Skip to content

feat(connections): persist favorites above the connection list - #754

Closed
2160039878-cyber wants to merge 2 commits into
libredb:mainfrom
2160039878-cyber:feat/favorite-connections-694
Closed

feat(connections): persist favorites above the connection list#754
2160039878-cyber wants to merge 2 commits into
libredb:mainfrom
2160039878-cyber:feat/favorite-connections-694

Conversation

@2160039878-cyber

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

Copy link
Copy Markdown
Contributor

Description

Each connection now has a star toggle. Starred connections appear in a Favorites group above the remaining connections, with the original order preserved within both groups. The preference survives reload and works for administrator-managed connections without saving a copy of their configuration.

Type of Change

  • New feature (non-breaking)
  • Documentation and test updates

Changes Made

  • Persist favorite IDs through the existing storage facade and collection mechanism. Server mode migrates, pulls and pushes the preference under the authenticated user's identity; an absent server preference restores an empty list.
  • Use an SSR-stable external-store subscription so the desktop/mobile and embedded connection lists share updates. A star click does not select or connect to a database. Failed writes leave the preference unchanged and show an error.
  • Keep Favorites in the existing compact badge style. Non-favorite order, connection settings, managed edit/delete restrictions and the empty-list action are preserved.
  • Isolate ConnectionsList's tests because the admin suites replace the storage facade. The API tests now read the real collection allowlist, so the new preference must actually be accepted by the route.

Testing

  • TDD: four new component cases failed against the original source.
  • bun run test:components --pass-with-no-tests -t 'ConnectionsList|ConnectionItem|useStorageSync': 56 matching tests passed, 0 failed.
  • bun run test:unit --pass-with-no-tests -t 'storage facade:': 43 passed, 0 failed.
  • bun run test:api --isolate --pass-with-no-tests -t '/api/storage': 22 passed, 0 failed. The first non-isolated attempt passed those 22 cases but hit six unrelated module-mock import errors; Bun's per-file isolation removes that interference.
  • Covers remount persistence, managed connections, multiple mounted lists, stable ordering, all-favorite and empty lists, server rendering, storage failures, malformed stored data, migration, pull/push and authenticated user scoping.
  • Passed locally: format, lint, typecheck, knip, readme:check, chart:check, channels:showcase:check, security:check, production build, build:lib and attw.
  • Full local tests / coverage and E2E were not completed: the Windows host lacks Helm/chart dependencies, Docker is unavailable, and existing SQLite cleanup tests encounter Windows file-lock errors. A broader storage-name filter also selected three Helm tests that could not run locally. Official Linux CI verifies the full suite and 100% line-coverage gate.

Environment: Windows, Node.js 24.18.1, Bun 1.4.2. Both builds ran from a clean checkout of the submitted commit with real local dependencies.

Checklist

  • Reviewed the diff and followed existing storage and component patterns.
  • Added regression tests and updated README.
  • Required CI test job passed the 100% line-coverage gate; all 20 checks passed on a814c96 (2 normal fork skips). Verified CI run.

Additional Notes

AI-assisted implementation and test execution using Codex. No new dependencies, provider changes or database schema migrations. The new collection contains only connection IDs; connection settings and credentials are not copied or changed by favoriting.

@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!

@cevheri cevheri added the loop:needs-moderator-action Flagged by the maintainer loop: suspicious content or a decision only a human can make label Sep 9, 2026
@cevheri

cevheri commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closing as an automated bulk submission that this project cannot absorb.

This account opened 35 pull requests here in under 25 hours, a median of 17 minutes apart and four inside the same 13 seconds. That is machine cadence, not a person working through a backlog, and 35 of its 41 pull requests across all of GitHub targeted this one repository. On the earlier ones I did review, the review threads were never answered and review was never re-requested, so nothing closed out.

This pull request never reached review, and the account is now blocked at the organization level, so it cannot move forward.

If a person wants to contribute here: open one issue, wait for assignment, and send one pull request at a time.

@cevheri cevheri closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loop:needs-moderator-action Flagged by the maintainer loop: suspicious content or a decision only a human can make

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants