feat(website,backend): notification bell for sequences awaiting review [WIP]#6841
Draft
corneliusroemer wants to merge 3 commits into
Draft
feat(website,backend): notification bell for sequences awaiting review [WIP]#6841corneliusroemer wants to merge 3 commits into
corneliusroemer wants to merge 3 commits into
Conversation
Add a notification bell to the top-right navigation that surfaces sequences awaiting review and deep-links straight to each group's review page, collapsing the "select organism -> submit -> review" path down to a single click (see #6669). Backend: - New GET /my/review-counts endpoint (NotificationController), scoped to the authenticated user's groups (super users see all). - SubmissionDatabaseService.getReviewCounts() counts unreleased entries (released_at IS NULL) grouped by organism and group, querying the base sequence_entries table to avoid the preprocessed-data join. The count therefore includes still-processing entries; documented on ReviewCount / getReviewCounts, and narrowable to PROCESSED later. - Partial index (V1.34) backing the query. - GetReviewCountsEndpointTest covering auth, empty, per-group counts and non-member isolation. Website: - NotificationBell island: single aggregated 30s-polled call, headless Menu drawer with per-organism/group rows deep-linking via routes.userSequenceReviewPage, button disabled until hydration. - Muted grey bell when nothing is pending, primary bell + red badge when there is; only rendered when logged in to avoid layout shift. - Wired endpoint + zod schemas; added groupManagementClientHooks. Docs: architecture_docs/notification-bell-review-counts.md, including a deferred localStorage-based dismissal design and follow-ups. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude generated prototype
No integration test yet.
Resolves #6670
Claude generated description
What & why
New users don't discover the submission approval step. After uploading, sequences sit unapproved (not released) and users are surprised they don't appear (see #6669). Reaching the review page today takes several clicks and requires first selecting the right organism, then Submit, then Review — 2–3 extra clicks if you start on the wrong organism, and new users don't know the path exists.
This PR adds a notification bell to the top-right nav (a familiar web pattern) that collapses this to one click: click the bell → drawer lists organism/group pairs with unapproved submissions → click a row → deep-link straight to that group's review page.
WIP / draft — opened for preview testing.
Behaviour
routes.userSequenceReviewPage.Backend
GET /my/review-countsendpoint (NotificationController, root-scoped likeAdminDashboardController—SubmissionControlleris locked to/{organism}), scoped to the authenticated user's groups (super users see all).SubmissionDatabaseService.getReviewCounts()counts unreleased entries (released_at IS NULL) grouped by organism + group, querying the basesequence_entriestable to avoid the preprocessed-data join and stay cheap.ReviewCount/getReviewCounts; narrowable toStatus.PROCESSEDlater if exactness is wanted.V1.34(ON sequence_entries (organism, group_id) WHERE released_at IS NULL) backs the query.GetReviewCountsEndpointTestcovers unauthorized / empty / per-group counts / non-member isolation.Website
NotificationBell.tsxisland (wrapped inwithQueryProvider): headless-uiMenudrawer reusing theOrganismNavigationpattern; button disabled until hydration to avoid Playwright races.backendApi.ts/types/backend.ts; addedgroupManagementClientHooksfor group-name labels.Navigation.astro, gated onisLoggedIn.Not in this PR (documented as follow-ups)
SandwichMenu.latestSubmittedAt) is written up inarchitecture_docs/notification-bell-review-counts.md.Tests
GetReviewCountsEndpointTest(4 tests) pass.check-types,format, and full unit suite (694 tests) pass.Not yet visually verified in a running browser — hence preview label for manual testing.
🤖 Generated with Claude Code
🚀 Preview: https://review-notification.loculus.org