Skip to content

fix(chat): three smoke-test polish issues — checkpoint pill, destructive button, section headers#285

Merged
blove merged 1 commit into
mainfrom
claude/smoke-quick-wins
May 13, 2026
Merged

fix(chat): three smoke-test polish issues — checkpoint pill, destructive button, section headers#285
blove merged 1 commit into
mainfrom
claude/smoke-quick-wins

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

Three independent UI polish fixes surfaced by smoke testing the chat library.

1. Checkpoint marker hover pill misplaced

Root cause: .chat-checkpoint-marker__pill is position: absolute with top: 50%, but the marker's :host had no position declaration. The pill therefore cascaded up to the nearest positioned ancestor (.chat-message__layout) and rendered ~250px below the dot it was supposed to anchor to.

Fix: add position: relative to the marker's :host block so the pill's top: 50% resolves against the host's tight bounding box around the dot. New spec asserts getComputedStyle(host).position === 'relative'.

2. Destructive confirm dialog button — poor contrast

Root cause: the destructive variant used background: var(--ngaf-chat-error-text). In dark mode that token resolves to #fca5a5 (light pink). Combined with color: #fff the button rendered as unreadable white-on-pink.

Fix: introduce a dedicated --ngaf-chat-destructive token defaulting to a saturated red on both themes (#dc2626 light / #ef4444 dark). Declared in chat.css (:root, prefers-color-scheme: dark, [data-ngaf-chat-theme="dark"]) and the parallel JS fallbacks in chat-tokens.ts (LIGHT_TOKENS, DARK_TOKENS). The destructive class switches to the new token and gains a subtle filter: brightness(1.1) on hover. Spec guards against re-introducing the error-text token.

3. Sidenav section headers (Projects / Recent / Archived) — lighter + smaller

Reduce visual prominence so the labels sit clearly below thread row text instead of competing with it. Both .chat-sidenav__threads-heading (used for Projects and Recent) and .chat-sidenav__archived-heading (the collapsible Archived header) now use font-size: 11px and letter-spacing: 0.4px, keeping color: var(--ngaf-chat-text-muted) so the color tracks the theme.

Test plan

  • npx nx test chat — 84/84 files pass, 616/616 tests pass
  • npx nx build chat — succeeds
  • npx nx lint chat — succeeds
  • npm run generate-api-docs — chat docs regenerated cleanly (185 entries)

…ive button, section headers

1. Checkpoint marker hover pill position
   Root cause: `.chat-checkpoint-marker__pill` is `position: absolute`
   with `top: 50%`, but the marker's `:host` had no `position`. The pill
   cascaded up to the nearest positioned ancestor
   (`.chat-message__layout`) and landed ~250px below the dot.
   Fix: set `position: relative` on the host so the pill anchors to the
   dot's own bounding box. Spec asserts `getComputedStyle(host).position`.

2. Destructive confirm dialog button — poor contrast
   Root cause: the destructive variant used
   `background: var(--ngaf-chat-error-text)`. In dark mode that token
   resolves to `#fca5a5` (light pink) — paired with `color: #fff` this
   gave unreadable white-on-pink contrast.
   Fix: introduce `--ngaf-chat-destructive` (`#dc2626` light /
   `#ef4444` dark) in both `chat.css` and the JS `CHAT_HOST_TOKENS`
   fallbacks, and switch the destructive button to that token. Adds a
   subtle `filter: brightness(1.1)` on hover. Spec guards against
   regressing to the error-text token.

3. Sidenav section headers (Projects / Recent / Archived) — lighter + smaller
   Reduce visual prominence so they sit below thread row text:
   `font-size: 11px`, `letter-spacing: 0.4px`. Both
   `.chat-sidenav__threads-heading` (Projects, Recent) and
   `.chat-sidenav__archived-heading` (Archived) get the same treatment
   so all three section labels render identically.
@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 Ready Ready Preview, Comment May 13, 2026 3:28am

Request Review

@blove blove merged commit f2d4746 into main May 13, 2026
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