fix: page keys scroll pane scrollback at zsh and REPL prompts - #2191
fix: page keys scroll pane scrollback at zsh and REPL prompts#2191HackAttack wants to merge 1 commit into
Conversation
PageUp/PageDown were forwarded to the pane whenever DECCKM (application cursor) was on, assuming only primary-screen pagers enable it, but zsh's line editor also enables DECCKM, as do REPLs such as python3. The result was PageUp scrolling shell history instead of Herdr scrollback. Bracketed paste discriminates the two: it means the app accepts typed or pasted text at a prompt, so line editors enable it and pagers do not.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change allows PageUp to scroll host pane history when DECCKM and bracketed paste are active. Regression tests verify local key consumption, scrollback movement, and no shell or PTY input. ChangesPageUp host scrollback
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR refines plain PageUp/PageDown routing so shell-like primary-screen sessions using both application-cursor mode and bracketed paste scroll Herdr’s pane history instead of sending the keys to the prompt.
Confidence Score: 5/5The PR appears safe to merge with the intended prompt and pager routing behavior covered in both local and headless paths. The changed predicate consistently routes shell-like DECCKM plus bracketed-paste states to host scrollback while retaining existing alternate-screen, mouse-reporting, and pager-like forwarding guards.
|
| Filename | Overview |
|---|---|
| src/pane/terminal.rs | Updates the terminal-mode predicate to classify DECCKM plus bracketed paste as shell-like and adds focused unit coverage. |
| src/app/input/terminal.rs | Adds an integration test confirming PageUp scrolls pane history rather than reaching a zsh-like prompt. |
| src/server/headless.rs | Adds equivalent coverage for PageUp routing through terminal-attach clients. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
K[Plain PageUp or PageDown] --> A{Alternate screen or mouse reporting?}
A -- Yes --> F[Forward key to terminal application]
A -- No --> D{DECCKM enabled?}
D -- No --> S[Scroll Herdr pane scrollback]
D -- Yes --> B{Bracketed paste enabled?}
B -- Yes --> S
B -- No --> F
Reviews (1): Last reviewed commit: "fix: page keys scroll pane scrollback at..." | Re-trigger Greptile
PageUp/PageDown were forwarded to the pane whenever DECCKM (application cursor) was on, assuming only primary-screen pagers enable it, but zsh's line editor also enables DECCKM, as do REPLs such as python3. The result was PageUp scrolling shell history instead of Herdr scrollback.
Bracketed paste discriminates the two: it means the app accepts typed or pasted text at a prompt, so line editors enable it and pagers do not.
Related: #953