Commit graph

34 commits

Author SHA1 Message Date
Peter Steinberger
d4fae5631a Improve ngrok authentication UX and move update settings
- Show alert dialog when attempting to enable ngrok without auth token
- Move update channel and check for updates from Advanced to General settings
- Place update controls under Application section for better accessibility
- Add AppKit import for NSAlert functionality
2025-06-16 06:07:03 +02:00
Armin Ronacher
e8fb468a19 Implement half broken SSE 2025-06-16 06:04:03 +02:00
Peter Steinberger
70a8da5235 feat: enhance UI and automatic update handling
- Fix session count display to show on single line in menu bar
- Add conditional compilation to disable automatic updates in DEBUG mode
- Add "Open Dashboard" menu item that opens internal server URL
- Convert Help menu from popover to native macOS submenu style
- Enable automatic update downloads in Sparkle configuration
- Increase Advanced Settings tab height from 400 to 500 pixels
- Add Tailscale recommendation with clickable markdown link
- Fix Sendable protocol conformance issues throughout codebase
- Add ApplicationMover utility for app installation location management

These changes improve the overall user experience by making the UI more
intuitive and ensuring automatic updates work correctly in production
while being disabled during development.
2025-06-16 05:53:08 +02:00
Peter Steinberger
d80ab6c217 Add ngrok integration for remote access
- Add NgrokService to manage ngrok tunnel lifecycle
- Integrate ngrok with TunnelServer via API endpoints (/api/ngrok/*)
- Add UI controls in Advanced Settings for ngrok configuration
- Store auth tokens securely in macOS Keychain
- Add ServerMonitor to track server status across the app
- Show tunnel status and public URL when active
- Support CLI-based ngrok integration (requires brew install ngrok)

This allows VibeTunnel to be accessed remotely via ngrok tunnels,
fulfilling the "use Claude Code anywhere" promise.
2025-06-16 05:45:51 +02:00
Armin Ronacher
19b428a879 Remove unused stuff 2025-06-16 04:52:30 +02:00
Armin Ronacher
482f48052c Hook up cleanup 2025-06-16 04:48:20 +02:00
Peter Steinberger
eb12804a0b Remove Tunnel2 2025-06-16 04:42:22 +02:00
Armin Ronacher
ce85d70ba6 Changed the path to the control 2025-06-16 04:36:44 +02:00
Armin Ronacher
5ffc2dca8d Vibed up some stuff for the api 2025-06-16 04:25:46 +02:00
Armin Ronacher
d6f7d81155 Checked in ported tunnel server. No idea if it works 2025-06-16 04:09:08 +02:00
Peter Steinberger
066d2882f9 Add window size animation for Settings and build script for tty-fwd
- Implement smooth window size animations when switching Settings tabs
- Add Xcode build phase to automatically build tty-fwd universal binary
- Configure build script with proper input/output dependencies for efficiency
- Fix Settings window animation using NSViewAnimation API
- Update project configuration for optimized builds
2025-06-16 03:45:06 +02:00
Peter Steinberger
1048e21083 Simplify server port configuration
Remove automatic port validation - just use port 4020 as default
if not set in UserDefaults, otherwise use the configured port.
Also removed debug logging added in previous commits.
2025-06-16 03:24:54 +02:00
Peter Steinberger
7bffb2ae7b Add tty-fwd universal binary build step to release process
- Integrate tty-fwd universal binary build into build.sh
- Automatically build and copy tty-fwd-universal to Resources folder
- Ensure binary is executable and included in app bundle
- Update release process to build universal binary for Intel and Apple Silicon
2025-06-16 03:19:17 +02:00
Peter Steinberger
f022d71778 Add debug logging to diagnose port 800 issue
Added debug logging to track the server port value throughout initialization
to understand why error logs show port 800 when the code uses port 4020.
This will help diagnose the permission denied error.
2025-06-16 03:03:11 +02:00
Peter Steinberger
ed19be138b Fix server port binding issue and refactor tunnel services
- Change default server port from 800 to 4020 to avoid privileged port restrictions
- Rename TunnelServerDemo.swift to TunnelServer.swift for clarity
- Remove redundant TunnelServerExample.swift
- Update tty-fwd binary
- Add SettingsWindowDelegate for improved window management
- Update UI components and session monitoring
- Add modern Swift refactoring documentation

The server was failing to start because it was trying to bind to port 800,
which requires root privileges on macOS. Port 4020 is now used as the default.
2025-06-16 02:39:19 +02:00
Peter Steinberger
223fa898b1 Fix Swift compatibility for older versions
- Replace backtick syntax for hyphenated property names with CodingKeys enum
- Change `stream-out` to streamOut with proper CodingKeys mapping
- Ensures compatibility with older Swift versions that don't support backtick property names
2025-06-16 02:36:17 +02:00
Peter Steinberger
0534f4b238 Change default server port from 8080 to 4020 and improve UI
- Change default server port from 8080 to 4020 across all components
- Move server port field to the right in Advanced Settings
- Shorten "Show in Dock" description text for better UI layout
- Update all hardcoded port references in TunnelServerDemo, SessionMonitor, and VibeTunnelApp
2025-06-16 02:33:54 +02:00
Peter Steinberger
be56723fbe mac 2025-06-16 02:23:04 +02:00
Peter Steinberger
99b77c9b53 feat: implement working HTTP server with debug panel
- Replace stub TunnelServerDemo with full Hummingbird HTTP server
- Add comprehensive debug settings view with server info and controls
- Implement API endpoint listing with interactive testing
- Add TTYForwardManager for tty-fwd integration
- Auto-start HTTP server on app launch on port 8080
- Show server status, port, and base URL in debug panel
- Add test buttons for GET endpoints with live response preview
- Include debug mode toggle and log level selector
- Add quick access to Console.app and Application Support
- Update bundle identifier to sh.vibetunnel.vibetunnel
- Add code signing configuration templates
2025-06-16 02:00:56 +02:00
Peter Steinberger
63510c5d2d Fix build errors by creating stub implementations and removing unavailable dependencies
- Created VibeTunnel.entitlements with necessary permissions
- Added missing menubar@3x.png and menubar.png assets
- Created TunnelServerDemo as ObservableObject stub for SettingsView
- Moved server-side Hummingbird-dependent files to separate directory
- Created SparkleUpdaterManager stub implementation
- Fixed WSMessage type definitions in TunnelClient
- Commented out HTTPTypesFoundation import in TunnelClient2
- Updated references from TunnelServer to TunnelServerDemo
2025-06-16 01:41:51 +02:00
Peter Steinberger
8a83d7c2c9 Refactor tunnel client architecture and improve server communication 2025-06-16 01:41:21 +02:00
Peter Steinberger
fe6f6a1299 Fix remaining build errors
- Remove HTTPTypesFoundation import from TunnelClient2.swift
- Replace APIKeyManager usage with hardcoded demo key in TunnelServerDemo
- Add WSMessage and WSMessageType definitions to TunnelClient.swift
- Remove TunnelClient2.swift to avoid duplicate TunnelClientError definitions
2025-06-16 01:29:24 +02:00
Peter Steinberger
c5a7bcc13f Fix build issues after dependency updates
- Add UserDefaults extension for KVO-compatible updateChannel property
- Fix HTTPField.Name API changes in AuthenticationMiddleware
- Add @preconcurrency annotations to SparkleUpdaterManager protocols
- Wrap KVO observer callback in Task { @MainActor } to fix concurrency warning
- Update deinit to avoid accessing MainActor-isolated properties

These changes address Swift 6 concurrency strictness and API changes
introduced in Hummingbird 2.14.1.
2025-06-16 00:49:38 +02:00
Peter Steinberger
19497cb207 Fix formatting and linting issues
- Add missing newlines at end of files
- Update .swiftlint.yml configuration
- Minor code formatting adjustments
2025-06-16 00:15:12 +02:00
Peter Steinberger
7ea32cfff0 Merge branch 'mac-v1' into main
- Integrated mac-v1 features including:
  - Sparkle updater integration with update channels
  - Menu bar app functionality
  - Settings window with General, Advanced, and About tabs
  - Authentication middleware for API security
  - Terminal and WebSocket handling
  - Launch at login functionality
  - Enhanced UI with custom view modifiers and About view

- Updated to use Hummingbird 2.x with ResponseCodable protocol
- Removed .DS_Store files
- Resolved all merge conflicts
2025-06-16 00:13:20 +02:00
Peter Steinberger
702b623d7f Fix settings window not appearing from menu bar
Replace deprecated showSettingsWindow: selector with NSApp.openSettings() to properly show the Settings window when clicking "Settings..." in the menu bar. This aligns with the correct SwiftUI pattern used in VibeMeter.
2025-06-15 23:54:17 +02:00
Peter Steinberger
b80c710c08 Add SwiftLint and SwiftFormat configuration for Swift 6
- Configure SwiftLint with Swift 6 compatible rules
- Disable conflicting self-related rules (implicit_self, redundant_self)
- Set up SwiftFormat to avoid self-rewrite conflicts
- Add custom rules for print statements and async/await patterns
- Create lint script and GitHub Actions workflow
- Add Package.swift for SPM dependencies
- Ensure proper exclusions for build directories and tests
2025-06-15 23:48:30 +02:00
Peter Steinberger
b5644d2b17
Add macOS app foundation with release infrastructure (#1) 2025-06-15 23:14:29 +02:00
Peter Steinberger
ea35d815c6 Update Hummingbird implementation to v2 API
- Update TunnelServer to use Hummingbird v2 Router API
- Use RouterBuilder for middleware and route configuration
- Update Application initialization with generic Router type
- Replace LifecycleTask with Service for cleanup tasks
- Update WebSocketHandler with proper v2 extension methods
- Fix all compilation issues with latest Hummingbird
2025-06-15 22:36:44 +02:00
Peter Steinberger
01f3666d1f Configure for macOS 14+ and use custom menubar icon
- Update deployment target to macOS 14.0 (from 15.5)
- Use custom 'menubar' icon from assets catalog instead of SF Symbol
- Set icon as template for proper menu bar appearance
- Update settings window frame for better sizing on macOS 14
- Reorganize menubar assets to use imageset format
2025-06-15 22:35:26 +02:00
Peter Steinberger
9c4454b454 Convert to menu bar only app
- Remove ContentView window - app now launches with settings dialog only
- Add status bar item (menu bar icon) with network shield symbol
- Configure as LSUIElement (background app) by default
- Menu bar menu includes Settings, About, and Quit options
- Auto-show settings on first launch when in menu bar mode
- Maintain Show in Dock toggle for users who prefer dock visibility
2025-06-15 22:33:58 +02:00
Peter Steinberger
79addfc861 Add basic HTTP server with web interface
- Implement TunnelServer using Hummingbird framework
- Serve HTML page at root with styled interface
- Add API endpoints: /health, /info, /tunnel/command
- WebSocket support at /tunnel/stream
- Add server controls in Advanced settings tab
- Show server status with start/stop functionality
- Display 'Open in Browser' link when server is running
- Port configuration (requires server restart)
2025-06-15 22:23:54 +02:00
Peter Steinberger
3d421cb7ec Fix build errors: Add Sparkle conditional compilation and remove TunnelServer
- Wrap SparkleUpdaterManager with #if canImport(Sparkle) to handle missing framework
- Provide stub implementation when Sparkle is not available
- Remove TunnelServer.swift that used unavailable Hummingbird dependency
- Fix AppDelegate to use public checkForUpdates() method
2025-06-15 22:06:01 +02:00
Peter Steinberger
888f5693c4 Add macOS app foundation with release infrastructure
## Summary
- Initial SwiftUI macOS app structure with menubar and settings
- Complete release automation scripts adapted from VibeMeter
- Sparkle framework integration for automatic updates (stable/pre-release channels)
- Launch at login functionality
- Single instance detection
- About window with version info and links

## Features Added
- Settings window with General and Advanced tabs
- Update channel switching (stable/pre-release)
- Launch at login toggle
- Debug mode and server port configuration
- Interactive About window with app info
- Single app instance enforcement

## Infrastructure
- Complete release automation (build, sign, notarize, DMG, GitHub release)
- Version 0.1 (build 100)
- Bundle ID: com.amantus.vibetunnel
- Domain: vibetunnel.sh
- GitHub: https://github.com/amantus-ai/vibetunnel

## Next Steps
- Add Sparkle framework dependency
- Generate EdDSA keys for update signing
- Set up appcast hosting on vibetunnel.sh
2025-06-15 21:59:09 +02:00