[codex] fix composer footer compact layout#1894
[codex] fix composer footer compact layout#1894juliusmarminge merged 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward UI bug fix that simplifies composer footer layout logic by removing complex DOM measurement in favor of heuristic-based approach. Net deletion of code with new test coverage added, self-contained to the composer component. You can customize Macroscope's approvability policy. Learn more. |
What changed
Implementbutton width stable across the compact transition to remove the remaining layout shiftWhy
The previous fix still allowed a dead zone where the footer could overflow near the compact breakpoint. The follow-up measurement-based heuristic also made the layout too sensitive to scroll width and introduced false compacting. The more reliable fix is to make the footer layout itself resilient: the leading controls can shrink and scroll, while the primary actions stay pinned.
UI changes
before

after
Screen.Recording.2026-04-11.at.1.40.19.AM.1.mp4
Impact
Implementbutton width jump when compact mode activatesValidation
bun fmtbun run --cwd apps/web test src/components/composerFooterLayout.test.tsbun run --cwd apps/web test:browser src/components/ChatView.browser.tsx --testNamePattern "wide desktop follow-up layout|keeps plan follow-up footer actions fused and aligned after a real resize"bun lintbun typecheckNotes
bun lintstill reports one pre-existing warning inapps/web/src/environments/runtime/catalog.test.tsaboutresolveRegistryReadfunction scoping.Note
Medium Risk
UI layout logic for the chat composer footer is reworked and could cause regressions at edge viewport widths or in wide-action states (plan follow-up, pending input). Changes are localized to client layout/behavior and covered by added browser tests.
Overview
Chat composer footer compaction is reverted to pure breakpoint logic. The measurement-based overflow heuristic is removed (and associated helpers/tests deleted), so compact/primary-action modes now depend only on container width and
hasWideActions.Footer layout is made more resilient under tight widths. The left control cluster always uses horizontal scrolling so it yields space without pushing the right action buttons out of bounds, and the plan follow-up
Implementbutton padding is fixed to keep its width stable across compact transitions.Regression coverage is expanded. Browser tests now validate wide-desktop plan follow-up stays expanded when it fits, compacts when it overflows, and that
Implementwidth/alignment remain stable after a real resize (with snapshot helpers extended to vary model/plan text).Reviewed by Cursor Bugbot for commit 0292198. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix composer footer compact layout to use width-based breakpoints only
measureComposerFooterOverflowPx,resolveComposerFooterContentWidth,shouldForceCompactComposerFooterForFit) from composerFooterLayout.ts and ChatComposer.tsx, replacing it with pure width-based heuristics.overflow-x-autoinstead of switching between overflow modes based on compact state.px-4padding, giving it a consistent width across compact and non-compact modes.hasWideActions, not on measured content overflow.Macroscope summarized 0292198.