Skip to content

fix: wrap agent prompt suggestions in narrow panes#12199

Open
oz-for-oss[bot] wants to merge 4 commits into
masterfrom
oz-agent/implement-issue-12198
Open

fix: wrap agent prompt suggestions in narrow panes#12199
oz-for-oss[bot] wants to merge 4 commits into
masterfrom
oz-agent/implement-issue-12198

Conversation

@oz-for-oss
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot commented Jun 4, 2026

Closes #12198

Summary

  • Allow agent prompt suggestion text to wrap in narrow split-pane layouts.
  • Let the prompt suggestion banner and button grow vertically instead of clipping to fixed heights.

Validation

  • ./script/format
  • cargo clippy -p warp --lib --all-features --tests -- -D warnings
  • cargo test -p warp --lib terminal::view::tests::ctrl_c_does_not_accept_prompt_suggestion_banner --all-features

Notes

  • No approved spec context was available.
  • Full package Clippy with all targets was attempted but blocked by missing generated channel config files for app binary targets in this environment; the app library target passed Clippy.
CleanShot.2026-06-04.at.13.31.10.mp4

Co-Authored-By: oz-for-x[bot] <284697482+oz-for-x[bot]@users.noreply.github.com>
@vikvang
Copy link
Copy Markdown
Contributor

vikvang commented Jun 4, 2026

@oz-agent this isn't the exact fix I was looking for. by default, we should keep the old state with clipping, but on hover, i would like to see the expanded state

@oz-for-oss
Copy link
Copy Markdown
Contributor Author

oz-for-oss Bot commented Jun 4, 2026

@vikvang

I'm working on changes requested in this PR (responding to a PR conversation comment).

You can view the conversation on Warp.

I pushed changes to this PR based on the comment.

Next steps:

  • Review the changes pushed to this PR.
  • Follow up with another comment if further adjustments are needed.

Powered by Oz

Keep agent prompt suggestions clipped by default and allow the banner and button to grow only while hovered.

Co-Authored-By: Sathvik Vangavolu <113149539+vikvang@users.noreply.github.com>

Co-Authored-By: Oz <oz-agent@warp.dev>
@vikvang vikvang marked this pull request as ready for review June 4, 2026 16:44
@oz-for-oss
Copy link
Copy Markdown
Contributor Author

oz-for-oss Bot commented Jun 4, 2026

@vikvang

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

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

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 Author

@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 the prompt suggestion banner/button layout so suggestion text can wrap and the banner can grow vertically in narrow panes.

Concerns

  • ⚠️ [IMPORTANT] This is a user-facing UI/layout change, but the PR description does not include screenshots or a screen recording demonstrating the wrapped prompt suggestion in a narrow split-pane layout. For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

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

Powered by Oz

@vikvang
Copy link
Copy Markdown
Contributor

vikvang commented Jun 4, 2026

@oz-agent can you add a little vertical padding to the button when it's hovered/expanded on?

@oz-for-oss
Copy link
Copy Markdown
Contributor Author

oz-for-oss Bot commented Jun 4, 2026

@vikvang

I'm working on changes requested in this PR (responding to a PR conversation comment).

You can view the conversation on Warp.

I pushed changes to this PR based on the comment.

Next steps:

  • Review the changes pushed to this PR.
  • Follow up with another comment if further adjustments are needed.

Powered by Oz

@vikvang vikvang requested a review from vorporeal June 4, 2026 17:30
@vorporeal
Copy link
Copy Markdown
Contributor

can you add a little vertical padding to the button when it's hovered/expanded on?

semantically, it's not that we should be adding padding only when it's hovered/expanded, it's that we should structure the button so that its height is implicitly determined based on the height of the text content + some vertical padding. this way, if we change it from being one line of text to two, everything will still naturally render properly (as we always have some vertical padding).

Comment on lines +278 to +282
if should_expand_button {
button.with_min_height(button_height).finish()
} else {
button.with_height(button_height).finish()
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need this if we're conditionally configuring Text to be able to soft-wrap or not?

Comment on lines +179 to +183
Text::new_inline(
text,
appearance.ui_font_family(),
appearance.monospace_font_size(),
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Text::new_inline() is just Text but without enabling soft-wrapping.

I think it would be clearer to create a single Text object, and conditionally invoke the soft_wrap() function on it.

Comment thread app/src/terminal/input.rs
@@ -14790,14 +14790,22 @@ impl Input {
fn apply_input_banner_padding(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this gets called from a number of places (for different types of terminal inputs - universal/classic/etc).

can you make sure that they all function in reasonable ways when this doesn't have a fixed height? would be good to include screenshots.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sure, will add to screenshots

Copy link
Copy Markdown
Contributor

@vikvang vikvang Jun 4, 2026

Choose a reason for hiding this comment

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

CleanShot 2026-06-04 at 17 11 02@2x CleanShot 2026-06-04 at 17 05 27@2x CleanShot 2026-06-04 at 17 05 15@2x CleanShot 2026-06-04 at 17 04 54@2x

Here are some screenshots with varying amounts of pane sizing.

Co-Authored-By: Sathvik Vangavolu <113149539+vikvang@users.noreply.github.com>
Co-Authored-By: Oz <oz-agent@warp.dev>
@vikvang vikvang requested review from vikvang and vorporeal June 4, 2026 21:14
Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent suggested prompts cut off when panes are split

3 participants