Repository navigation
fix(fork): composer sits lower, smaller Petal mascots, usage drawer floats over the chat - #407
Conversation
…loats over the chat - The composer's floor spacer is 1rem again, down from 2rem. - Petal tiles draw a 24px mascot in a 28px box (was 28px in 36px), with the gaps above the mascot and below the name evened out: 8 + 28 + 12 + 10 = 58px tall. The columns still share the sidebar's width, at least 56px each. - The composer's usage drawer floats above the vessel on every composer, as the draft hero's already did, so opening it no longer pushes the chat up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NoahHendrickson
left a comment
There was a problem hiding this comment.
Thermo-nuclear code-quality review of 1c654375d9fe7194f395972ba8d9b09ac03c98ac.
The composer floor and the Petal tile changes are just value changes and look fine. The drawer change is where the problems are. It undoes #403's layout through a CSS override instead of reverting it, and it brings back the bug #403 was fixing without the safeguard #403 removed. Not approving until the two points below are resolved.
1. The drawer is positioned by a stylesheet override that contradicts its own JSX (structural)
ComposerShell renders in exactly one place: ChatComposer → ChatView, inside [data-chat-composer-overlay="true"] (ChatView.tsx:4195). With [data-draft-hero] dropped from the selector, the rule in ComposerShell.css now matches every render. So it is an unconditional position: absolute that always overrides the relative class on the element (ComposerShell.tsx:95). The JSX says the drawer sits in flow, the CSS file says it floats, and the CSS always wins. The guard test then pins both: the dead relative class and the CSS selector.
The simpler fix is to put back the pre-#403 JSX, which already said this in one place:
className="pointer-events-none absolute inset-x-0 bottom-full z-20 flex flex-col"Then delete the whole rule from ComposerShell.css, drop the shellCss toMatch from the guard, and pin the JSX class instead. That leaves one source of truth with no selector coupling to ChatView's overlay attribute. As it stands, the override layer survives only because #403 needed a draft-hero-only exception, and that exception no longer exists.
2. Reintroduces #403's bug without restoring the guard #403 deleted (design regression)
The PR calls this the usage drawer, but the same top vessel also holds the background-work section, and that section opens on its own whenever a new task starts (useComposerBackgroundWork / resolveCollapsedTaskIds). A subagent spawning is exactly when a ChildThreadApprovals card shows up right above the composer (ChatView.tsx:4271). So the common sequence is: subagent starts → drawer opens by itself → its pointer-events-auto panel covers the approval the user has to act on. That is the exact bug 60ae533 describes ("The auto-opening background-work drawer floated over ... subagent approval cards, Petal asks and the newest transcript lines").
Before #403 the floating drawer was safe because of the give-way logic (hasUnseenApproval plus the childThreadApprovalsAtom subscription in ChatView). #403 deleted that logic because the in-flow layout made it unnecessary. This PR undoes the layout but not the deletion. The description says the drawer "can now cover approval cards", but it does not say that this cover now happens automatically.
Pick one model on purpose:
- Float, and restore the give-way: revert the relevant parts of 60ae533 (the approval-id set,
hasUnseenApproval, and its logic test). Or, more simply, don't auto-open the work section whilechildThreadApprovalsis non-empty. - Float only the usage tray: keep the auto-opening work section in flow so it never covers anything, and float only the section the user opens by hand. This probably needs the two sections in separate vessels, so weigh that against option one.
Shipping a floating drawer that opens itself, with nothing stopping it from covering a blocking approval, is not a choice to leave unstated in a PR body.
3. Minor: the Petal tile height lives in four hand-synced places
The arithmetic 8 + 28 + 12 + 10 / 58px is restated in the SidebarV2BotGridBody docblock, the CARD_INTRINSIC_SIZE hint in Sidebar.tsx, customizations.yaml, and the guard. This PR had to edit all four to change one number. A Tailwind arbitrary class must be a literal, so this isn't a blocker. Still, an exported PETAL_TILE_HEIGHT_PX next to the tile, applied through style={{ containIntrinsicSize: ... }}, would make the next resize a one-line change. Not required for this PR.
Also unmentioned: the tile's horizontal padding went from px-2 to px-1. It's probably intentional with the 56px column floor, but the description and the manifest entry don't mention it.
🤖 Review: Claude Opus 5.5 (claude-opus-5-5) via Claude Code
| never moves the transcript (or, on the draft hero, the launchpad it is centred over). */ | ||
| :root[data-fork="noahhendrickson-t3code"] | ||
| [data-chat-composer-overlay][data-draft-hero] | ||
| [data-chat-composer-overlay] |
There was a problem hiding this comment.
With [data-draft-hero] gone, this selector matches the only place ComposerShell ever renders (ChatComposer inside ChatView's overlay), so it is an unconditional override of the relative class in ComposerShell.tsx:95. Please put the positioning back in the JSX (absolute inset-x-0 bottom-full, which is what it was before #403) and delete this rule. Then the guard can pin the class instead of this selector.
There was a problem hiding this comment.
Fixed in 019a7e7. The rule is deleted from ComposerShell.css, and the position lives in ComposerShell's JSX again: absolute inset-x-0 bottom-full.
| flow, so an open drawer pushes the transcript up rather than covering whatever | ||
| sits above the composer; the draft hero floats it (ComposerShell.css). */} | ||
| Chromium Backdrop Root, which would stop a child from blurring the picture. It floats | ||
| over the transcript rather than pushing it up (ComposerShell.css). */} |
There was a problem hiding this comment.
This comment and the relative class two lines down now disagree with each other: ComposerShell.css overrides it on every render. Positioning the element in two places that disagree is harder to follow than the pre-#403 version. Please make this absolute inset-x-0 bottom-full and drop the CSS rule.
There was a problem hiding this comment.
Fixed in 019a7e7. The class is pointer-events-none absolute inset-x-0 bottom-full z-20 flex flex-col, and the comment now says the drawer floats and gives way to subagent approvals.
| // only the draft hero floats it. | ||
| // The drawer floats over the transcript, so opening it never pushes the chat up. | ||
| const shell = readSibling("../custom/ComposerShell.tsx"); | ||
| expect(shell).toContain('className="pointer-events-none relative z-20 flex flex-col"'); |
There was a problem hiding this comment.
This guard now pins a class that never takes effect, plus the CSS rule that overrides it. Once the positioning moves back into the JSX, pin absolute inset-x-0 bottom-full here and drop the shellCss match. Separately, the comment says the drawer "never pushes the chat up" but not that it can open by itself over a pending subagent approval. If that is accepted, the guard (or the manifest) should say so. If it isn't, the give-way #403 removed needs to come back (see the review body).
There was a problem hiding this comment.
Fixed in 019a7e7. The guard pins the JSX class, drops the shellCss match, and also pins the approval give-way wiring in ChatView (childThreadApprovalsAtom and composerChildApprovalIds).
NoahHendrickson
left a comment
There was a problem hiding this comment.
Code review of 1c654375d9fe7194f395972ba8d9b09ac03c98ac.
The composer floor and the Petal tile changes look right. The comments, CARD_INTRINSIC_SIZE (58px), the guard and the manifest all agree on 8 + 28 + 12 + 10.
I left two inline comments on the usage drawer, which now floats on every composer:
- Important. The drawer opens on its own, not just when you open it.
useComposerBackgroundWorkopens the background-work section whenever a new task starts. Once the drawer floats, it covers the newest transcript lines and approval cards with no user action. Those lines also can't be scrolled into view, because the transcript inset comes from the overlay's height, and an absolutely positioned drawer adds nothing to it. The PR body only covers the case where you open the usage drawer yourself. - Plausible, not checked in a running app. On Glass with sidebar vibrancy, the drawer fill is
rgb(255 255 255 / 6%)with no backdrop blur. Before this change the cutoff mask hid the transcript behind the in-flow drawer. Now the drawer sits above the overlay, so transcript text would show through it.
I didn't build or run the app. These findings come from reading the diff and the code around it.
🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code
| never moves the transcript (or, on the draft hero, the launchpad it is centred over). */ | ||
| :root[data-fork="noahhendrickson-t3code"] | ||
| [data-chat-composer-overlay][data-draft-hero] | ||
| [data-chat-composer-overlay] |
There was a problem hiding this comment.
Important: the background-work section now covers the transcript by itself, and nothing can scroll it back into view.
This drawer holds more than the usage tray. ComposerUsageDrawer stacks the background-work section from useComposerBackgroundWork (apps/web/src/custom/ComposerBackgroundWork.tsx) on top of it. That section "opens whenever an unseen task starts" (open = heldTaskIds === null), so the user never chose to open it.
Before, only the draft hero matched this rule. Now every docked composer does, so:
- When a subagent, monitor or background terminal starts, the section opens on its own. It then covers the newest streamed lines and any approval cards or Petal asks above the composer, and stays there until the user collapses it.
- Those lines can't be scrolled into view. The overlay's measured height drives the transcript inset and the cutoff mask (see the
ChatView.tsxspacer comment). Anabsolute/bottom: 100%child adds no height to the overlay, so the scroller's bottom ends behind the drawer.
The PR body says the drawer "can now cover approval cards or the newest lines" while you have it open. Here it also happens without the user opening anything, for as long as background work runs.
One option: keep the draft-hero scope for the background-work section, or keep it in flow, and float only the usage tray. Or add the drawer's height to the transcript inset while it's open.
There was a problem hiding this comment.
Fixed in 019a7e7. The give-way from before #403 is back: each subagent approval arriving above the composer collapses the background-work section once, and the toggle reopens it. That is hasUnseenApproval (with tests in composerBackgroundWork.logic.test.ts), useComposerBackgroundWork(view, approvalIds), and childThreadApprovalsAtom in ChatView. Covering the newest transcript lines while the drawer is open is the intended trade-off: the maintainer asked for the drawer to float over the chat rather than push it.
| [data-chat-composer-overlay][data-draft-hero] | ||
| [data-chat-composer-overlay] | ||
| [data-fork-composer-top-vessel] { | ||
| position: absolute; |
There was a problem hiding this comment.
Plausible (I read the CSS but didn't run it): the transcript may show through the drawer on Glass with sidebar vibrancy.
Under [data-fork-sidebar-vibrancy="true"].dark[data-fork-theme="cool-darker"], --fork-composer-vessel-bg is rgb(255 255 255 / 6%) (theme.custom.palettes.css:751). The drawer paints exactly that (theme.custom.css:751), and that theme clears composer blurs on purpose. Its own comment says: "Without the blur a translucent menu would leak the text underneath it instead." The theme also sets the overlay's scrim to background: none and relies on the cutoff mask to end the transcript at the overlay's top.
While the drawer was in flow it sat inside the masked region. At bottom: 100% it sits above the overlay's top edge, so the full-strength transcript would show through a 6% wash.
Flat Glass gives the drawer an opaque lift-1, and Basic, Inlet and the opaque-backdrop Glass path are opaque or blurred, so none of them are affected. Worth one look in the desktop app with vibrancy on.
There was a problem hiding this comment.
Not changed yet. This needs a look in the running app under that palette. If the text shows through, the fix is a backdrop blur on the floating drawer for that theme. I've asked the maintainer to check.
NoahHendrickson
left a comment
There was a problem hiding this comment.
Reviewed 1c654375d9fe7194f395972ba8d9b09ac03c98ac against 59b02da1c085e5a06b02252d8d19f64ed859c81f. Found one layout regression. A reduced Chromium fixture using the base and head CSS confirmed the overlap and pointer interception.
| [data-chat-composer-overlay][data-draft-hero] | ||
| [data-chat-composer-overlay] | ||
| [data-fork-composer-top-vessel] { | ||
| position: absolute; |
There was a problem hiding this comment.
[P2] Keep Scroll to end clear of the open drawer
In a started thread, scroll up until Scroll to end appears, then open the usage drawer. The drawer no longer contributes to the measured composer height used to position the button. The button stays at its closed-drawer offset and its z-30 puts it above the drawer in the z-20 composer overlay. It covers the middle of the quota row and intercepts pointer input there. Account for the open drawer in the button’s clearance while keeping the transcript inset tied to the composer.
There was a problem hiding this comment.
Fixed in 019a7e7. ChatView adds however far the open drawer rises above the composer overlay to Scroll to end's clearance, and the overlay's resize observer now also watches the drawer, so the button re-measures as the drawer opens and closes.
Thread transfer impact
This comment will update automatically after the next completed run. |
…Scroll to end Addresses the #407 review of the floating drawer: - Position lives in ComposerShell's JSX again (`absolute inset-x-0 bottom-full`, as before #403); the ComposerShell.css override is gone. - The background-work section opens by itself, so a subagent approval arriving right above the composer collapses it once, as before #403 (hasUnseenApproval + childThreadApprovalsAtom in ChatView); the toggle reopens it. - Scroll to end is lifted by however far the open drawer rises above the composer overlay, and the overlay's resize observer watches the drawer so it re-measures as the drawer opens and closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three desktop fixes from looking at the merged
customin the dev app: the composer sat too high off the bottom, the Petal tiles felt oversized, and opening the composer's usage drawer pushed the chat up.The fork guards and the
fork-composer-shellandfork-botsmanifest entries are updated to match.vp run check:changedpasses, except theChatView"shortcut conditioned on rightPanelOpen" browser case, which also fails on macOS on untouched upstream (noted in #402). The fork lint ratchet passes.🤖 Signed: Claude Opus 5.5 (
claude-opus-5-5) via Claude Code