Repository navigation
fix(prompt): read a question card from the pane's bottom when its terminal is scrolled up - #402
Conversation
…minal is scrolled up The prompt reader parsed herdr's `visible` read, which is the pane's viewport. A pane whose terminal was scrolled up into its history (a drag or the wheel in the terminal lens) stays scrolled while the agent draws its next menu at the bottom, so the reader saw history, no known menu, and a blocked pane: every later omo or pi question became the fallback card with only Enter and Esc. Read herdr's `detection` source instead, the bottom screen herdr detects agents from, for the card, the check before an answer, and Codex's queue. An alternate-screen TUI cannot be scrolled, so it reads the same as before.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughPrompt parsing and Codex question-queue checks now read pane text from the detection buffer. The contract test scrolls the pane before checking its offset. The changelog describes question-card behavior when omo or pi panes are scrolled into history. ChangesPrompt screen reading
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The selected change is a changelog update describing the question-card fix for scrolled panes. No actionable merge-blocking risk is identified in what was reviewed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is narrowly scoped and retains checks before sending answers. No introduced security vulnerability was established, but the external terminal service’s read behavior has not been independently verified during state changes. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
While upstream CI waits for approval, I ran the same workflows on the fork at this head (991e99a):
|
Bumps package.json and herdr-plugin.toml to 0.3.48, moves the Unreleased notes under [0.3.48] - 2026-10-04 (with the PR links #403, #405 and #406 lacked), and adds the compare link. Raises the remote PC bundle to 15 (the bridge starts herdr on a stale socket, #405; `/api/worktree/create` takes `agent`, #401): push the `remote-v15` tag and let the bundle workflow publish before running release.yml. Carries #393, #376, #403, #405, #402, #400, #397, #406, #401, #407, #408. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
Change
When a pane's terminal is scrolled up into its history (a drag or the wheel in the terminal lens), every later omo or pi question shows in the chat as the last-resort card with only Enter and Esc, instead of the question with its options. The first question in a session usually renders fine; once the terminal has been scrolled, the following ones do not.
Cause: the prompt reader parsed herdr's
visibleread, which is the pane's viewport. herdr keeps a scrolled viewport where it is while the agent draws its next menu at the bottom, so the reader got history, recognised no menu, and, with herdr reporting the pane blocked, fell back to the generic card (prompt: pi pane … is blocked on a screen no reader knows; fallback card (2 options)in the server log).The reader now uses herdr's
detectionsource, the bottom screen herdr itself detects agents from, wherever the viewport is. One helper (liveScreeninserver/prompt.ts) serves every screen read the prompt flow parses: the card, the check before an answer is typed, the fallback card, and Codex's queue open/close. Claude's grey suggestion keeps itsvisibleANSI read, sincedetectionreturns text only.detectionreads the same asvisible.detectionis a passive read: unlike therecenttext reads fix: prevent chat polling from scrolling the desktop Codex TUI #393 moved off, it sends no input to the pane (checked below).Validation
server/omo-prompt.contract.test.tsnow scrolls the pane a whole screen up into its history after the first answer, then expects the second question's card. Without the change it fails (no card); with it, it passes.detectionvsvisible(scratch test, not committed): an idle alternate-screen TUI (mouse reporting on) and a main-screen program, each polled three times. Unscrolled,detectionequalsvisible. Scrolled, onlydetectionstill shows the menu. The program's stdin received nothing.generate:types --check,typecheckandbuildpass.test:unit: 1100 pass; the 14 failures (Codex resume-selection argv and pi's /var vs /private/var tmpdir, macOS-specific) are the same set onupstream/mainwithout this change.test:integrationon macOS: the failing set with this change is the same as onupstream/main(Codex/omo session binding and a few others that fail on this Mac either way); the prompt, pi, secret and omo-prompt suites pass.Not verified: Linux and Windows CI (fork CI waits for approval), and a real phone. The scroll was driven through herdr's
pane.scroll, the same call the terminal lens makes.