- Update is_pid_alive to detect zombie processes (status 'Z') as dead
- Add spawn_type field to distinguish PTY vs socket sessions
- Add reap_zombies function to clean up zombie children
- Only attempt zombie reaping for PTY sessions to avoid interfering with osascript processes
- Fix session cleanup to work properly with zombie processes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Use proper type casting for ioctl on both Linux and non-Linux platforms
- Separate platform-specific code blocks for clarity
- Fix potential clippy warnings on Linux CI
- Track SSE reconnection attempts in session-view
- Mark sessions as exited after 3 failed reconnects within 5 seconds
- Disconnect stream and load final snapshot when giving up
- Provides fallback when server exit events aren't reliably sent
- Improves UX by stopping endless reconnection attempts
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- DELETE endpoint now waits up to 3 seconds for process to actually die
- Polls every 100ms to confirm process termination after SIGKILL
- Returns different messages based on whether process confirmed dead
- Makes is_pid_alive function public for reuse
- Provides more reliable session killing with proper status updates
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update session.json status to "exited" when killing sessions via DELETE endpoint
- Set exit_code to 9 (SIGKILL) when process is killed
- Handle already-dead sessions by ensuring they're marked as "exited"
- Add PID tracking to PTY sessions so they can be properly killed
- Add reconnection detection in session-view: mark sessions as exited after 3 failed reconnects within 5 seconds
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move stopKillingAnimation() to finally block to ensure it always runs
- Prevents animation from getting stuck when kill operation fails
- Ensures proper cleanup regardless of success or error conditions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 5-second timeout when waiting for PTY stream-out file creation
- This prevents indefinite hanging when PTY background thread fails
- Send proper exit events to streaming clients when PTY process terminates
- Exit event format matches web frontend expectations: ["exit", exitCode, sessionId]
- Ensures web UI can properly handle session termination for PTY fallback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed redundant continue statements in loops
- Replaced manual string prefix stripping with strip_prefix method
- Fixed wildcard pattern that covered other patterns
- Removed redundant clone and unnecessary return value
- Used format string interpolation for cleaner code
- Removed unused imports and variables
- All Clippy checks now pass with -D warnings
Change API response message from 'Terminal spawned successfully' to
'Session created successfully' for PTY fallback sessions. This allows
the web frontend to properly navigate to session-view instead of
treating it as a terminal window spawn.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Applied automatic Clippy fixes for better code quality
- Removed redundant continue statements at the end of match arms
- Fixed unused variable warnings by prefixing with underscore
- Applied cargo fmt to ensure consistent formatting
- Add setup_shutdown_handler() to catch SIGTERM and SIGINT signals
- Create update_all_sessions_to_exited() to mark running sessions as exited
- Update handle_pty_session() to mark sessions as exited when PTY closes naturally
- Integrate signal handling into main server startup for both scenarios
- Ensures session.json files accurately reflect process state after server shutdown
- Fixes issue where sessions remain "running" after server restart or normal exit
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed Swift formatting issues in AppConstants.swift and VibeTunnelApp.swift
- Fixed Rust formatting in tty-fwd source files
- CI should now pass formatting checks
- Changed swift.yml, rust.yml, and node.yml from direct triggers to workflow_call
- This fixes the workflow configuration error causing immediate CI failures
- Reusable workflows must use workflow_call when invoked by other workflows
- Fixed SwiftLint error by changing snake_case variable name to camelCase
- Added small corner radius to Create New Session modal
- Increased padding between KILL and CREATE buttons in header
- Remove XTerm.js dependencies (@xterm/xterm, @xterm/addon-fit, @xterm/addon-web-links, asciinema-player)
- Switch terminal component to use @xterm/headless for better performance and compatibility
- Simplify build process by removing unused renderer and mobile-terminal components
- Update package.json scripts to use asset bundling approach
- Fix TypeScript imports and remove deprecated addons
- Streamline terminal implementation for improved reliability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds complete PTY fallback functionality when VibeTunnel.app socket is unavailable:
- Implements spawn_via_pty() with full bidirectional I/O
- Creates PTY master/slave, forks child process, and handles stdin/stdout
- Fixes race condition by creating session.json synchronously before API response
- Maintains compatibility with existing session format and API structure
- Enables cross-platform terminal functionality without requiring macOS app
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change button order to: ESC, ⇥, ABC123, CTRL, ⏎
- Use larger tab symbol (⇥) and enter symbol (⏎)
- Keep CTRL as text, ABC123 in middle position
- Improve visual consistency with symbol sizing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Group related buttons on left: SHOW/HIDE EXITED, CLEAN EXITED, KILL
- Position CREATE button on right side for mobile layout
- Add exited session count to button text for better UX
- Conditionally show SHOW/HIDE EXITED only when exited sessions exist
- Wire up clean exited functionality from header to session list
- Maintain consistent button styling with black backgrounds and colored borders
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Convert hide exited checkbox to button toggle matching theme style
- Use "SHOW ALL" / "HIDE EXITED" text based on state
- Blue border when active, gray when inactive
- Standardize all header buttons to small size (px-2 py-1 text-xs)
- Consistent button styling across mobile and desktop layouts
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Apply consistent black theme across all components with colored borders
- Add animated VibeTunnel logo with rainbow scrolling gradient
- Implement comprehensive mobile input controls with Ctrl+Alpha overlay
- Add fit-to-width toggle button in session view header with scroll preservation
- Enhance mobile experience with proper viewport handling and keyboard positioning
- Update button styling to use black backgrounds with colored borders throughout
- Resize scroll-to-bottom button for better mobile accessibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Instead of typing commands character by character, which can be slow
and error-prone with special characters, we now:
1. Copy the command to clipboard using NSPasteboard
2. Use Cmd+V to paste it in the terminal
3. Press Enter to execute
This approach is more reliable, faster, and handles special characters
better. Terminal.app continues to use 'do script' since it supports
it natively.
Replace requestRenderBuffer() with direct renderBuffer() call during
momentum scrolling to avoid competing requestAnimationFrame systems.
Before: Momentum RAF + render queue RAF = scheduling conflicts & jank
After: Single momentum RAF with synchronous rendering = smooth scrolling
This provides buttery smooth momentum scrolling on mobile while
maintaining < 2ms render times and proper RAF batching for other operations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features added:
- Debug overlay showing render performance metrics (renders, avg time, last time)
- Activates only when ?debug or &debug is in URL query parameters
- Real-time updates during scrolling and terminal operations
- Scroll-to-bottom indicator appears when user scrolls up from bottom
- Instantly scrolls to bottom and re-enables follow cursor when clicked
- Restore smooth fractional pixel scrolling for better UX
Performance improvements:
- Proper render count tracking at start of renderBuffer()
- High-precision timing using performance.now()
- Force component re-render in debug mode for live metrics
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace blind UTF-8 conversion with escape-sequence-aware processing:
- Add proper ANSI escape sequence parser (CSI, OSC, simple sequences)
- Buffer at escape sequence boundaries instead of arbitrary UTF-8 boundaries
- Preserve complete escape sequences as atomic units during conversion
- Only apply UTF-8 validation to text content between escape sequences
- Eliminates rendering artifacts in complex terminal applications like Claude
This maintains full JSON/asciinema compatibility while fixing the
fundamental issue where escape sequences were being corrupted by
UTF-8 validation during cast file generation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add HTML escaping to prevent HTML injection in terminal output
- Implement smart follow cursor with programmatic scroll protection
- Add output batching for SSE streams (~60fps) to improve performance
- Use integer pixel positions for crisp text rendering
- Preserve .vibetunnel folder contents on server restart
- Restrict mobile keyboard to actual mobile devices only
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Modified snapshot endpoint to find the last screen clear command
- Only includes content after the last clear for much smaller snapshots
- Preserves the last resize event before clear to maintain terminal dimensions
- Detects common clear sequences: \x1b[2J, \x1b[3J, \x1b[H\x1b[2J, \x1bc
- Logs reduction percentage showing data savings
- Falls back to full content if no clear command found
- Dramatically reduces snapshot size for long-running sessions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed 10-second refresh interval that was fetching new snapshots continuously
- Initial snapshot load is sufficient for session card preview
- Reduces server load and unnecessary network requests
- Session cards now load once and display static snapshot content
- Interactive session view still provides real-time updates via streaming
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed from single large write to batched writes (~1MB per batch)
- Prevents "write data discarded, use flow control" errors
- Flushes batches before resize events to maintain proper sequence
- Balances performance with buffer limits for reliable data transfer
- Handles large session dumps without data loss
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced Renderer class with new vibe-terminal component for interactive sessions
- Integrated CastConverter.connectToStream() for real-time SSE streaming
- Added proper stream connection management with cleanup on disconnect
- Implemented automatic snapshot loading when sessions exit
- Updated copy functionality to work with DOM-based text selection
- Enhanced terminal initialization lifecycle with proper event handling
- Maintained all mobile input controls and keyboard functionality
- Fixed TypeScript type errors for viewport cleanup functionality
- Improved loading states and error handling for network issues
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added connectToStream() method that connects terminal to SSE streams
- Handles header messages with terminal dimensions for initial sizing
- Processes cast events for output ('o') and resize ('r') operations
- Detects session exit events and cleans up connections automatically
- Dispatches custom events for terminal-resize and session-exit
- Returns connection object with EventSource and disconnect method for cleanup
- Uses followCursor=true for live streaming vs false for dumps
- Comprehensive error handling and connection state management
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added dumpToTerminal() method that builds entire cast content into one string and writes it all at once for maximum performance
- Handles resize ('r') events by tracking final terminal dimensions and applying them before writing content
- Processes output ('o') events into a single concatenated string for the fastest possible loading
- Ignores input ('i') events during dump as they're not needed for display
- Updated session cards to use the new fast dump method instead of manual parsing
- Results in dramatically faster session card loading and refresh
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced Renderer class with new vibe-terminal component
- Updated session card to use DOM-based terminal instead of XTerm.js directly
- Implemented snapshot loading with cast file parsing
- Added automatic refresh every 10 seconds
- Configured terminal for card display with smaller font and horizontal fitting
- Disabled pointer events to allow click-through to card selection
- Simplified lifecycle management using Lit component patterns
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed incomplete RGB color object handling that was causing type errors
- Simplified color handling to support standard palette colors and 24-bit RGB
- Fixed horizontal scrolling container null check
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed console.log statements from viewportY setter, fitTerminal, setupResize, scrollViewportPixels, momentum scrolling, renderBuffer, scrollToBottom, and followCursor methods
- Cleaned up terminal creation logging
- Improved color handling to support 24-bit RGB colors and RGB objects
- Enhanced write method with followCursor parameter for better cursor tracking
- Added followCursor method for automatic cursor visibility during playback
- Updated test page with cast file playback functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>