Repository navigation
feat(desktop): first-48h activation — launch-at-login default, question telemetry, day-0 chips, first-real-app card, honest screen evidence, daily summary in Chat - #12608
Conversation
Every existing 'ask this' entry point auto-sends. Surfaces that want the user to read a suggested question before asking it (the first-real-app card, the daily summary follow-up, the teach-me chip) need a composer that is filled and focused but not fired. MainChatNavigationRequestStore now carries a pending draft that whichever shell's composer mounts consumes exactly once. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ss chat and push-to-talk The in-app question counter (rating prompt, remote question_count prompts) was advanced only from typed chat, and the activation dashboard's 'questions in 48h' undercounted push-to-talk by half (22.6% vs 48.3% on the August cohort) because the realtime lane never fired the typed events. Every accepted question now emits question_asked with a coarse surface, the fine source, and the turn id where one exists; every terminal outcome emits question_answered (grounded / screen_failed / error / cancelled) joined by attempt_id. Voice turns that never committed (too short, silent) produce no answer record. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fresh installs seeded the onboarding value from the live SMAppService status, which is 'not registered' for every new install, so every new user finished onboarding with auto-start off; nothing proactive can run for a process that is not alive, and a closed app has no day-1 return path. The V1 migration could not tell a user's decline from 'never set'. LaunchAtLoginPreference owns the rule: on by default; the Settings toggle records an explicit decline as a presence marker (re-enabling clears it); a one-shot V2 migration enables existing users unless that marker exists. Failure-Class: none Co-Authored-By: Claude Fable 5.1 <[email protected]>
…th no history
~30% of new users' first messages are a chip pasted verbatim, and three of the
six chips asked about data that cannot exist on day 0 ('what did I spend my
time on this week', 'highest-leverage thing', 'what can you help me with').
Users who stopped after one question over-indexed 3x on exactly those
empty-state answers. The top-up set is now gated on live signals: summarize
the screen / last hour / turn the screen into tasks (Screen Recording
granted), switch to <system language> (locale differs from Omi's language),
calendar (connected), and a 'Remember that I…' draft that prefills the
composer instead of sending. Both shells read the same composer.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…d failure A PTT screen question whose evidence was never installed — Screen Recording not granted, granted only after launch (dead window-server connection), an ambiguous multi-display desktop, or a follow-up turn in a locked session that never recaptured — expired its screen protocol instantly and spoke the canned "I couldn't verify the current screen." with no cause. - Route rejection by disposition, not by reason string. `rejectionDisposition` treats absent evidence as recoverable (provider continuation) and keeps a stale/contradictory failure about evidence that WAS captured deterministic. - Stop minting a zero report deadline for a turn with no installed evidence (`RealtimeScreenEvidenceProtocolPolicy.reportDeadline`). - Reject a `.notAdmitted` transport receipt with the named reason `transport_not_admitted` instead of leaving the protocol pending and silent; a superseded turn/epoch/call still stays a no-op. - New `screenRecordingNeedsRelaunch` capture failure, decided from `ScreenRecordingPermissionPolicy.needsRelaunchToApply`, with its own `screen_recording_needs_relaunch` tool-result payload and spoken text. - The prompt claims "every turn arrives with an image" only on a session that actually attaches the frame (Gemini). - Telemetry: bounded `capture_failure` / `granted_at_launch` / `evidence_age_ms_bucket` / `provider` on both screen-evidence fallbacks, a new `screen_evidence_terminal` health event at the moment the local string is spoken, and an honest `hasScreenshot` on the PTT query event. - INV-VOICE-1 updated to match. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Mobile has shown the daily summary for months. Desktop shipped only the on/off setting: the backend generated a record every night, pushed a `daily_summary` notification to `macos_` tokens, and nothing on this side ever read either. The generated client for `GET /v1/users/daily-summaries` sat unused. It goes in Chat, at the top of the thread, because Chat is what the app opens on and the summary is a read the user should meet without navigating to it. It is chrome above the transcript, not a message: no turn is recorded, no synthetic row is appended, and the thread keeps its one journal-owned transcript (INV-CHAT-1). The follow-up chip prefills the composer through the existing `MainChatNavigationRequestStore` seam and sends nothing — asking stays the user's move. Three files are copied byte-identical from the open onboarding-first-run draft (#12603) so the later merge is a no-op: the typed API client, the owner-scoped store with its 15-minute throttle, and the Home section plus its stats row, which this card reuses so the two surfaces cannot drift. Desktop has no FCM registration and no remote-notification delegate, so the push never arrives here. The observable equivalent is a refresh that returns a summary the owner has not been shown; announcing on that gives the same at-most-once notch card without inventing a push path. The last-seen id is owner-scoped, so one account's day is never suppressed by another's. Nothing renders when there is nothing: day 0, a quiet day, a signed-out process, or an empty section. The Settings toggle stays what it always was — generation and delivery, not display — so a summary that already exists is still shown when it is off. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…on ready A third of new macOS users never ask a question. The best first question is about the screen, but 19% of those were asked with Omi's own window frontmost, so Omi described its own onboarding. Notch cards convert at ~2% because none of them opens Ask Omi, and push-to-talk is discoverable only as two hover lines. Once per fresh install, the first time a real app is frontmost for ~3s after onboarding, a persistent notch card says "I can see <App>" and offers both ways to ask — naming the user's actual PTT chord, or falling back to tap-only copy when they have none. Tapping it opens the main chat with "Summarize what's on my screen" in the composer, focused and unsent. Split the way IntegrationNudgeCoordinator is: the coordinator owns the NSWorkspace activation observation, the dwell, delivery and the four exits (tap, close, PTT start, 60s timeout); FirstRealAppCardPolicy is pure and clock-free. Both timers run on an injected scheduler, so the whole lifecycle is unit-tested without a sleep. Never fires for a user who was already onboarded when this build arrived: a three-state marker (absent / pending / consumed) lets the install gate tell "never evaluated" from "declined", which a Bool cannot — the same ambiguity that made the launch-at-login V1 migration re-enable a setting users had turned off. One PostHog event, first_real_app_card, carrying a bounded phase and nothing else. The card's copy names the frontmost app; that name never leaves the Mac. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…follows the live edge Chrome inserted above the thread shifts everything below it. Admit the card only when the transcript is following the live edge (then re-follow) or is empty; a reader who scrolled away meets it on their next return to the bottom, never as a jump (INV-CHAT-2). Failure-Class: none Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ive them Co-Authored-By: Claude Fable 5.1 <[email protected]>
- question_answered: the voice coordinator owns answers for voice turns (chat path answers only main_chat/task_chat); realtime surface from the hub route label; pre-commit voice terminals produce no answer record - the 'Remember that I…' draft chip prefills instead of sending on the legacy suggestion banner too - a chat navigation request always owns the draft slot (no stale prefill) - daily summary: owner fence on the fetch result, card sink fenced to the owner it was fetched for, last-seen id written after the card is handed off - first-real-app card: ignore the replayed voice snapshot on subscribe - realtime hasScreenshot only when a frame is actually attached (Gemini) - day-0 chips: drop the stale calendar sniff; the calendar chip comes from onboarding's connector state Failure-Class: none Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…mainactor suites Co-Authored-By: Claude Fable 5.1 <[email protected]>
…up chip names older days daily_summary_snapshot reports the shared store shape-only; open_chat_prefilled drives the prefill-without-send entry so chat_drafts_snapshot can prove the draft landed unsent. The follow-up chip on a summary older than yesterday now names its day instead of asking about yesterday. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
34 issues found across 64 files
Confidence score: 2/5
FirstRealAppCard.swiftsends the frontmost app name to PostHog through generic notification telemetry, creating a concrete privacy leak when the card is tapped — route these events through privacy-safe analytics or redact the title.HomeDailySummarySection.swiftis never constructed, so the Home summary is absent despite the new view existing — wire it into the Home hub or remove the unused path.RealtimeHubController+SessionLifecycle.swiftcan tell Gemini that every turn includes a screen image even when PTT capture is unavailable, risking answers based on stale or missing screen context — only set the prompt flag when usable evidence was captured.RealtimeHubController+ScreenEvidence.swiftmay reject a live protocol for a stale or mismatched.notAdmittedcallback because it does not validate attachment, session, or response identity — validate the full request identity before applying the rejection.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="desktop/macos/Desktop/Sources/AnalyticsManager.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/AnalyticsManager.swift:832">
P2: Every typed chat `question_asked` event omits `attempt_id`, so it cannot be joined to the `question_answered` event emitted for the same provider turn. Propagate the provider's attempt ID through the acceptance callback and pass it here instead of `nil`.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/AnalyticsManager.swift:956">
P2: A QueryShell retry has no corresponding `question_asked`, but this unconditional hook still records its terminal `question_answered` event. Gate answer emission on the accepted-question state or propagate the retry flag so retries do not inflate answered-question telemetry.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummarySection.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummarySection.swift:9">
P1: The Home summary never renders because nothing constructs `HomeDailySummarySection`. Wire this view into the Home hub, or remove it if the summary is intended to exist only in Chat.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummarySection.swift:76">
P2: When a summary has no overview, action items, or highlights, this control still offers `More` even though expansion has no content. Render the button only when at least one expandable field is present, as `ChatDailySummaryCard` does.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Components/ChatMessagesView.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Components/ChatMessagesView.swift:788">
P2: When a refreshed summary replaces an already-admitted card while the reader is scrolled away, this early return skips viewport preservation and the card's changed height shifts the transcript. Retain the admitted record until live-follow resumes or preserve the reader's anchor whenever the summary changes.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCard.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCard.swift:26">
P1: Tapping this card sends the frontmost app name to PostHog through generic notification telemetry. Route this card through privacy-safe notification analytics or redact its title before the generic sent/clicked/dismissed events.</violation>
</file>
<file name="desktop/macos/e2e/flows/floating-bar-functional.yaml">
<violation number="1" location="desktop/macos/e2e/flows/floating-bar-functional.yaml:7">
P2: This flow lists four first-real-app sources in `covers`, but its steps only exercise the generic typed Ask Omi path. Remove these entries or add steps that drive and verify the first-real-app card and telemetry.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCardCoordinator.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCardCoordinator.swift:303">
P2: A canceled dwell can still fire after the user returns to the same app because the callback has no cancellation or generation guard. Check the work item's cancellation state or capture and validate an activation generation before firing.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCardCoordinator.swift:351">
P2: The coordinator treats calling `presenter` as confirmed presentation, so an unavailable or replaced card still emits `shown`, consumes the one-shot, and eventually emits `timed_out`. Add delivery and replacement/drop callbacks, and only mark the card live and emit `shown` after the card is actually presented.</violation>
</file>
<file name="desktop/macos/e2e/flows/onboarding-flow.yaml">
<violation number="1" location="desktop/macos/e2e/flows/onboarding-flow.yaml:9">
P2: This flow does not exercise or verify `DesktopAutomationFirstUsePopupActions.swift`, so adding it to `covers` overstates E2E coverage. Remove this entry or add steps that invoke the popup actions and assert their resulting behavior.</violation>
</file>
<file name="desktop/macos/e2e/flows/home-stage.yaml">
<violation number="1" location="desktop/macos/e2e/flows/home-stage.yaml:11">
P2: These `covers:` entries claim coverage for activation, day-zero chips, and daily-summary code that this flow never drives or verifies. Remove them or add deterministic steps that invoke the relevant actions and assert their behavior; otherwise regressions in these sources can be treated as covered.</violation>
</file>
<file name="desktop/macos/e2e/flows/ptt-lifecycle.yaml">
<violation number="1" location="desktop/macos/e2e/flows/ptt-lifecycle.yaml:7">
P2: This flow does not exercise or verify `AnalyticsManager+Questions.swift`, so listing it in `covers` overstates E2E coverage. Remove this entry or add a PTT scenario that commits a question and asserts its telemetry.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionLifecycle.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionLifecycle.swift:416">
P1: When a Gemini session has no usable PTT capture, this flag still makes the prompt say every turn includes a screen image. The model can therefore answer current-screen questions from memory instead of invoking the screenshot tool; base the instruction on actual per-turn attachment or make the prompt conditional on image presence.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Services/APIClient/APIClient+DailySummaries.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Services/APIClient/APIClient+DailySummaries.swift:15">
P2: For summaries generated by the current backend, these additional stats fields are never present, so the desktop stats row silently omits those chips. Align this model with the endpoint or add and populate the backend fields before relying on them in the UI.</violation>
</file>
<file name="desktop/macos/Desktop/Tests/FirstRealAppCardTelemetryBoundaryTests.swift">
<violation number="1" location="desktop/macos/Desktop/Tests/FirstRealAppCardTelemetryBoundaryTests.swift:51">
P2: This boundary test does not fail when production expands `allowedKeys` with an app or window identifier, because the expected keys come from the same production set. Assert the exact test-owned key set (`["phase"]`) so a privacy regression requires an explicit test change.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/DesktopDiagnosticsManager.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/DesktopDiagnosticsManager.swift:568">
P2: When screen verification fails, the local fallback is spoken and the turn ends as `.success`, so this hook records `grounded` instead of `screen_failed`. Pass the screen-failure disposition into terminal telemetry and emit `screen_failed` for this path.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/DesktopDiagnosticsManager.swift:568">
P2: When `commitTurn()` has no active realtime session, it terminalizes before recording an accepted question, but this branch still emits `question_answered` and creates an orphan answer. Carry an accepted/committed flag into terminal telemetry and emit the answer only for committed turns.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/AnalyticsManager+FirstRealAppCard.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/AnalyticsManager+FirstRealAppCard.swift:31">
P2: The production emitter does not enforce the declared privacy allow-list; it forwards the raw payload directly to PostHog. Filter the payload here so an accidental future app name, title, or other dimension is stripped at the production boundary rather than being protected only by a test.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryCoordinator.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryCoordinator.swift:64">
P1: During an owner switch, this ID-only gate can let `announceIfNew()` publish the previous owner’s cached summary after the fetch resumes. Capture an authorization snapshot before the await and revalidate that generation before announcing.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryCoordinator.swift:91">
P2: When the owner changes or the notification surface rejects the card, `defaultCardSink` returns without delivery, but this marker prevents every later retry. Make the sink report successful presentation and persist `record.id` only after that success.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+ScreenEvidence.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+ScreenEvidence.swift:167">
P1: A `.notAdmitted` callback with a mismatched attachment, session, or response can still reject the live protocol because this branch validates only turn, epoch, and call ID. Validate the full request identity before rejecting, or treat those mismatches as stale callbacks.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+ScreenEvidence.swift:542">
P2: When output acquisition fails, this event records a user-visible terminal failure that the user never hears. Move `recordScreenEvidenceTerminal` after the successful lease acquisition and immediately before `speakOneShot`.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCardPolicy.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCardPolicy.swift:164">
P2: When an existing user is signed out during the first launch of this build, this branch classifies the install as fresh because sign-out resets `hasCompletedOnboarding` to false. Persist or consult a durable prior-completion/install marker independent of that transient flag, so the card remains retired for users who onboarded before this build.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift:56">
P2: When the endpoint returns no summary, `refreshIfNeeded()` bypasses its throttle because `latest` is nil, causing repeated network requests for users with no record. Throttle on `lastRefresh` regardless of whether a record was returned.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift:84">
P2: When the owner changes while this request fails, the stale task still publishes `lastError` after `reset()`. Recheck `isOwnerStillCurrent()` in the catch path before updating store state.</violation>
<violation number="3" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift:89">
P2: An owner switch can let the old refresh clear the new owner's `inFlight` task. Track a refresh token/task identity and clear the slot only when it still refers to the completing refresh.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Analytics/AnalyticsManager+Questions.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Analytics/AnalyticsManager+Questions.swift:89">
P2: When a voice turn reaches `provider_failed` before `floatingBarQuerySent` commits it, this default emits `question_answered(error)` without any `question_asked`, violating the pairing invariant. Pass committed state into this mapper or suppress terminal outcomes until the question commit is recorded.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/Analytics/AnalyticsManager+Questions.swift:120">
P2: Onboarding opener sends are counted as `question_asked`, but this allowlist drops their terminal `question_answered`; the scripted opener pollutes activation counts and creates unpaired telemetry. Mark onboarding sends non-questions at the asked seam.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryPresentation.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryPresentation.swift:17">
P2: Malformed dates with repeated or trailing separators are accepted and can show the wrong day. Preserve empty subsequences and require the backend's exact `YYYY-MM-DD` shape before parsing.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryPresentation.swift:22">
P2: A user-selected non-Gregorian system calendar misparses the backend's Gregorian summary date. Parse with a Gregorian calendar while retaining the injected timezone.</violation>
</file>
<file name="desktop/macos/Desktop/Sources/MainWindow/Dashboard/DayZeroChips.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Dashboard/DayZeroChips.swift:25">
P2: When ScreenCaptureKit is broken or stale while TCC remains granted, `DayZeroChipSignals.live()` still enables the three screen chips. Use the app-level capture health status, not only `CGPreflightScreenCaptureAccess()`, before offering screen-grounded questions.</violation>
</file>
<file name="desktop/macos/e2e/flows/ai-chat-settings.yaml">
<violation number="1" location="desktop/macos/e2e/flows/ai-chat-settings.yaml:7">
P2: This flow does not exercise or verify `LaunchAtLoginPreference`, so adding it to `covers` falsely reports E2E coverage for the launch-at-login default and decline behavior. Remove this entry or add steps that drive the real toggle and assert the preference/system outcome.
(Based on your team's feedback about E2E flows exercising claimed paths.) [b27737b9-6bb5-4efa-9160-6194e4f6e1de]</violation>
</file>
<file name="desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBPostOnboardingGuidance.swift">
<violation number="1" location="desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBPostOnboardingGuidance.swift:124">
P2: Immediately after a fresh install with screen access, this adds a last-hour question even though no screen history has been captured yet. Gate this candidate on an explicit recent-screen-history signal, or defer it until that signal exists.</violation>
<violation number="2" location="desktop/macos/Desktop/Sources/Onboarding/SecondBrain/SBPostOnboardingGuidance.swift:282">
P2: When transcription auto-detect is enabled, this still records a language mismatch and shows a misleading `Switch to …` chip. Make the live signal honor the effective transcription mode, including auto-detect, before persisting this suggestion.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| // dismissal, queue advancement and standard click telemetry stay owned by | ||
| // `FloatingControlBarManager`. It calls back into the coordinator through | ||
| // the `askOmiPrefilled` action. | ||
| FloatingControlBarManager.shared.openNotificationAsChat(notification) |
There was a problem hiding this comment.
P1: Tapping this card sends the frontmost app name to PostHog through generic notification telemetry. Route this card through privacy-safe notification analytics or redact its title before the generic sent/clicked/dismissed events.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/FirstRealAppCard.swift, line 26:
<comment>Tapping this card sends the frontmost app name to PostHog through generic notification telemetry. Route this card through privacy-safe notification analytics or redact its title before the generic sent/clicked/dismissed events.</comment>
<file context>
@@ -0,0 +1,67 @@
+ // dismissal, queue advancement and standard click telemetry stay owned by
+ // `FloatingControlBarManager`. It calls back into the coordinator through
+ // the `askOmiPrefilled` action.
+ FloatingControlBarManager.shared.openNotificationAsChat(notification)
+ } label: {
+ HStack(alignment: .top, spacing: OmiSpacing.md) {
</file context>
| /// Resting state is one glance: emoji, date, headline, and the numbers. "More" opens the overview, | ||
| /// the day's action items, and the topic highlights in place; nothing navigates away, because the | ||
| /// hub is the resting surface and the summary is a read, not a task. | ||
| struct HomeDailySummarySection: View { |
There was a problem hiding this comment.
P1: The Home summary never renders because nothing constructs HomeDailySummarySection. Wire this view into the Home hub, or remove it if the summary is intended to exist only in Chat.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummarySection.swift, line 9:
<comment>The Home summary never renders because nothing constructs `HomeDailySummarySection`. Wire this view into the Home hub, or remove it if the summary is intended to exist only in Chat.</comment>
<file context>
@@ -0,0 +1,249 @@
+/// Resting state is one glance: emoji, date, headline, and the numbers. "More" opens the overview,
+/// the day's action items, and the topic highlights in place; nothing navigates away, because the
+/// hub is the resting surface and the summary is a read, not a task.
+struct HomeDailySummarySection: View {
+ @ObservedObject var store: HomeDailySummaryStore
+
</file context>
| onboardingDemoContext: RealtimeHubTools.activeOnboardingDemoContext(), | ||
| // Only Gemini receives the PTT-down frame as in-turn video (see | ||
| // `attachTurnScreenFrameIfNeeded`); no other session may be told an image always arrives. | ||
| turnScreenFrameAttached: provider == .gemini) |
There was a problem hiding this comment.
P1: When a Gemini session has no usable PTT capture, this flag still makes the prompt say every turn includes a screen image. The model can therefore answer current-screen questions from memory instead of invoking the screenshot tool; base the instruction on actual per-turn attachment or make the prompt conditional on image presence.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionLifecycle.swift, line 416:
<comment>When a Gemini session has no usable PTT capture, this flag still makes the prompt say every turn includes a screen image. The model can therefore answer current-screen questions from memory instead of invoking the screenshot tool; base the instruction on actual per-turn attachment or make the prompt conditional on image presence.</comment>
<file context>
@@ -410,7 +410,10 @@ extension RealtimeHubController {
+ onboardingDemoContext: RealtimeHubTools.activeOnboardingDemoContext(),
+ // Only Gemini receives the PTT-down frame as in-turn video (see
+ // `attachTurnScreenFrameIfNeeded`); no other session may be told an image always arrives.
+ turnScreenFrameAttached: provider == .gemini)
let s = RealtimeHubSession(
provider: provider,
</file context>
| /// Owner-gated. A signed-out or mid-transition process must never fetch, because the record it | ||
| /// would get back belongs to whoever the runtime settles on next. | ||
| func refreshIfNeeded() async { | ||
| guard ownerID() != nil else { return } |
There was a problem hiding this comment.
P1: During an owner switch, this ID-only gate can let announceIfNew() publish the previous owner’s cached summary after the fetch resumes. Capture an authorization snapshot before the await and revalidate that generation before announcing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryCoordinator.swift, line 64:
<comment>During an owner switch, this ID-only gate can let `announceIfNew()` publish the previous owner’s cached summary after the fetch resumes. Capture an authorization snapshot before the await and revalidate that generation before announcing.</comment>
<file context>
@@ -0,0 +1,139 @@
+ /// Owner-gated. A signed-out or mid-transition process must never fetch, because the record it
+ /// would get back belongs to whoever the runtime settles on next.
+ func refreshIfNeeded() async {
+ guard ownerID() != nil else { return }
+ await store.refreshIfNeeded()
+ announceIfNew()
</file context>
| // that also cover recovered provider continuations. | ||
| var terminalProperties = screenEvidenceFallbackProperties(evidence: evidence, reason: reason) | ||
| terminalProperties["failure_kind"] = Self.screenEvidenceFailureKind(evidence) | ||
| DesktopDiagnosticsManager.shared.recordScreenEvidenceTerminal(properties: terminalProperties) |
There was a problem hiding this comment.
P2: When output acquisition fails, this event records a user-visible terminal failure that the user never hears. Move recordScreenEvidenceTerminal after the successful lease acquisition and immediately before speakOneShot.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+ScreenEvidence.swift, line 542:
<comment>When output acquisition fails, this event records a user-visible terminal failure that the user never hears. Move `recordScreenEvidenceTerminal` after the successful lease acquisition and immediately before `speakOneShot`.</comment>
<file context>
@@ -466,11 +525,21 @@ extension RealtimeHubController {
+ // that also cover recovered provider continuations.
+ var terminalProperties = screenEvidenceFallbackProperties(evidence: evidence, reason: reason)
+ terminalProperties["failure_kind"] = Self.screenEvidenceFailureKind(evidence)
+ DesktopDiagnosticsManager.shared.recordScreenEvidenceTerminal(properties: terminalProperties)
takeOverVoiceOutputForAuthoritativeLocalResult()
guard let lease = acquireVoiceOutput(.deterministicScreenEvidence, reason: "screen_evidence_failed")
</file context>
| self.lastRefresh = self.now() | ||
| } catch { | ||
| // Bounded: the message is for the local log and an inline hint, never for analytics. | ||
| self.lastError = "Couldn't load your daily summary." |
There was a problem hiding this comment.
P2: When the owner changes while this request fails, the stale task still publishes lastError after reset(). Recheck isOwnerStillCurrent() in the catch path before updating store state.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift, line 84:
<comment>When the owner changes while this request fails, the stale task still publishes `lastError` after `reset()`. Recheck `isOwnerStillCurrent()` in the catch path before updating store state.</comment>
<file context>
@@ -0,0 +1,100 @@
+ self.lastRefresh = self.now()
+ } catch {
+ // Bounded: the message is for the local log and an inline hint, never for analytics.
+ self.lastError = "Couldn't load your daily summary."
+ log("HomeDailySummaryStore: refresh failed: \(error)")
+ }
</file context>
| self.lastError = "Couldn't load your daily summary." | |
| guard isOwnerStillCurrent() else { return } | |
| self.lastError = "Couldn't load your daily summary." |
|
|
||
| /// Refresh when the hub appears, but not on every re-render. | ||
| func refreshIfNeeded() async { | ||
| if let lastRefresh, now().timeIntervalSince(lastRefresh) < Self.refreshInterval, latest != nil { |
There was a problem hiding this comment.
P2: When the endpoint returns no summary, refreshIfNeeded() bypasses its throttle because latest is nil, causing repeated network requests for users with no record. Throttle on lastRefresh regardless of whether a record was returned.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift, line 56:
<comment>When the endpoint returns no summary, `refreshIfNeeded()` bypasses its throttle because `latest` is nil, causing repeated network requests for users with no record. Throttle on `lastRefresh` regardless of whether a record was returned.</comment>
<file context>
@@ -0,0 +1,100 @@
+
+ /// Refresh when the hub appears, but not on every re-render.
+ func refreshIfNeeded() async {
+ if let lastRefresh, now().timeIntervalSince(lastRefresh) < Self.refreshInterval, latest != nil {
+ return
+ }
</file context>
| if let lastRefresh, now().timeIntervalSince(lastRefresh) < Self.refreshInterval, latest != nil { | |
| if let lastRefresh, now().timeIntervalSince(lastRefresh) < Self.refreshInterval { |
| /// rendering a parsing artifact. | ||
| static func day(from date: String?, calendar: Calendar = .current) -> Date? { | ||
| guard let date else { return nil } | ||
| let parts = date.split(separator: "-") |
There was a problem hiding this comment.
P2: Malformed dates with repeated or trailing separators are accepted and can show the wrong day. Preserve empty subsequences and require the backend's exact YYYY-MM-DD shape before parsing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Dashboard/ChatDailySummaryPresentation.swift, line 17:
<comment>Malformed dates with repeated or trailing separators are accepted and can show the wrong day. Preserve empty subsequences and require the backend's exact `YYYY-MM-DD` shape before parsing.</comment>
<file context>
@@ -0,0 +1,91 @@
+ /// rendering a parsing artifact.
+ static func day(from date: String?, calendar: Calendar = .current) -> Date? {
+ guard let date else { return nil }
+ let parts = date.split(separator: "-")
+ guard parts.count == 3 else { return nil }
+ let numbers = parts.compactMap { Int($0) }
</file context>
| } | ||
|
|
||
| static func payload(phase: Phase) -> [String: Any] { | ||
| ["phase": phase.rawValue] |
There was a problem hiding this comment.
P2: The production emitter does not enforce the declared privacy allow-list; it forwards the raw payload directly to PostHog. Filter the payload here so an accidental future app name, title, or other dimension is stripped at the production boundary rather than being protected only by a test.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/ProactiveAssistants/FirstRealApp/AnalyticsManager+FirstRealAppCard.swift, line 31:
<comment>The production emitter does not enforce the declared privacy allow-list; it forwards the raw payload directly to PostHog. Filter the payload here so an accidental future app name, title, or other dimension is stripped at the production boundary rather than being protected only by a test.</comment>
<file context>
@@ -0,0 +1,53 @@
+ }
+
+ static func payload(phase: Phase) -> [String: Any] {
+ ["phase": phase.rawValue]
+ }
+
</file context>
… draft, chip gates, migration retry, read-only QA action, real e2e steps - QueryShellHome leaves search-results mode before taking a prefilled draft - day-0 screen chips need a grant that is live in this process; 'last hour' also needs screen analysis on - the launch-at-login V2 one shot is consumed only after a successful registration (or a skip), so a transient failure retries next launch - daily_summary_snapshot no longer refreshes (a refresh can post a card) - screen_evidence_terminal carries attempt_id for joins with question_* - home-stage flow drives open_chat_prefilled / chat_drafts_snapshot / daily_summary_snapshot instead of merely listing the files as covered Failure-Class: none Co-Authored-By: Claude Fable 5.1 <[email protected]>
…criptor Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…cd3f Failure-Class: none Co-Authored-By: Claude Fable 5.1 <[email protected]>
#12608 (first-48h activation) landed upstream while this branch deleted the second shell. Three conflicts, all of them the same shape: main put new behaviour on surfaces this branch removes. - `DashboardPage.swift` (modify/delete): kept our deletion. Everything #12608 added to it was a *second* wiring of behaviour it had already wired into the shared surfaces — the day-0 chip composition, the prefilled-draft consumption, the draft-chip branch. Those live in `ChatProvider` / `OnboardingOpenerView` / `QueryShellHome` and survive. - `home-stage.yaml` (modify/delete): kept our deletion. Its S1-S8 assert `state.homeMode`, which only `DashboardPage` ever published; its new S9-S12 (prefilled draft, daily-summary snapshot) are real and are re-homed onto `chat-first.yaml`, on the route that owns them now. - `ptt-lifecycle.yaml` (content): took main's version. Both sides fixed the same stale covers path; main dropped the entry, we repointed it. Main's is the one already on the base branch. `QueryShellHome`'s new prefilled-draft path arrived guarded on `usesLegacyPresentation`, a symbol this branch deletes; the guard is dropped, which is also the correct behaviour — it is the only composer. `HomeDailySummarySection` was the hub's rendering of the summary and had no renderer left; its `HomeDailySummaryStatsRow`, which the surviving Chat card uses, stays and now names the file. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Why
New macOS users decide whether to use Omi in one sitting. On the August true-new cohort (n=598, PostHog) the median first question came 5.4 min after signup, 90% within 30 min, and 96% of third questions landed on day 0. A third of new users never asked once. The "24% ask 3+ questions in 48h" figure was typed-only; counting push-to-talk gives 48%, and PTT is 72% of first-48h question volume.
Four mechanical defects capped day 0, and the day-0 surfaces asked for data a new user cannot have. This PR fixes the floor and replaces the day-0 surfaces. Evidence: knowledge-base projects
macos-churn-analysis,ptt-improvement,macos-onboarding-redesign, plus a 291-user Firestore read of first-48h messages (aggregate only).What
A. Launch at login defaults on unless the user turned it off.
SBOnboardingModelseeded the value from liveSMAppServicestatus, which is "not registered" on every fresh install, so every new user finished onboarding with auto-start off and a closed app had no day-1 return path.LaunchAtLoginPreferenceowns the rule; the Settings toggle records an explicit decline as a presence marker (re-enabling clears it); a one-shot V2 migration enables existing users unless that marker exists. Known limit: a decline made before this build cannot be distinguished from "never set" and is re-enabled once; the toggle is authoritative afterwards.B. One question vocabulary.
question_asked(surface, source, attempt_id) andquestion_answered(grounded / screen_failed / error / cancelled, joined by attempt_id) fire from the two existing emitters. Push-to-talk now advances the in-app question counter (rating prompt, remotequestion_countprompts), which was typed-only. Voice turns that never committed (too short, silent) produce no answer record.C. Day-0 chips ask only what Omi can answer with no history. ~30% of first messages were a chip pasted verbatim; three of six chips asked about the week or "what can you do", and users who stopped after one question over-indexed 3x on exactly those empty-state answers.
DayZeroChipsgates the top-up set on live signals: summarize the screen / last hour / turn the screen into tasks (Screen Recording granted), "Switch to " (locale differs from Omi's), calendar (connected), and a "Remember that I…" draft that prefills the composer instead of sending. Both shells read the same composer.D. First-real-app tap-to-ask card. Exactly once per fresh install, after onboarding, when the first non-Omi app becomes frontmost (3 s dwell, re-verified): "I can see {App}. Hold ⌥ and ask me anything about it — or tap to type." Tap opens the main chat with "Summarize what's on my screen" prefilled, focused, not sent (new
FloatingBarNotificationAction.askOmiPrefilled). Dismisses on tap, ✕, PTT start, or 60 s. Existing users who onboarded before this build never see it. 19% of day-0 screen questions were asked with Omi itself frontmost; this card guarantees a real app behind the top question.E. Screen evidence: say why, don't fail flat. "I couldn't verify the current screen." came only from the realtime PTT hub, and on a fresh install it fired because a turn with no captured evidence got a zero-second protocol deadline, so the permission-aware recoverable path was computed and never reached; a second question in a still-open locked session hit the same branch. Rejection now routes by disposition, not reason string;
.notAdmittedtransport is rejected with a named reason instead of silently expiring; "granted after launch, needs relaunch" is its own capture failure with an honest tool error; the prompt no longer claims an attached frame when none was attached. Report-deadline expiry with installed evidence stays deterministic (INV-VOICE-1 updated in the same change).F. Daily summary in Chat. Desktop rendered no daily summary; the generated client was unused. The summary now renders at the top of the chat thread in both shells (emoji, date, headline, overview, the mobile three-stat row, expandable highlights and action items) with a "What did I do yesterday?" chip that prefills the composer. Fetched at launch, on day change, on wake; a new summary id posts one notch card. Two files (
APIClient+DailySummaries.swift,HomeDailySummarySection.swift) are byte-identical copies from #12603;HomeDailySummaryStore.swiftis the same copy plus an owner fence on the fetch result (INV-AUTH-1), which #12603 should pick up when it rebases. Desktop has no FCM receive path, so the card is driven by the store's new-id detection, not the push.Shared seam:
MainChatNavigationRequestStore.request(draft:)andopenMainAppChat(prefilledDraft:): prefill, focus, never send.Merge note for #12603
FloatingBarNotificationActiongainsaskOmiPrefilled(prompt:)here; #12603 adds four cases and an exhaustivescenarioDescriptorswitch whosenilarm lists the three original cases. Git merges that switch cleanly and the build then fails until.askOmiPrefilledis added to thenilarm.HomeDailySummaryStore.swiftdiverges from #12603 by the owner fence above.Not in this PR
Teach-and-prove memory loop (no UX yet), warm-start imports, answer-ends-with-next-move, remote-prompt experiments.
check-sources-root-layout.pyreports 90 loose root files vs baseline 77 onorigin/mainalready; this PR adds none.Product invariants affected
RuntimeOwnerIdentity.captureAuthorizationSnapshot().MainChatNavigationRequestStore.Failure-Class: none
Line-count exceptions
Each is a switch arm, a call-site argument, or a one-line hook at the only seam that owns the behaviour; the new logic lives in new files (
Analytics/AnalyticsManager+Questions.swift,Preferences/,Dashboard/DayZeroChips.swift,ProactiveAssistants/FirstRealApp/,Dashboard/ChatDailySummary*.swift).Line-Count-Exception: desktop/macos/Desktop/Sources/DesktopDiagnosticsManager.swift | 1503 -> 1521 | screen_evidence_terminal event + question_answered hook at the voice terminal seam
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift | 3082 -> 3086 | one render arm for askOmiPrefilled
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift | 5682 -> 5689 | one action arm for askOmiPrefilled + attempt_id on two analytics calls
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionDelegate.swift | 1529 -> 1533 | receipt descriptor passed to the rejection path
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionLifecycle.swift | 1516 -> 1519 | turnScreenFrameAttached passed to the system instruction
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Pages/DashboardPage.swift | 4165 -> 4186 | consume the composer draft; draft-chip branches in askHomeSuggestion and handleSuggestedPrompt
Line-Count-Exception: desktop/macos/Desktop/Sources/OmiApp.swift | 1640 -> 1656 | openMainAppChat(prefilledDraft:), V2 migration rewrite with retry-on-failure, two coordinator start lines
Line-Count-Exception: desktop/macos/Desktop/Sources/Providers/ChatProvider.swift | 7153 -> 7154 | dayZero signals argument on the opener composer
Line-Count-Exception: desktop/macos/Desktop/Sources/AnalyticsManager.swift | 1655 -> 1667 | question_asked hook in the two existing emitters + the test seam; the vocabulary lives in Analytics/AnalyticsManager+Questions.swift
Line-Count-Exception: desktop/macos/Desktop/Sources/DesktopAutomationBridge.swift | 4828 -> 4829 | one registration line for the activation QA actions (their bodies live in Automation/DesktopAutomationActivationActions.swift)
Verification
xcrun swift build -c debug --package-path Desktop: clean on the final tree../scripts/dev-feedback.py --once swift '<27 suites>'): 615 tests, 0 failures../scripts/agent-logic-harness.sh --swift-only: passed (focused lifecycle/state suites green).python3 scripts/check_desktop_test_quality.py: debt at or below baseline../scripts/swiftlint-wrapper.sh lint: 0 violations.scripts/pr-preflight --pr-body-file: all manifest checks pass.omi-activation(./run.sh --yolo, dev backend, David's seeded account) via the automation bridge:daily_summary_snapshot:hasSummary=true, date 2026-08-23 → label "Sun, Aug 23", stats present, 4 highlights, 11 action items (the account's newest generated summary).open_chat_prefilled query="Summarize what's on my screen"thenchat_drafts_snapshot: main composer draft is exactly that text, nothing sent.FirstRealAppCardCoordinator: install gate recorded consumed(existing user never sees the card);LaunchAtLogin migration V2: enabled for existing user (success: false)(non-production bundles cannot register login items by design).fbc7b97d33and later commits (voice-lane double counting, realtime surface label, orphan answers, the draft chip auto-sending on the legacy banner, stale draft slot, owner fences on the summary store and card sink, last-seen id ordering, replayed voice snapshot, realtimehas_screenshot, the stale calendar sniff).🤖 Generated with Claude Code