Skip to content

Fix voice turn failures, silent checkout, and broken usage telemetry - #106

Merged
engmsaleh merged 6 commits into
mainfrom
fix/realtime-voice-update
Oct 25, 2026
Merged

engmsaleh merged 6 commits into
mainfrom
fix/realtime-voice-update

Conversation

@engmsaleh

Copy link
Copy Markdown
Collaborator

Production PostHog (Oct 18–25) showed real users losing turns, checkouts failing with no feedback, and dashboards undercounting usage. This fixes the causes found in the app and backend.

Mac app

  • cannot_update_voice aborted turns. Every turn on a reused Realtime session resent audio.output.voice, which OpenAI rejects once the session has spoken. Both new users this week hit it in their first session. Pre-turn updates now omit the voice; a changed voice setting starts a fresh session at the next turn.
  • Turns on prewarmed sessions were never tracked. The launch-time prewarm connected without starting a telemetry session, so endTurn() returned early and no skilly_turn_completed fired. Since Oct 12 the backend recorded 254 completed responses against 92 tracked turns. The telemetry session now starts at the first turn on a prewarmed connection, keeping idle prewarm time out of billed seconds.
  • Checkout could fail silently. startCheckout() returned with no user-visible result on missing auth, missing token, non-200, malformed URL, browser-open failure, or exception, and every paywall dismisses right after it. Missing auth now opens sign-in, a 401 refreshes once and retries, and other failures show an alert.
  • Removed the inherited intro. First-run setup no longer plays ff.mp3 (third-party game music from the Clicky fork), the welcome animation, or the intro video; "Replay intro" is gone.
  • Debug builds get skilly-dev:// and a skillydev_ OAuth state prefix, so sign-in returns to the dev build instead of an installed production copy. Project version now reads 3.4 (30), and release.sh writes each released version back to the project file.

Backend

  • All Mac/extension events landed on one PostHog person. captureServerEvent now defaults to workos_user_id (the native app's distinct_id) for the 21 user-scoped events; tenant events are unchanged.
  • /api/mac/auth/callback routes skillydev_ states to skilly-dev://; production states still go to skilly://. No WorkOS dashboard change needed.

Verification

  • Backend: bun test 295/295 (3 new identity tests, 2 new callback tests), tsc --noEmit clean.
  • Mac app, Debug build in Xcode with PostHog confirming each step: 3 consecutive voice turns with no failures, 3 voice changes each reconnecting cleanly, turn after relaunch tracked, signed-out checkout opened sign-in, signed-in checkout opened Polar (did_open: true).
  • Not verified: a Release build and a full paid checkout.

Deploy notes

  • Merge deploys the backend; ship the app fixes as v3.5 via release.sh.
  • Commit project.pbxproj with each release now that release.sh updates it.

🤖 Generated with Claude Code

engmsaleh and others added 6 commits October 26, 2026 00:00
OpenAI rejects a voice change once a session has produced assistant
audio (cannot_update_voice), and the app aborted the turn on that
error. Pre-turn session updates now omit the voice, and a changed
voice setting starts a fresh session at the next turn instead of
updating the live one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The launch-time prewarm connected without starting a telemetry
session, so endTurn() returned early and no skilly_turn_completed was
sent for any turn on that connection. PostHog showed these as messages
with no response while the backend recorded relay_completed usage for
each one. The telemetry session now starts at the first turn on a
prewarmed connection, which keeps idle prewarm time out of the
session duration used for billing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
startCheckout() returned without any user-visible result on missing
auth, a missing session token, non-200 responses, a malformed URL,
a failed browser open, or an exception, and every paywall dismisses
right after it returns. Missing auth now opens sign-in, a 401 refreshes
the session once and retries (same recovery as the voice token fetch),
and every other failure shows an alert with a support contact.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
captureServerEvent defaulted to tenant_id or a shared
"skilly_web_backend" identity, and the 21 Mac and extension events
that only carry workos_user_id never passed an explicit id. Every
account's entitlement checks and usage reports collapsed into one
PostHog person. The default now prefers workos_user_id, which matches
the native app's distinct_id, so backend and app events join on the
same person. Tenant-scoped events are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
First-run setup still played ff.mp3 (third-party game music inherited
from the Clicky fork), the "hey! i'm skilly" welcome animation, and
the intro video, and Settings plus the panel footer offered "Replay
intro". Finishing setup now shows the cursor overlay directly; the
music file, player, and replay entry points are gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Debug and production builds both claimed skilly://, so the WorkOS
callback opened whichever copy LaunchServices preferred, usually the
installed production app, which then rejected the foreign OAuth state.
Debug builds now register skilly-dev:// and prefix their OAuth state
with skillydev_; the backend callback page routes those states to
skilly-dev://. Production states and the WorkOS redirect are unchanged.

The project file still said 1.6 (1) because release.sh only passed the
version to xcodebuild. It now reads 3.4 (30), and release.sh writes
each released version back into the project file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
skilly-studio Ready Ready Preview Oct 25, 2026 9:35pm UTC

Request Review

@engmsaleh
engmsaleh merged commit f70b9e3 into main Oct 25, 2026
14 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2ff37832 Deployed Oct 25, 2026 by vercel[bot]
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