Commit graph

673 commits

Author SHA1 Message Date
Helmut Januschka
9792908fe1
Add terminal max width control and fix WebSocket panic (#29)
* feat: add terminal max width option

- Add terminal preferences manager for persistent settings storage
- Add maxCols property to terminal component with width constraint logic
- Add UI toggle button (∞/80) in session header for easy width control
- Default behavior unchanged: unlimited width (takes full container)
- Optional 80-column max width limit when enabled
- Preferences saved to localStorage and restored on page load
- Real-time updates without page refresh

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: enhance terminal width selector with common presets and custom input

- Add common terminal width presets: ∞, 80, 100, 120, 132, 160
- Add custom width input field (20-500 columns)
- Replace simple toggle with dropdown selector UI
- Include helpful descriptions for each preset
- Support keyboard shortcuts (Enter to submit, Escape to cancel)
- Add click-outside-to-close functionality
- Maintain all existing preferences persistence
- Show current width in button label and tooltip

Common widths:
- 80: Classic terminal
- 100: Modern standard
- 120: Wide terminal
- 132: Mainframe width
- 160: Ultra-wide
- Custom: User-defined (20-500)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: prevent WebSocket send on closed channel panic

Added safeSend helper function with panic recovery to handle race conditions
when multiple goroutines access WebSocket channels. Replaces unsafe channel
sends with graceful error handling.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-20 09:21:20 +02:00
Helmut Januschka
c6b000a421 docs: add --no-spawn flag documentation
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 08:27:19 +02:00
Helmut Januschka
c40608a586 add --no-spawn flag to disable terminal spawning
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 08:26:13 +02:00
Peter Steinberger
a56682f44c make file browser compat 2025-06-20 07:39:54 +02:00
Peter Steinberger
4bbdaa963c add session validation and retry 2025-06-20 07:39:30 +02:00
Peter Steinberger
aa60d9ef7d Validate that essential session files exist 2025-06-20 07:39:04 +02:00
Peter Steinberger
b3a7e3a110 fix deprecation 2025-06-20 07:38:48 +02:00
Peter Steinberger
fa4c1b3815 Declare that we open files in place 2025-06-20 07:38:28 +02:00
Peter Steinberger
856a581608 Modernize SwiftUI on iOS 2025-06-20 07:29:46 +02:00
Peter Steinberger
596c3393ea change build to copy vt script 2025-06-20 07:17:53 +02:00
Peter Steinberger
bda7e978c4 ignore vt binary 2025-06-20 07:17:22 +02:00
Peter Steinberger
f40c4bc16f move closer to rust server format 2025-06-20 07:17:15 +02:00
Peter Steinberger
d7dd436b2e bring iOS to feture parity with frontend 2025-06-20 07:06:00 +02:00
Peter Steinberger
fdafb0b522 Hummingbird removed 2025-06-20 07:00:00 +02:00
Peter Steinberger
b228ffb64c Web design tweaks 2025-06-20 06:59:22 +02:00
Peter Steinberger
70312fda17 Remove Hummingbird 2025-06-20 06:59:17 +02:00
Peter Steinberger
12cb1e5c8e Merge remote-tracking branch 'origin/frontend-redesign-2' 2025-06-20 06:03:48 +02:00
Peter Steinberger
d3f80986e3 feat: redesign frontend with modern dark theme and green accents
- 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
2025-06-20 05:47:14 +02:00
Peter Steinberger
5142cf1eb6 fix(ios): Fix iOS session creation and file browser issues
- Fix working directory validation to fall back to home directory when iOS sends invalid paths
- Fix file browser API client to handle correct response format (absolutePath + files)
- Improve session creation header design with translucent material and fixed height
- Add authentication support placeholder for future API protection
- Add better error logging for debugging API issues
- Move TerminalTextFieldStyle to SessionCreateView for better organization

The iOS app can now create sessions successfully and browse directories without errors.
2025-06-20 05:45:48 +02:00
Peter Steinberger
bb23cbcc32 feat(ios): Make 'claude' the default command in session creation
- Add 'claude' as the first quick start command
- Set 'claude' as the default command instead of 'zsh'
- Add sparkle icon for Claude command
- Remove 'irb' to make room for Claude in the grid
2025-06-20 05:45:48 +02:00
Peter Steinberger
ed14aee481 fix(ios): Update Connect button to use dark background with accent border
- Change from bright accent fill to dark terminal background
- Add accent color border that gets thicker when active
- Use accent color for text instead of terminal foreground
- Better visual consistency with the dark terminal aesthetic
2025-06-20 05:45:48 +02:00
Peter Steinberger
22b946d76c feat(ios): Add file browser and modernize Xcode project structure
- Implement beautiful file browser matching web frontend design
  - Directory navigation with parent directory support
  - Create folder functionality
  - File/folder icons and visual distinction
  - Loading states and error handling
  - Smooth animations and haptic feedback

- Update Xcode project to use folder synchronization (objectVersion 77)
  - Automatic file inclusion from filesystem
  - No manual file management needed in Xcode
  - Matches vibetunnel3 project structure

- Add file system API integration
  - Browse directory endpoint
  - Create directory endpoint
  - FileEntry model for API responses

- Integrate file browser with session creation
  - Browse button in working directory field
  - Sheet presentation of file browser
  - Default to home directory (~)

- Improve session creation UI
  - Transparent navigation bar with blur effect
  - Better spacing and visual hierarchy
  - Enhanced error display styling
  - Convert directory buttons to horizontal scroll
2025-06-20 05:45:48 +02:00
Peter Steinberger
8ddde1d6c2 feat(ios): Fix iOS build and integrate SwiftTerm for terminal emulation
Major improvements to the iOS VibeTunnel app:

SwiftTerm Integration:
- Properly integrated SwiftTerm 1.2.5 for terminal emulation
- Fixed naming conflicts and API compatibility issues
- Added proper actor isolation with @preconcurrency
- Terminal data now feeds correctly via SSE streams

Session Management:
- Fixed session model to match Go server's JSON response format
- Added CodingKeys mapping for field name differences (cmdline, cwd, etc.)
- Support for "starting" session status
- Enhanced date parsing for both ISO8601 and RFC3339 formats

Working Directory Fixes:
- Changed default working directory from iOS sandbox to server paths
- Now uses ~/ as default (matching web frontend)
- Added common server directories as quick options
- Server expands ~ to actual home directory

Terminal Streaming:
- Implemented Asciinema cast v2 format parsing
- SSE client properly handles output, resize, and exit events
- Added terminal snapshot loading for existing sessions
- Fixed special key handling with proper ANSI escape sequences

UI Improvements:
- Updated session list to grid layout (2 columns)
- Added session count and "Kill All" functionality
- Redesigned session cards with inline kill/clean buttons
- Shows command and working directory in session preview

Error Handling:
- Added comprehensive logging for debugging
- Enhanced error messages for better user experience
- Detailed API request/response logging
- Network error descriptions (connection refused, timeout, etc.)

Server Configuration:
- Set default server address to 127.0.0.1:4020
- Sessions now created with spawn_terminal: false for PTY mode
- Both web and iOS clients can share terminal sessions

The iOS app now provides a full terminal experience using SwiftTerm,
mirroring the web frontend's functionality with proper server integration.
2025-06-20 05:45:48 +02:00
Peter Steinberger
d68d5e5dae feat: Add Xcode project and asset catalogs
- Add xcodegen project specification (project.yml)
- Configure for iOS 18.0+ deployment target
- Add SwiftTerm package dependency
- Create asset catalogs:
  - App icon placeholder
  - Accent color (terminal blue)
  - Terminal background color
- Configure proper Info.plist settings
- Set up build configurations and schemes

The project is now ready to open in Xcode.
2025-06-20 05:45:48 +02:00
Peter Steinberger
e69dbda538 feat: Add complete native iOS/iPadOS app for VibeTunnel
- Beautiful terminal-inspired UI design with custom theme
- Full SwiftUI implementation targeting iOS 18+
- SwiftTerm integration for terminal emulation
- Real-time session management with SSE streaming
- Complete feature parity with web frontend:
  - Server connection management
  - Session list with auto-refresh
  - Create, kill, and cleanup sessions
  - Full terminal emulation with input/output
  - Keyboard toolbar with special keys
  - Font size adjustment
  - Haptic feedback throughout
- Comprehensive error handling and loading states
- iPad optimizations (basic, split view pending)
- Complete documentation and setup instructions

The app provides a native, performant alternative to the web interface
with a stunning dark theme and smooth animations.
2025-06-20 05:45:48 +02:00
Peter Steinberger
58fdc049ba copy more rust behavior, fix vt forwarder format 2025-06-20 05:30:13 +02:00
Peter Steinberger
710747ac8d settings cleanup 2025-06-20 05:30:13 +02:00
Mario Zechner
de8952d34a feat: highlight session cards with orange border when 'esc to interrupt' is detected
- Add checkForEscPrompt() method to scan buffer content on each update
- Emit 'esc-prompt-change' event when prompt presence changes
- Apply orange border to session card when prompt is detected
- Case-insensitive search for 'esc to interrupt' text

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 05:07:56 +02:00
Mario Zechner
3ec549344b fix: improve terminal buffer fitting algorithm
- Properly measure character width at 14px and scale proportionally
- Calculate visible rows based on container height
- Show bottom N lines that fit in the viewport
- Remove overly conservative character width estimates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 04:54:06 +02:00
Mario Zechner
89982e9bdf feat: implement WebSocket-based real-time buffer updates
- Add /buffers WebSocket endpoint with binary protocol
- Replace polling with push-based updates in vibe-terminal-buffer
- Add buffer change notifications to TerminalManager
- Remove pollInterval property from components
- Optimize network traffic by only sending updates on changes

Binary protocol: [0xBF magic][4 bytes: session ID length][session ID][buffer data]

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 04:36:23 +02:00
Peter Steinberger
4327ac9349 settings tweaks 2025-06-20 04:14:46 +02:00
Peter Steinberger
a3f55affc6 check vt version 2025-06-20 04:08:02 +02:00
Peter Steinberger
73b8d899e0 better server switch animation 2025-06-20 04:08:02 +02:00
Peter Steinberger
b5989d0196 Allow cli reinstall 2025-06-20 04:08:02 +02:00
Peter Steinberger
ec5402b86e add connection timeout 2025-06-20 04:08:02 +02:00
Peter Steinberger
d09b7e7495 rename var 2025-06-20 04:08:02 +02:00
Peter Steinberger
c9b86bc9cf check if process is alve 2025-06-20 04:08:02 +02:00
Peter Steinberger
d99553c07d better logic for vt 2025-06-20 04:08:02 +02:00
Peter Steinberger
ca88128ff6 reap zombies 2025-06-20 04:08:02 +02:00
Peter Steinberger
0d825f9333 more id fixes 2025-06-20 04:08:02 +02:00
Peter Steinberger
9bcbb0c1f7 another go binary ignored 2025-06-20 04:08:02 +02:00
Peter Steinberger
3bc0b9445f fix log id 2025-06-20 04:08:02 +02:00
Peter Steinberger
93c9c19e7a ensure go is not checked in 2025-06-20 04:08:02 +02:00
Peter Steinberger
8180586f2d terminal spawning, get rid of debug logs 2025-06-20 04:08:02 +02:00
Peter Steinberger
fc6c9d74f1 fix terminal spawning 2025-06-20 04:08:02 +02:00
Peter Steinberger
ec8d3d1db9 Fancy about 2025-06-20 04:08:02 +02:00
Mario Zechner
deb3935172 Implement optimized binary format for terminal buffer transmission
- Switch from JSON to binary format for buffer data transfer
- Optimize encoding with run-length encoding for empty rows
- Reduce data size with efficient cell encoding (1 byte for spaces, variable for complex cells)
- Support both palette and RGB colors with minimal overhead
- Pre-calculate exact buffer sizes to avoid allocations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:56:00 +02:00
Mario Zechner
35755d8376 fix: remove debug logging from vibe-terminal-buffer
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:49:02 +02:00
Mario Zechner
faba4b1407 refactor: simplify vibe-terminal-buffer to always fit horizontally
- Remove fontSize and fitHorizontally properties as they're no longer needed
- Always auto-scale font size to fit terminal width in container
- Simplify dimension calculation logic
- Remove unused props from session-card component
- Maintain bottom-aligned terminal view with proper scaling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:48:08 +02:00
Mario Zechner
dbbaaa8442 fix: remove viewportY=0 to show bottom portion of terminal
- Let server decide which portion of buffer to return
- Server defaults to showing bottom portion with prompt
- Only request the number of lines that fit in viewport

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:25:50 +02:00