Grow the prompt popup with wrapped text so the typed tail stays visible - #112
Merged
Conversation
The text-prompt popup measured its height by counting `\n`-separated lines, but typed input never contains a newline — Enter submits — so a refine note, question, or rejection past the popup's 70-column inner width wrapped below the single visible row, hiding both the tail and the cursor. Measure with `Paragraph::line_count` at the popup's inner width instead, which counts wrapped rows and explicit newlines alike, so pre-seeded multi-line RejectWork buffers still size correctly. Past the 20-row clamp the paragraph scrolls to the bottom, keeping the cursor end in view rather than reintroducing the bug for very long text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKZGWmsroAvj47g2PjPYK4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Size the prompt popup from its wrapped text, not its newlines
The text-prompt popup (
Mode::Prompt— refine notes, questions, rejectionfeedback) computed its height by counting
\n-separated lines in the buffer.Typed input never contains a newline, since Enter submits, so the box stayed
three rows tall while the
Paragraph'sWrap { trim: false }wrapped anythingpast ~70 characters below the single visible row — hiding both the tail being
typed and the cursor.
crates/voro/src/ui.rsnow measures the popup withParagraph::line_count(inner_width)(the workspace already enables ratatui'sunstable-rendered-line-info), which counts wrapped rows and explicit newlinesalike, so pre-seeded multi-line RejectWork buffers (DESIGN.md §11c) still size
correctly. Width (72) and the 3..=20 height clamp are unchanged. When the
wrapped text exceeds the clamp the paragraph scrolls by the overflow so the
bottom — the cursor end — stays visible, rather than letting the same bug recur
for very long text. No keybinding or editing-model changes;
Mode::LinkPrisuntouched.
Verified: two new TestBackend render tests in
ui.rs— one asserts asingle-line buffer wider than the popup shows both its head and its
TAILMARK▏tail, the other that a buffer wrapping past the height clamp showsthe tail and no longer the head. Both fail against the previous rendering and
pass after the change.
cargo test --workspace(281 + 273 tests) andcargo clippy --workspace --all-targets -- -D warningspass;cargo fmt --all --checkis clean.