Repository navigation
fix(fork): the prompt stash matches the queue card - #469
Conversation
The stash drawer is portaled over the composer, so the banner-card redesign never reached it: it stayed inset, tucked under the prompt, in small type with an X. It now spans the prompt 8px above it, with the queue card's header, 40px edge-to-edge rows, chat-stream type and a muted trash remove; the header label follows the interface font size. 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 a7550a6 (base 514de9a). Not approving.
The visual goal is right, but the PR gets there by rebuilding by hand, outside the form, every piece of composer context the portal loses. This adds five separate mechanisms that each patch over the portal:
- a new form stamp (
data-fork-composer-stash-open) that exists only so CSS can zero--chat-composer-drawer-inset, which JS then reads back; - a
calc(1rem + 9px)margin that undoes the layer's JS tuck (rootFontSizePx + 1) and adds the cards' 8px gap; - a
pointer-events: noneoverride on the layer, needed only because of that margin; - a second copy of the thread-composer card scope in
theme.custom.thread-composer.css, which checks the rootdata-fork-draft-hero-shownwhere the original checks the overlay's:not([data-draft-hero]), and sets--fork-composer-radius: 12pxagain; - a line-for-line copy of the queue card's shape rules, plus a widened guard regex for the text-size remap.
The PR's own follow-ups list is mostly fallout from this approach. "Shows less in short windows" comes from the margin eating the layer's computed maxHeight. "Inlet sits closer/narrower" comes from the restated rules not matching Inlet's own drawer rules.
1. Possible code-judo move: render the stash as a card in the banners dock instead of portaling it
The queue card, which the stash is meant to copy, already lives in ComposerBanner.Column inside the form, and the ComposerStashBadge is in that same dock. If ComposerStashMenu rendered there, inside a ComposerBanner.Attachment like the top drawer, it would pick up for free:
- full width;
- the 8px lift (
> [data-slot=composer-banner-attachment] { margin-bottom: 8px }); - the card fill and ring;
- the thread-composer card on Flat Glass and Basic, with the right draft scope;
- the chat-stream text remap, so the guard needs no change.
All of #1–#5 would go away: no form stamp, no margin magic, no pointer-events override, no root-scoped duplicate in thread-composer.css. The CSS change would shrink to sharing the queue card's row rules (point 2 below).
Things to check before committing to this:
- Height. Does the dock's overlay cap the card's height sensibly? The queue card uses
max-h-32on its scroll area. Today the layer'scanOverflowTopfloor does this job. - Events. Does moving the drawer inside the form change any keyboard or pointer handling?
composerEventScope.tslists[data-composer-drawer-layer], and the stash adds its own capture-phasekeydownandpointerdownlisteners.
If one of those really requires the portal, say so in the fence. Then do the fallback below.
Fallback, if the portal has to stay: put the lift in ComposerCommandMenuLayer itself. It already reads --chat-composer-drawer-inset from the form, so read a sibling variable for the overlap (or take a prop) instead of hard-coding rootFontSizePx + 1. The card then sits 8px up because the layer is placed there, not because a margin fights the layer. That removes the calc(1rem + 9px), the pointer-events override and its :has(), and the short-window regression.
2. The queue card's look is copied, not shared
theme.custom.css:2668: padding: 0; overflow: clip; border-radius, the 40px [data-composer-banner-row] rule, gap: 0, and the li hairline all repeat the [data-fork-queued-runs-banner] block 20 lines above. The "twin" will drift the first time one of them changes. Write it once with a shared selector or stamp, e.g. :is([data-fork-queued-runs-banner], [data-composer-stash-drawer]) with :is(ol, ul). Keep only the real stash differences (header font size, scrollbar inset) in their own block.
The JSX has the same problem. ComposerStashMenu.tsx:179 copies the queue card's header markup ("Label" plus the font-normal text-muted-foreground/70 tabular-nums count span), and :284 copies its icon-xs/ghost-muted Trash2Icon button. Since these are meant to stay identical, move them into a small component in apps/web/src/custom/ and use it in both places. The fences in the upstream file then shrink to one import and one call.
3. A Button restyle in feature CSS, and washes that ignore the existing token
theme.custom.css:2715–2721 changes [data-slot="button"] hover and pressed from a feature block, which gets around shadcn/no-restyle. It also uses hand-picked 5% and 8% foreground washes, even though every theme already defines --fork-composer-control-hover for exactly this case.
The stated reason, "on Flat Glass --accent is the card's own fill", applies just as much to the queue card's identical ghost-muted buttons and to its highlighted row. So one of two things is true:
- the queue card has the same bug, and the fix belongs in one shared place (a composer-card token for ghost-muted hover), or
- the queue card is fine, and the stash shouldn't need the override either.
4. The same condition in two places in ChatComposer
ChatComposer.tsx:4032 and :4226 both spell out isStashMenuOpen && !composerMenuOpen, once for the stamp and once for the render. If point 1 lands, the stamp goes away. Otherwise, compute one stashDrawerOpen so the stamp can't fall out of sync with what is mounted.
Size
theme.custom.css is already 3,710 lines. This PR adds about 80 more, most of them the duplicated block from point 2. Points 1 and 2 together should bring that close to zero net.
Order of priority: 1, then 2, then 3. Point 4 sorts itself out once 1 lands.
NoahHendrickson
left a comment
There was a problem hiding this comment.
Code review of a7550a6ca367cdc639f861e4618cd880ca2a1ba0 (/code-review high, findings checked against the source).
Three findings, inline:
- important: the stash card's Flat Glass/Basic scope reads a global root stamp, so a split draft pane flips the stash in the other pane back to glass.
- important:
overflow: clipon the drawer clips its own::beforedrop shadow. The PR lists this as a Glass-only follow-up, but it applies to every theme that keeps the glass card: Glass, Inlet, 3D-glass Flat Glass, and the new-agent draft hero. Only the Flat Glass/Basic thread-composer card is unaffected, because its::beforeswaps the outer shadow for an inset ring. - nit: the 25px lift comes out of the layer's 96px floor, so in a short window the stash can show its header and no full entry. That undoes what
canOverflowTopwas added for. The PR's "list shows less" note understates this.
No other correctness issues found in the TSX, manifest, or guard changes.
🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code
| :root[data-fork="noahhendrickson-t3code"]:is( | ||
| [data-fork-glass-3d="off"].dark[data-fork-theme="cool-darker"], | ||
| [data-fork-theme="basic"] | ||
| ):not([data-fork-draft-hero-shown]) |
There was a problem hiding this comment.
important: data-fork-draft-hero-shown is a counted root stamp shared by every ChatView (custom/forkStageStamps.ts: "Root stamps are counted, so split panes and the side chat share them"). The form rule this stands in for is per pane: [data-chat-composer-overlay]:not([data-draft-hero]).
Failure: on Flat Glass or Basic, use the split toggle, which opens a draft pane (hero shown) beside the thread. Open the stash in the thread pane's composer and it draws as the glass card with 16px corners, not the thread composer's card that the queue card uses.
Fix: scope it to something the portaled drawer carries. For example, ChatComposer could pass a per-composer flag (not draft hero) into ComposerStashMenu and stamp it on the drawer, then key this rule on that stamp instead of :root.
There was a problem hiding this comment.
Fixed in eec7e86 by deleting this rule. The stash now renders inside the form, in the banners dock, so the per-pane thread-composer scope ([data-chat-composer-overlay]:not([data-draft-hero]) [data-chat-composer-form]) reaches it directly, as it does the queue card. Nothing reads the root stamp now.
| --chat-composer-attached-seam: transparent; | ||
| margin-bottom: calc(1rem + 9px); | ||
| padding: 0; | ||
| overflow: clip; |
There was a problem hiding this comment.
important: the drawer is ComposerBanner.Root, and its ::before carries the outer before:shadow-composer dark:before:shadow-composer-dark (ComposerBanner.tsx:65). overflow: clip here clips that pseudo-element's shadow at the card edge. This lands just as the card is lifted 8px off the prompt to float over the transcript.
The PR body lists this only for Glass, but it applies to every theme where the stash keeps the glass card: Glass, Inlet, 3D-glass Flat Glass, and the draft hero. Only the Flat Glass/Basic rule in theme.custom.thread-composer.css avoids it, because it replaces the shadow with an inset ring.
Fix: clip the scroll area or rows, which only need it for the row washes at the rounded corners, instead of the drawer root. Or move the outer shadow onto the drawer element itself.
There was a problem hiding this comment.
Fixed in eec7e86: there is no outer shadow left to clip. In the dock, the card rule [data-fork-composer-banners] [data-slot="composer-banner"][data-composer-banner-surface="attached"]::before replaces the ::before box-shadow with the inset hairline in every theme, as it does for the queue card. That card has always had overflow: clip, and the stash now shares its block.
| pointer-events: auto; | ||
| --chat-composer-attachment-overlap: 0px; | ||
| --chat-composer-attached-seam: transparent; | ||
| margin-bottom: calc(1rem + 9px); |
There was a problem hiding this comment.
nit: this margin sits inside the layer, so it takes 25px from ComposerCommandMenuLayer's Math.max(96, spaceAbove - 24) floor, which doesn't know about the lift. At the floor the drawer gets about 71px, but the 40px header plus a 41px first row (border included) is 81px. So in a short window, or with the composer near the top, you get the header and a cut-off first entry. canOverflowTop was added to keep the entries and drop the header.
Fix: apply the lift outside the layer's height budget. For example, add it to the layer's bottom for the stash, or subtract it from the floor.
There was a problem hiding this comment.
Fixed in eec7e86 by deleting the margin. The stash no longer uses ComposerCommandMenuLayer: it is an in-flow card in the dock, capped by ComposerBanner.Scroll's max-h-[min(24rem,40dvh)], so the layer's floor no longer applies.
The review of #469 found the portaled stash rebuilt, by hand, every piece of composer context the portal loses. Rendered as the card nearest the prompt in the banners dock instead, it gets the width, the 8px lift, the card fill and the chat-stream type from the dock, so the form stamp, the lift margin, the pointer-events override and the second thread-composer scope go. It shares the queue card's rules and parts (ComposerCardParts: the counted title and trash remove). Inside both cards --accent is the composer's control hover, so row highlights and ghost buttons read on Flat Glass's card lift. The stash tab steps aside while the card is open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed the code-quality review in eec7e86. 1. The stash now renders as a card in the banners dock. It's the last attachment in
2. One block now covers both cards: 3. The queue card had the same bug. Its editing row and its 4. Fixed by 1. ChatComposer computes
|
Resolves the #467 header conflict: ComposerCardTitle takes text-sm/5, so the queue and stash titles share one size on the banner scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged 🤖 Signed: Claude Opus 5.5 ( |
The stash drawer was portaled over the composer, so the Nov 23 banner-card redesign never reached it. It stayed inset and tucked under the prompt, in small type, with an X to delete.
The open stash now renders as a card in the banners dock, the card nearest the prompt. The dock gives it the queue card's full width, the 8px gap above the composer, the card fill (the thread-composer card on Flat Glass and Basic) and chat-stream type.
:is([data-fork-queued-runs-banner], [data-composer-stash-drawer]), for the 40px header and rows that run edge to edge, split by full-width hairlines. It also keeps rows full width when the list scrolls. Both cards usecustom/ComposerCardParts.tsxfor the counted title ("Stash N", "Queued N") and the muted trash remove.--accentis the composer's control hover. Before, row highlights and ghost-button hovers vanished into the Flat Glass card's own lift; that bug was in the queue card too.1rem).ChatComposer.tsxandComposerStashMenu.tsxare fenced underfork-composer-shell, and the manifest lists both files.Follow-up, not in this PR: no guard covers the stash selectors yet.
Checks:
vp run check:changedand the fork lint ratchet pass. I checked it in a browser on Flat Glass:Reviewed with sol-loop: 2 rounds with gpt-6.2-sol on high. Sol verdict: approved. That covers the first approach; the dock rework came after it, from the PR review.
🤖 Signed: Claude Opus 5.5 (
claude-opus-5-5) via Claude Code🤖 Claude Opus 5.5 (
claude-opus-5-5) subagent: code review. I applied its click-through and hover-wash fixes; the dock rework later made both unnecessary.🤖 GPT-6.2 Sol (
gpt-6.2-sol) via Codex: sol-loop reviewer. I applied its scrolling-row and fence fixes.