feat(cockpit-langgraph): redesign 7 langgraph examples' bespoke UI (encapsulated CSS, sky-blue accent)#777
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…capsulated CSS, --ds-* + semantic status)
…capsulated CSS on --ds-*)
…ated CSS, real :hover)
…ed CSS on --ds-*)
…ated CSS on --ds-*)
…t form (encapsulated CSS on --ds-*)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 2m 37s —— View job Code Review
SummaryThe approach is solid: all 7 components correctly encapsulate styles on Issues1. Specificity bug — active row loses accent on hover (
.row--active:hover {
background: var(--ds-accent-surface, rgba(100, 195, 253, 0.08));
}2. Missing Both action buttons lack 3. Both components declare Looks Good
|
| .row--active { | ||
| background: var(--ds-accent-surface, rgba(100, 195, 253, 0.08)); | ||
| border-color: var(--ds-accent-border, rgba(100, 195, 253, 0.25)); | ||
| } |
There was a problem hiding this comment.
Specificity bug: hovered active row loses accent background
.row:hover has specificity (0,2,0) (one class + one pseudo-class) which beats .row--active's (0,1,0) (one class). When the user hovers the currently-selected checkpoint row, .row:hover wins and the accent-surface background is overwritten by --ds-surface-tinted.
persistence.component.ts already handles this correctly with a .thread--active:hover override. Same fix needed here:
| .row--active { | |
| background: var(--ds-accent-surface, rgba(100, 195, 253, 0.08)); | |
| border-color: var(--ds-accent-border, rgba(100, 195, 253, 0.25)); | |
| } | |
| .row--active { | |
| background: var(--ds-accent-surface, rgba(100, 195, 253, 0.08)); | |
| border-color: var(--ds-accent-border, rgba(100, 195, 253, 0.25)); | |
| } | |
| .row--active:hover { | |
| background: var(--ds-accent-surface, rgba(100, 195, 253, 0.08)); | |
| } |
| <button | ||
| class="px-2 py-1 text-xs rounded bg-[var(--tplane-chat-surface-alt)] text-[var(--tplane-chat-text)] hover:bg-[var(--tplane-chat-surface-alt)] transition-colors" | ||
| class="btn" | ||
| title="Replay from this checkpoint" | ||
| (click)="replay(state, i)" | ||
| > |
There was a problem hiding this comment.
Missing type="button" on both Replay and Fork buttons. Without an explicit type, browsers default to type="submit". These buttons are not inside a <form> element so it doesn't fire a submission today, but it's fragile — if the template ever gains a wrapping form these will submit it unintentionally. All other new buttons in this PR (persistence, interrupts) correctly declare type="button".
| <button | |
| class="px-2 py-1 text-xs rounded bg-[var(--tplane-chat-surface-alt)] text-[var(--tplane-chat-text)] hover:bg-[var(--tplane-chat-surface-alt)] transition-colors" | |
| class="btn" | |
| title="Replay from this checkpoint" | |
| (click)="replay(state, i)" | |
| > | |
| <button | |
| type="button" | |
| class="btn" | |
| (click)="replay(state, i)" | |
| > |
| :host { | ||
| --st-done: #2ea567; | ||
| --st-active: #e0a850; | ||
| --st-error: #e0645a; | ||
| } | ||
| .panel { | ||
| padding: 1rem; |
There was a problem hiding this comment.
--st-error is defined here (and in step-pipeline.component.ts) but is never consumed — PipelineStep.status is 'pending' | 'active' | 'complete' with no error state, and neither template has an error branch. The variable is harmless dead code, but it's misleading (it implies an error state that doesn't exist in the durable-execution graph). Safe to remove from both files unless an error status is planned.
Summary
Applies the encapsulated-CSS-on-
--ds-*redesign (proven on the render examples, #759/#761) to the 7 langgraph examples whose bespoke UI was rendering unstyled — the same root cause: Tailwind utilities compile to zero rules in the embedded example builds, so anything not drawn by the pre-styled@threadplane/chatlibrary was unstyled. Accent = sky-blue--ds-accent.Audited scope (live, all 9 langgraph examples)
Only the affected ones are touched. streaming + deployment-runtime are pure library chat and were confirmed fine — left alone.
(mouseenter)/(mouseleave)JS hacks → real:hover)style=→ encapsulated classes)--tplane-chat-*→--ds-*)Notes
--st-*constants — the design system has no--ds-success/warning/errortokens.sidebarWidth="w-64"/"w-56"(Tailwind class names passed to an input that expects a CSS length) →"16rem"/"14rem".ViewPropsinputs preserved; only styling changed. Library components untouched.interruptswelcome-suggestion text kept byte-identical (e2e-asserted).Verification
nx run-many -t build); bespoke templates Tailwind-free (grep)Plan:
docs/superpowers/plans/2026-07-07-langgraph-examples-redesign.md🤖 Generated with Claude Code