Commit graph

348 commits

Author SHA1 Message Date
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
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
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
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
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
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
9d7fe36699
Fix CI issues (#476) 2025-07-28 09:19:40 +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
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
Peter Steinberger
69a3ff0714 Fix notification preferences to match web defaults
- Set notificationsEnabled to false by default in ConfigManager (matching TypeScript)
- Update NotificationService to check master notifications switch
- Update SessionMonitor to use ConfigManager instead of UserDefaults
- Fix notification tests to handle existing config files
- Add documentation about expected default values
2025-07-27 15:53:33 +02:00
Peter Steinberger
a5d43e8274 Fix remaining test compilation issues
- Add attachedViaVT parameter to test initializations
- Remove unnecessary nil coalescing operators for non-optional name property
2025-07-27 15:50:33 +02:00
Peter Steinberger
609c57d0bb Document proper macOS test execution requirements
- Add critical note that macOS tests must use XcodeBuildMCP
- Warn against using swift test which causes crashes
- Explain UserNotifications framework requires Xcode environment
- Add examples of correct test commands
2025-07-27 15:49:06 +02:00
Peter Steinberger
ee89f85866 Fix remaining macOS test compilation issues
- Update SessionMonitorTests to use all required ServerSessionInfo fields
- Add @MainActor annotations to NotificationServiceClaudeTurnTests
- Fix NotificationServiceTests to work with MainActor isolation
- Remove invalid save() method calls on NotificationPreferences
2025-07-27 15:49:06 +02:00
Peter Steinberger
7ee567a4b4 Fix macOS test compilation errors
- Add @MainActor annotations to fix actor isolation issues
- Convert GeneralSettingsViewTests from class to struct for Sendable conformance
- Fix missing test function declaration in SystemControlHandlerTests
- Remove unnecessary nil coalescing operator warning in NotificationService
2025-07-27 15:49:06 +02:00
Peter Steinberger
d75e2ffd76 Restore attachedViaVT property to distinguish VibeTunnel sessions
- Add attachedViaVT to SessionInfo interface to identify nested sessions
- Set attachedViaVT=true when VIBETUNNEL_SESSION_ID env var is present
- Add property to Swift ServerSessionInfo for API compatibility
- Allows distinguishing between direct terminal sessions and those spawned from within VibeTunnel
2025-07-27 15:48:44 +02:00
Peter Steinberger
03c5638f21 Migrate remaining XCTest files to Swift Testing framework
- Migrate PathSplittingTests.swift from XCTest to Swift Testing
  - Convert from XCTestCase class to struct with @Suite attribute
  - Replace XCTAssert* calls with #expect macros
  - Add descriptive test names using @Test attribute
  - Use parameterized testing for pathComponents test
  - Replace XCTUnwrap with try #require

- Migrate GeneralSettingsViewTests.swift from XCTest to Swift Testing
  - Convert from XCTestCase to final class with @Suite attribute
  - Replace setUp() with init() for test setup
  - Replace XCTAssert* calls with #expect macros
  - Add descriptive test names using @Test attribute

Both test files now follow Swift Testing conventions while maintaining their original test logic and coverage.
2025-07-27 15:48:44 +02:00
Peter Steinberger
a90f37e4cb
feat: Add comprehensive notification system with Codable models and modern Swift concurrency (#475) 2025-07-27 13:23:37 +00:00
Peter Steinberger
c6a299ac5f
Add push notifications onboarding screen (#474)
Co-authored-by: Diego Petrucci <baulei@icloud.com>
2025-07-27 12:12:30 +00:00
Peter Steinberger
5128142b1b claude tweaks 2025-07-27 14:10:59 +02:00
Peter Steinberger
3f86ed365c Optimize GitRepositoryMonitor to reduce redundant checks
- Implement repository deduplication in SessionMonitor to check each unique directory only once
- Add smart parent directory detection for common development paths (Projects, Development, etc.)
- Extend cache duration for common parent directories from 30s to 5 minutes
- Add negative caching for non-Git directories (10 minute cache)
- Group sessions by repository before Git checks to avoid duplicate lookups

This reduces Git repository checks from ~100/minute to significantly fewer by:
1. Deduplicating checks across multiple sessions in the same repository
2. Caching parent directory results longer
3. Remembering non-Git paths to avoid repeated filesystem traversals
2025-07-27 14:00:22 +02:00
Peter Steinberger
d4b7962800
Refactor notification preferences system (#469)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alex Fallah <alexfallah7@gmail.com>
2025-07-27 13:32:11 +02:00
Peter Steinberger
f3a98ee058
feat: add comprehensive Git worktree management with follow mode and enhanced UI (#452) 2025-07-26 15:06:18 +02:00
Peter Steinberger
4c897f139b
Remove screen recording permission requirement (#451) 2025-07-22 01:43:00 +02:00
Peter Steinberger
e5e6142a6d
Fix authenticate-pam module missing in npm package (#450) 2025-07-22 00:21:44 +02:00
Peter Steinberger
102f6c5e33
Improve Quick Start editor UI consistency across web and macOS (#448) 2025-07-21 17:11:49 +02:00
Peter Steinberger
2b6df96689
refactor: split StatusBarController into smaller components (#445) 2025-07-21 14:53:32 +02:00
Peter Steinberger
958973c7b7
refactor: extract all magic strings to centralized constants (#444) 2025-07-21 14:22:45 +02:00
Peter Steinberger
f8a7cf9537
Add file-based quick start configuration and remove WebSocket sync (#436)
* feat(server): add configuration service with file-based persistence

- Implement ConfigService for managing application configurations
- Add REST API endpoints for quick start configuration
- Add comprehensive test coverage for config operations
- Define TypeScript types for configuration structures
- Replace WebSocket-based config sync with REST API

* feat(web): add quick start editor component

- Create fully-featured command editor with add, edit, delete functionality
- Add drag-and-drop reordering support
- Implement real-time validation and error handling
- Include comprehensive test coverage (100%)
- Support keyboard navigation and accessibility

* feat(web): add session status management

- Create session status dropdown component for state management
- Add session termination capabilities with proper cleanup
- Refactor session header to integrate status controls
- Support graceful disconnection and reconnection

* feat(mac): add directory autocomplete service

- Implement AutocompleteService for directory path completion
- Create AutocompleteView with native macOS UI
- Support home directory expansion (~/)
- Add system file browser integration
- Optimize performance for large directory structures

* feat(mac): add quick start settings interface

- Create SwiftUI settings view for managing quick start commands
- Implement inline editing with immediate feedback
- Add default commands for common workflows
- Include toggle for using current directory as default
- Add smooth animations and hover effects

* feat: integrate quick start in session creation

- Add quick start command buttons to session create form
- Implement directory picker with autocomplete support
- Update form layout for better user experience
- Add comprehensive tests for new functionality
- Sync quick start integration across web and native

* feat(web): add repository discovery to settings

- Add repository discovery functionality in unified settings
- Update settings UI to support new configuration options
- Remove WebSocket-based configuration sync
- Simplify settings component with REST API integration

* docs: add macOS quick start implementation guide

- Document architecture and implementation details
- Include code examples and best practices
- Explain integration between web and native components
- Provide troubleshooting guidance

* feat: enhance UI/UX across components

- Improve session list with better status indicators
- Update terminal binary detection and display
- Refine width selector and image upload interactions
- Clean up WebSocket control handler
- Update server configuration handling
- Fix notification status display
- Polish settings view layout

* feat(web): improve session header UI elements

- Position edit icon directly after text instead of far right
- Update magic wand icon with sparkles to match macOS design
- Change from grid to flex layout for better icon positioning
- Enhance visual consistency across platforms

* fix(web): improve OPTIONS label alignment in session create form

- Add flex-shrink-0 to chevron icon to prevent shrinking
- Add leading-none to OPTIONS label for better vertical alignment

* docs: update changelog for beta.14 with Quick Start features

- Document Quick Start Configuration System (#229, #250, #436)
- Add native macOS settings interface details
- Include session management improvements
- Add bug fixes and breaking changes
- Reference related issues and PRs

* feat(mac): add ConfigManager for synchronized quick start commands

- Create ConfigManager to sync commands with web UI config file
- Monitor ~/.vibetunnel/config.json for changes
- Replace UserDefaults with file-based configuration
- Ensure consistency between Mac app and web interface

* feat(mac): add ClickableURLView component

- Create reusable component for clickable URLs in SwiftUI
- Support for opening URLs in default browser
- Consistent styling across the app

* refactor(mac): simplify remote access settings UI

- Use ClickableURLView for consistent URL display
- Reduce code duplication in settings sections
- Improve maintainability of remote access views

* refactor(mac): integrate ConfigManager in NewSessionForm

- Replace direct UserDefaults access with ConfigManager
- Use synchronized quick start commands from shared config
- Improve command selection UI consistency

* fix(web): update terminal padding and termination handling

- Remove horizontal padding from terminal containers
- Implement proper session termination via DELETE API
- Keep vertical padding for better visual appearance
- Fix binary mode toggle styling

* fix(mac): resolve ConfigManager threading crash

- Fix main actor violation in file monitor callback
- Remove unsafe self reference in asyncAfter closure
- Capture monitor queue reference to avoid accessing self
- Ensure all @Published property updates happen on main thread

* feat(web): add reset to defaults button in quick start editor

- Add Reset to Defaults button for easy restoration
- Import DEFAULT_QUICK_START_COMMANDS from config types
- Improve user experience with quick command reset option

* fix(web): adjust OPTIONS chevron icon size

- Reduce chevron icon from 10x10 to 8x8 for better visual balance
- Update responsive size classes accordingly
- Remove leading-none from OPTIONS label for better alignment

* docs: update changelog with latest UI improvements and bug fixes

- Document ConfigManager and ClickableURLView additions
- Add AutocompleteService and reset to defaults features
- Include all UI fixes and threading crash resolution
- Document session header and terminal improvements

* fix(mac): fix ConfigManager threading crash when moving quick start items

- Remove background file monitor queue and use main queue directly
- ConfigManager is @MainActor so all operations must happen on main thread
- Simplify file monitor callback by removing unnecessary Task wrapper
- Fixes crash when reordering quick start commands in settings

* feat: add Zod validation for quick start configuration

- Add Zod dependency for runtime config validation
- Implement ConfigSchema to validate quick start commands
- Ensure commands have non-empty strings and valid structure
- Add validation on config load and update operations
- Fix auth headers for config API endpoints
- Remove unused repository path WebSocket handlers
- Update storage key for consistency

This improves config reliability and prevents invalid commands from being saved.

* docs: update changelog with comprehensive beta.14 release notes

- Reorganize changelog with clear user-focused sections
- Add detailed feature descriptions for Quick Start functionality
- Highlight UI/UX improvements with specific examples
- Document all bug fixes and stability improvements
- Include breaking changes and migration guidance
- Add emojis for better visual organization
- Expand technical details for developers

* fix: handle undefined activityStatus in session categorization

Sessions with undefined activityStatus were incorrectly shown as idle.
Now only sessions with explicitly false isActive are considered idle.

* feat: enhance quick start configuration with repository discovery

- Add repository discovery and filtering in AutocompleteService
- Support directory-only suggestions for quick start paths
- Improve autocomplete filtering to exclude hidden and system directories
- Update quick start settings UI with better directory selection
- Add tests for vibe-terminal-binary component
- Minor UI improvements to clickable URLs and form components

* fix: update tests for storage key change and terminal sizing

- Update repository-service tests to use new 'app_preferences' storage key
- Fix vibe-terminal-binary test to enable fitHorizontally for maxCols constraint
- Ensure tests align with recent configuration changes

* fix: update failing tests and improve repository status element

- Add id="repository-status" to repository counter for easier test selection
- Update quick-start-editor test to match actual button classes
- Fix all unified-settings tests to use the new repository-status ID
- Prevent tests from accidentally selecting unrelated elements

* docs: update beta 14 changelog to match earlier style

Simplified changelog format to be consistent with beta 13 and earlier versions,
making it more concise and easier to read.

* feat: add IDs to quick-start-editor elements for better testability

- Add id="quick-start-edit-button" to Edit button
- Add id="quick-start-save-button" to Save button
- Add id="quick-start-cancel-button" to Cancel button
- Add id="quick-start-reset-button" to Reset to Defaults button
- Add id="quick-start-add-command-button" to Add Command button
- Add dynamic IDs for remove buttons: quick-start-remove-command-{index}
- Add dynamic IDs for inputs: quick-start-name-input-{index}, quick-start-command-input-{index}
- Add dynamic IDs for command items: quick-start-command-item-{index}

This makes tests more maintainable by avoiding complex selectors that search by text content.

* test: update quick-start-editor tests to use element IDs

- Replace button text search with ID selectors for better reliability
- Update edit button selector to use #quick-start-edit-button
- Update add command button selector to use #quick-start-add-command-button
- Update reset button selectors to use #quick-start-reset-button

This demonstrates how the new IDs make tests more maintainable and less fragile.

* docs: rewrite beta 14 changelog with accurate feature descriptions

- Clarify that Quick Start commands became customizable (not new)
- Add accurate description of session status management dropdown
- Include proper technical details about systemd support
- Fix misleading descriptions about features
- Maintain concise style consistent with previous releases

* fix: remove obsolete tests and fix control-unix-handler tests

- Remove obsolete repository-path-sync.test.ts that was testing removed functionality
- Remove skipped session-view-drag-drop.test.ts that was causing import errors
- Fix control-unix-handler tests to test actual functionality instead of non-existent methods
- All tests now passing (1008 passed, 113 skipped)

* docs: update beta 14 contributors section

- Add Gopi as first-time contributor for ngrok clickable URLs (#422)
- Properly credit hewigovens and Claude as co-authors on systemd (#426)
- Remove duplicate first-time attribution for hewigovens

* docs: fix Claude contributor GitHub link to @claudemini

* docs: fix claudemini's contribution attribution

- claudemini improved theme toggle UI (PR #429/#438), not systemd
- List them as first-time contributor
- Keep Claude AI assistant as systemd co-author

* docs: remove incorrect AI assistant attribution

- There was no AI assistant Claude that co-authored systemd
- Keep only the correct contributors: 2 first-time and 1 additional

* fix: apply linter fixes for CI

- Fix optional chaining in test mock
- Fix unused parameters with underscore prefix
- Format quick-start-editor test file
- Keep any types in test file (acceptable for tests)

* fix: remove all any type warnings in tests

- Use proper ControlUnixHandler type import
- Type vi.importMock with typeof import('net')
- Type WebSocket mock with proper import type
- All lint warnings now resolved

* docs: add image upload feature to changelog

- Added image upload menu feature (#432)
- Also added theme toggle improvement (#438) that was missing

* refactor: add element IDs for improved test maintainability

- Added descriptive IDs to interactive elements across components
- Updated tests to use ID selectors instead of text-based queries
- Enhanced documentation with ID naming best practices
- Makes tests more reliable and less brittle to text changes

* fix: correct session-list test expectation for hideExited toggle

The component emits an event but doesn't directly change its state - the parent handles the state update

* docs: add more PR/issue references to beta 14 changelog

- Added fixes #368 for theme toggle improvement
- Added duplicate reference #421 for Chinese input issue #431
- All PR and issue references now properly documented

* fix: SwiftFormat modifier order and SystemControlHandler test race condition

* fix: repository scanner not showing discovered repositories

- Fixed storage key mismatch between 'app_preferences' and 'vibetunnel_app_preferences'
- Added missing authClient prop to unified-settings component in app.ts
- Updated all test files to use the correct storage key
- Repository scanner now correctly displays discovered repositories count

* refactor: extract session termination logic into reusable helper

- Create session-actions.ts utility for common session operations
- Refactor handleTerminateSession to use the new helper
- Fix handleClearSession to properly delete exited sessions before navigation
- Move Git branch indicator to header next to path in file browser
- Fix Options label alignment in session create form

* refactor: migrate repository base path from CLI arg to config.json

- Remove --repository-base-path command line argument
- Add repositoryBasePath to VibeTunnelConfig type and schema
- Update server to read/write repository path from config.json
- Refactor client to use ServerConfigService for repository path
- Update settings UI to manage path through server config API
- Ensure consistent naming with macOS app implementation

This simplifies configuration by using config.json as the single source
of truth for repository base path, with automatic file watching for
real-time updates.

* docs: remove --repository-base-path from README

This option was removed in the previous commit as repository base path
is now configured via config.json instead of command line arguments.

* fix: reduce Logs button border contrast and add comprehensive drag & drop tests

- Changed border opacity from 100% to 30% for softer appearance
- Created drag & drop tests with 21 passing tests covering:
  - Drag over/leave functionality
  - Drop handling for single and multiple files
  - Paste functionality with various UI states
  - Error handling and edge cases
- Fixed TypeScript lint errors in test files
- Disabled 2 visual overlay tests due to shadow DOM limitations in test environment

* fix: auto-format session-action-service.ts to pass CI checks

* fix: update tests to match refactored session action service implementation

- Fixed repository service tests by adding mock serverConfigService
- Updated session-card tests to expect DELETE endpoint instead of /cleanup
- Corrected error message expectations in session-card tests
- Fixed quick-start-editor test button class expectations
- Auto-formatted all files to pass CI checks

* fix: update session-action-service tests with proper mocks and window handling

- Added @vitest-environment happy-dom directive for DOM testing
- Set up proper mock for terminateSession to return success: true
- Mock window.dispatchEvent to prevent errors in test environment
- Fixed all test expectations to match refactored implementation

* fix: update server config tests to match refactored API implementation

- Updated config route tests to match new implementation that always returns serverConfigured: true
- Fixed error messages to match 'No valid updates provided' instead of 'Invalid quick start commands'
- Removed dependency on getRepositoryBasePath function, now using configService.repositoryBasePath
- Added tests for repository base path updates via PUT /api/config
- Added test for updating both repository path and quick start commands together

* fix: resolve remaining CI issues with type assertions and import ordering

* fix: update remaining tests and clean up imports

- Fix repository service test to include serverConfigService
- Update session card test error expectations
- Fix quick start editor button class tests
- Add proper mock setup for session action service
- Update server config tests for refactored API
- Clean up type assertions and import ordering

* fix: correct undefined runningSessions variable reference in Kill All button

The Kill All button was referencing a non-existent runningSessions variable after refactoring split it into activeSessions and idleSessions. Fixed by using the locally defined runningSessions variable in renderExitedControls() method.

* fix: improve Quick Start settings UI styling

- Use tertiaryLabelColor for better visual hierarchy
- Adjust opacity values for improved contrast
- Remove redundant "Quick Start" header

* fix: ensure thread safety in SystemControlHandlerTests

- Wrap notification flag updates in MainActor tasks
- Ensure test assertions run on MainActor
- Fixes potential race conditions in async tests

* fix: correct SwiftFormat modifier order in VibeTunnelApp

- Change 'weak static' to 'static weak' to match SwiftFormat rules
- Fixes CI linting failure

* fix: resolve Swift 6 concurrency errors in SystemControlHandlerTests

- Wrap MainActor property mutations in Task blocks for notification observers
- Fix test expectations to match actual path handling behavior
- SystemControlHandler stores paths as-is without tilde conversion

The CI failures were due to Swift 6's stricter concurrency checking
which prevented mutating MainActor-isolated properties from Sendable
closures. Also corrected the test expectation - the handler doesn't
convert paths to tilde notation, that only happens in UI components.

* fix: revert to correct SwiftFormat modifier order

- SwiftFormat expects 'weak static', not 'static weak'
- Fixes CI formatting check failure

* chore: trigger CI rebuild

* fix: resolve remaining CI issues with type assertions and import ordering

- Disable AppleScript tests on CI environment (not available in headless mode)
- Make SystemControlHandlerTests more robust with proper synchronization
- Add better error messages for test failures
- Fix exit code 126 issues by handling server startup failures gracefully

* Remove repository base path CLI argument from BunServer

- Server now reads repository base path directly from config.json
- Updated NewSessionForm to use ConfigManager for repository path
- Updated GeneralSettingsView to use ConfigManager instead of @AppStorage
- Updated ProjectFolderPageView to use ConfigManager
- Removed --repository-base-path CLI argument from BunServer
- RepositoryPathSyncService already updated to use ConfigManager

* Update tests to use ConfigManager and add CI diagnostics

- Updated RepositoryPathSyncServiceTests to use ConfigManager instead of UserDefaults
- Added diagnostic logging in BunServer for CI debugging when binary is not found
- Updated GitHub Actions workflows

* fix: simplify Mac CI by removing web artifact caching

- Remove web artifact download/upload between Node.js and Mac CI workflows
- Mac CI now builds web components directly via Xcode build process
- Eliminates file permission issues with artifact transfers
- Workflows can now run in parallel for faster CI
- Add better diagnostics for missing binary errors in BunServer

* fix: make tests properly fail when server binary is not available

- Update ServerManagerTests to require server binary presence
- Tests now fail with clear error if vibetunnel binary is missing
- Remove fallback logic that allowed tests to pass without binary
- ServerBinaryAvailableCondition now only checks app Resources folder

The server binary must be properly embedded in the Mac app's Resources
folder. Tests should not pass if the binary is missing, as this would
indicate a broken build.

* Refactor code to reduce duplication and improve structure

- Use AppConstants.getPreferredGitApp() instead of direct UserDefaults access
- Add getDashboardAccessMode() and setDashboardAccessMode() helpers to AppConstants
- Create GitAppHelper utility to centralize Git app preference logic
- Simplify GitRepositoryRow and SessionRow to use GitAppHelper
- Keep ConfigManager focused on server-needed config (quickStartCommands, repositoryBasePath)
- Mac-specific settings remain in UserDefaults with improved access patterns

* Move configuration enums to shared location

- Create ConfigurationEnums.swift with AuthenticationMode and TitleMode
- Remove duplicate enum definitions from UI files
- Fix ConfigManager to use correct enum case names (.osAuth instead of .os)
- Add description property to AuthenticationMode for UI display
- Proper separation of shared types from UI-specific code
2025-07-21 14:03:33 +02:00
Peter Steinberger
ec5dd0a611
Fix timer continuing to run for exited sessions (#428) 2025-07-20 16:58:01 +02:00
Peter Steinberger
1bc1c8de84 Bump version to 1.0.0-beta.14
- Update version.xcconfig to 1.0.0-beta.14 (build 203)
- Update web/package.json to 1.0.0-beta.14
- Update web/package.npm.json to 1.0.0-beta.14
- Add CHANGELOG entry for beta.14 with systemd support
2025-07-20 11:52:37 +02:00