Skip to content

Clip terminal view column to prevent split-pane footer overflow#11099

Open
SagarSDagdu wants to merge 1 commit into
warpdotdev:masterfrom
SagarSDagdu:fix/short-pane-input-footer-overflow
Open

Clip terminal view column to prevent split-pane footer overflow#11099
SagarSDagdu wants to merge 1 commit into
warpdotdev:masterfrom
SagarSDagdu:fix/short-pane-input-footer-overflow

Conversation

@SagarSDagdu
Copy link
Copy Markdown
Contributor

@SagarSDagdu SagarSDagdu commented May 16, 2026

Description

TerminalView::render's main column wraps the output area in Shrinkable but adds the input area without any flex/clip. In a Flex column, non-flex children are laid out with an unbounded main-axis constraint and take their natural height, so when a horizontal split shortens the top pane the input box + chip rows + footer can overflow past the column's bottom edge and paint into the pane below.

This PR wraps the column in Clipped at the outer Stack. The Flex column reports the max-constraint height (because of MainAxisSize::Max), so the clip rect matches the pane's available height. Sibling overlays in the same Stack (context menus, tooltips, ambient-agent progress, etc.) are added after column.finish() and remain outside the clip layer, so they're unaffected. The cloud-mode-v2 composing branch directly above already uses Expanded (FlexFit::Tight) and shrinks correctly, so it doesn't need this wrapper.

This is the vertical analog of #10724 / #10811 (horizontal overflow on the inline-menu header) and applies the same Clipped-at-the-overflow-source pattern.

Linked Issue

Fixes #10906

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Screenshots / Videos

Before

Screen.Recording.2026-05-16.at.12.09.33.PM.mov

After

Screen.Recording.2026-05-16.at.12.10.26.PM.mov

Testing

  • I have manually tested my changes locally with ./script/run.

Reproduction:

  1. Open Warp and enter agent input mode with enough chips/attachments that the input footer has multiple rows.
  2. Cmd+Shift+D to split the window horizontally.
  3. Drag the divider up until the top pane is short.
  4. Confirm the footer's bottom row clips at the divider instead of bleeding into the lower pane.

Also spot-checked:

  • Normal-height pane: input + output still render as before.
  • Output area still expands to fill available space when the pane is tall.
  • Context menus, tooltips, and ambient-agent progress (sibling overlays in the outer Stack) are unaffected by the clip.

cargo check -p warp is clean.

No automated test added — the fix is a single Clipped wrapper and is most cheaply verified by manual repro in a short horizontally-split pane.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

When a pane is shortened in a horizontal split, the agent input area's
natural height can exceed the pane's available height. The Flex column
in TerminalView gives non-flex children (the input) an unbounded main-axis
constraint, so the input is laid out at its full natural height while the
Shrinkable output area is squeezed to zero. The overflow then paints past
the column's bottom edge and into the lower pane.

Wrap the column in Clipped at the outer Stack so painting is clipped to
the column's reported size (MainAxisSize::Max → pane available height).
Sibling overlays in the same Stack (context menus, tooltips, ambient-
agent progress) are added after column.finish() and remain outside the
clip layer, so they're unaffected. The cloud-mode-v2 composing branch
above already uses Expanded (FlexFit::Tight) and shrinks correctly, so
it doesn't need this wrapper.

Fixes warpdotdev#10906
@cla-bot cla-bot Bot added the cla-signed label May 16, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 16, 2026
@SagarSDagdu SagarSDagdu marked this pull request as ready for review May 16, 2026 06:42
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 16, 2026

@SagarSDagdu

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR wraps the normal TerminalView::render column in Clipped so a short split pane constrains the terminal output/input column to the pane bounds while leaving later stack overlays outside the clip layer. The change is localized, matches the existing clipping pattern already used elsewhere in terminal rendering, and the PR includes visual before/after evidence plus manual validation.

Concerns

  • None.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested review from a team and captainsafia and removed request for a team May 16, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top split bottom-row buttons bleed into lower pane when pane is short

1 participant