fix: wrap agent prompt suggestions in narrow panes#12199
fix: wrap agent prompt suggestions in narrow panes#12199oz-for-oss[bot] wants to merge 4 commits into
Conversation
Co-Authored-By: oz-for-x[bot] <284697482+oz-for-x[bot]@users.noreply.github.com>
|
@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 |
|
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:
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>
|
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 Powered by Oz |
There was a problem hiding this comment.
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
|
@oz-agent can you add a little vertical padding to the button when it's hovered/expanded on? |
|
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:
Powered by Oz |
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). |
| if should_expand_button { | ||
| button.with_min_height(button_height).finish() | ||
| } else { | ||
| button.with_height(button_height).finish() | ||
| } |
There was a problem hiding this comment.
do we need this if we're conditionally configuring Text to be able to soft-wrap or not?
| Text::new_inline( | ||
| text, | ||
| appearance.ui_font_family(), | ||
| appearance.monospace_font_size(), | ||
| ) |
There was a problem hiding this comment.
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.
| @@ -14790,14 +14790,22 @@ impl Input { | |||
| fn apply_input_banner_padding( | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
sure, will add to screenshots
Co-Authored-By: Sathvik Vangavolu <113149539+vikvang@users.noreply.github.com> Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>




Closes #12198
Summary
Validation
./script/formatcargo clippy -p warp --lib --all-features --tests -- -D warningscargo test -p warp --lib terminal::view::tests::ctrl_c_does_not_accept_prompt_suggestion_banner --all-featuresNotes
CleanShot.2026-06-04.at.13.31.10.mp4