Commit graph

633 commits

Author SHA1 Message Date
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
Mario Zechner
fb7d1b2dc0 feat: ensure last non-empty line is always visible in terminal buffer
- Show bottom portion of buffer when content exceeds viewport
- Keep all content visible when it fits within viewport
- Maintain fitHorizontally mode to show all content scaled
- Calculate proper start index to show the most relevant content

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:24:25 +02:00
Mario Zechner
6479168ca5 fix: change terminal buffer background to black
- Replace dark gray (#1e1e1e) with pure black background
- Match the expected terminal appearance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:21:47 +02:00
Mario Zechner
3bf543e694 fix: resolve terminal rendering issues in vibe-terminal-buffer
- Move terminal color definitions to shared CSS in input.css
- Use bright color palette for dark backgrounds
- Switch from Lit template rendering to direct innerHTML for terminal content
- Add display: inline-block to terminal-char for proper rendering
- Remove redundant style definitions from terminal.ts
- Fix issue where Lit's template system was interfering with terminal output

The key fix was using innerHTML directly instead of Lit's template system for
the terminal content, matching the approach used in terminal.ts.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 03:21:16 +02:00
Mario Zechner
01df54c63b fix: add terminal styles to vibe-terminal-buffer component
- Add explicit terminal character styles to ensure proper rendering
- Include style definitions for bold, italic, underline, dim, strikethrough
- Ensure CSS variables are properly inherited from parent scope
- Fix text rendering issues where colors appeared gray

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:58:44 +02:00
Mario Zechner
c738ec0f57 feat: trim blank cells from end of each line
- Reduce data transfer by omitting trailing blank cells
- Keep at least one cell per line to maintain structure
- Handle empty lines efficiently with single space cell
- Add fallback rendering for completely empty lines

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:47:14 +02:00
Mario Zechner
4a9ee48427 feat: implement fitHorizontally mode and buffer trimming
- Add fitHorizontally mode to vibe-terminal-buffer component
- Scale font size to fit entire terminal width when enabled
- Trim blank lines from bottom of buffer to reduce data transfer
- Always show content from top down (not centered on cursor)
- Match behavior of terminal.ts fitTerminal implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:45:13 +02:00
Mario Zechner
aa0658acc7 Fetch at least one full terminal screen in buffer component
The component was only fetching as many lines as could fit in its container,
which could miss important context. Now it fetches at least one full terminal
screen worth of lines (stats.rows) to ensure we capture the complete visible
terminal state.

Also improved rendering to show the bottom portion when we have more lines
than can fit in the display area.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:33:23 +02:00
Mario Zechner
ef7a679c2b Fix binary buffer encoding to support large terminals
The binary encoding was using 16-bit unsigned integers which failed when:
- Terminal has many rows (>65k)
- Cursor is above the viewport (negative relative position)

Changes:
- Upgrade to version 2 of the binary format
- Use 32-bit integers for dimensions and positions
- Use signed integers for viewport/cursor positions
- Update header size from 16 to 32 bytes
- Update documentation to reflect new format

This fixes the issue where cursorY could be negative when the cursor
is above the visible viewport (e.g., cursorY=0, viewportY=46 results
in relative cursorY=-46).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:31:15 +02:00
Mario Zechner
b041743287 Add vibe-terminal-buffer component for efficient session previews
Replace terminal.ts in session-card with new buffer-based component that:
- Fetches terminal buffer snapshots via JSON API
- Polls every second only when content changes (checks lastModified)
- Automatically calculates lines needed based on container height
- Reuses terminal rendering styles and logic

Changes:
- Create terminal-renderer.ts with shared rendering logic for both components
- Add vibe-terminal-buffer component that works with buffer API
- Update session-card to use vibe-terminal-buffer instead of vibe-terminal
- Add terminal-line CSS for proper styling
- Fix color handling in terminal-manager (-1 means default color)
- Add debug logging to help diagnose rendering issues

The new approach is more efficient - no cast file parsing, just direct
buffer snapshots from the server.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 02:19:09 +02:00
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