feat(nav): topbar utility cluster — avatar menu, notifications bell, ⌘K stub, repo + conn polish #607

Merged
code-lead merged 1 commit from boss/581 into main 2026-04-30 21:09:02 +00:00
Collaborator

Closes #581.

Summary

  • AvatarMenu (Base UI) replaces the inline username | Logout | ThemeToggle cluster: Forgejo avatar with deterministic two-letter fallback, operator card, theme picker, profile/docs links, destructive logout footer.
  • NotificationsBell + Drawer subscribes to a new useNotificationsStore fed via useSSE's onmessage side-effect — every route's stream feeds the bell with no per-route wiring. Surfaces dead-letters, stage failures, and error envelopes over the rolling 24h window. "Dismiss all" stamps seenAt in localStorage.
  • CommandPaletteTrigger placeholder renders the ⌘K chip with platform-aware kbd hint (⌘ on Mac, Ctrl elsewhere); click toasts "coming soon" until #570 ships the real palette.
  • RepoSelector swaps the glyph for lucide FolderGit2; trigger label flips between repo name (1 selected), N repos (many), and All (none).
  • ConnPill collapses to a 6 px green dot below lg when state is live; full pill on lg+ and always for reconnecting/disconnected.
  • /whoami surfaces avatar_url, profile_url, forge_base_url so the avatar menu and notification links resolve without extra round-trips.

Test plan

  • Topbar renders avatar (or initials fallback) with menu opening on click
  • Bell badge increments on simulated flow:dead-letter event; "Dismiss all" zeroes it
  • ⌘K trigger fires the toast and shows ⌘ on macOS, Ctrl elsewhere
  • RepoSelector trigger label and FolderGit2 icon
  • ConnPill flips to dot under lg, full pill on lg+
  • just qa clean (typecheck + Biome + 2622 server tests)
Closes #581. ## Summary - **AvatarMenu** (Base UI) replaces the inline `username | Logout | ThemeToggle` cluster: Forgejo avatar with deterministic two-letter fallback, operator card, theme picker, profile/docs links, destructive logout footer. - **NotificationsBell** + Drawer subscribes to a new `useNotificationsStore` fed via `useSSE`'s onmessage side-effect — every route's stream feeds the bell with no per-route wiring. Surfaces dead-letters, stage failures, and error envelopes over the rolling 24h window. "Dismiss all" stamps `seenAt` in localStorage. - **CommandPaletteTrigger** placeholder renders the ⌘K chip with platform-aware kbd hint (⌘ on Mac, Ctrl elsewhere); click toasts "coming soon" until #570 ships the real palette. - **RepoSelector** swaps the `⊕` glyph for lucide `FolderGit2`; trigger label flips between repo name (1 selected), `N repos` (many), and `All` (none). - **ConnPill** collapses to a 6 px green dot below `lg` when state is `live`; full pill on `lg`+ and always for `reconnecting`/`disconnected`. - `/whoami` surfaces `avatar_url`, `profile_url`, `forge_base_url` so the avatar menu and notification links resolve without extra round-trips. ## Test plan - [ ] Topbar renders avatar (or initials fallback) with menu opening on click - [ ] Bell badge increments on simulated `flow:dead-letter` event; "Dismiss all" zeroes it - [ ] ⌘K trigger fires the toast and shows ⌘ on macOS, Ctrl elsewhere - [ ] RepoSelector trigger label and FolderGit2 icon - [ ] ConnPill flips to dot under `lg`, full pill on `lg`+ - [ ] `just qa` clean (typecheck + Biome + 2622 server tests)
feat(nav): topbar utility cluster — avatar menu, notifications bell, ⌘K stub, repo + conn polish
All checks were successful
qa / dockerfile (pull_request) Successful in 6s
qa / qa (pull_request) Successful in 1m56s
fbc6a6ead6
Closes #581.

- AvatarMenu (Base UI) replaces the inline `username | Logout | ThemeToggle`
  cluster: Forgejo avatar (with deterministic two-letter fallback), operator
  card, theme switcher, profile/docs links, destructive logout footer.
- NotificationsBell + Drawer subscribes to a new `useNotificationsStore`
  fed by `useSSE`'s onmessage side-effect, so every route's stream feeds
  the bell with no per-route wiring. Surfaces dead-letters, stage failures,
  and error envelopes over the rolling 24h window. "Dismiss all" stamps
  `seenAt` in localStorage.
- CommandPaletteTrigger placeholder renders the ⌘K chip with platform-
  aware kbd hint (⌘ on Mac, Ctrl elsewhere); click toasts a "coming soon"
  pointer until #570 ships the real palette.
- RepoSelector: lucide `FolderGit2` icon replaces the `⊕` glyph; trigger
  shows repo name for 1 selected, "N repos" for many, "All" for none.
- ConnPill: compact 6 px green dot below `lg` when state is `live`; full
  labelled pill on `lg`+ and always for `reconnecting`/`disconnected`.
- /whoami: surfaces `avatar_url`, `profile_url`, `forge_base_url` so the
  avatar menu and notification links resolve without extra round-trips.
- ThemeToggle component + test deleted; the segmented theme picker now
  lives inside the avatar menu.
reviewer approved these changes 2026-04-30 21:08:07 +00:00
reviewer left a comment

All five AC clusters met and CI green (#2634). The compact-mode conn-pill, notifications store, ⌘K stub, and avatar menu are correct.

  • behavior (nit): AvatarMenu is gated on user !== null, so the theme picker is unreachable before /whoami resolves and permanently gone on any auth-disabled deployment — old ThemeToggle was unconditional. Fine for always-auth setups; worth a follow-up if auth-off ever ships.
  • test-gap (nit): eventToNotification (three-branch event mapping) and the selectors in notifications-store.ts are exported with a _resetNotificationsForTest helper but no spec was shipped — consider adding one alongside.
All five AC clusters met and CI green (#2634). The compact-mode conn-pill, notifications store, ⌘K stub, and avatar menu are correct. - **behavior** (nit): `AvatarMenu` is gated on `user !== null`, so the theme picker is unreachable before `/whoami` resolves and permanently gone on any auth-disabled deployment — old `ThemeToggle` was unconditional. Fine for always-auth setups; worth a follow-up if auth-off ever ships. - **test-gap** (nit): `eventToNotification` (three-branch event mapping) and the selectors in `notifications-store.ts` are exported with a `_resetNotificationsForTest` helper but no spec was shipped — consider adding one alongside.
code-lead deleted branch boss/581 2026-04-30 21:09:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!607
No description provided.