Commit graph

614 commits

Author SHA1 Message Date
Mario Zechner
00602e3218 Implement server-side terminal buffer management with xterm.js headless
Major architectural change: replaced tail -f streaming with direct file watching
and server-side terminal state management for better performance and efficiency.

Key changes:
- Add StreamWatcher class using fs.watch() instead of tail -f process
  - Benchmarks showed fs.watch() is faster and more efficient
  - Handles multiple SSE clients per session without duplicate processes
  - Streams existing content then watches for new data

- Add TerminalManager class for server-side xterm.js instances
  - Maintains headless terminal state per session
  - Watches stream files and feeds data into terminals
  - Provides binary buffer snapshots on demand

- Add new /api/sessions/{id}/buffer endpoint
  - Returns efficient binary terminal buffer snapshots
  - Supports viewportY and lines parameters for partial updates
  - Uses run-length encoding for compression

- Create comprehensive binary format documentation (snapshot-format.md)
  - 16-byte header with dimensions and cursor position
  - Variable-length cell encoding with UTF-8 and RGB support
  - ~75% size reduction compared to JSON

- Fix cmdline.join() error with defensive programming
  - Handle cases where cmdline might not be an array

This enables session-list.ts to efficiently show terminal states without
overwhelming client/server resources.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 01:56:20 +02:00
Peter Steinberger
938682cc85 Make go serve via mac 2025-06-20 01:51:36 +02:00
Peter Steinberger
009763b022 delete applescript go abomination 2025-06-20 01:07:57 +02:00
Peter Steinberger
b968bf7f1e Reasons 2025-06-20 01:07:57 +02:00
Mario Zechner
d5f54ddb57 Ignore Go executables. 2025-06-20 01:06:28 +02:00
Peter Steinberger
943410fc1c Add new vt binary that supports both rust and go 2025-06-20 00:48:33 +02:00
Peter Steinberger
ae270d66f8 Add support to detect new vt command 2025-06-20 00:37:09 +02:00
Peter Steinberger
788269c2ab Better gentle Sparkle update driver 2025-06-20 00:29:00 +02:00
Peter Steinberger
11911ebc8f add force kill buttom and Sparkle user driver 2025-06-19 23:53:12 +02:00
Peter Steinberger
d20b7e6656 Add manual kill button 2025-06-19 23:52:23 +02:00
Peter Steinberger
6974e57f15 kill if we are our own 2025-06-19 23:52:15 +02:00
Peter Steinberger
9c2c50dd4f Add support for go in Mac app, implement missing features 2025-06-19 23:44:28 +02:00
Peter Steinberger
8f6adcf90d Make reload button for all impls 2025-06-19 23:43:37 +02:00
Peter Steinberger
66ed7d793d fix build warning 2025-06-19 23:43:37 +02:00
Peter Steinberger
acfb4dd971 Enable updates even for dev mode 2025-06-19 23:42:59 +02:00
Peter Steinberger
25857fb2de Feature: auto-close controlled term windows on session exit 2025-06-19 23:42:59 +02:00
Mario Zechner
d64abdafad Fix up resize input format 2025-06-19 23:20:30 +02:00
Mario Zechner
0b97181a04 Fix Ctrl+C signal handling and cross-server session compatibility
- Added proper PTY slave terminal configuration for signal interpretation
- Enabled ISIG flag so Ctrl+C generates SIGINT instead of being treated as text
- Configured ICANON and ECHO flags for proper terminal behavior
- Applied configuration in both child process code paths (manual dup2 and login_tty)

- Implemented hybrid proxy fallback system for cross-server session input
- Rust server now proxies input to Node.js server when pipe write fails
- Added reqwest HTTP client for seamless communication between servers
- Reduced pipe timeout to 1 second for faster fallback detection
- Added key translation for special keys when proxying to Node.js

This fixes both:
1. Ctrl+C not interrupting processes in Rust-created sessions
2. "Device not configured" errors when accessing Node.js sessions from Rust server

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 23:06:39 +02:00
Mario Zechner
6391605267 Reorder ctrl key dialog buttons for better UX
- Move CANCEL button to the left (renamed from CLOSE)
- Keep CLEAR button in the middle when sequence exists
- Move SEND button to the right when sequence exists
- Follows standard UI convention with cancel actions on left, primary actions on right

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 22:55:37 +02:00
Mario Zechner
3c081f90f4 Less stream logging in Node. 2025-06-19 22:51:38 +02:00
Mario Zechner
17f46c84c8 Fix terminal paste functionality and standardize resize endpoint field names
- 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>
2025-06-19 22:28:19 +02:00
Mario Zechner
bbd079c052 Fix terminal keyboard event handling to allow browser shortcuts
The terminal component was aggressively preventing default on ALL keyboard events, blocking important browser shortcuts like F12 (DevTools), Ctrl+C/Ctrl+V (copy/paste), and Ctrl+F (find).

Updated the keyboard handler to:
- Allow F12 and Ctrl+Shift+I/Cmd+Alt+I for DevTools
- Allow common browser shortcuts like Ctrl+A, Ctrl+F, Ctrl+R, etc.
- Allow Alt+Tab and Cmd+Tab for window switching
- Only preventDefault on keys that are actually handled by the terminal

This preserves terminal functionality while restoring essential browser shortcuts.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 22:06:23 +02:00
Mario Zechner
5ce76f828f No more artifiial waiting, just start streaming. 2025-06-19 21:26:09 +02:00
Mario Zechner
47ccd26416 Fix server working directory corruption and remove duplicate PTY code
- Fixed sessionId calculation bug in asciinema stream-out events
- Removed ~400 lines of duplicate PTY code from term_socket.rs
- Created reusable spawn_with_pty_fallback function in tty_spawn.rs
- Fixed working directory isolation in session spawning threads
- Ensured static file serving works correctly after session creation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 21:25:49 +02:00
Mario Zechner
2040e6e7b4 Removed expand toggle in session-view header. 2025-06-19 21:25:49 +02:00
Peter Steinberger
e5e63c47bb Rename button 2025-06-19 21:20:15 +02:00
Peter Steinberger
f9f25141cb Fix AppleScript replacement 2025-06-19 21:20:09 +02:00
Peter Steinberger
2c276fc67c Ensure server restarts on password change. 2025-06-19 18:15:44 +02:00
Peter Steinberger
99392b53a4 Center on screen where the mouse is 2025-06-19 17:55:00 +02:00
Your Name
4f8ea188dd Add .gitattributes to normalize line endings to LF 2025-06-19 17:44:30 +02:00
Peter Steinberger
0412f01759 Make appcast generator always use local CHANGELOG.md
- Remove GitHub release body fallback
- CHANGELOG.md is now the single source of truth for release notes
- Show clear warning if version is not found in changelog
- Ensures consistency between what's in the repo and what users see
2025-06-19 15:02:22 +02:00
Peter Steinberger
9b4853e6d6 Fix appcast changelog extraction for beta releases
- Update generate-appcast.sh to try multiple version formats
- Now correctly extracts changelog for 1.0-beta.2 from 1.0.0-beta.2 entry
- Both beta releases now show proper release notes in appcast
2025-06-19 15:00:21 +02:00
Peter Steinberger
7f82f39b6b Update appcast for 1.0.0-beta.2 release
- Generate EdDSA signatures for beta.2 release
- Fix generate-appcast.sh color variable ordering
- Add proper signatures for both beta releases
2025-06-19 14:55:22 +02:00
Peter Steinberger
1464b1f19a Fix server startup 2025-06-19 14:42:42 +02:00
Peter Steinberger
fdc8592a6d Remove the X on stopped 2025-06-19 14:40:36 +02:00
Peter Steinberger
c22422e50d At Hummingbird tests for resize. 2025-06-19 14:32:14 +02:00
Peter Steinberger
7158a16694 Better process, conflict handling. 2025-06-19 14:32:14 +02:00
Peter Steinberger
e281ce7d72 lint 2025-06-19 14:32:14 +02:00
Peter Steinberger
978205da76 Add resize feature to Rust server 2025-06-19 14:32:14 +02:00
Peter Steinberger
720c81c704 Add resize feature to Hummingbird 2025-06-19 14:32:14 +02:00
Peter Steinberger
7707e6db3d Add port conflict resolver logic. 2025-06-19 14:32:14 +02:00
Peter Steinberger
87a9053833 whatever 2025-06-19 14:32:14 +02:00
Peter Steinberger
098cdf642d Up error logging 2025-06-19 14:32:14 +02:00
Mario Zechner
607090a1d3 Pty improvements 2025-06-19 14:07:59 +02:00
Peter Steinberger
0fb8f38761 disable logs 2025-06-19 13:20:32 +02:00
Peter Steinberger
57639639dd build release or debug version based on scheme 2025-06-19 13:02:15 +02:00
Peter Steinberger
0272d77e83 Increment build number to 107 for beta.2 release 2025-06-19 12:52:38 +02:00
Peter Steinberger
ef1d3d7c6e Fixes crash on Tahoe when opening Settings 2025-06-19 12:50:20 +02:00
Peter Steinberger
7f301d5368 was actually a circular dependency 2025-06-19 12:41:44 +02:00
Peter Steinberger
553f66fc4b Touched by Xcode 2025-06-19 12:35:42 +02:00