Commit graph

188 commits

Author SHA1 Message Date
Mario Zechner
ab5a34398d Improve mobile UI and add localStorage for session creation
- 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>
2025-06-16 17:46:44 +02:00
Mario Zechner
d164db3496 Add Kill All sessions button and fix terminal scaling
- Add Kill All button to session list that appears when running sessions exist
- Button triggers individual session kill animations by clicking each kill button
- Fix terminal scaling issues with proper character width ratio (0.63)
- Constrain terminal containers to viewport width to prevent overflow
- Override XTerm's fixed width CSS to respect container bounds
- Reduce minimum font size to 4px for better scaling flexibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 17:37:48 +02:00
Armin Ronacher
3e3f81b892 Fix terminal handling 2025-06-16 17:35:00 +02:00
Peter Steinberger
936806edd6 Improve setting front logic 2025-06-16 17:32:06 +02:00
Peter Steinberger
b5d043cba8 Fix build script and input handling
- Change npm build to npm bundle in Xcode build script
- Update session JSON parsing to handle dictionary format
- Make input text optional in InputRequest struct
- Add ctrl_enter and shift_enter to special keys list
2025-06-16 17:23:33 +02:00
Armin Ronacher
420ec3117c Added health endpoint 2025-06-16 17:17:40 +02:00
Armin Ronacher
a803b5ae7d Fixed session create 2025-06-16 17:10:36 +02:00
Armin Ronacher
231aa7040d Simplify url matching 2025-06-16 16:57:08 +02:00
Armin Ronacher
55056ce37e cargo fmt 2025-06-16 16:54:45 +02:00
Mario Zechner
70d53f0b19 Update root gitignore for web build files 2025-06-16 16:48:04 +02:00
Peter Steinberger
0a067ca7a7 Update CI to build Rust binaries and clarify Node.js builds
- Rename Node.js job to clarify it builds both frontend and backend
- Add comment explaining what npm run build does (CSS, client, server)
- Include public/bundle/ in Node.js artifacts for frontend assets
- Add Rust binary build job with matrix strategy for multiple platforms:
  - Linux (x86_64)
  - macOS (x86_64 and arm64)
  - Windows (x86_64)
- Cache Rust dependencies for faster builds
- Run tests only on native platforms (not cross-compilation targets)
2025-06-16 16:47:42 +02:00
Peter Steinberger
445187d754 Add Node.js server build to CI workflow
- Add dedicated job for building Node.js server
- Use Node 20 on Ubuntu for the server build
- Run npm ci, build, and tests for the web directory
- Upload dist/ folder as build artifacts
2025-06-16 16:44:25 +02:00
Peter Steinberger
f6893e1a61 Improve server mode description clarity 2025-06-16 16:38:16 +02:00
Peter Steinberger
c0b9cc4b87 Improve Rust server configuration handling
- Use absolute path for static directory to avoid path resolution issues
- Quote static path argument to handle paths with spaces
- Remove hardcoded default port - now fetched from user defaults via ServerManager
- Add port validation to ensure server doesn't start without configured port
- Add invalidPort error case for better error handling
2025-06-16 16:37:27 +02:00
Peter Steinberger
67ec9ef118 Add dist/ to web .gitignore
Ignore generated distribution files in the web directory.
2025-06-16 16:30:18 +02:00
Peter Steinberger
ad69ead279 Fix Rust server command to use correct tty-fwd syntax
- Change static path from ../web/dist to web/public
- Reorder arguments to: --static-path web/public --serve <port>
- Update directory existence checks to match new path
2025-06-16 16:23:43 +02:00
Peter Steinberger
d013019b16 cleanup git 2025-06-16 16:20:46 +02:00
Peter Steinberger
f7d72acfca Update MockHTTPClient imports 2025-06-16 16:16:04 +02:00
Peter Steinberger
34d868e5c6 Reorganize view files for better project structure
- Move SettingsView.swift to Presentation/Views/
- Move MenuBarView.swift to Presentation/Views/
- Remove redundant Sources folder
- Consolidate all views under Presentation/Views for consistency
2025-06-16 16:16:04 +02:00
Peter Steinberger
6199a256ca Add server mode architecture with Hummingbird and Rust options
- Implement ServerProtocol for abstracting server implementations
- Create ServerManager to orchestrate server switching
- Add HummingbirdServer wrapper around existing TunnelServer
- Implement RustServer to run tty-fwd with --serve option
- Add server mode selector in debug settings UI
- Create ServerConsoleView for real-time server log viewing
- Update ServerMonitor to work with ServerManager
- Add heartbeat monitoring for server health checks
- Support hot-swapping between server modes
- Stream server logs (stdout/stderr) to console view
2025-06-16 16:16:04 +02:00
Peter Steinberger
95642f4723 Update web/.gitignore to exclude generated JS files in public/
- Add rules to exclude *.js and *.js.map files in web/public/
- Add rules to exclude component JS files in web/public/components/
- These are build artifacts that should not be tracked
2025-06-16 16:16:04 +02:00
Mario Zechner
febcea09fa Add debug logging for static file serving
- Debug static path configuration and existence checks
- Log static file request processing steps
- Track index.html file resolution for root path requests
- Help diagnose why index.html isn't being served for URLs with query params

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:13:32 +02:00
Armin Ronacher
8fcc8f0310 Add hardcore ctrlc handler 2025-06-16 16:10:37 +02:00
Mario Zechner
c5a6e2dd1d Remove unnecessary session polling from session-view
Session-view was polling /api/sessions every 2 seconds unnecessarily.
All session updates come via SSE stream including exit events.
This eliminates redundant API calls and improves performance.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:08:28 +02:00
Armin Ronacher
68ca8a48e3 Fix warning 2025-06-16 16:07:22 +02:00
Mario Zechner
6f48ff2ff1 Improve session input endpoint error handling
- Add comprehensive validation like Node.js version
- Check session exists and is running before sending input
- Detect dead processes and return proper 410 Gone status
- Handle special keys vs regular text input appropriately
- Return proper HTTP status codes (404, 410, 400) instead of 500 errors
- Enable signal-hook iterator feature for better signal handling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:07:11 +02:00
Armin Ronacher
f917e18d68 Added a multi stream endpoint 2025-06-16 15:57:59 +02:00
Mario Zechner
f1dabd6f4b Fix session creation and management endpoints
- Add tilde expansion (~/) to absolute paths in session creation
- Improve session kill endpoint error handling and graceful termination
- First attempt SIGTERM, fallback to SIGKILL like Node.js implementation
- Return proper 404 for non-existent sessions instead of 500 errors
- Add debug logging for URI path handling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 15:55:59 +02:00
Mario Zechner
ed3927b4a6 Fix session management and terminal scaling
- Fix session killing via DELETE endpoint instead of wrong POST /kill
- Add proper session card kill animation with ASCII spinner
- Fix double key press issue with keyed directive for session-view
- Implement URL-based navigation for consistent component lifecycle
- Fix session card terminal scaling to show all content at smaller sizes
- Modify ScaleFitAddon to only scale font size for previews, not dimensions
- Add session card loading and killing states with visual feedback
- Remove duplicate event listeners and improve component cleanup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 15:35:11 +02:00
Armin Ronacher
eb1622c604 Protect against closed pipes 2025-06-16 15:19:38 +02:00
Armin Ronacher
0d00c56b44 Document mkdir 2025-06-16 15:08:38 +02:00
Armin Ronacher
3ee0a57d6d Add mkdir endpoint 2025-06-16 15:07:57 +02:00
Armin Ronacher
fa647d1fe3 Added session create endpoint 2025-06-16 15:04:10 +02:00
Mario Zechner
90eb324930 Fix session card styling to match original design
- Restore compact header layout with proper spacing (px-3 py-2)
- Use original VS Code theme colors (text-vs-user, text-vs-warning)
- Fix terminal preview with proper aspect ratio (640/480)
- Update kill button styling to match original (bg-vs-warning)
- Add compact footer with session ID and working directory

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 14:59:24 +02:00
Armin Ronacher
f92e3d8bc4 Reuse header sending code 2025-06-16 14:58:16 +02:00
Armin Ronacher
4e554ed125 HTTP server cleanup 2025-06-16 14:55:09 +02:00
Armin Ronacher
5cd6b8802f Validate that we use valid uuids 2025-06-16 14:48:42 +02:00
Armin Ronacher
d1c6fd32cc Removed unused code 2025-06-16 14:46:09 +02:00
Armin Ronacher
b0e54b3cbc Updatd readme 2025-06-16 14:46:09 +02:00
Armin Ronacher
e2b06b672d Allow static file rendering 2025-06-16 14:46:09 +02:00
Armin Ronacher
1beb938646 Added real streaming endpoint 2025-06-16 14:46:09 +02:00
Armin Ronacher
0a5f947b98 Refactor server 2025-06-16 14:46:09 +02:00
Armin Ronacher
10c1379922 Vendor blocking-http-server 2025-06-16 14:46:09 +02:00
Armin Ronacher
bf7f2e0434 Refactor server slightly 2025-06-16 14:46:09 +02:00
Armin Ronacher
73c57e9682 Expose more session cleanup 2025-06-16 14:46:09 +02:00
Armin Ronacher
1ebfc0c37c Expose more methods 2025-06-16 14:45:19 +02:00
Armin Ronacher
c30f16531e Started port of server into tty-fwd 2025-06-16 14:45:19 +02:00
Peter Steinberger
39a5f25680 add workspace 2025-06-16 14:17:45 +02:00
Mario Zechner
ae2c986e33 Implement session-card architecture and improve session management
- Create session-card component for individual session rendering
- Add Renderer active count tracking to monitor instance leaks
- Parse session ID from tty-fwd stdout for reliable session creation
- Add 2-second delay for fresh session connections to prevent race conditions
- Simplify session-list to use session-card components
- Restore original layout with controls and proper padding
- Improve SSE exit event handling with direct session ID usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 13:50:28 +02:00
Mario Zechner
4757d27d26 Implement session-card architecture and improve session management
- Create session-card component for individual session rendering
- Add Renderer active count tracking to monitor instance leaks
- Parse session ID from tty-fwd stdout for reliable session creation
- Add 2-second delay for fresh session connections to prevent race conditions
- Simplify session-list to use session-card components
- Restore original layout with controls and proper padding
- Improve SSE exit event handling with direct session ID usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 13:50:19 +02:00