Fix overlay clipping for long prompts#19
Conversation
|
Updated this PR with the follow-up fix from local testing. The new approach keeps the overlay modal, but splits it into a bounded scrollable question/context pane plus sticky answers and sticky help/footer rows. This avoids both failure modes we saw: answer rows being pushed off-screen, and the top of long prompts being clipped. Overlay prompt scrolling is handled with I also refreshed the PR description with before/after screenshots and validation details. Disclosure: I'm a developer - but not a TypeScript developer. |
dbb46c4 to
78c4eac
Compare
78c4eac to
c23eb54
Compare
|
Added another follow-up for custom/freeform responses: in overlay editor modes, the layout now prioritizes height for the editor area and caps the editor viewport in a way that preserves multiple wrapped input rows near the cursor. This addresses the case where a long custom response wrapped but only the first row was visible in the constrained overlay. Validation: |
Summary
PageUp/PageDown, plusHome/EndandCtrl+u/Ctrl+dwhile in select mode.↑,↓,↕) so users can tell when hidden prompt text exists above or below.Why
The first terminal-height fix kept the answer rows and help/footer visible, but for very long questions/context it could center the viewport around the controls and clip the beginning of the prompt. Falling back to inline mode was also not sufficient because Pi inline custom UI is still an active TUI component, so terminal scrollback is not reliable while the prompt is open.
This update keeps the modal overlay but gives the prompt itself its own bounded scroll area. That lets users read the prompt from the top, scroll through long content, and still see/select answers without hiding the dialog. When the user switches to a custom response or comment editor, the layout shifts height toward the editor so long wrapped input remains readable.
Screenshots
Before
After
Validation
bun testnpm run checkask_userprompts, including longquestiontext and longcontexttext.