Skip to content

feat(chat-sidenav): polish — icon rail collapsed, footer slots, primary/secondary CTA pills#399

Merged
blove merged 9 commits into
mainfrom
claude/sidenav-polish
May 17, 2026
Merged

feat(chat-sidenav): polish — icon rail collapsed, footer slots, primary/secondary CTA pills#399
blove merged 9 commits into
mainfrom
claude/sidenav-polish

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 17, 2026

Summary

Sub-project A of a two-part demo UX polish pass (user reviewed demo.cacheplane.ai/embed and flagged sidenav usability issues; sub-project B follows for chat-surface tweaks).

  • Minimized sidenav becomes an icon rail (actions-only). New chat / Search render as 32×32 icon-only rounded squares; threads/projects/archived sections hide. Tooltips on hover via native title attribute.
  • Footer gets two new ng-content slots: [sidenavFooterLeft] + [sidenavFooterRight]. Theme switcher lives in the right slot (consumer-provided by the canonical demo). Expand/collapse toggle moves from the topbar into the right slot's last child (lib-rendered).
  • New chat = primary CTA pill (filled with --ngaf-chat-primary token, biggest button in sidenav, rounded 9999px, matches the chat-input send button family).
  • New project = secondary pill (muted dark fill, 1px border, smaller text, same radius family).
  • Legacy [sidenavAccount] slot kept for back-compat (visually folded into footer-right via :has() CSS).

Files changed

  • libs/chat/src/lib/compositions/chat-sidenav/chat-sidenav.component.ts — template: new footer with slot pair, expand toggle moved into footer, topbar collapse button removed
  • libs/chat/src/lib/compositions/chat-sidenav/chat-sidenav.component.spec.ts — 5 new vitest cases; updated existing tests that referenced removed selectors
  • libs/chat/src/lib/styles/chat-sidenav.styles.ts — footer + toggle CSS, New chat primary-pill rules, collapsed-mode polish (hide non-essential sections, icon-only buttons), specificity fix for action--new
  • libs/chat/src/lib/styles/chat-project-list.styles.ts — New project secondary-pill styling
  • libs/chat/src/lib/primitives/chat-project-list/chat-project-list.component.spec.ts — 1 new vitest case for the secondary-pill CSS
  • examples/chat/angular/src/app/shell/demo-shell.component.{ts,css} — theme-switcher button projected into [sidenavFooterRight]

Test plan

  • 6 new vitest cases (5 chat-sidenav + 1 chat-project-list); existing tests updated to match removed legacy .chat-sidenav__action--collapse selector
  • 751/751 chat lib tests pass (full suite)
  • npx nx build chat + npx nx build examples-chat-angular both succeed
  • Live verification on http://localhost:4200/embed:
    • Expanded mode: New chat = white primary pill (dark theme), New project = gray secondary pill, search input-styled, RECENT list, footer right-aligned with theme + collapse toggle
    • Collapsed mode: 32×32 icon-only New chat, search, theme, expand toggle; threads/projects hidden
    • Theme toggle: clicking the sun icon flips light/dark across the whole demo
  • CI green

Known follow-up (out of scope, not a blocker)

The "+ New project" button is rendered inside <chat-project-list> which is hidden in collapsed mode. As a result, collapsed mode does not show a "+ New project" icon — only New chat, Search, theme, and expand. New chat being the bigger CTA, projects being organizational (less frequent), this is defensible for v1. If you want the New project icon visible in collapsed mode, the architectural fix is to hoist the button to the top-level sidenav template (alongside New chat). Flagging as a follow-up.

Sub-project B (next PR)

  • "More prompts" dropdown width + visuals
  • Scroll fade above chat input
  • Message-actions-bar padding

Spec: docs/superpowers/specs/2026-05-17-sidenav-polish-design.md
Plan: docs/superpowers/plans/2026-05-17-sidenav-polish.md

🤖 Generated with Claude Code

blove and others added 9 commits May 16, 2026 22:22
Reworks minimized state into an icon rail, adds footer slot pair
(sidenavFooterLeft + sidenavFooterRight), promotes New chat to a
primary-CTA pill matching chat-input button family, tones New project
down to a muted secondary pill, relocates the expand toggle into the
footer's right slot. Demo footer-right gets a theme switcher.

Sub-project A of a two-part polish pass; sub-project B (chat-surface)
ships separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks: footer slots + toggle relocation, footer/toggle CSS, New chat
primary CTA pill, New project secondary pill, demo theme switcher into
right slot, collapsed-mode polish, build verify + PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…se toggle

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on-only buttons

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two CSS bugs caught in live verification:

1. The generic .chat-sidenav__action rule is defined AFTER the
   .chat-sidenav__action--new pill rule, and they have equal
   specificity (one class each) — so the generic transparent
   background + 8px radius + 8px-12px padding was winning the
   cascade and stomping the pill style. Fixed by adding a
   higher-specificity .chat-sidenav__action.chat-sidenav__action--new
   block AFTER the generic rule that re-asserts the pill properties.

2. .chat-sidenav__footer-right needed margin-left: auto so the
   right-side container pushes to the right edge of the footer when
   the left container is empty (justify-content: space-between has
   no effect with only one flex child).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 17, 2026 5:26am

Request Review

@blove blove merged commit 25a57b0 into main May 17, 2026
18 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