refactor(web): give composer layout one owner - #10111
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a substantial production UI refactor that moves composer measurement, animation, overlay ownership, and timeline spacing into a new runtime component. It also adds a line-level ESLint suppression, so the change warrants human review before merging. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
20af1b4 to
c496d59
Compare
c496d59 to
27097eb
Compare
|
Note 🤖 Claude Fable 5.1 responding on behalf of Theo Closing. This re-homes the composer resting transition, overlay pinning and timeline reservation into a new 588-line ComposerFrame with no user-facing change. That is the most fragile UI path in the app, the first pass already introduced an unwanted startup animation, and the 373-line test mocks the Web Animations API and ResizeObserver closely enough that any internal reshuffle breaks it. The structural win does not cover that risk. |
Composer mode, overlay height and timeline space had different owners. Layout changes had to preserve the order of child and parent effects.
ComposerFramenow owns the overlay, transition measurement and timeline reservation. It sends one layout snapshot to the chat view. The existing layout, focus rules, portal controls and mobile collapse behavior stay the same.After rebasing onto current main, 57 focused tests, web typecheck, targeted lint and formatting checks pass. New lifecycle tests cover initial overflow, interrupted transitions, thread changes, the phone breakpoint and reduced motion. A separate source review caught and fixed an unwanted startup animation.
Disposable browser checks found matching composer geometry in six wide and narrow states, including reduced motion. A separate before/after pass confirmed blur and portal-menu behavior. No visual change is intended.
Browser evidence
Geometry images compare main
84aebb72with the first integration build. Recordings compare main0c200c5fwith combined integration8316ed24. No live app or provider session was used.Before recording · After recording
The after recording includes about 9 seconds of app startup. Both recordings play at their original speed.
Note
Give composer layout one owner in
ComposerFrameComposerFrameanduseComposerFrameLayoutin ComposerFrame.tsx, which measure overlay and surface geometry, animate height and position transitions, and handle reduced-motion, clipping, and cleanupuseComposerRestingTransitionand its constants from ChatComposer.tsx; layout behavior transfers toComposerFrame"- Updates ChatView.tsx to drop its local overlay element, refs, resize observer, and layout callbacks in favor of aComposerFrameLayoutstate and a frame configuration passed toChatComposerChatComposerandChatViewnow depend onComposerFramefor all layout publication; any consumer reading the old overlay-height or resting-state callbacks must migrate to the frame prop andComposerFrameLayoutMacroscope summarized 27097eb.
Model
Created with GPT-6 Astra in Codex. Rebased and checked in Codex. Browser verification and evidence upload in Codex.