Repository navigation
FW6-ALT: hybrid scroll routing for alt-screen panes - #97
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e gating AI Lead integration fixes on FW6-ALT (adversarial review): - restore the coalescer reset in effect cleanup (pending 'scheduled' state otherwise deadlocks app-scroll after an enabled toggle) - prime fetch wrapped in try/catch (transport errors stay unclassified instead of unhandled rejections) and gated to touch-enabled viewports (desktop no longer issues unused capture round-trips) - overlay reports classification before the generation check so a quick dismiss during the spinner cannot discard it - new journey: unclassified thin pane — overlay spinner auto-closes, caches app-scroll, second drag emits navigate frames Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chrome's scroll anchoring races the manual prepend compensation and double-compensates when it engages (load-dependent), causing a visible jump and the prepend journey's full-suite flake. The overlay owns its scroll math; overflow-anchor none makes it the only actor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughTerminal scrollback is classified as history or app-scroll, cached per history session, and propagated through the terminal surface. Touch gestures open history overlays for history-rich panes and emit batched navigation scroll operations for app-scroll panes, with unit and journey coverage. ChangesHybrid terminal scroll routing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TerminalView
participant TouchScroll
participant HistoryOverlay
participant Agentd
TerminalView->>TouchScroll: pass cached historyScrollMode
TouchScroll->>HistoryOverlay: open overlay for history mode
HistoryOverlay->>TerminalView: report resolved mode
TouchScroll->>Agentd: send navigate scroll for app-scroll mode
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/dashboard/src/components/TerminalView.tsx`:
- Around line 66-70: Update the scroll-mode cache effect around
scrollModeCacheRef and historySessionId so it deletes the cached entry only when
the session ID actually changes, not on status or tmuxSessionKey updates.
Preserve cache entries across disconnect/reconnect cycles while retaining
refresh behavior for pane switches and history-overlay openings, including the
related logic in the effect body around lines 238–270.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1ad652e8-cf4b-4fa7-a93f-a2a92ad5de0c
📒 Files selected for processing (14)
apps/dashboard/src/components/TerminalView.tsxapps/dashboard/src/components/terminal/TerminalHistoryOverlay.tsxapps/dashboard/src/components/terminal/TerminalSurface.tsxapps/dashboard/src/components/terminal/terminalScrollMode.test.tsapps/dashboard/src/components/terminal/terminalScrollMode.tsapps/dashboard/src/hooks/useTerminalTouchScroll.test.tsapps/dashboard/src/hooks/useTerminalTouchScroll.tstasks/2026-07-21-fw6-alt-brief.mdtasks/frontend-ux-handoffs/fw6-alt.mdtasks/frontend-ux-log.mdtests/journeys/command-center.journey.spec.tstests/journeys/controlPlaneMock.tstests/journeys/fw6-focus.journey.spec.tstests/journeys/fw6-precision.journey.spec.ts
|
Re CodeRabbit's cache-wipe note: intentional. Reconnects and viewport-mode flips should re-probe — the pane's history profile can change while detached, and a stale 'history' classification would reopen the black-overlay bug class this PR fixes. Cost is one 500-line capture per reconnect on touch viewports only (the prime is gated), which we accept for correctness. |
Device finding 6b: the FW6-HIST local history overlay showed a black screen on claude-code panes — alt-screen apps write nothing to tmux history, so the capture legitimately returned one line (root-caused from production audit logs to the exact pane).
What changed
navigate {op:'scroll'}transport, so the app scrolls its own transcript — identical to desktop trackpad behavior. Frame-coalesced (restored 92d98d3 coalescer), ±120/message, read-only sends nothing.overflow-anchor: none.Review chain
🤖 Generated with Claude Code
Summary by CodeRabbit