Commit graph

137 commits

Author SHA1 Message Date
Mario Zechner
34801bc687 Fix terminal layout and improve mobile UX
- Restructure session-view to use proper flexbox layout (header/xterm/buttons)
- Container now exactly fits viewport height (100vh)
- Header shows command and working directory stacked
- XTerm gets all remaining space with horizontal scrolling
- Mobile buttons integrated into layout instead of overlaying
- Replace setTimeout with requestAnimationFrame for better performance
- Add isPreview parameter to renderer for future preview scaling
- Disable pointer events on preview terminals so clicks pass through

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 11:55:22 +02:00
Mario Zechner
093aff4379 Update XTerm theme to VS Code Dark colors and improve SSE streaming
- Replace Gruvbox color scheme with VS Code Dark theme colors
- Remove inappropriate terminal.clear() calls from live stream connections
- Add debugging logs for SSE events to investigate DOM recreation issue
- Ensure only snapshots clear terminal, streams append new content

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:58:21 +02:00
Mario Zechner
e8bee03388 Replace asciinema with XTerm renderer and add key combination support
- Replace AsciinemaPlayer with XTerm.js renderer in session-view and session-list
- Add XTerm CSS for proper terminal styling and hide input textarea
- Implement resize event handling (r-type cast events) in renderer
- Add Ctrl+Enter and Shift+Enter key combination support
- Update tty-fwd to handle ctrl_enter and shift_enter keys
- Set TERM=xterm-256color in tty-fwd for proper Unicode box-drawing
- Add font scaling and preview sizing for session-list terminals
- Remove asciinema dependencies and update CSS accordingly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
7b6ebad8be Increase XTerm scrollback buffer to 1M lines by default
- Add configurable scrollback parameter to Renderer constructor
- Default to 1,000,000 lines (up from 1,000) for full session history
- Users can now scroll through entire terminal session history
- Fix renderer-entry.ts import path (remove .js extension)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
c7c8a605c2 Replace custom renderer with XTerm.js and consolidate tests
- Remove old custom ANSI renderer (src/client/renderer.ts)
- Rename XTermRenderer to Renderer and move to renderer.ts
- Update renderer-entry.ts to export single Renderer class
- Rename and update all test files:
  - test-xterm-renderer.html → test-renderer.html
  - simple-xterm-test.html → simple-test.html
  - debug-xterm.html → debug-renderer.html
- Remove obsolete custom renderer tests
- Update tests/index.html with new test descriptions
- All tests now use single XTerm.js-based Renderer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
e4b4a37c86 Fix renderer export name - use TerminalRenderer with Renderer alias 2025-06-16 10:38:19 +02:00
Mario Zechner
9bc6fcc4b1 Replace CDN imports with local bundle in all tests
- Create renderer-entry.ts to bundle both Renderer and XTermRenderer
- Add bundle:renderer script to generate public/bundle/renderer.js
- Update all test files to import from ../bundle/renderer.js
- Remove all unpkg/CDN XTerm.js script imports
- Tests now use bundled dependencies for faster loading

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Peter Steinberger
6d9ee470c4 Replace NSApplicationOpenSettingsCategory hack with SwiftUI SettingsLink
- Use SettingsLink in MenuBarView for native SwiftUI settings opening
- Move HiddenWindowView to SettingsOpener.swift for better organization
- Keep programmatic settings access via notification for AppDelegate use
- Position hidden window offscreen to avoid menu click interference
- Remove unused HiddenWindow.swift and ObjectiveC imports
- Fix for FB10184971: Settings doesn't work in MenuBarExtra-only apps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 09:52:45 +02:00
Peter Steinberger
92890fe189 fixes showing settings on macOS Tahoe 2025-06-16 09:52:45 +02:00
Mario Zechner
43d406a84c Clean up build system and implement XTerm.js renderer
- Replace TypeScript compilation with esbuild bundling
- Organize all generated files in public/bundle/
- Remove PWA features and simplify index.html
- Add XTerm.js renderer with same API as custom renderer
- Create comprehensive test suite in public/tests/
- Update .gitignore to only track source files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 09:33:33 +02:00
Armin Ronacher
8f52b73454 Seemingly this is needed 2025-06-16 09:13:36 +02:00
Peter Steinberger
796bb55b91 fix warning 2025-06-16 09:12:57 +02:00
Peter Steinberger
9fa6199c1c setting structure 2025-06-16 09:12:48 +02:00
Peter Steinberger
0cb87e6f81 better truncate 2025-06-16 09:12:34 +02:00
Peter Steinberger
e41a4c465a Same size for all tabs 2025-06-16 08:34:33 +02:00
Peter Steinberger
62dfe07643 add session validation 2025-06-16 08:34:27 +02:00
Peter Steinberger
1056145bc0 Improve ngrok 2025-06-16 08:11:45 +02:00
Peter Steinberger
0bc40ffae9 Implement session cast 2025-06-16 08:11:45 +02:00
Peter Steinberger
08837015c7 fix permissions on web 2025-06-16 08:10:43 +02:00
Peter Steinberger
8b8d4fb4c3 fix web install 2025-06-16 08:03:26 +02:00
Mario Zechner
33b1f89f12 Fix Tailwind CSS to use local installation via npx
- Update build:css script to use npx tailwindcss instead of global
- Update watch:css script to use npx tailwindcss instead of global
- Ensures consistent builds using project dependencies

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:59:58 +02:00
Mario Zechner
807b32d479 PWA, server needs to serve via HTTPS still 2025-06-16 07:57:48 +02:00
Armin Ronacher
1d074e616b Add CLI tool installation feature with sudo authentication
- Created CLIInstaller utility to symlink vt binary to /usr/local/bin
- Added 'Install vt Command' button to Advanced Settings
- Handles sudo authentication through system dialogs
- Checks for existing installations and provides replacement option
- Includes proper error handling and user feedback

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:48:07 +02:00
Mario Zechner
fce59c3df6 Add URL routing and enhanced mobile terminal controls
- Implement browser URL routing with session ID parameters
- Add browser back/forward navigation support
- Auto-load session view from URL on page refresh
- Add mobile swipe-back gesture from left edge
- Reorganize mobile controls: arrow keys + special keys in normal view
- Simplify text overlay to show only SEND and SEND+ENTER buttons
- Remove left arrow from BACK button for cleaner look

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:47:43 +02:00
Peter Steinberger
ac13030b52 Fix SSE stream closing issue and improve file monitoring
- Add periodic heartbeats (every 15 seconds) to keep SSE connections alive
- Enhance response headers to prevent proxy buffering (X-Accel-Buffering: no)
- Fix monitorFileChanges to read entire file from beginning like tail -f
- Process lines synchronously to maintain order
- Send initial connection message to establish stream immediately
- Remove empty line filtering to match tail -f behavior exactly

This ensures streams stay open indefinitely and don't timeout due to inactivity.
2025-06-16 07:45:13 +02:00
Mario Zechner
aae68479ee Improve mobile terminal input with virtual keyboard support
- Move controls above virtual keyboard using Visual Viewport API
- Dynamically adjust textarea height when keyboard appears/disappears
- Add smooth transitions for keyboard show/hide
- Prevent textarea from stretching behind buttons
- Clean up event listeners properly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:36:58 +02:00
Peter Steinberger
975705ae80 Remove control directory creation logic from TunnelServer
The tty-fwd binary should handle its own directory requirements. This removes:
- ensureControlDirectoryExists() function
- All calls to ensure control directory exists during startup and API calls
- Directory writability checks

The control directory path is still passed to tty-fwd, but VibeTunnel no longer manages its creation.
2025-06-16 07:36:30 +02:00
Peter Steinberger
63d02b4ed6 Update CI workflow to use Xcode 16.2 2025-06-16 07:22:26 +02:00
Armin Ronacher
cf3069381e Fixed build on my machine 2025-06-16 07:21:02 +02:00
Mario Zechner
a77b1dbe26 Implement auto-switch to session view after creation and clean startup
- Add automatic session view switching after creating new sessions
- Poll for session to appear in list and switch immediately when found
- Handle tty-fwd ID mismatch by falling back to newest session
- Add comprehensive debugging for session creation flow
- Clean control directory contents on server startup for fresh state
- Improve session creation UX with seamless transition to interactive view

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:19:35 +02:00
Peter Steinberger
060f25dbe7 Fix tty-fwd SIGKILL issue by adding entitlements and signing script
- Add entitlements to allow spawning executables with different signatures
- Create build script to properly sign tty-fwd binary during builds
- Add error logging for better debugging of process termination
- Validate control directory permissions before use
2025-06-16 07:19:03 +02:00
Peter Steinberger
79a23c0aa6 Replace PATH hack with proper zsh configuration loading in Xcode build script
- 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
2025-06-16 07:15:53 +02:00
Mario Zechner
2fa36dd15b Move CREATE SESSION button to header and improve UI layout
- Move CREATE SESSION button from session list to app header for better visibility
- Hide CLEAN EXITED button when "hide exited" is checked (only show when needed)
- Simplify session list controls layout with clean flex design
- Add proper state management for create modal between app and session list
- Maintain hide exited state when navigating between views
- Fix checkbox blocking issue with better event timing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:13:45 +02:00
Peter Steinberger
334d4d741e Improve tty-fwd error messages and ensure control directory exists
- Added detailed error messages for common exit codes (SIGKILL, command not found, etc.)
- Create control directory (~/.vibetunnel/control) if it doesn't exist
- Trim whitespace from error output for cleaner messages
- Specifically handle exit code 9 (SIGKILL) which occurs when control directory is missing
- Ensure directory exists in both listSessions() and createSession()
2025-06-16 07:06:30 +02:00
Peter Steinberger
74373a129d Fix TypeScript error in server.ts
- Handle error type properly in catch block
- Check if error is instanceof Error before accessing message property
- Provide fallback for unknown error types
2025-06-16 06:59:11 +02:00
Armin Ronacher
14321ccbb5 Add --claude and --claude-yolo 2025-06-16 06:55:04 +02:00
Peter Steinberger
91f12f6ed6 Add Xcode build phase for web frontend
- Added "Build Web Frontend" phase that runs npm install and npm run build
- Copies built web assets from web/public/ to app Resources folder
- Modified TunnelServer.swift to only serve static files from bundled Resources
- Removed development path options from static file serving
- Added proper PATH configuration for npm in build script
2025-06-16 06:54:04 +02:00
Mario Zechner
3a6665c13f Fix session status detection and prevent stream restarts for exited sessions
- Add session status polling in session view to detect when sessions end
- Switch from live stream to static snapshot for exited sessions
- Fix session list player creation for toggled visibility states
- Use requestAnimationFrame for better DOM timing instead of setTimeout
- Rename checkbox label from "--filter-exited" to "hide exited"
- Implement smart kill/clean button behavior based on session status
- Remove all focus outlines from session view interface

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 06:43:27 +02:00
Peter Steinberger
05b3be6569 disable user script sandbox 2025-06-16 06:41:10 +02:00
Peter Steinberger
d4c5f22fad Improve UI styling in Advanced Settings
- Increase General tab height by 50px to 450px for better spacing
- Style server port field with rounded border and centered text
- Center the Tailscale recommendation footer text
2025-06-16 06:40:08 +02:00
Peter Steinberger
6cbe2b8cbb Fix Xcode build phase permissions and increase General tab height
- Add tty-fwd-universal to inputPaths to fix "Operation not permitted" error
- Set alwaysOutOfDate flag to ensure build phase runs when needed
- Increase General settings tab height from 300 to 400 pixels
- Fix ngrok alert handling to use SwiftUI alerts instead of NSAlert
2025-06-16 06:35:04 +02:00
Armin Ronacher
347d79914f Fix cargo build for some macs 2025-06-16 06:23:23 +02:00
Peter Steinberger
6c0b8cb7b3 Prevent update dialogs on app startup in debug mode
- Set startingUpdater to false in DEBUG builds to prevent automatic initialization
- Keep all automatic update checks and downloads disabled in DEBUG mode
- Only start the updater manually in release builds if needed
- This ensures no update-related dialogs appear during development
2025-06-16 06:11:34 +02:00
Peter Steinberger
d4fae5631a Improve ngrok authentication UX and move update settings
- Show alert dialog when attempting to enable ngrok without auth token
- Move update channel and check for updates from Advanced to General settings
- Place update controls under Application section for better accessibility
- Add AppKit import for NSAlert functionality
2025-06-16 06:07:03 +02:00
Armin Ronacher
e8fb468a19 Implement half broken SSE 2025-06-16 06:04:03 +02:00
Mario Zechner
e27657a9fe WIP: Interactive session view needs refinement
- Basic routing and keyboard handling implemented
- Terminal display and input sending functional
- Still needs polish and bug fixes before fully working

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:54:15 +02:00
Peter Steinberger
70a8da5235 feat: enhance UI and automatic update handling
- Fix session count display to show on single line in menu bar
- Add conditional compilation to disable automatic updates in DEBUG mode
- Add "Open Dashboard" menu item that opens internal server URL
- Convert Help menu from popover to native macOS submenu style
- Enable automatic update downloads in Sparkle configuration
- Increase Advanced Settings tab height from 400 to 500 pixels
- Add Tailscale recommendation with clickable markdown link
- Fix Sendable protocol conformance issues throughout codebase
- Add ApplicationMover utility for app installation location management

These changes improve the overall user experience by making the UI more
intuitive and ensuring automatic updates work correctly in production
while being disabled during development.
2025-06-16 05:53:08 +02:00
Mario Zechner
09cc9edb43 Implement interactive session view with keyboard input
- Add session-view.ts component for full-screen terminal interaction
- Implement real-time keyboard input handling for all key types
- Add routing between session list and interactive session view
- Support special keys, Ctrl combinations, and regular text input
- Remove compiled JS files from git tracking (should be build artifacts)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:51:27 +02:00
Mario Zechner
ba4a86c5db Improve terminal preview layout for better space utilization
- Change asciinema player fit mode from 'both' to 'width' for horizontal expansion
- Add overflow-hidden to prevent vertical overflow from breaking layout
- Terminal previews now always use full card width

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:48:50 +02:00
Peter Steinberger
d80ab6c217 Add ngrok integration for remote access
- Add NgrokService to manage ngrok tunnel lifecycle
- Integrate ngrok with TunnelServer via API endpoints (/api/ngrok/*)
- Add UI controls in Advanced Settings for ngrok configuration
- Store auth tokens securely in macOS Keychain
- Add ServerMonitor to track server status across the app
- Show tunnel status and public URL when active
- Support CLI-based ngrok integration (requires brew install ngrok)

This allows VibeTunnel to be accessed remotely via ngrok tunnels,
fulfilling the "use Claude Code anywhere" promise.
2025-06-16 05:45:51 +02:00