Skip to content

fix(chat): sidenav collapsed-mode polish — vertical icons, thread initials, right-click context menu#287

Merged
blove merged 1 commit into
mainfrom
claude/sidenav-collapsed-polish
May 13, 2026
Merged

fix(chat): sidenav collapsed-mode polish — vertical icons, thread initials, right-click context menu#287
blove merged 1 commit into
mainfrom
claude/sidenav-collapsed-polish

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

Three small fixes for the chat sidenav collapsed (56px) mode.

1. Top-bar icons stack vertically

The New-thread [+] and the collapse/expand chevron sat side-by-side via justify-content: space-between inside a 56px column, leaving awkward gaps. The collapsed-mode rule now switches the top bar to flex-direction: column with a 4px gap. The expanded/drawer presentation is unchanged.

2. Thread rows show a first-letter initial

Previously the title text was hidden in collapsed mode and nothing took its place — the strip looked empty aside from the active-row highlight. Each row now renders a 28px circular initial (uppercase, surrogate-pair-safe via Array.from), hidden in expanded/drawer mode and revealed in collapsed mode. The row button also carries a title attribute so the full thread label appears as a native tooltip on hover.

3. Right-click context menu on rows

The kebab is hidden in collapsed mode — a 28px target inside a 56px column was cramped. Right-clicking any thread row now opens the same overflow menu anchored at the cursor (and suppresses the OS context menu) in expanded, collapsed and drawer modes alike — a power-user convenience that also restores access to row actions in collapsed mode.

chat-overflow-menu gained an anchorPos: {x, y} input that takes precedence over the element anchor when set. The thread-list keeps the two anchor sources mutually exclusive via paired signals.

Test plan

  • npx nx test chat — 618 tests pass (84 files), including 4 new tests covering the contextmenu open path, the no-adapter preventDefault path, initial rendering, and the empty-title ? fallback.
  • npx nx lint chat — passes
  • npx nx build chat — passes
  • npx nx build examples-chat-angular — passes
  • npm run generate-api-docs — regenerated (185 chat entries)
  • Manual smoke in the chat example at the collapsed sidenav width

…tials, right-click context menu

Three small fixes to the chat sidenav when in `collapsed` (56px) mode:

1. Top-bar icons stack vertically. The New-thread `[+]` and collapse/expand
   chevron previously sat side-by-side inside a 56px column via
   `justify-content: space-between`, producing awkward proportions. The
   collapsed-mode rule now switches the top bar to `flex-direction: column`
   with even gap.

2. Thread rows show a first-letter initial. In collapsed mode the title
   label is hidden and there was nothing in its place — the strip looked
   empty aside from the active-row highlight. Each row now renders a 28px
   circular initial (uppercase, surrogate-pair-safe via `Array.from`),
   hidden in expanded/drawer mode and revealed in collapsed mode. The row
   button carries a `title` attribute so the full thread label appears as a
   native tooltip on hover.

3. Right-click context menu on rows. The kebab is hidden in collapsed mode
   (28px target in a 56px column was cramped). Right-clicking any thread
   row now opens the same overflow menu anchored at the cursor — and
   suppresses the OS context menu — in expanded, collapsed and drawer
   modes alike. `chat-overflow-menu` gained an `anchorPos: {x, y}` input
   that takes precedence over the element `anchor` when set; the
   thread-list keeps the two anchor sources mutually exclusive via paired
   signals.

Tests cover both the contextmenu open path and the no-adapter
preventDefault path, plus initial rendering and the empty-title "?"
fallback.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Building Building Preview, Comment May 13, 2026 3:30am

Request Review

@blove blove merged commit e45c7d9 into main May 13, 2026
13 of 14 checks passed
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.

1 participant