* Prevent recursive VibeTunnel sessions (GitHub #95)
Added detection and prevention of nested VibeTunnel sessions to avoid
recursive 'vt' command execution.
Changes:
- Set INSIDE_VIBETUNNEL and VIBETUNNEL_SESSION environment variables when creating PTY sessions
- Added check in vt script to detect if already inside a VibeTunnel session
- Shows helpful error message when recursive session is attempted
This prevents the confusing behavior where users could run 'vt' inside a
VibeTunnel session, creating nested terminal instances. Now users get a
clear error message explaining they're already in a VibeTunnel session.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve recursive session prevention based on PR feedback
- Consolidate to single environment variable VIBETUNNEL_SESSION_ID
- Add session ID for debugging purposes as requested
- Show session ID in error message for better user feedback
- Remove redundant environment variables (INSIDE_VIBETUNNEL, VIBETUNNEL_SESSION)
This addresses feedback from PR #104 to use a single, more informative
environment variable that serves both purposes: preventing recursion
and providing debugging information.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add Shift+Tab support for Claude Code planning mode (GitHub #100)
Added proper Shift+Tab key sequence handling to enable Claude Code mode switching.
Changes:
- Added 'shift_tab' to SpecialKey type definition
- Updated input-manager.ts to detect Shift+Tab combination (e.shiftKey)
- Updated direct-keyboard-manager.ts for mobile Shift+Tab support
- Added shift_tab mapping to PTY manager (sends \x1b[Z escape sequence)
This allows users to press Shift+Tab in VibeTunnel to switch between Claude Code
modes (autoaccept, planning, regular) as expected.
Technical Details:
- Shift+Tab sends the standard terminal escape sequence \x1b[Z (CSI Z)
- Both desktop and mobile input handlers now support the key combination
- Maintains backward compatibility with regular Tab functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix Shift+Tab not being sent as special key
Added 'shift_tab' to the special keys list in input-manager.ts so it gets
sent as {"key": "shift_tab"} instead of {"text": "shift_tab"}.
This was the missing piece - the frontend was correctly detecting Shift+Tab
but then sending it as text instead of a special key, so the server couldn't
map it to the \x1b[Z escape sequence.
Now Shift+Tab will properly send {"key": "shift_tab"} in the API request.
* Fix failing CI test in session-list.test.ts
Updated test expectation to check for 'compactMode' instead of
non-existent 'showCreateModal' property. This was a stale test
that was unrelated to the Shift+Tab changes but was blocking CI.
All tests now pass.
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Add backpressure handling for process.stdout.write() in PTY output forwarding
- Pause PTY output when stdout buffer is full
- Resume on drain event to prevent CPU spinning
- Add backpressure logging for socket writes in sendInput()
- Add backpressure logging for file stream writes in AsciinemaWriter
- Remove unused bell detection code (was already commented out)
These changes prevent the hanging issue when pasting large amounts of text
by properly handling stream backpressure instead of blindly writing data.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add claude-patch.ts to enable debugging Claude Code with Node.js --inspect flag
- Temporarily disable bell character handling in pty-manager.ts due to VS Code terminal hanging issue
- Fix TypeScript linter errors across test files (replace any types with proper interfaces)
The bell character handling was causing VS Code terminals to hang when pasting certain content.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated all e2e tests to use --no-auth flag instead of username/password
- Fixed terminal buffer test to handle little-endian encoding correctly
- Fixed buffer size expectations to handle optimized empty terminals
- Fixed logs test to allow reasonable size after clearing
- Added --no-hq-auth flag to bypass HQ authentication for testing
- Add POST /api/sessions/:sessionId/reset-size endpoint to reset terminal size when clients disconnect
- Implement reset-size control pipe command in PTY manager
- Update session-view component to call reset-size on unmount
- Add terminal resize event listener in fwd.ts to track terminal size changes
- Fix source maps configuration for development mode:
- Set inline source maps with embedded sources in esbuild config
- Add source map settings to TypeScript configs
- Set NODE_ENV to development for dev builds
This ensures external terminals resize back to their actual size when the last web client disconnects.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed alias regex to handle both 'alias name=value' and 'name=value' formats
- Added platform-specific shell execution with proper flags for Windows/Unix
- Skip alias resolution on Windows (not supported)
- Use expanded alias value instead of running the alias name
- PowerShell uses -NoProfile -Command, cmd.exe uses /C, Unix shells use -c/-i
- Unified all command resolution logic in ProcessUtils.resolveCommand()
- Simplified alias handling to use interactive shell execution
- Fixed alias execution by using 'zsh -i -c' for proper alias loading
- Removed duplicate resolution code from pty-manager
- Commands are now resolved in order: PATH -> aliases -> shell builtins