Commit graph

1736 commits

Author SHA1 Message Date
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
Peter Steinberger
b7aafa9a6d Fix autocomplete dropdown transparency using NSWindow
- Replace SwiftUI overlay with custom NSWindow implementation
- Use NSColor.controlBackgroundColor for opaque background
- Add proper click-outside-to-dismiss functionality
- Handle Swift concurrency and actor isolation correctly
- Inspired by SuggestionsDemo but simplified for our use case
2025-07-27 19:49:00 +02:00
Peter Steinberger
43e38f6b0d Fix minus button click target to match plus button using ZStack trick
- Use invisible plus symbol under minus to ensure equal button sizes
- SF Symbol 'minus' is naturally smaller than 'plus', causing unequal click targets
- Both buttons now have identical 20x20 clickable areas
2025-07-27 19:04:25 +02:00
Peter Steinberger
10ce613c6b Comment out verbose debug logs for session tracking and buffer notifications 2025-07-27 18:53:46 +02:00
Peter Steinberger
56589b8a0e move repo scan to background 2025-07-27 18:49:56 +02:00
Peter Steinberger
e02f0c555d lint 2025-07-27 18:49:40 +02:00
Peter Steinberger
5b18b6712c sync worktree view with web 2025-07-27 18:47:57 +02:00
Peter Steinberger
bf76d779ea Improve Quick Start Commands UI with native macOS table
- Replace custom List implementation with native SwiftUI Table
- Add standard macOS +/- buttons with proper click targets
- Support inline editing with double-click and Enter key
- Fix text field alignment and padding issues
- Add proper focus management for keyboard navigation
- Remove redundant labels during inline editing
- Ensure table regains focus after editing completes
2025-07-27 18:47:21 +02:00
Peter Steinberger
8ad99ab4a7 Fix Quick Start settings UI to match other settings sections
- Remove double border by restructuring to use Section with header/footer pattern
- Move "Quick Start Commands" title and description outside the content border
- Remove custom background and border from List to eliminate visual inconsistency
- Match the same visual hierarchy as Server Configuration and other settings panels
- Maintain single border around content area with consistent styling
2025-07-27 18:09:19 +02:00
Peter Steinberger
fab5987e33 Add error logging to session termination from list view
- Add consistent error logging when terminate session fails from X button
- Match error handling behavior between list view and detail view
- Helps diagnose issues with session termination
2025-07-27 18:08:44 +02:00
Peter Steinberger
cae76b6fae Add error logging to SessionRow terminate function
Previously, when session termination failed from the X button in the list view,
the error was silently swallowed. This made it difficult to diagnose why
termination might fail compared to the menu action which has proper logging.

Now both termination paths log errors consistently, making debugging easier.
2025-07-27 18:05:49 +02:00
Peter Steinberger
dfe0cfda25 Fix test failures and resolve all linting warnings
- Fix notification preference tests to match default enabled: false
- Fix PtyManager initialization in integration tests
- Fix path splitting tests for macOS URL behavior
- Add hour formatting to duration display (1h 23m 45s format)
- Fix non-optional URL nil comparison warning
- Fix force unwrapping warning in EventSource.swift
- Apply SwiftFormat formatting fixes
- Update test expectations to match actual behavior
2025-07-27 17:44:50 +02:00
Peter Steinberger
f87b511ec1 Fix web test failures
- Update notification preferences test to expect enabled: false as default (matching macOS defaults)
- Add PtyManager.initialize() calls to integration tests to fix initialization errors
- Make createTestServer async to properly initialize PtyManager
- Fix formatting issues in test files

This fixes the failing tests in config-service.test.ts, worktree-workflows.test.ts,
and socket-protocol-integration.test.ts.
2025-07-27 16:41:01 +02:00
Peter Steinberger
22bcdeffd4 Fix remaining compilation warnings
- Remove unnecessary nil check for non-optional URL in PathSplittingTests
- Add CodingKeys enum to ServerEvent to explicitly exclude auto-generated id property from encoding/decoding

This resolves all compilation warnings except the harmless AppIntents metadata warning.
2025-07-27 16:33:44 +02:00
Peter Steinberger
cfdfe70083 Fix remaining macOS test failures
- Fix path splitting tests to match actual macOS URL behavior for root paths
- Add hour formatting to ServerEvent.formattedDuration for durations >= 1 hour
- Update Claude notification tests to check ConfigManager instead of UserDefaults

All tests now pass successfully (241 passed, 0 failed, 6 skipped).
2025-07-27 16:27:35 +02:00
Peter Steinberger
b3c13748f9 fix: Add missing EventSource implementation for NotificationService
- Implement EventSource class for Server-Sent Events (SSE) support
- Add localAuthToken computed property to ServerManager
- Fix actor isolation issues in NotificationService
- Fix warning about unnecessary nil coalescing in SessionMonitor
- Remove unused duration variable in handleCommandError
2025-07-27 16:05:28 +02:00