Session Info: opening, updating or closing it never moves the chat around it

Merged
TE
8d ago
+285-12

Leo, 2026-10-31: "why is the session info thing still pushing my layout when it doesnt need to???"

Cause

When a computer use preview card was showing, the chat kept a column clear for it on the right (COMPUTER_USE_PREVIEW_RESERVE). Opening Session Info hid the card and dropped that reserve, so the transcript and composer widened under the panel. Closing it narrowed them again. That is the push: the panel itself floats, but the chat column changed width every time it opened and closed.

Fix

App.tsx: the card's column stays reserved while Session Info floats over it (the default placement). It is released only when Session Info is set to Push always, because in that mode the panel takes the chat's room itself. The CSS and TS comments in computerUse/ say the same.

Test

webviews/test/session-info-layout-still.test.ts records the box of every element outside Session Info (its panel, its toggle and the preview card are excluded) on every frame while the panel opens, while a section folds and unfolds, and as it closes. Any element that moves fails the test. It covers Chromium and WebKit, three layouts (no tab row, the native tab row, and a computer use card), and widths of 560, 900, 1200 and 1600px.

  • Red at 8be903a0 (the test with the card case, before the fix): run 41167536927. The card case fails because the transcript and composer move.
  • Red again at 54067920 (the fix reverted on top of the final test): run 41169724174.
  • Green at ba7f3080 (head): run 41170456362, 51 passed.

Before / after (2x, 900x640, synthetic chat, host theme)

The stills test writes these to the run's fast-checks-output artifact. "Before" comes from the fix-reverted run and "after" from the head run.

Before (Session Info open)After (Session Info open)After (Session Info closed)
Light
Dark

Visual verdict:

  • Before, open: the chat column widens to the full pane (the bubbles' right edge at about 1620px in the 2x image), and the card covers "Question 4".
  • After, open: the bubbles and composer keep their right edge at about 1392px, the same as in the closed still. The panel floats over the card's column and nothing in the chat moves.

Viewed after image: yes.

Risk

Low. The change is one condition in the webview and touches nothing native. With Push always set, the behaviour is unchanged.

Spec: design/session-info.md (rule 1: "Opening, closing, resizing or updating it never takes a column and never reflows the chat"). This PR also maps the Session Info surface in .github/design-surfaces.json.

Agent session: agent session

šŸ¤– Generated with Claude Code