Repository navigation
fix(mobile): native touch scroll-back in attached tmux terminals (FW6-SCROLL) - #94
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orts + pager session fix Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d-session History (3f085d9)
The pager bottom-anchors and virtualizes rows, so asserting the oldest line right after open raced the anchor rAF. Assert the line count, pin the viewport to the top, then assert content. 10x repeat green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughChangesTerminal scroll-back
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TerminalView
participant useTerminalTouchScroll
participant dispatchTerminalTouchScroll
participant XTerminal
TerminalView->>useTerminalTouchScroll: Provide writable state and scroll input callback
useTerminalTouchScroll->>dispatchTerminalTouchScroll: Dispatch drag or momentum delta
dispatchTerminalTouchScroll->>XTerminal: Scroll directly or emit SGR wheel input
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
Summary
Fixes owner device finding: swipe-scrolling an attached tmux terminal on mobile showed no history.
Root cause (verified with byte-level probes): an attached tmux client always runs the outer terminal on the alternate screen, where xterm's local
scrollLines— what touch scrolling called — is a no-op. Live swipe scroll-back never worked in attached mode; the pre-Wave-6 stream view (plain DOM scroll) masked the gap, and attach-everywhere + Focus made it the primary surface.Fix: vertical touch drag and momentum now synthesize SGR mouse-wheel reports at the finger's cell position whenever the buffer is alternate, mouse tracking is active (
tmux mouse on— set on both hosts), and the connection is writable. tmux then scrolls copy-mode natively (verified working while zoomed, auto-exits at bottom) and passes wheel through to alt-screen TUIs (codex transcript scrolls itself) — identical to native desktop tmux behavior, which is why trackpad scroll already worked. Normal-buffer terminals keep the existing local-scroll path; read-only terminals send nothing.Also fixes a second defect found during diagnosis: after an FW6-FOCUS in-session switch, the History pager captured scrollback for the originally-attached session instead of the selected one (
historySessionIdnow threads the selected session; the WebSocket keeps its attachment identity).Review chain
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests