Repository navigation
fix(web): Glass and Inlet polish, finished threads pulse, petals in the tab strip - #335
Conversation
When a sidebar status mark turns from Working to Done while the Done dot is on screen, two rings pulse off the dot and a petal's mascot in the same row hops once. Every theme; reduced motion skips it. Each thread's last mark outlives the row, since a finished row moves group, but only for 1.5s, so a row unmounted while working does not celebrate later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The composer's context strip drops upstream's new surface-glass fill, which painted a band behind the pills under the desktop glass. - The music strip and its open button take a white wash and the popups' glass edge instead of a grey slab mixed from the translucent panel. - The Code / Chat switch's chosen mode wears the selected glass. - The Bots header joins the Threads header on the quiet ink. - The petal Threads panel drops the card tint other right panels keep, so it matches the sidebar; the panel is stamped from React, not :has(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NoahHendrickson
left a comment
There was a problem hiding this comment.
Code-quality review of 2d7f10d87f13e72418c4a2ffbcdde9671bfd4a5b. Not approving yet. Two of the bar's presumptive blockers apply here, and fixing the first one also deletes about 40 lines.
1. theme.custom.glass-surfaces.css goes past 1k lines (926 → 1007), and the lines that push it over are a copy
The new Code / Chat block (lines ~823–864) is the fork-collapsed-thread-tabs selected-glass recipe a second time: the same base fill and shadow, the same ::before glint, the same ::after dark edge, and the same vibrancy 6% override. Only two things differ: border-color: transparent, and pseudo insets moved out 1px to make up for the border. Code judo: widen the four existing collapsed-tab selectors from [data-fork-thread-tabs] :is(...) to :is([data-fork-thread-tabs], [data-fork-sidebar-mode-tabs]) :is(...), and keep a single small delta rule for the border and inset. That removes ~40 duplicated lines, puts the file back under 1k, and means the next change to selected glass can't drift between the two copies. The forkGlass3d guard regex already allows both markers, so the guard doesn't need to change.
The music strip's ::before (line 336) is the same kind of problem: it's a verbatim copy of the popups' glint ring (padding: 0.5px, the 22% → 0 → 10% gradient, the content-box mask). Join the popup rule's selector list, or move that ring into a custom property beside --fork-glass-halo / --fork-glass-sheen, which this rule already uses for the other two layers. Don't add a third copy of the mask recipe.
2. The PR ships two unrelated changes
The Glass surface fixes are theme work. The Done celebration is a new behaviour in every theme with its own manifest entry, a module-level state map, and DOM animation. Reviewing, reverting, or bisecting either one now means taking the other along. CLAUDE.md says not to mix unrelated changes. Unless both came from one request, please split the celebration into its own PR.
3. doneCelebration.ts: the transition model is loosely typed and the effect measures layout before it knows it has to
- Measure after the cheap check, not before.
if (kind !== "done" || (element !== null && isOnScreen(element)))runscheckVisibility+getBoundingClientRect+ agetComputedStylewalk up every ancestor for every Done mark that mounts or re-renders into Done. That covers opening the sidebar, a thread switch, or a group regroup with a hundred settled rows, even though almost none of them have a pending Working record. Look up the map first (apending(seed, now)or a splitenter), and callisOnScreenonly when a fresh Working → Done is actually waiting. Same behaviour, and the hot path does no layout reads. kind: stringis the wrong boundary. The caller flattensSidebarV2TopStatusMark | nullinto a string with a nested ternary (status === null ? "idle" : status.mark === "dot" ? status.tone : status.mark), and the hook then compares that against the literals"done"and"working". Have the hook takestatusand derive a typed"working" | "done" | "other"itself, or typekindas the real union. A rename of a tone should fail typecheck, not quietly turn the celebration off. ThenSidebarV2StatusMarkgets one hook line and no inline ternary.seednow has two jobs. It was the working mark's animation-phase seed. It is now also the identity key for a global transition map, and the dedupe between copies ("a second copy finds the transition taken") only holds because every caller happens to passscopedThreadKey. The hover card passesthread.idand the scheduled chrome row passes a constant. If identity matters, name it (threadKey) and keep it separate from the animation seed.- Ring styling belongs in CSS. Fourteen inline style properties via
Object.assign, includingzIndex: "2147483000"and acolor-mixbuilt from a computed colour string, is a stylesheet's job. A[data-fork-done-ring]rule (static look, maybe--ring-color) leaves the JS doing only creating, positioning, andanimate().
4. panelStampRef is a copy of columnStampRef with a different selector
The two factories are character-for-character the same apart from the closest() argument. Make one closestStampRef(selector, attribute) and have both exports call it. BotThreadsPanel also renders its own PreviewPanelShell, so the stamp is really "tag my own shell" rather than a :has() replacement on a large ancestor. That's fine given the shell is upstream code, but the doc comment should say so.
Smaller
- In
doneCelebration.test.ts, "celebrates across a remount" checks the same thing as the first case (leave Working, enter Done within the window). The model has no concept of a remount, so the case adds nothing. Fold it into the firstit.
The CSS fixes are tightly scoped behind the Glass + vibrancy gate, and the React stamp keeps :has() out, which is good. The structure isn't at the bar yet: the duplicated selected-glass block is what puts the file over 1k, and the celebration hook does layout reads on a hot path it doesn't need to.
| own sidebar fill and opaque border, which read as a dark disc. The extra | ||
| marker outranks the SegmentedTab rule above. */ | ||
| &.dark[data-fork-theme="cool-darker"] | ||
| [data-fork-sidebar-mode-tabs] |
There was a problem hiding this comment.
This block is the collapsed-tab selected-glass recipe again (base, ::before glint, ::after dark edge, vibrancy 6%). It also takes the file from 926 to 1007 lines. Fold [data-fork-sidebar-mode-tabs] into the existing [data-fork-thread-tabs] selectors with :is(...), and keep a single delta rule for border-color: transparent and the 1px inset shift.
There was a problem hiding this comment.
Fixed in 5a68fb8. The four collapsed-tab rules now select :is([data-fork-thread-tabs], [data-fork-sidebar-mode-tabs]), and one small Code / Chat rule keeps the transparent border and moves the glint and dark edge out by 1px. The file is 964 lines.
| var(--fork-glass-sheen); | ||
| } | ||
|
|
||
| & [data-fork-music-strip]::before { |
There was a problem hiding this comment.
This is a verbatim copy of the popups' glint ring ::before (~line 453). Join that selector list, or move the ring into a --fork-glass-* token like the halo and sheen this rule already reuses.
There was a problem hiding this comment.
Fixed in 5a68fb8. The strip now wears var(--fork-glass-rim) (the chips' halo and inset light) over its own drop shadow, the same rim its open button already wears. That drops the copied ring and its position: relative. Neither element has a border, so the inset light lands on the edge.
| const element = dot.current; | ||
| // A hidden copy (a collapsed tab while the sidebar is open) must not take the transition | ||
| // from the copy on screen. | ||
| if (kind !== "done" || (element !== null && isOnScreen(element))) { |
There was a problem hiding this comment.
isOnScreen (getBoundingClientRect plus an ancestor getComputedStyle walk) runs for every Done mark that mounts, before the map has said whether there's a pending Working → Done for this seed. Check the map first, and measure only when a fresh transition is actually waiting.
There was a problem hiding this comment.
Fixed in 5a68fb8. createDoneTransitions now has leftWorking(key, now), a map read. The hook calls isOnScreen only when that says a Working to Done is waiting. Otherwise it just records the mark.
| }) { | ||
| const status = props.status; | ||
| const dot = useRef<HTMLSpanElement>(null); | ||
| useDoneCelebration( |
There was a problem hiding this comment.
This ternary flattens a typed status union into a string that the hook then compares to "done" and "working". Pass status and derive a typed kind inside the hook, so a tone rename breaks typecheck instead of silently turning the celebration off.
There was a problem hiding this comment.
Fixed in 5a68fb8. useDoneCelebration takes SidebarV2TopStatusMark | null and derives "working" | "done" | "other" itself, so a tone rename fails typecheck on status.tone === "done". The call site is one line.
| const color = getComputedStyle(dot).backgroundColor; | ||
| for (const [index, delay] of [0, 320].entries()) { | ||
| const ring = document.createElement("div"); | ||
| Object.assign(ring.style, { |
There was a problem hiding this comment.
The ring's static look, including the magic 2147483000 z-index, belongs in a CSS rule ([data-fork-done-ring]). The JS should only create the element, position it, and run animate().
There was a problem hiding this comment.
Fixed in 5a68fb8. The look is a [data-fork-done-ring] rule in theme.custom.css, fenced and added to the manifest entry. ="flash" adds the first ring's fill, and --fork-done-ring-color carries the dot's colour. The script now only sets that colour, the box, and runs animate().
| export const forkFindBarRef = columnStampRef("data-fork-has-find-bar"); | ||
|
|
||
| /** A stable ref that stamps its element's workspace panel with `attribute` while mounted. */ | ||
| function panelStampRef(attribute: string) { |
There was a problem hiding this comment.
This is identical to columnStampRef apart from the closest() selector. Make one closestStampRef(selector, attribute) and use it for both.
There was a problem hiding this comment.
Fixed in 5a68fb8. There's one closestStampRef(selector, attribute). columnStampRef is now a one-line wrapper so the column stamps' guard strings still match, and the petal panel calls it directly. The doc comment says the panel's header tags its own (upstream) shell.
NoahHendrickson
left a comment
There was a problem hiding this comment.
Correctness review of 2d7f10d87f13e72418c4a2ffbcdde9671bfd4a5b.
One new finding, inline below: the track clips the selected glass on the Code / Chat tab.
The earlier review on this commit already covers the other two points that held up, so I'm not repeating them here: the isOnScreen walk runs before the map lookup (doneCelebration.ts:39), and panelStampRef duplicates columnStampRef.
Checked and dismissed:
checkVisibility()without a guard:ChatComposer.tsx:3192already calls it the same way.- An off-canvas collapsed sidebar copy taking the Done transition:
bodyand#rootareoverflow: hidden, and their boxes span the viewport, so a dot at x<0 fails the ancestor walk. - The Automations chrome row celebrating:
SCHEDULED_RUN_ACTIVITY_MARKShas nodonetone, so Working → Done never happens there. - The transition logic in
createDoneTransitions: React runs every passive cleanup before any setup in a commit, so a group move's unmountleavelands before the new row'senter, and only the first copy on screen celebrates. The new tests cover this.
🤖 Generated with Claude Code
| &::after { | ||
| content: ""; | ||
| position: absolute; | ||
| inset: -2px; |
There was a problem hiding this comment.
The SegmentedTabs track clips part of this selected glass away. SidebarModeTabs sets the track to h-7 p-0 with size-7 tabs, and the track keeps SegmentedTabs' overflow-clip, so the tab's border box is the track's clip edge. Two parts of this rule paint past that edge:
- Dark edge (
::after).inset: -2pxis measured from the padding box, inside the tab's 1px border, so the ring covers border-box −1px…0. Under Full 3D, the track'soverflow-clip-margin: 1px(line ~204) just reaches it. This rule sits in theNOT_OFFblock, though, and that margin rule sits in the Full-only block. Under Selected items only the clip margin is 0, so the ring is cut on the top, bottom and outer side. Only the side facing the other tab still shows. - Halo.
--fork-glass-selected-shadowopens with--fork-glass-halo(0 0 2px 1px, reaching about 3px out). The 1px margin cuts it under Full and removes it under Selected items only.
The collapsed thread tabs avoid this because their track keeps the default p-0.5, which leaves 2px of room. A small fix: give [data-fork-sidebar-mode-tabs] its own overflow-clip-margin of about 3px in this NOT_OFF block. The track still clips the glide, and the edge and halo get their room back.
There was a problem hiding this comment.
Fixed in 5a68fb8. You were right: under Selected items only the track's clip cut the dark edge and the halo. [data-fork-sidebar-mode-tabs] now sets overflow-clip-margin: 3px in the NOT_OFF block, which wins over the Full block's 1px by source order. The track still clips the glide.
…ration - The Code / Chat switch joins the collapsed tabs' selected-glass rules instead of copying them, and its track gives the halo room under Selected items only, where it was clipped. - The music strip wears the chips' rim instead of a copy of the popups' glint ring. - The celebration hook takes the typed status, measures only once a Working -> Done is waiting, and leaves the rings' look to CSS. - One closestStampRef serves the column and panel stamps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Answers to both reviews of Fixed
Declined
|
The right panels beside the chat card (browser, terminal, files, diff, the petal Threads list) no longer add the card's tint and wash, so they read at the gutter's alpha, the sidebar's. The petal panel's stamp only existed to exempt it from that tint, so it goes too. The embedded side chat relied on the panel's tint, so its card paints its own fill again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tab strip ended at the window gutter, so the last tab's outer flare ran past the panel's rounded corner. Under Inlet the strip now ends at the panel's margin and corner plus the flare. Windows keeps its caption inset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utton The menu morph draws a copy of the button over it while the menu is open, copied once at open, so a new pick left the old label at the old width over the new button, and its caret hung off the tab. The copy is retaken whenever the button's contents change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Beside the project switcher, one mascot per petal the sidebar lists, apart from the thread tabs. The petal on screen, or whose work is, is pressed; picking one opens it, and a petal whose work needs you opens with its Threads panel, as in the sidebar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Several Glass surfaces stopped reading as glass under the desktop vibrancy: the composer's pill row grew a band behind it (upstream pingdotgg#34846 made the strip
surface-glass, and Glass paints that class as an opaque fill); the music strip and its open button were a grey slab mixed from the translucent panel; the Code / Chat switch's chosen mode was a dark disc with a hard border; the Bots header sat in the panel's flat grey while the Threads header uses the quiet ink; and the right panels (browser, terminal, the petal Threads list) carried the chat card's extra tint, so they read darker than the sidebar. Under Inlet, the collapsed tab strip's rightmost open tab flared past the panel's corner, and picking a new model in the open composer menu left the old label over the button with its caret off the tab. Separately, finishing a thread had no moment in the sidebar, and with the sidebar collapsed there was no way to reach a petal.Change
Pill row: under Glass with vibrancy, the context strip's
surface-glassfill is cleared; the fork's timeline cutoff already ends the transcript above that row, so the cover had nothing to hide.Music strip: a white wash in place of the
--sidebarmix under vibrancy; under Full 3D glass, the popups' halo, sheens and glint ring, and the chips' rim on the pressed button.Code / Chat switch: the chosen tab wears the selected glass the collapsed tab strip uses.
Bots header: joins Glass's quiet-ink allowlist beside the Threads header.
Right panels: they no longer add the card's tint and wash, so every inline right panel reads at the gutter's alpha, the sidebar's. The embedded side chat relied on that tint, so its own card paints its fill again.
Done celebration (every theme): when a sidebar status mark turns Working → Done while its dot is on screen, two rings pulse off the dot and a petal's mascot hops once (
custom/doneCelebration.ts). The transition is remembered per thread across the remount a group move causes, but only for 1.5s, so a row unmounted while working does not celebrate later. Reduced motion skips it. Subagent marks in a conversation share the status mark, so they celebrate too.Inlet tab strip: ends at the panel's margin and corner plus the tab's flare (not on Windows, which keeps its caption inset), so the last open tab's flare lands on the panel's straight top edge.
Inlet menu morph: the copy of the button it draws over the open menu's trigger is retaken whenever the button's contents change, so a model picked with the menu open relabels it at the right width.
Petals in the collapsed tab strip: a mascot track beside the project switcher (
custom/bots/CollapsedPetalTabs.tsx), one per petal the sidebar lists, apart from the thread tabs (petal work still never shows as tabs). The petal on screen, or whose work is, is pressed; picking one opens it, and a petal whose work needs you opens with its Threads panel, as in the sidebar. User guide and manifest updated.Scope
Fork-only presentation work and one small feature (the petal track), all requested by the maintainer. No server, contracts or upstream files.
Verification
vp run check:changed: format, lint, knip, typecheck, 109 guard/test files, React compiler all pass;node .fork/lint-owned.mjsexits 0.doneCelebration.test.tscovers Working → Done once (including after the row remounts), the stale unmounted row, and a thread first seen Done. Guards updated:forkGlass3d(Code / Chat as a selected item),forkCoolDarkerTheme(Bots row),forkGlassStageCard(right panels paint no tint; the side chat keeps its card fill),forkPopupSurface(bare pill strip),sidebarV2CardRows(dot ref).Model: Claude Opus 5.5 in T3 Code (Claude Code harness).
🤖 Generated with Claude Code