Commit graph

959 commits

Author SHA1 Message Date
Peter Steinberger
fe5f4eaa23 Fix build script to handle missing hash file gracefully
- Change error to warning when hash file is not found
- Force full rebuild instead of failing when hash is missing
- This fixes build failures when the hash calculation phase hasn't run

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 01:03:51 +02:00
Armin Ronacher
a8f96f8129 Replace monaco with codemirror for previews (works now) 2025-06-23 00:52:50 +02:00
Mario Zechner
4ab8d6bb46 Add font size control to terminal settings dropdown
- Fix keyboard event handling to allow typing in terminal width input field
- Add font size adjustment controls (8-32px range) with +/- buttons and reset
- Store font size preference in localStorage for persistence
- Trigger terminal resize events when font size changes to update PTY dimensions
- Improve UX by preventing input event bubbling in settings dropdown

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 00:48:46 +02:00
Mario Zechner
c93297d4b8 Fix buffer aggregator mesage handling in client. 2025-06-23 00:48:46 +02:00
Peter Steinberger
a582ab5188 Improve zoom animation and add black hole for cleanup 2025-06-23 00:45:51 +02:00
Peter Steinberger
c574121f21 feat: exited sessions can be exited with esc key 2025-06-23 00:45:37 +02:00
Peter Steinberger
136ca9ff29 yellow X is to clean up sessions 2025-06-23 00:19:03 +02:00
Peter Steinberger
177856d5aa New Session now supports enter+esc. 2025-06-23 00:18:37 +02:00
Peter Steinberger
55d9ffef07 Add detailed documentation about custom node install 2025-06-23 00:18:37 +02:00
Peter Steinberger
9424ad27ca Improve CI commenter 2025-06-23 00:18:37 +02:00
Peter Steinberger
ad90606f73 fix: iOS top safe area not respected #50 2025-06-23 00:18:37 +02:00
Peter Steinberger
1325085986 Show yellow (X) on killed cards to clean up 2025-06-23 00:18:37 +02:00
Peter Steinberger
15e18111af Improve server change detection 2025-06-23 00:18:37 +02:00
Peter Steinberger
f2d89352f0 Some terminals like Warp start up slow, 5 sec is too strict 2025-06-23 00:18:37 +02:00
Mario Zechner
302063327e feat: Add unified logging infrastructure with web viewer
- Implement client-side logger that mirrors server interface
- Add /api/logs endpoints for client log submission and retrieval
- Create real-time log viewer component at /logs with filtering
- Update all client files to use new logging system
- Add responsive design for log viewer (mobile/desktop layouts)
- Implement smart auto-scroll that preserves reading position
- Add Mac-style auto-hiding scrollbars
- Configure Express to serve .html files with clean URLs
- Update spec.md with logging infrastructure documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 00:05:43 +02:00
Mario Zechner
04cfe992ee refactor: Apply unified logging style guide to all server files
- Remove all colors from error/warn logs per style guide
- Add appropriate colors to logger.log calls (green=success, yellow=warning, blue=info, gray=metadata)
- Remove all prefixes like [STREAM], ERROR:, WARNING:
- Ensure all messages start lowercase (except acronyms) with no periods
- Add missing essential logs for lifecycle events and state changes
- Add debug logs for troubleshooting and performance monitoring
- Ensure all error logs include the error object
- Add proper logging to previously silent catch blocks
- Enhance context in logs with relevant IDs, counts, and durations

The logging now provides comprehensive visibility into:
- Server initialization and shutdown sequences
- Session lifecycle (creation, usage, termination)
- Connection events and client tracking
- Authentication attempts and security events
- File system operations and Git performance
- Remote server health checks and HQ communication
- Process management across platforms
- Resource cleanup and performance metrics

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 23:10:51 +02:00
Mario Zechner
f6df526f6b feat: Add structured logging system with unified style
- Implement centralized logger utility with file and console output
- Add debug mode support via --debug flag
- Initialize logger at startup for server, fwd, and cli
- Replace all console.log/error calls with structured logger
- Add logging style guide for consistent messaging
- Include proper shutdown handling with closeLogger()

The logger provides:
- Timestamped color-coded console output
- Module identification in all logs
- File logging to ~/.vibetunnel/log.txt
- Debug logs toggled via --debug flag

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 22:40:00 +02:00
Mario Zechner
3a3b5e44e9 feat: Add unified logger utility with file and console output
- Create logger factory with explicit module names (no stack traces)
- Support log/warn/error/debug levels with clean method names
- Write to ~/.vibetunnel/log.txt with automatic cleanup on startup
- Add colored console output with timestamps and module names
- Support debug mode via flag or environment variable

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 22:04:11 +02:00
Mario Zechner
1c007a2181 fix: Track cursor visibility state in terminal renderer
Applications like Claude CLI use ANSI escape sequences to hide the cursor
(\x1b[?25l) and render their own cursor with inverse text. The terminal
component now tracks cursor visibility by parsing these sequences in the
write() method and respects the visibility state when rendering.

- Added cursorVisible state that defaults to true
- Parse \x1b[?25l (hide) and \x1b[?25h (show) sequences in write()
- Only render cursor when both on cursor line AND cursor is visible

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 21:23:38 +02:00
Mario Zechner
1bb15097a4 refactor: Remove unused stream-notifier system
The direct notification system wasn't being used since hasListeners()
was checking before any listeners were set up. All sessions were using
file watching anyway. Simplified the code by removing the unused
notification system and keeping only the optimized file watching.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 21:09:57 +02:00
Mario Zechner
312786230b refactor: Remove unnecessary header construction in StreamWatcher
AsciinemaWriter always writes a header, so we can trust it exists.
Removed all the default header construction logic and headerSent tracking.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 21:00:41 +02:00
Mario Zechner
d7e811412a refactor: Simplify file watching - remove unnecessary OptimizedFileWatcher
- Integrate stat checking directly into StreamWatcher
- Remove platform-specific code paths that all used fs.watch anyway
- Keep the actual optimization: checking file stats to avoid spurious events
- Simpler, cleaner code with the same benefits

The real improvements remain:
1. Direct notifications for in-process sessions
2. Stat checking to verify actual file changes
3. Only processing when file size increases

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:57:46 +02:00
Mario Zechner
daa1db3392 Merge branch 'websocket-stream' 2025-06-22 20:46:27 +02:00
Mario Zechner
983f6282c5 Remove latency test scripts 2025-06-22 20:45:02 +02:00
Mario Zechner
c43a549ed8 fix: Simplify notification logic - use direct or file, never both
- Check upfront if we have listeners for direct notifications
- Use EITHER direct notifications OR file watcher, not both
- This eliminates any possibility of duplicate broadcasts
- Server sessions get instant updates via direct notifications
- Forwarded sessions use optimized file watcher

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:41:13 +02:00
Armin Ronacher
dad9e7a248 Standardize on VibeTunnel 2025-06-22 20:38:22 +02:00
Armin Ronacher
36f47c4581 Clauded up some SVG icons 2025-06-22 20:37:49 +02:00
Mario Zechner
52feefddf2 fix: Prevent duplicate notifications and improve latency
- Only use file watcher if no direct notifications are available
- Remove unnecessary deduplication logic
- Clean up logging for direct notifications
- Wait 100ms to detect if we're getting direct notifications before
  starting file watcher (for cross-process scenarios)

This should eliminate duplicate broadcasts and improve latency for
server-created sessions while maintaining compatibility with fwd.ts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:36:30 +02:00
Mario Zechner
76512c19c4 fix: Prevent double input processing in server sessions
The issue was that sendInput() was processing input twice:
1. Writing directly to PTY + asciinema for in-memory sessions
2. Then continuing to socket path which would write again

Added early return after in-memory session processing to avoid
the socket path when we already have a direct PTY reference.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:29:49 +02:00
Armin Ronacher
8a3807d4ce Claude fixed resizing 2025-06-22 20:24:36 +02:00
Mario Zechner
a84e43dadc fix: Prevent duplicate broadcasts in StreamWatcher
Add deduplication logic to prevent the same line from being broadcast
twice when both direct notification and file watcher fire. Uses a
simple hash and 50ms time window to detect duplicates.

This fixes the double input issue in server-created sessions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:21:03 +02:00
Mario Zechner
fbc8954d39 feat: Optimize file watching for lower latency streaming
- Add platform-specific optimized file watcher
  - Linux: inotify with rapid polling after changes
  - macOS: FSEvents + periodic checks to overcome batching
  - Windows: ReadDirectoryChangesW with debouncing
- Add direct in-process notifications via StreamNotifier
  - Bypasses file watching for same-process sessions
  - Near-instant latency for server-created sessions
- Update StreamWatcher to use both mechanisms
  - Primary: Direct notifications (microsecond latency)
  - Fallback: Optimized file watching (for fwd.ts)
- Add latency and stress test scripts

This should significantly reduce streaming latency, especially
for sessions created by the server process.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 20:18:57 +02:00
Armin Ronacher
975e50c052 Claude fixed resizing 2025-06-22 20:13:02 +02:00
Mario Zechner
912909c68f Ignore Local.xcconfig 2025-06-22 19:21:38 +02:00
Mario Zechner
94ed322e83 fix: Ensure vibetunnel server dies when Mac app is killed
- Add synchronous wait in applicationWillTerminate to ensure server stops before app exits
- Implement parent process monitoring in server spawn script
- Server now monitors parent PID and self-terminates if parent dies
- Handles both graceful shutdown and force-quit scenarios

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 19:17:38 +02:00
Mario Zechner
aa846cceea feat: Add version info to fwd.ts startup logs
- Display version number inline with session started message
- Show build date and git commit in session info
- Import version details from version.ts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 18:50:49 +02:00
Peter Steinberger
a49ecbc1a7 fix: Fix CI issues - iOS build/test and TypeScript linting
- Fix iOS CI to use correct workspace and scheme names
- Update iOS test script to use workspace instead of project
- Fix all TypeScript 'any' type warnings by adding proper types
- Update build destination format for Xcode 16 compatibility
2025-06-22 17:09:59 +02:00
Peter Steinberger
932beff906 Work on custom node installer 2025-06-22 16:46:08 +02:00
Armin Ronacher
f1288417b1 Added real icon to web ui 2025-06-22 16:10:27 +02:00
Peter Steinberger
47040e7ff8 fix port formatting 2025-06-22 16:04:52 +02:00
Peter Steinberger
87bc8e9f70 Better name for action 2025-06-22 16:04:21 +02:00
Peter Steinberger
0e8b0d199a Hack Warp Enter 2025-06-22 16:04:15 +02:00
Peter Steinberger
4fb6e925ac delete garbage schemes 2025-06-22 16:04:06 +02:00
Peter Steinberger
c6b571ecc9 Change local signing explainer 2025-06-22 15:55:02 +02:00
Peter Steinberger
0aa728f3f5 Populate dock menu 2025-06-22 15:55:02 +02:00
Peter Steinberger
9f8e45c184 Hide window hack from dock 2025-06-22 15:55:02 +02:00
Peter Steinberger
1ffabb048b Add helper for differrent vt name 2025-06-22 15:55:02 +02:00
Peter Steinberger
b58524750b ensure dev team is picked up 2025-06-22 15:55:02 +02:00
Peter Steinberger
caaee6b114 local needs to be local 2025-06-22 15:55:02 +02:00
Peter Steinberger
8bcaf54ed1 remove empty stack 2025-06-22 15:55:02 +02:00