Summary
Create apps/traverse-starter/macos-swift/ — a native macOS client for the traverse-starter reference app using SwiftUI. Phase 1 uses the same HTTP polling approach as web-react. Shares TraverseClient.swift with ios-swift (copy or Swift package — see #58). SSE is the phase 2 upgrade path.
Phase 1 scope (HTTP polling — unblocked)
- Native macOS app calling the Traverse HTTP/JSON API
- Text input →
POST /v1/workspaces/{workspace}/execute → poll → render result
- Runtime URL + workspace configurable via Preferences window (⌘,)
- Health check status in toolbar
- macOS UI conventions: menu bar, keyboard shortcuts (⌘↵ submit, ⌘R reset), window management
Stack
| Concern |
Choice |
| Language |
Swift 6 |
| UI framework |
SwiftUI (AppKit bridge for menu bar) |
| HTTP |
URLSession |
| Min target |
macOS 14 |
| Architecture |
MVVM — ExecutionViewModel owns idle→loading→polling→done state |
Directory structure
apps/traverse-starter/macos-swift/
TraverseStarterMac.xcodeproj/
TraverseStarterMac/
TraverseClient.swift # URLSession HTTP client (shared with ios-swift)
ExecutionViewModel.swift # ObservableObject — idle/loading/polling/done
ContentView.swift # Main view
PreferencesView.swift # Runtime URL + workspace (⌘,)
AppDelegate.swift # NSApplicationDelegate, menu bar
Assets.xcassets/
Info.plist
TraverseStarterMacTests/
Phase 2 upgrade path (do not implement now)
When Traverse ships #525 / #526 / #527:
Definition of Done
Summary
Create
apps/traverse-starter/macos-swift/— a native macOS client for thetraverse-starterreference app using SwiftUI. Phase 1 uses the same HTTP polling approach asweb-react. SharesTraverseClient.swiftwithios-swift(copy or Swift package — see #58). SSE is the phase 2 upgrade path.Phase 1 scope (HTTP polling — unblocked)
POST /v1/workspaces/{workspace}/execute→ poll → render resultStack
ExecutionViewModelowns idle→loading→polling→done stateDirectory structure
Phase 2 upgrade path (do not implement now)
When Traverse ships #525 / #526 / #527:
URLSessionDataDelegate)execute()withsendCommand("submit", { note })TraverseCoreSwift package withios-swift(see Extract TraverseCore Swift package shared between ios-swift and macos-swift #58)Definition of Done
TraverseClientandExecutionViewModelmacos-swift/covering: prerequisites, runtime URL config, build and runscripts/ci/repository_checks.shupdated to acknowledgemacos-swift/directory