Skip to content

feat: desktop app bring-up (stream B: B1-B5)#2

Merged
gitjehan merged 5 commits into
mainfrom
feat/desktop-app
Jul 3, 2026
Merged

feat: desktop app bring-up (stream B: B1-B5)#2
gitjehan merged 5 commits into
mainfrom
feat/desktop-app

Conversation

@gitjehan

@gitjehan gitjehan commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stream B from docs/TASKS.md — brings the native macOS companion app into the repo and wires it for our stack. Five commits, in order:

  1. B1 — vendor import: MIT-licensed Swift/SwiftUI app base into desktop/ (capture pipeline, pointer overlay, voice pipeline, panel UI). Upstream LICENSE retained; per-user Xcode state and unused onboarding media excluded.
  2. B2 — project config: our bundle IDs (com.flexithon.companion*), upstream signing team IDs removed (automatic signing prompts each dev for their own personal team), shared build scheme added so fresh clones build headlessly.
  3. B3 — configurable endpoint: hardcoded proxy URL replaced with an APIBaseURL Info.plist key. Dev builds point at http://localhost:3000/api; the demo build will point at Vercel with a one-line plist edit.
  4. B4 — on-device voice: VoiceTranscriptionProvider = apple — speech-to-text now runs on-device via Apple Speech, no third-party STT key needed.
  5. B5 — build guide: desktop/README.md with Xcode 16.3/macOS 15.2 constraints, signing, the four runtime permissions, smoke test, and troubleshooting.

Headless build verified on this branch: xcodebuild ... CODE_SIGNING_ALLOWED=NOBUILD SUCCEEDED (only pre-existing upstream warnings).

What's left (B6 — not in this PR)

The end-to-end smoke test has NOT run yet. It is blocked on:

  • Stream A (feat/api-proxy): /api/chat and /api/tts routes in flexithon-app — nothing is listening on localhost:3000/api yet, so chat/TTS will fail until that lands.
  • First GUI run: someone on a Mac needs to Cmd+R, grant the four permissions (Microphone, Speech Recognition, Accessibility, Screen Recording — the last one needs an app relaunch), and verify: hold-to-talk → "where do I click to open System Settings?" → streamed reply + pointer flight + spoken audio.
  • Apple Speech accuracy check (~10 realistic utterances); fallback is a one-line plist flip to assemblyai + porting the token-proxy route.

Also deliberately NOT in this PR (next streams): the imported code still phones home (analytics + form endpoint) — stream C strips it before anything ships; senior UI (D), verify loop (E), scam guardian (F).

Test plan

  • plutil -lint on Info.plist; Swift file parse check
  • Headless Debug build succeeds on a clean checkout of this branch
  • B6 smoke test once stream A lands (tracked in docs/TASKS.md)

Made with Cursor

gitjehan and others added 5 commits July 3, 2026 23:06
Imports the open-source Swift/SwiftUI menu-bar app (Clicky, MIT) that we
build on: ScreenCaptureKit capture pipeline, pointer overlay engine,
push-to-talk voice pipeline, and panel UI. Upstream LICENSE retained at
desktop/LICENSE.

Excluded from the import: xcuserdata, agent docs, and ~9MB of onboarding
media (music/images) that our fork does not use - the only code reference
(onboarding music) degrades gracefully. All functional changes land in
follow-up commits so the diff against upstream stays reviewable.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace placeholder bundle identifiers with com.flexithon.companion
  (app, tests, uitests).
- Remove hardcoded upstream developer team IDs; automatic signing now
  prompts each dev for their own personal team on first open.
- Add a shared build scheme so fresh clones (and future CI) can build
  without relying on per-user Xcode state.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the hardcoded proxy URL placeholder with an APIBaseURL key read
through AppBundleConfiguration at startup. Dev builds ship pointing at
http://localhost:3000/api (our Next.js proxy); the demo build only needs
a plist edit to target production. Missing key fails fast with a clear
message, and a trailing slash is trimmed so /chat and /tts endpoint
interpolation stays correct.

Co-authored-by: Cursor <cursoragent@cursor.com>
Set VoiceTranscriptionProvider to the Apple provider in Info.plist. The
transcription factory already resolves this key, so no code changes:
voice input now transcribes on-device (private, free, no third-party
STT key or token proxy needed). AssemblyAI remains available behind the
same key as a fallback if accuracy testing disappoints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Covers Xcode 16.3 install constraints on macOS 15.2, signing with a
personal team, the four runtime permissions (with the Screen Recording
relaunch gotcha), Info.plist configuration keys, the end-to-end smoke
test, and troubleshooting for the known non-interactive SPM stall.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gitjehan gitjehan merged commit 4211237 into main Jul 3, 2026
1 check passed
@gitjehan gitjehan deleted the feat/desktop-app branch July 3, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant