Skip to content

feat(connections): persist custom sidebar ordering - #768

Open
2160039878-cyber wants to merge 1 commit into
libredb:mainfrom
2160039878-cyber:feat/connection-order-748
Open

feat(connections): persist custom sidebar ordering#768
2160039878-cyber wants to merge 1 commit into
libredb:mainfrom
2160039878-cyber:feat/connection-order-748

Conversation

@2160039878-cyber

@2160039878-cyber 2160039878-cyber commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Saved connections can now be dragged into a custom sidebar order using a dedicated handle. The same handle supports Alt+Up / Alt+Down, keeps keyboard focus after moving, and describes both interactions to assistive technology.

Closes #748.

Changes Made

  • Persist a browser-local ordered ID list using the existing local-storage helpers. Reordering does not edit connection records, credentials or the active connection, including administrator-managed connections.
  • Apply saved order before rendering; ignore missing/invalid IDs and append new connections in their original order. Refresh mounted lists when another tab changes the preference.
  • Accept drops only from the current list, preserve normal edit/delete/select behavior, and retain the previous order if storage cannot save it.
  • Favorites No way to mark a connection as a favorite #694 / feat(connections): persist favorites above the connection list #754 has not landed on this base. This change does not add or change a favorites field; when integrating it, the existing favorites partition must operate on the ordered list so each group's order remains independent of its pin status.

Testing

  • TDD: four ordering regressions failed before implementation.
  • bun run test:components --pass-with-no-tests -t 'ConnectionsList': 17 passed through the project's isolated component groups. Covers drag, keyboard controls/focus, remount persistence, invalid preferences, external/cancelled drops, cross-tab updates, storage failure and existing connection actions.
  • Passed locally: format, lint, typecheck, knip, readme:check, chart:check, channels:showcase:check, security:check, build, build:lib, attw.
  • Builds used clean commit 8947de38448016a637d974a9f50590c4ea574209.
  • Browser component smoke verified keyboard reordering, retained active connection/focus and persistence after reload. A follow-up Playwright CLI smoke in headless Microsoft Edge exercised the actual component with HTML5 drag-and-drop: dragging Production ahead of Development delivered dragstart, prevented dragover, drop and dragend, stored the new ID order, kept Development active and retained focus on the dragged handle. Reload preserved the order. The in-app browser tool's earlier attempt had not delivered a drop; the Edge smoke completed that missing validation. This used a synthetic component fixture, not a live database.
  • Full local bun run test, coverage and app E2E were not run: this Windows host lacks Helm/chart dependencies and working Docker; existing SQLite cleanup also encounters Windows file locks. CI must verify the full suite and 100% line coverage.

Environment: Windows, Node.js 24.18.1, Bun 1.4.2.

Checklist

  • Claimed and linked the issue, reviewed the diff, updated documentation and added regression tests.
  • Required CI test job passes the 100% line-coverage gate.

Additional Notes

AI-assisted implementation and validation using Codex. Order is a browser preference, not a cross-device server-synced setting. No dependency, connection-schema or server-storage changes.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to reorder saved connections

1 participant