Commit graph

1751 commits

Author SHA1 Message Date
Helmut Januschka
dbba6127df
Add tmux integration to VibeTunnel (#460)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2025-07-30 02:25:54 +02:00
Peter Steinberger
40f4a6f413 Suppress VT wrapper output for title and status commands
- Add early command detection to skip version output for specific commands
- Commands that now run silently: vt title, vt status, vt version, vt --version
- Fixes ugly text wrapping in Claude Code when using vt title
- Preserves color information by eliminating wrapper output
- Requires Mac app rebuild to take effect
2025-07-30 00:28:12 +02:00
Peter Steinberger
10cbfe260d Add repo prompt docs 2025-07-29 15:59:32 +02:00
Peter Steinberger
5d49693573 Suppress socket disconnect error on normal Claude Code exit
- Add isExitingNormally flag set during onExit callback
- Check for common normal disconnect errors (EPIPE, ECONNRESET, Unknown error)
- Log as debug instead of error for normal disconnects
- Prevents misleading error message when exiting Claude Code normally
2025-07-29 15:30:35 +02:00
Peter Steinberger
7a69ccb711 Remove 'Using binary:' prefix from vt output
Simplify output to just show the path without redundant label
2025-07-29 15:26:26 +02:00
Peter Steinberger
bc6633a635 Shorten vt output path by removing /Contents/Resources/vibetunnel suffix
Shows cleaner path ending at .app for Mac app bundles
2025-07-29 15:25:44 +02:00
Peter Steinberger
b514143486 Fix prettify_path function not found error
Move prettify_path function definition to the beginning of the script
to ensure it's available when needed for vt output formatting
2025-07-29 15:23:27 +02:00
Peter Steinberger
0b7d978167 Improve vt command output formatting
- Shorten home directory paths to ~ for better readability
- Merge version and build date into single line
- Apply gray color to output using ANSI escape codes
2025-07-29 15:21:32 +02:00
Peter Steinberger
909a9e8249 Remove unused 'Verbose Status Check Logging' toggle
This toggle was UI-only with no actual implementation. It was intended for
controlling verbose logging of remote service health checks but was never
connected to any logging logic.
2025-07-29 10:27:10 +02:00
Peter Steinberger
89b30d0d8c Notification fix attempt 2025-07-29 09:46:02 +02:00
Peter Steinberger
bfeb94d972 test fixes 2025-07-29 08:08:15 +02:00
Peter Steinberger
dcd65b5db4 Fix notification auto-reconnection on page reload
- Add auto-resubscribe logic to web push notification service
  - Automatically restore push subscription if notifications were previously enabled
  - Sync subscription state with saved preferences on initialization
  - Handle failed resubscription by updating preferences accordingly

- Fix Mac app notification service startup check
  - Only establish SSE connection if notifications are enabled in config
  - Prevents unnecessary connection attempts when notifications are disabled
  - Ensures consistent behavior between web and native components

This fixes the issue where notification settings appeared enabled but the
SSE connection indicator was red and test button was disabled until the
user manually toggled notifications off and on.
2025-07-28 20:15:28 +02:00
Peter Steinberger
5aabd862e7 Fix test notification system
- Remove duplicate NotificationService.start() call from VibeTunnelApp
- Fix compression middleware blocking SSE events by excluding /api/events
- Add Accept-Encoding: identity header to EventSource to prevent compression
- Add comprehensive debugging to EventSource for data reception
- Fix Swift compilation errors with explicit self references
- The issue was that SSE events were being gzip compressed, preventing proper streaming
2025-07-28 19:03:21 +02:00
Peter Steinberger
dad2f3380e Add SSE connection status indicator to notification settings
- Show real-time connection status with colored indicator
- Display 'Event Stream: Connected/Disconnected' on separate row
- Add warning message when notifications enabled but connection is down
- Update connection status via NotificationCenter events
- Add debugging logs to EventSource for better troubleshooting
2025-07-28 18:06:02 +02:00
Peter Steinberger
5083cb5c1e make sure session doesn't extend mobile screen 2025-07-28 16:05:35 +02:00
Peter Steinberger
c273272e52 update push event 2025-07-28 16:05:22 +02:00
Peter Steinberger
aa5bb9eef2 Implement unified test notification system through server
- Add /api/test-notification endpoint that emits SSE events to all clients
- Include server version in test notifications for verification
- Update web client to listen for SSE test notifications
- Update Mac app to call server endpoint instead of local notification
- Add TestNotification to ServerEventType enum
- Ensure test notifications are distributed to ALL connected endpoints

This provides a complete test of the notification flow:
Web/Mac → Server → SSE → All clients (Web + Mac)
2025-07-28 16:04:07 +02:00
Peter Steinberger
8cdce956e7 remove double block 2025-07-28 15:52:52 +02:00
Peter Steinberger
9e3a1a60f9 Fix client-side handling of git status SSE updates
Updated connection-manager to handle the new field names:
- Changed gitUntrackedCount to gitAddedCount
- Changed gitStagedCount to gitDeletedCount

This completes the git status terminology standardization.
2025-07-28 15:44:40 +02:00
Peter Steinberger
0812bfd89d Standardize git status terminology to use 'New' for untracked files
- Web UI: Changed 'Added' to 'New' for untracked files
- Mac UI: Changed 'Untracked' to 'New' and removed staged file display
- Both UIs now consistently show: New (green +), Modified (yellow ~), Deleted (red -)
- Focused on working directory changes, removed staging area counts
- Backend: Changed untracked to added in git-status.ts for consistency
2025-07-28 15:16:37 +02:00
Peter Steinberger
75dd51883b Merge branch 'main' - keep notification refactoring changes 2025-07-28 15:09:31 +02:00
Peter Steinberger
7caa839027 Unify notification system to use SSE for all clients
- Remove redundant Unix socket notification path from SessionMonitor
- Fix Mac app to use correct /api/events endpoint (was missing /api prefix)
- Remove NotificationControlHandler as notifications now flow through SSE
- Clean up unused 'session-monitor' category from control protocol
- Simplify notification flow: Events → SessionMonitor → SSE → All clients

This eliminates duplicate code paths and makes the system more maintainable.
2025-07-28 15:00:08 +02:00
Peter Steinberger
23a8999e28 Fix SSE events to include missing gitDeletedCount field
The git-watcher was sending incomplete git status updates via SSE,
missing the gitDeletedCount field. This caused the UI to lose the
deleted files count after receiving real-time updates.

Note: gitAddedCount is defined in the Session type but is not computed
by the git status utility and remains unused throughout the codebase.
2025-07-28 14:48:24 +02:00
Peter Steinberger
a53091d04b Implement unified notification system via Unix socket
- Extended control protocol to support session-monitor events
- Modified SessionMonitor to emit events via Unix socket to Mac app
- Removed duplicate notification logic from Mac SessionMonitor
- All notifications now flow: Server → Unix Socket → Mac NotificationControlHandler
- Respects user notification preferences on Mac side
- Single source of truth for all notification events (server-side)

This eliminates the need for SSE connection from Mac app and removes
polling-based duplicate detection, simplifying the architecture.
2025-07-28 14:35:29 +02:00
Peter Steinberger
a5741a56bb Fix EMFILE error in git-watcher by using shallow directory watching
- Use depth: 0 to watch only immediate children instead of recursive watching
- Prevents 'too many open files' errors in large repositories
- Still detects both tracked and untracked file changes
- Combines shallow watching with periodic polling for reliability
2025-07-28 14:25:11 +02:00
Peter Steinberger
240b491050 sync descriptions of web settings with mac 2025-07-28 14:20:54 +02:00
Peter Steinberger
a992aaae76 Dashboard setting tweaks 2025-07-28 14:17:46 +02:00
Peter Steinberger
969fd2e327 Show server PID in settings 2025-07-28 14:13:39 +02:00
Peter Steinberger
6a918aeab6 mac settings: remove dupe section 2025-07-28 14:13:14 +02:00
Peter Steinberger
6bd269f71a Make claude less dumb 2025-07-28 14:00:17 +02:00
Peter Steinberger
f856c49e1b Fix session cleanup on startup by using correct JSON field name 2025-07-28 13:52:56 +02:00
Peter Steinberger
414a2160e7 Rework Settings to give Notifications its own Tab 2025-07-28 13:43:44 +02:00
Peter Steinberger
8945dd5d66 worktree button is not for mobile 2025-07-28 13:35:00 +02:00
Peter Steinberger
e0617ab206 Add docs for push notification feat 2025-07-28 13:26:14 +02:00
Peter Steinberger
a2bd642053 Fix duplicate Git worktree button in mobile view
- Move worktree toggle button inside responsive container
- Button now properly hides when compact menu is shown
- Prevents redundant display of same functionality on mobile
2025-07-28 13:24:17 +02:00
Peter Steinberger
9bc3c7b891 update changelog 2025-07-28 12:09:02 +02:00
Peter Steinberger
2b20fa9555 Refactor socket client API: Remove HTTP fallback and add type-safe message handling
- Remove HTTP fallback and PID file management from socket-api-client
- Delete ServerPidManager utility class
- Add type-safe sendMessage and sendMessageWithResponse methods to VibeTunnelSocketClient
- Add MessagePayloadMap for compile-time type safety of message payloads
- Refactor SocketApiClient to use clean API instead of brittle type casting
- Remove backwards compatibility code - only emit events with MessageType enum names
- Simplify message handling and response listeners
- Update buildMessage to properly handle CONTROL_CMD messages
2025-07-28 11:40:56 +02:00
Peter Steinberger
9d7fe36699
Fix CI issues (#476) 2025-07-28 09:19:40 +02:00
Peter Steinberger
acdc4f22a8 Consolidate duplicate git status implementations
- Create shared git-status utility to avoid code duplication
- Update git-watcher.ts to use the shared utility
- Update sessions.ts to use the shared utility
- Remove duplicate getDetailedGitStatus implementations
- Fix import and linting issues

The shared utility provides a single source of truth for parsing git status output,
making the codebase more maintainable.
2025-07-28 02:48:01 +02:00
Peter Steinberger
cd6cbd8d6e Add VIBETUNNEL_PREFER_DERIVED_DATA support and version tracking
- Add VIBETUNNEL_PREFER_DERIVED_DATA environment variable to vt script
  - When set, prefers VibeTunnel builds from Xcode's DerivedData
  - Logs binary location, version, and build timestamp
  - Falls back to /Applications if no DerivedData build found
- Add version and buildDate to StatusResponse interface
- Include version info in api-socket-server status responses
- Add comprehensive documentation in README.md
- Version info already stored in session.json (was pre-existing)

This helps developers easily test changes without installing to /Applications
2025-07-28 02:05:39 +02:00
Peter Steinberger
60e33948b2 Add documentation for Asciicast Pruning in VibeTunnel 2025-07-28 02:05:22 +02:00
Peter Steinberger
9a565d884d remove garbage 2025-07-28 01:27:36 +02:00
Peter Steinberger
627309ebf4 Move ascii stream pruning to asciinema writer 2025-07-28 01:27:30 +02:00
Peter Steinberger
2aff059636 Increase logging and change mobile detection 2025-07-28 00:41:25 +02:00
Peter Steinberger
8a9f270c3e Increase ANSI sequences we use for pruning 2025-07-28 00:39:10 +02:00
Peter Steinberger
f98ef1728f Increaes ANSI sequences we use for pruning the ascii stream 2025-07-28 00:37:26 +02:00
Peter Steinberger
734fc1b282 Disable sending terminal resize events 2025-07-28 00:21:14 +02:00
Peter Steinberger
c980efaafd Improve logging 2025-07-28 00:17:50 +02:00
Peter Steinberger
0b2f675e78 Modernize autocomplete dropdown with SwiftUI materials
- Replace NSColor.controlBackgroundColor with .regularMaterial
- Remove unused VisualEffectBackground and AutocompletePopupContent
- Simplify code by using native SwiftUI material modifiers
2025-07-27 20:06:20 +02:00
Peter Steinberger
f893e747a5 Fix mouse hover selection in autocomplete dropdown
- Pass selectedIndex binding through to AutocompleteViewWithKeyboard
- Allow mouse hover to properly update selection state
- Maintain keyboard navigation functionality
2025-07-27 20:05:12 +02:00