Skip to content

Clip inline menu header to prevent split-pane overflow#10811

Merged
advait-m merged 1 commit into
warpdotdev:masterfrom
SagarSDagdu:fix/cloud-agent-composer-model-chip-overflow
May 17, 2026
Merged

Clip inline menu header to prevent split-pane overflow#10811
advait-m merged 1 commit into
warpdotdev:masterfrom
SagarSDagdu:fix/cloud-agent-composer-model-chip-overflow

Conversation

@SagarSDagdu
Copy link
Copy Markdown
Contributor

@SagarSDagdu SagarSDagdu commented May 13, 2026

Description

InlineMenuView::render_header in app/src/terminal/input/inline_menu/view.rs returned its header row unclipped, while the menu body below was already wrapped in Clipped. In a narrow split pane the header's trailing controls (drag indicator + e.g. "Manage defaults" button for the /model menu) painted past the pane boundary into the adjacent pane.

This PR wraps the returned header in Clipped to match the body's behavior. InlineMenuView is the shared inline menu used by /model, /commands, etc., so all of them benefit.

Note: an earlier revision of this PR also touched render_cloud_mode_v2_footer in agent_input_footer/mod.rs for the issue's original screenshot (the footer model chip overflow). Per review feedback that path is gated behind the dogfood-only CloudModeInputV2 flag, so I dropped that commit. The same Flex → Wrap/WrapFill treatment should be applied to the V2 footer before that flag promotes — tracked as a follow-up.

Videos

Before

Screen.Recording.2026-05-13.at.7.36.59.PM.mov

After

Screen.Recording.2026-05-13.at.7.39.15.PM.mov

Linked Issue

Fixes #10724

  • 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).

Testing

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

Reproduction:

  1. Open a Warp pane.
  2. Split the workspace so another pane is immediately adjacent.
  3. Narrow the first pane.
  4. Type /model (or any inline menu trigger) to open the inline menu.
  5. Verify the header row (tabs, drag indicator, "Manage defaults") stays inside the pane.

Before: Manage defaults and drag indicator extended past the divider into the adjacent pane.
After: the menu header clips at the pane edge, matching the menu body which was already clipped.

cargo fmt --check and cargo clippy -p warp --all-targets -- -D warnings both clean.

No integration test added — fix is a single Clipped wrapper and is most cheaply verified by manual repro in a narrow split pane.

Agent Mode

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

@cla-bot cla-bot Bot added the cla-signed label May 13, 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 13, 2026
@SagarSDagdu SagarSDagdu marked this pull request as ready for review May 13, 2026 14:10
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 13, 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: @zachbai.

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 updates two UI layout surfaces to keep cloud agent footer controls and inline menu header controls within narrow split-pane bounds by switching the V2 footer row to the existing wrap/fill pattern and clipping the inline menu header.

Concerns

  • No blocking correctness concerns found.
  • No security concerns found in the changed layout-only code.

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 a review from zachbai May 13, 2026 14:15
@SagarSDagdu
Copy link
Copy Markdown
Contributor Author

Hi @zachbai, could you please take a look at this? A small UI fix.

@zachbai zachbai requested review from advait-m and removed request for zachbai May 14, 2026 15:30
@zachbai
Copy link
Copy Markdown
Contributor

zachbai commented May 14, 2026

@advait-m can you take a look?

@advait-m
Copy link
Copy Markdown
Member

@advait-m can you take a look?

will do

Comment on lines +850 to +851
// Clip so trailing controls don't paint past the pane in a narrow split pane.
Some(Clipped::new(header).finish())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding the screen recordings here - this makes sense to me!

.with_child(right.finish())
.with_child(WrapFill::new(0., left.finish()).finish())
.with_child(WrapFill::new(0., right.finish()).finish())
.with_run_spacing(CLOUD_MODE_V2_FOOTER_GAP)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add before/after recording for this (can be just 1 vid or 2)? I'm trying to figure out what the original issue was here

Let me know if I missed catching this in original videos

Copy link
Copy Markdown
Contributor Author

@SagarSDagdu SagarSDagdu May 15, 2026

Choose a reason for hiding this comment

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

@advait-m I have added both the videos in PR description. In the first video, observe the first pane, when I reduce the width, the pane items overflow into the next pane's UI.

That doesn't happen in the second video

Copy link
Copy Markdown
Member

@advait-m advait-m May 15, 2026

Choose a reason for hiding this comment

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

@SagarSDagdu CloudModeInputV2 feature flag is dogfood-only so this actually isn't live anywhere, could you revert this part of the PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ah wait, I think it might be enabled through cloud_mode FF indirectly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

but yeah, I'm trying to understand which part this code change is fixing - the other change is fixing this piece:

image

Copy link
Copy Markdown
Contributor Author

@SagarSDagdu SagarSDagdu May 16, 2026

Choose a reason for hiding this comment

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

You're right that CloudModeInputV2 is dogfood-only, so that footer change wasn't fixing anything live. I've dropped commit 73552289 (the Flex → Wrap change in render_cloud_mode_v2_footer) via rebase + force-push. The PR is now scoped to just the inline-menu Clipped change, which fixes the overflow shown in the image you attached (the /model menu header). I'll leave a note that the V2 footer needs the same treatment before that flag promotes.

@advait-m

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool, thanks!

The InlineMenuView body is already wrapped in `Clipped`, but the
header row (label, tabs, drag indicator, "Manage defaults" trailing
button) was rendered raw. In a narrow split pane the trailing controls
painted past the pane boundary into the adjacent pane. Wrap the
returned header in `Clipped` to match the body's clipping behavior.

Refs warpdotdev#10724
@SagarSDagdu SagarSDagdu force-pushed the fix/cloud-agent-composer-model-chip-overflow branch from a1b17a6 to a6442c3 Compare May 16, 2026 06:09
@SagarSDagdu SagarSDagdu changed the title Wrap cloud agent composer footer to prevent split-pane overflow Clip inline menu header to prevent split-pane overflow May 16, 2026
@advait-m advait-m enabled auto-merge (squash) May 17, 2026 01:57
@advait-m advait-m merged commit 53da563 into warpdotdev:master May 17, 2026
31 checks passed
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.

Model chip overflows into adjacent pane in split-pane cloud agent composer

3 participants