Commit graph

90 commits

Author SHA1 Message Date
Peter Steinberger
ec0bbcfdf4 Fix CI: Resolve all Clippy warnings and improve code quality
- 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
2025-06-18 13:13:12 +02:00
Mario Zechner
68dd22e183 Fix session-view navigation for PTY fallback sessions
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>
2025-06-18 13:08:37 +02:00
Peter Steinberger
9b3839e361 Fix CI: Apply final Rust formatting 2025-06-18 13:07:37 +02:00
Peter Steinberger
6f20d395f5 Fix CI: Apply Clippy fixes and remove redundant continue statements
- 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
2025-06-18 13:06:06 +02:00
Mario Zechner
dd31dfb9f4 Fix compiler warnings in term_socket.rs
- Remove unused FromRawFd import
- Prefix unused parameters with underscore

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 13:05:46 +02:00
Mario Zechner
45f627fddf Add signal handling to update session statuses on server shutdown
- 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>
2025-06-18 13:04:52 +02:00
Peter Steinberger
2f4ca27b03 Fix CI: Format Swift and Rust code
- Fixed Swift formatting issues in AppConstants.swift and VibeTunnelApp.swift
- Fixed Rust formatting in tty-fwd source files
- CI should now pass formatting checks
2025-06-18 13:02:31 +02:00
Mario Zechner
1cef390ed6 Add PTY fallback to term_socket.rs with race condition fix
- Implements spawn_via_pty() function with complete bidirectional I/O
- Creates PTY master/slave, forks child process, handles stdin/stdout
- Fixes race condition by creating session.json synchronously before returning
- Background thread handles I/O operations while session metadata is immediate
- Enables cross-platform terminal functionality without requiring VibeTunnel.app

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 12:46:25 +02:00
Mario Zechner
18bb33c2ce Fix escape sequence corruption in asciinema cast output
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>
2025-06-18 08:23:09 +02:00
Peter Steinberger
e7480c3f59 Spawn new Terminal 2025-06-18 04:52:11 +02:00
Armin Ronacher
4fa8229b6f Add multiplex streaming 2025-06-17 21:18:15 +02:00
Armin Ronacher
f52001d831 Refactored into SSE helper 2025-06-17 20:31:34 +02:00
Armin Ronacher
e8b22949c8 Clean up parser 2025-06-17 20:16:28 +02:00
Armin Ronacher
78a5d1a77e Refactor thread spawning 2025-06-17 19:47:04 +02:00
Armin Ronacher
1b41fac4cf Cleanup reading of existing content 2025-06-17 18:43:22 +02:00
Armin Ronacher
19b545d8ba Simplify startup handling for the stream 2025-06-17 18:41:50 +02:00
Armin Ronacher
58932a535b Initial work for streaming refactor 2025-06-17 18:30:25 +02:00
Peter Steinberger
9642c7ed85 Add app-calling logic 2025-06-17 13:52:58 +02:00
Armin Ronacher
9e564fef00 Fixed unicode slicing 2025-06-17 13:28:58 +02:00
Armin Ronacher
11cc34d003 Refactor output writing 2025-06-17 13:02:17 +02:00
Armin Ronacher
f23dc80a38 spawn now works via the terminal once peter finishes that 2025-06-17 11:41:52 +02:00
Armin Ronacher
7ef07e61c5 Removed mod term 2025-06-17 11:28:13 +02:00
Armin Ronacher
34a2bcce49 Removed --spawn-terminal for now 2025-06-17 11:27:30 +02:00
Armin Ronacher
df13c82c64 Added --spawn-terminal experiment 2025-06-17 11:08:28 +02:00
Armin Ronacher
eee8a65450 Improved vt command to allow finding the current session 2025-06-17 09:56:21 +02:00
Peter Steinberger
e8f65b9121 Fix CI failures: platform-specific Rust code and Swift formatting 2025-06-17 01:36:12 +02:00
Peter Steinberger
12cef6f5c8 lint Rust 2025-06-17 01:03:29 +02:00
Armin Ronacher
4f29fd899e Remove unused heuristics for now 2025-06-17 00:33:45 +02:00
Armin Ronacher
17ccdf6661 Fix clippy warning 2025-06-17 00:07:42 +02:00
Armin Ronacher
b79d5a1fb4 SIGKILL ueber alles 2025-06-16 23:36:06 +02:00
Armin Ronacher
83b46187a8 Detect expired sessions 2025-06-16 23:13:12 +02:00
Armin Ronacher
afa48c67d5 Change default term 2025-06-16 22:53:10 +02:00
Armin Ronacher
4cbbf2e457 Fixed header size reporting 2025-06-16 22:49:17 +02:00
Armin Ronacher
535887061a Refactor header writing 2025-06-16 22:26:26 +02:00
Armin Ronacher
f12d8c7463 Cleanup 2025-06-16 21:58:31 +02:00
Armin Ronacher
1423902539 Small refactoring to make clippy happy 2025-06-16 21:47:49 +02:00
Armin Ronacher
71f49142ea Show waiting status 2025-06-16 21:39:37 +02:00
Armin Ronacher
db752fc39c Added browse command 2025-06-16 20:39:46 +02:00
Armin Ronacher
f328e2c1cb Added password protection 2025-06-16 20:27:07 +02:00
Armin Ronacher
f8ac02d5e5 Removed accidentally added code 2025-06-16 19:58:46 +02:00
Armin Ronacher
9213d59cf9 Added -i / --shell 2025-06-16 19:34:36 +02:00
Peter Steinberger
46408a387c Fix server startup coordination and health endpoint consistency
- Fix server health check to use /api/health endpoint consistently
- Improve ServerManager error handling to properly sync state
- Fix async/await warning in DebugSettingsView
- Ensure server state is properly reported even if initial check fails
2025-06-16 18:18:24 +02:00
Armin Ronacher
3e3f81b892 Fix terminal handling 2025-06-16 17:35:00 +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
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
Armin Ronacher
68ca8a48e3 Fix warning 2025-06-16 16:07:22 +02:00