Skip to content

refactor(web): give composer layout one owner - #10111

Closed
t3dotgg wants to merge 1 commit into
mainfrom
t3code/debt-gzuf-1-layout-panels
Closed

refactor(web): give composer layout one owner#10111
t3dotgg wants to merge 1 commit into
mainfrom
t3code/debt-gzuf-1-layout-panels

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 5, 2026

Copy link
Copy Markdown
Member

Composer mode, overlay height and timeline space had different owners. Layout changes had to preserve the order of child and parent effects.

ComposerFrame now 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 84aebb72 with the first integration build. Recordings compare main 0c200c5f with combined integration 8316ed24. No live app or provider session was used.

Before After
Wide multiline composer before Wide multiline composer after
Before After
Narrow multiline composer before Narrow multiline composer after

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 ComposerFrame

  • Adds ComposerFrame and useComposerFrameLayout in ComposerFrame.tsx, which measure overlay and surface geometry, animate height and position transitions, and handle reduced-motion, clipping, and cleanup
  • Removes useComposerRestingTransition and its constants from ChatComposer.tsx; layout behavior transfers to ComposerFrame"- Updates ChatView.tsx to drop its local overlay element, refs, resize observer, and layout callbacks in favor of a ComposerFrameLayout state and a frame configuration passed to ChatComposer
  • Risk: ChatComposer and ChatView now depend on ComposerFrame for all layout publication; any consumer reading the old overlay-height or resting-state callbacks must migrate to the frame prop and ComposerFrameLayout

Macroscope summarized 27097eb.

Model

Created with GPT-6 Astra in Codex. Rebased and checked in Codex. Browser verification and evidence upload in Codex.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +11 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB +10 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB +1 B (+0.0%) 7.8 KiB
Codex Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.5 KiB 13.6 KiB +26 B (+0.2%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB +2 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +24 B (+0.4%) 7.8 KiB
Claude Live turn WebSocket decoded 57.8 KiB 57.8 KiB +44 B (+0.1%) 66.4 KiB
Claude Live turn messages 8 9 +1 (+12.5%) 21

Baseline: b7465a3 · PR result: 27097eb · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-1-layout-panels branch from 20af1b4 to c496d59 Compare September 6, 2026 04:32
@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-1-layout-panels branch from c496d59 to 27097eb Compare September 6, 2026 06:04
@t3dotgg

t3dotgg commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

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.

@t3dotgg t3dotgg closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant