The working directory input was displaying formatted paths (~/Documents) but
storing them as-is when edited, causing backend errors since it expects
absolute paths.
Reverted to showing raw paths in the input field. The file browser component
is unaffected as it correctly only formats for display, not for input.
This ensures workingDir always contains absolute paths as expected by the API.
- Add formatPathForDisplay to session-create-form working directory input
- Add formatPathForDisplay to file-browser path display
- Users now see ~/Documents instead of /Users/username/Documents everywhere
- Maintains raw paths for editing and API calls, only formats for display
- Remove global padding from modal-content CSS class to allow custom padding
- Set dialog width to use calc(100vw-1rem) on mobile for minimal margins
- Add padding directly to header and content sections (p-4)
- Adjust close button position to align with new padding
- Use responsive max-widths: full on mobile, md on small screens, 576px on desktop
This properly reduces the dialog margins to approximately 0.5rem (8px) on each side
on mobile devices, maximizing the available space for content.
- Change sidebar background from near-black to dark gray (dark-bg-secondary)
- Extend dark gray background to session list container for consistent appearance
- Reduce session create dialog margins on mobile from mx-4 to mx-2
- Reduce dialog padding on mobile from p-4 to p-3
- Maintain larger spacing on tablets/desktop with responsive classes
These changes create a more cohesive dark gray sidebar and better utilize
screen space on mobile devices for the session creation dialog.
- Implement client-side logger that mirrors server interface
- Add /api/logs endpoints for client log submission and retrieval
- Create real-time log viewer component at /logs with filtering
- Update all client files to use new logging system
- Add responsive design for log viewer (mobile/desktop layouts)
- Implement smart auto-scroll that preserves reading position
- Add Mac-style auto-hiding scrollbars
- Configure Express to serve .html files with clean URLs
- Update spec.md with logging infrastructure documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix iOS CI to use correct workspace and scheme names
- Update iOS test script to use workspace instead of project
- Fix all TypeScript 'any' type warnings by adding proper types
- Update build destination format for Xcode 16 compatibility
- Document all frontend components with JSDoc headers describing their purpose and events
- Add @fires and @listens tags for all component events with detailed parameter descriptions
- Update spec.md with complete Component Event Architecture section
- Add shared terminal-text-formatter.ts for consistent text formatting between client/server
- Implement event-driven activity detection replacing polling-based approach
- Add content-changed event to vibe-terminal-buffer for activity monitoring
- Remove ESC prompt detection in favor of general activity detection
- Add plain text endpoint with optional style formatting (/api/sessions/:id/text?styles)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update color scheme to use dark backgrounds (#0a0a0a, #1a1a1a, #242424)
- Add vibrant green accent colors (#00ff88) with glow effects
- Update Tailwind configuration with new theme colors and utilities
- Add reusable CSS component classes (btn-primary, btn-secondary, btn-ghost, card, input-field)
- Replace inline styles across all components with theme classes
- Create new terminal icon component with glow effect
- Update app header with redesigned layout and session stats
- Update session cards with improved visual hierarchy
- Redesign session create form and file browser modals
- Update session view with consistent theme styling
- Apply theme to mobile controls and overlays
- Update all status indicators to use theme colors
- Add smooth transitions and hover effects throughout
- Made terminal container focusable to receive paste events without clipboard API
- Added tabindex="0" and paste event handling to terminal component
- Terminal now dispatches custom 'terminal-paste' events with clipboard text
- Session view listens for paste events and sends text to terminal session
- Standardized resize endpoint field names across all servers (Rust, Go, Node.js)
- Changed from width/height to cols/rows for consistency
- Removed custom clipboard handling code that required permissions
- Standard Ctrl+V/Cmd+V paste now works without permission prompts
- Maintained PID copying functionality in session cards
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add Linux implementation of VibeTunnel
This commit introduces a complete Linux port of VibeTunnel, providing feature parity with the macOS version. The implementation includes:
- Full Go-based server with identical REST API and WebSocket endpoints
- Terminal session management using PTY (pseudo-terminal) handling
- Asciinema recording format for session playback
- Compatible CLI interface matching the macOS `vt` command
- Support for all VibeTunnel features: password protection, network modes, ngrok integration
- Comprehensive build system with Makefile supporting various installation methods
- Systemd service integration for running as a system daemon
The Linux version maintains 100% compatibility with the existing web UI and can be used as a drop-in replacement for the macOS app on Linux systems.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add comprehensive ngrok integration to Linux VibeTunnel
Implements full ngrok tunnel support for the Go/Linux version to match
the macOS Swift implementation, enabling secure public access to local
VibeTunnel instances.
- **ngrok Service**: Complete lifecycle management with status tracking
- **HTTP API**: RESTful endpoints matching macOS version
- **CLI Support**: Command-line ngrok flags and integration
- **Auto-forwarding**: Built-in HTTP request forwarding to local server
- `POST /api/ngrok/start` - Start tunnel with auth token
- `POST /api/ngrok/stop` - Stop active tunnel
- `GET /api/ngrok/status` - Get current tunnel status
- Uses `golang.ngrok.com/ngrok` SDK for native Go integration
- Thread-safe service with mutex protection
- Comprehensive error handling and logging
- Real-time status updates (disconnected/connecting/connected/error)
- Proper context cancellation for graceful shutdown
```bash
vibetunnel --serve --ngrok --ngrok-token "your_token"
vibetunnel --serve --port 4030 --ngrok --ngrok-token "your_token"
```
- Added golang.ngrok.com/ngrok v1.13.0
- Updated web packages (security fixes for puppeteer)
Maintains full API compatibility with macOS VibeTunnel for seamless
cross-platform operation and consistent web frontend integration.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* up
* Fix SSE streaming performance with byte-based approach
Addresses @badlogic's review feedback to prevent performance issues
with line-based file reading in processNewContent().
## Changes Made
### Performance Fix
- **Byte-based seeking**: Replace line counting with file position tracking
- **Efficient reads**: Only read new content since last position using file.Seek()
- **Memory optimization**: Avoid reading entire file on each update
- **Incomplete line handling**: Properly handle partial lines at file end
### Technical Details
- Changed lastLineCount *int → seenBytes *int64
- Use file.Seek(seenBytes, 0) to jump to last read position
- Read only new content with currentSize - seenBytes
- Handle incomplete lines by adjusting seek position
- Maintains same functionality with better performance
### Benefits
- **Scalability**: No longer reads entire file for each update
- **Performance**: O(new_content) instead of O(total_content)
- **Memory**: Constant memory usage regardless of file size
- **Reliability**: Handles concurrent writes and partial lines correctly
This prevents the SSE streaming from exploding in our faces as @badlogic
warned, especially for long-running sessions with large output files.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Optimize streaming performance to reduce 1+ second delays
Implements multiple optimizations to address user-reported 1+ second delay
between typing and stream rendering:
## PTY Reading Optimizations
- **Reduced sleep times**: 100ms → 1ms for EOF checks
- **Faster polling**: 10ms → 1ms for zero-byte reads
- **FIFO optimization**: 1s → 100ms for stdin EOF polling
## UTF-8 Buffering Improvements
- **Timeout-based flushing**: 5ms timer for incomplete UTF-8 sequences
- **Real-time streaming**: Don't wait for complete sequences in interactive mode
- **Smart buffering**: Balance correctness with responsiveness
## File I/O Optimizations
- **Immediate sync**: Call file.Sync() after each write for instant fsnotify
- **Reduced SSE timeout**: 1s → 100ms for session alive checks
- **Better responsiveness**: Ensure file changes trigger immediately
## Technical Changes
- Added StreamWriter.scheduleFlush() with 5ms timeout
- Enhanced writeEvent() with conditional file syncing
- Optimized PTY read/write loop timing
- Improved SSE streaming frequency
These changes target the main bottlenecks identified in the
PTY → file → fsnotify → SSE → browser pipeline.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix critical stdin polling delay causing 1+ second input lag
- Reduced FIFO EOF polling from 100ms to 1ms
- Reduced EAGAIN polling from 1ms to 100µs
- Added immediate continue after successful writes
- This eliminates the major input delay bottleneck
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix critical performance issues causing resource leaks and CPU burns
Performance optimizations based on code review feedback:
1. **Fix SSE goroutine leaks**:
- Added client disconnect detection to SSE streams
- Propagate write errors to detect when clients close connections
- Prevents memory leaks from abandoned streaming goroutines
2. **Fix PTY busy-loop CPU burn**:
- Increased sleep from 1ms to 10ms in idle scenarios
- Reduces CPU wake-ups from 1000/s to 100/s (10x improvement)
- Significantly reduces CPU usage when PTY is idle
3. **Multi-stream disconnect detection**:
- Added error checking to multi-stream write operations
- Prevents goroutine leaks in multi-session streaming
These fixes address the "thing of the things" - performance\!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Standardize session creation API response format to match Rust server
Changes:
- Updated Go server session creation response to include success/message/error fields
- Now returns: {"success": true, "message": "Session created successfully", "error": null, "sessionId": "..."}
- Maintains backward compatibility with existing sessionId field
- Go server already supported both input formats (cmdline/command, cwd/workingDir)
This achieves protocol compatibility between Go and Rust implementations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix delete endpoint to return 200 OK with JSON response
- Changed handleKillSession to return 200 OK instead of 204 No Content
- Added JSON response with success/message fields for consistency
- Fixes benchmark tool compatibility expecting 200 response
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update Go server API to match Rust format exactly
- Use 'command' array instead of 'cmdline'
- Use 'workingDir' instead of 'cwd'
- Remove compatibility shims for cleaner API
- Better error messages matching Rust server
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Major performance optimizations for Go server
- Remove 100ms artificial delay in session creation (-100ms per session)
- Optimize PTY I/O handling with reduced polling intervals
- Implement persistent stdin pipes to avoid repeated open/close
- Batch file sync operations to reduce I/O overhead (5ms batching)
- Remove blocking status updates from API handlers
- Increase SSE session check interval from 100ms to 1s
Target: Match Rust performance (60ms avg latency, 16+ ops/sec)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix O_NONBLOCK compilation issue
* Add comprehensive TLS/HTTPS support with Caddy integration
Features:
- Optional TLS support via CLI flags (defaults to HTTP like Rust)
- Self-signed certificate generation for localhost development
- Let's Encrypt automatic certificate management for domains
- Custom certificate support for production environments
- HTTP to HTTPS redirect capability
- Maintains 100% backward compatibility with Rust version
Usage examples:
- Default HTTP: ./vibetunnel --serve (same as Rust)
- HTTPS with self-signed: ./vibetunnel --serve --tls
- HTTPS with domain: ./vibetunnel --serve --tls --tls-domain example.com
- HTTPS with custom certs: ./vibetunnel --serve --tls --tls-cert cert.pem --tls-key key.pem
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix terminal sizing issues and implement dynamic resize support
Backend changes:
- Add handleResizeSession API endpoint for dynamic terminal resizing
- Implement Session.Resize() and PTY.Resize() methods with proper validation
- Add session registry in Manager to track running sessions with PTY access
- Fix stdin error handling to prevent session crashes on EAGAIN errors
- Write resize events to asciinema stream for frontend synchronization
- Update default terminal dimensions from 80x24 to 120x30
Frontend changes:
- Add width/height parameters to SessionCreateData interface
- Calculate appropriate terminal dimensions when creating sessions
- Implement automatic resize API calls when terminal dimensions change
- Add terminal-resize event dispatch for backend synchronization
- Ensure resize events bubble properly for session management
Fixes nvim being stuck at 80x24 by implementing proper terminal
dimension management and dynamic resizing capabilities.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add client-side resize caching and Hack Nerd Font support
- Implement resize request caching to prevent redundant API calls
- Add debouncing to terminal resize events (250ms delay)
- Replace ResizeObserver with window.resize events only to eliminate pixel-level jitter
- Add Hack Nerd Font Mono as primary terminal font with Fira Code fallback
- Update session creation to use conservative 120x30 defaults
- Fix terminal dimension calculation in normal mode
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add comprehensive XTerm color and rendering enhancements
- Complete 256-color palette support with CSS variables (0-255)
- Enhanced XTerm configuration with proper terminal options
- True xterm-compatible 16-color theme
- Text attribute support: bold, italic, underline, dim, strikethrough, inverse, invisible
- Cursor blinking with CSS animation
- Font rendering optimizations (disabled ligatures, antialiasing)
- Terminal-specific CSS styling for better rendering
- Mac option key as meta, alt-click cursor movement
- Selection colors and inactive selection support
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
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>
- Add optional session name field to create form
- Update Session interface to include name property
- Backend now accepts and stores custom session names
- Session cards and views display name when available, fallback to command
- Session names are passed to tty-fwd for better identification
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add localStorage persistence for last used working directory and command
- Values are saved on successful session creation and loaded on component creation
- Survives page reloads and provides better UX for repeated session creation
- Enhance mobile terminal buttons with larger Unicode symbols (arrows, tab, enter)
- Make arrow keys, tab, and enter buttons more visible and easier to tap
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed build script shell from /bin/sh to /bin/zsh for better compatibility
- Sources user's .zshrc or .zprofile to get the actual PATH configuration
- Properly handles all Node.js installation methods (nvm, homebrew, fnm, etc.)
- Added PATH debugging output to help troubleshoot issues
- Maintains fallback for systems without zsh configuration files
Also includes:
- Added PATH environment fix for ngrok detection in NgrokService
- Implemented proper update channel support in SparkleUpdaterManager using delegate methods
- Fixed session name placeholder text in web frontend
- Added disabled:opacity-50 to make button appear grayed out when disabled
- Added disabled:cursor-not-allowed for better UX when button is disabled
- Added disabled:hover:bg-vs-user to prevent hover effects on disabled button
- Button is disabled when command field is empty or only whitespace
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed the duplicate session-create-form component from the main app since
the session list now manages its own modal. Added session-created event
handler to the session-list component.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove old app-new entry points and components
- Remove duplicate/experimental files
- Keep only active session-list and file-browser components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>