Repository navigation
fix(ui): notification cards lift only for the chat input they would cover - #37157
Conversation
…over The lift measured the composer's full-width wrapper, so with the right sidebar open the update card rose above an input it never covered. Measure the centred input column instead, and keep observing the full-width strip so a sidebar toggle that moves the column still re-measures.
…n resizes Changing the chat width setting resizes the centred input column while its full-width pane keeps its size, so the cards could stay over Send and Stop or stay lifted for nothing. Observe the measured column as well as the pane.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
No actionable comments were generated in the recent review.
|
Review loop statusThe problem. With the right sidebar open, the bottom-right cards (Downloading Update, Update Available, the star prompt and so on) floated well above the bottom of the window, over the sidebar, while a chat was open. They were dodging the chat input, but the input was far away. The clearance added in #36233 measured the composer's full-width strip, which reaches about 40 px into the cards' column, instead of the input box the user sees. What changes for users. The cards now move up only when the chat input would actually sit under them. With the sidebar closed on a narrow window the input still reaches the corner, so the cards still clear Send and Stop as before. Review (light path). One adversarial reviewer confirmed the light-path classification and found one problem, now fixed:
Verified. CI green on the current head 3c94a19, which is the QA'd commit 0a38c9f plus a main merge (05c98ff, clean, touches none of this PR's files) and one test-only commit (3c94a19: main's new type-assertion check flagged a cast in this PR's test helper; the helper now throws if the element is missing, and the reviewer confirmed the test still covers the same case). A screenshot run of a dev build on the M4Air (Codex driving over CDP, no agents under test):
Not verified. The Stop button wasn't on screen (no message was sent). It sits where Send does, so the same spacing applies. Still screenshots can't rule out a one-frame flicker during a sidebar toggle; none was seen. Deferred / noticed, not from this PR (on main):
For Brennan's review
Where judgment matters:
|
ELI5
With the right sidebar open, the bottom-right cards (Downloading Update, Update Available, the star prompt and so on) floated noticeably above the bottom of the window, over the sidebar, even though nothing was under them. They were dodging the chat input, but the chat input wasn't anywhere near them. Now they only move up when they would actually cover the input box.
What Changed
NativeChatComposerField, which owns both elements. It measures the centred, width-capped input column and re-measures when either the column or the full-width strip around it resizes. The strip covers sidebar toggles: on a wide window the centred column keeps its width when a sidebar opens or closes, so only the strip resizes. The column covers the chat width setting (Comfortable, Wide, Full): there only the column resizes. Inline edit composers still don't register.Why
The overlap check used the wrong element. Measuring the box the user sees is the direct fix. Watching both the strip and the column for resizes keeps the cards up to date on sidebar toggles and chat width changes without adding listeners.
Linked Issue
Follow-up to #36233.
Visual Proof
Dev build of this branch on a Mac, with a Downloading Update card showing over an empty Claude chat.
Wide window, right sidebar open: the cards rest at the bottom over the sidebar. The input is far to the left, so nothing moves.
(screenshot removed: contained real product data)
Narrow window (1024 × 768), right sidebar closed: the input reaches the corner, so the cards still lift clear of it and of Send.
(screenshot removed: contained real product data)
Chat width switched to Full while the chat stays on screen. Without the column re-measure (left), the card stays down over the input's right edge and a sliver of Send. With it (right), the cards lift.
Testing
NotificationCardStack.test.tsxadds a chat pane that reaches under the cards with its centred input column clear of them, and checks the cards don't lift. That case fails when the full-width pane is measured. A second test widens only the input column under the cards and narrows it back, and checks the cards lift and settle; it fails without the column re-measure.Risk
Only where the bottom-right cards and the toasts above them sit while a chat is open changes. The riskiest part: if the input column were measured wrong, the cards could cover Send and Stop again with the sidebar closed. The existing lift tests and QA cover that. No saved data, IPC or paired-client change. A plain revert backs it out.
Level: Low
Review
Review path: light.
Plan: measure the centred input column instead of the full-width wrapper. Keep observing the full-width strip for resizes, so a sidebar toggle still re-measures. Register from the field, which renders both elements.
Agent skill upstream boundary
Checklist
N/Awith reason