Repository navigation
Releases
Release v0.7.1
Release v0.7.1 - Fix mouse wheel scrolling with Claude Code
MAJOR FIX: Mouse wheel scrolling now works with TUI apps!
Root Cause (from Gemini/ChatGPT analysis):
- Claude Code uses alternate screen buffer (DECSET ?1049h)
- Claude Code enables mouse reporting mode (DECSET 1000/1002/1006)
- In this mode, xterm.js forwards wheel events to app instead of scrolling viewport
- Our auto-scroll logic was also fighting manual scroll attempts
Solution Implemented:
-
Custom wheel handler (Option A):
- Detects alternate buffer with term.buffer.active.type
- Sends arrow key sequences (\x1b[A / \x1b[B) to PTY on wheel
- Allows Shift+Wheel to force terminal scrollback
- 3-5 arrow keys per scroll tick for smooth scrolling
-
Smart auto-scroll (Option D):
- Only auto-scrolls if user hasn't manually scrolled up
- Tracks scroll position with onScroll handler
- Re-enables when user returns to bottom
- Prevents fighting manual scrolling
-
Debug logging:
- Logs buffer type changes to console
- Helps validate fix is working
Testing:
- Start: term-wrapper web claude
- Mouse wheel: scrolls Claude output (sends arrow keys)
- Shift+wheel: scrolls terminal history (bypasses app)
- Console: shows "Buffer type: alternate/normal"
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.7.0
Release v0.7.0 - Add --host and --port flags to web command
NEW FEATURE: User can now specify host and port for web command
Problem:
- User wanted to run: term-wrapper web --host 100.67.148.16 claude
- But web command didn't support --host or --port flags
- ServerManager always started server with hardcoded localhost:0
Solution:
- Added --host and --port flags to web subparser
- Modified cli.py to pass these to ServerManager when web command used
- Updated ServerManager.get_server_url() to accept optional host/port
- Modified _start_server() to pass host/port to server command
- Updated _wait_for_server_start() to parse and return both host and port
Usage:
- term-wrapper web --host 100.67.148.16 --port 8000 claude
- term-wrapper web --host 0.0.0.0 claude (auto-assign port)
- term-wrapper web claude (default: localhost, auto-assign port)
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.11
Release v0.6.11 - Security fix: bind to localhost only
SECURITY FIX: Changed default host from 0.0.0.0 to 127.0.0.1
Problem:
- Server was binding to 0.0.0.0 (all network interfaces) by default
- This made the terminal accessible from other machines on the network
- Major security risk for local development tool
Solution:
- Changed default --host from 0.0.0.0 to 127.0.0.1 (localhost only)
- Updated help text to clarify security implications
- Display "localhost" in URL for better UX
- Users can still explicitly use --host 0.0.0.0 if needed
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.10
Release v0.6.10 - Remove pointer-events: none blocking touch
CRITICAL FIX: pointer-events: none on .xterm-viewport was blocking ALL touch events!
Problem in v0.6.9:
- pointer-events: none prevented touch events from reaching viewport element
- Our touch handlers never fired because events were blocked at CSS level
- All the capture/stopPropagation logic was correct but events never arrived
Solution in v0.6.10:
- Removed pointer-events: none from .xterm-viewport
- Changed to direct viewport.scrollTop manipulation (simpler, more reliable)
- Direct 1:1 mapping: finger movement = scroll position
- No more term.scrollLines() API calls or complex accumulator logic
- Added debug console logging to verify touch events fire
Technical changes:
- handleTouchMove: viewport.scrollTop = initialScrollTop + totalDiff
- Momentum uses requestAnimationFrame instead of setTimeout
- Much simpler and more direct approach
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.9
Release v0.6.9 - Fix continuous touch scrolling (intercept xterm.js)
CRITICAL BREAKTHROUGH: Discovered xterm.js's Gesture system was blocking our touch handlers.
Root cause:
- xterm.js registers touch handlers on .xterm-screen via Gesture.addTarget()
- These handlers use preventDefault() and stopPropagation()
- Our bubble-phase handlers never received touch events
Solution:
- Use capture: true to intercept BEFORE xterm.js
- Call stopPropagation() to block xterm.js's Gesture handlers
- Add touch-action: none to .xterm-screen element
Research:
- Analyzed xterm.js Viewport.ts and VS Code Gesture system source
- Found xterm.js Issue #5377 confirms limited touch support
- Issue #594 explains viewport structure interferes with touch
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.8
Release v0.6.8 - CI workflow fixes
- Fixed CI compatibility with Ubuntu 24.04 (libasound2t64)
- All tests passing successfully
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.6
Release v0.6.6 - Fix continuous touch scrolling
CRITICAL FIX: Scrolling now works continuously while dragging
Problem reported by user:
- Expected: Hold and drag finger → scroll continuously
- Actual: Scrolled once, then stopped until finger lifted
Root cause:
- Small continuous movements (2-5px/frame) rounded to 0 lines
- Formula: round(3px / 50 * 5) = round(0.3) = 0 ❌
- Only first large movement scrolled
Solution:
- Accumulate fractional scroll amounts
- scrollAccumulator += (diff / 50 * multiplier)
- Scroll when accumulated >= 1 line
- Preserve fractional remainder for smooth continuous scrolling
Example:
- Frame 1: 3px → 0.3 lines accumulated
- Frame 2: 3px → 0.6 lines accumulated
- Frame 3: 3px → 0.9 lines accumulated
- Frame 4: 3px → 1.2 lines → SCROLL 1 line, keep 0.2
Now supports smooth dragging at any speed!
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.5
Release v0.6.5 - Much faster touch scrolling
Implements variable speed scrolling:
- Slow swipe: 5 lines per 50px (was 3)
- Fast swipe: 8 lines per 50px
- Very fast swipe: 12 lines per 50px (4x faster!)
Based on velocity detection for natural feel.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.4
Release v0.6.4 - Add version display to web UI
- Shows version number in header for easy verification
- Adds /version API endpoint
- Helps debug issues with old servers/cache
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Release v0.6.3
Release v0.6.3 - Fix thinking indicator duplication
This release fixes the thinking indicator duplication issue through
deep ANSI sequence analysis and auto-scroll implementation.
Root Cause Identified
Claude Code writes multiple status lines as NEW lines (not updating
in-place). Analysis revealed:
- NO cursor save/restore sequences
- NO cursor positioning commands
- NO line clearing sequences
- Simple line-by-line output with newlines
Each status update appends a new line to the buffer. In native terminals,
users stay at bottom and only see latest line. In our mobile viewport,
both old and new status lines were visible simultaneously.
Fixes Applied
-
Auto-scroll to bottom during streaming (app.js)
- Added onWriteParsed handler to keep viewport at bottom
- Scrolls if within 3 lines of bottom
- Matches native terminal behavior
- Old status lines scroll out of view
-
Filter ESC[<u sequence (api.py)
- Non-standard sequence appearing 60 times
- May interfere with xterm.js cursor positioning
- Pattern: [?25l[<u[?1004l[?2004l[?25h
-
Reduced scrollback to 500 lines
- Better mobile performance
- Still enough history for typical usage
Investigation Documentation
- test_screencast/ROOT_CAUSE_ANALYSIS.md - Complete analysis
- test_screencast/DUPLICATION_FOUND.md - Frame evidence
- test_screencast/AFTER_FIX_ANALYSIS.md - Previous testing
- test_screencast/analysis_frame_*.png - Visual evidence
- test_screencast/claude_ansi_output.txt - Raw PTY capture
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com