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

Closed
opened 2026-04-30 18:51:00 +00:00 by claude-desktop · 1 comment
Collaborator

User story

As an operator, I want a tidy right-hand topbar cluster: a search button to foreshadow ⌘K, a notifications bell that surfaces stalled tasks and dead-letters, a recognisable repo picker, a compact connection pill, and an avatar dropdown that owns the "user, theme, logout" trio.

Acceptance criteria

⌘K trigger button

  • New button in the topbar utility cluster. Renders the kbd shortcut hint (⌘K on Mac, Ctrl K elsewhere) inside a rounded-compact border border-border chip.
  • Click is a no-op for now (placeholder until #570 ships the palette). Toast "Command palette coming soon (#570)" so operators don't think it's broken.

Notifications bell

  • New Bell icon button next to the ⌘K chip. Subscribes to the existing /events feed and counts envelopes whose type matches flow:dead-letter, pipeline_stage{state:"failure"}, or any error-shaped payload over the last 24 h.
  • When count > 0, render an absolute-positioned red badge with the count (max 99+).
  • Click opens a right-side <Drawer title="Notifications"> with a chronological list. Each row: source, timestamp, summary, link to the offending repo / issue / PR.
  • Dismiss-all button at the top clears the badge counter (client-side localStorage-stamped seen-at).

RepoSelector cosmetic refresh

  • Replace the glyph with a lucide FolderGit2 icon.
  • When a single repo is active, render the repo name (e.g. claude-hooks) instead of All. When multiple repos are selected, render <icon> N repos.

Connection pill compact mode

  • When connState === "live" and the viewport is < lg, render the pill as a 6 px green dot only (no text). On lg+, keep the current label.
  • connecting / disconnected states keep their current label-bearing pill (operator needs the context).

Avatar dropdown

  • Replace the inline charles | Logout | ThemeToggle cluster with a single avatar button.
  • Avatar uses the operator's Forgejo avatar URL when available (resolve via whoami + Forgejo /users/<login> lookup; fallback to a deterministic initials chip — CH for charles).
  • Click opens a Base UI <DropdownMenu> anchored bottom-right of the avatar:
    • User card: avatar + login + a small "Operator" chip.
    • Theme switcher (radio: Auto / Dark / Light).
    • External links: Open Forgejo profile, Open docs.
    • Footer: red Logout action (POSTs to /logout).
  • Drop the existing inline ThemeToggle, the <form action="/logout">, and the username <span>.

Out of scope

  • Persisting "seen" state across browsers.
  • Notification grouping / filtering (raw chronological list is fine).
  • Avatar uploads.

References

  • Source: apps/web/src/components/app-shell.tsx, repo-selector.tsx, conn-pill.tsx, theme-toggle.tsx.
  • Spec: specs/topbar-nav-overhaul.md § P2.
## User story As an operator, I want a tidy right-hand topbar cluster: a search button to foreshadow `⌘K`, a notifications bell that surfaces stalled tasks and dead-letters, a recognisable repo picker, a compact connection pill, and an avatar dropdown that owns the "user, theme, logout" trio. ## Acceptance criteria ### `⌘K` trigger button - [ ] New button in the topbar utility cluster. Renders the kbd shortcut hint (`⌘K` on Mac, `Ctrl K` elsewhere) inside a `rounded-compact border border-border` chip. - [ ] Click is a no-op for now (placeholder until #570 ships the palette). Toast `"Command palette coming soon (#570)"` so operators don't think it's broken. ### Notifications bell - [ ] New `Bell` icon button next to the `⌘K` chip. Subscribes to the existing `/events` feed and counts envelopes whose `type` matches `flow:dead-letter`, `pipeline_stage{state:"failure"}`, or any `error`-shaped payload over the last 24 h. - [ ] When count > 0, render an absolute-positioned red badge with the count (max `99+`). - [ ] Click opens a right-side `<Drawer title="Notifications">` with a chronological list. Each row: source, timestamp, summary, link to the offending repo / issue / PR. - [ ] Dismiss-all button at the top clears the badge counter (client-side `localStorage`-stamped seen-at). ### RepoSelector cosmetic refresh - [ ] Replace the `⊕` glyph with a lucide `FolderGit2` icon. - [ ] When a single repo is active, render the repo name (e.g. `claude-hooks`) instead of `All`. When multiple repos are selected, render `<icon> N repos`. ### Connection pill compact mode - [ ] When `connState === "live"` and the viewport is < `lg`, render the pill as a 6 px green dot only (no text). On `lg`+, keep the current label. - [ ] `connecting` / `disconnected` states keep their current label-bearing pill (operator needs the context). ### Avatar dropdown - [ ] Replace the inline `charles | Logout | ThemeToggle` cluster with a single avatar button. - [ ] Avatar uses the operator's Forgejo avatar URL when available (resolve via `whoami` + Forgejo `/users/<login>` lookup; fallback to a deterministic initials chip — `CH` for `charles`). - [ ] Click opens a Base UI `<DropdownMenu>` anchored bottom-right of the avatar: - User card: avatar + login + a small "Operator" chip. - Theme switcher (radio: Auto / Dark / Light). - External links: `Open Forgejo profile`, `Open docs`. - Footer: red `Logout` action (POSTs to `/logout`). - [ ] Drop the existing inline `ThemeToggle`, the `<form action="/logout">`, and the username `<span>`. ## Out of scope - Persisting "seen" state across browsers. - Notification grouping / filtering (raw chronological list is fine). - Avatar uploads. ## References - Source: `apps/web/src/components/app-shell.tsx`, `repo-selector.tsx`, `conn-pill.tsx`, `theme-toggle.tsx`. - Spec: `specs/topbar-nav-overhaul.md` § P2.
Collaborator

🤖 Auto-assigned to boss (heuristic: area:dashboard + body 2877 bytes (> 2 KB) — boss (heavy)). Reply /unassign to reroute.

🤖 Auto-assigned to **boss** (heuristic: area:dashboard + body 2877 bytes (> 2 KB) — boss (heavy)). Reply `/unassign` to reroute.
Sign in to join this conversation.
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.

Reference
charles/claude-hooks#581
No description provided.