Skip to content

feat(desktop): scenario onboarding, guided first run, and daily-summary stats - #12603

Closed
Git-on-my-level wants to merge 36 commits into
mainfrom
feat/onboarding-first-run
Closed

Git-on-my-level wants to merge 36 commits into
mainfrom
feat/onboarding-first-run

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Replaces the permission-ramp onboarding on macOS with one real session, then guides the user through one real task from the notch, then writes it up. Stats for the daily summary come from a new desktop usage ingest. Design and evidence: knowledge-base project macos-onboarding-redesign (rev 2), mockup https://claude.ai/code/artifact/e342e294-f46f-48a5-93d2-203fa2804f27.

Phase 1 — scenario onboarding (desktop)

  • SBOnboardingModel.Step is now six beats: hello, see, card, talk, write, ready. Each permission is asked right before the payoff that needs it (Screen Recording → the page opens; Notifications → after the first card; Microphone → before push-to-talk).
  • Two bundled pages (Resources/onboarding-pages/) are rendered with real dates and opened in the default browser; the app detects them by window title with a timed fallback.
  • The scripted card goes through the real NotificationService path (respectFrequency: false, isPersistent: true) and lands on the real notch. "Remind me" creates a real action item.
  • Every trip out of Omi is a button the thread has explained ("Open the order page", "Open the note"); Omi summons itself back (openMainAppWindow) once the card is answered or times out, or the note arrives. While the note page is up a guide chip sits at the notch.
  • The note comes back over loopback: OnboardingNoteReceiver is a one-shot NWListener on 127.0.0.1 (ephemeral port, nonce-bound, 16 KiB head cap, eight connections, three-second lifetimes, note bounded to 1 500 scalars) alive only while the page is open; the page fires an image beacon to it and sets a short title as the "sent" signal (the window server truncates long window names, so the title cannot carry a payload). A memory, and a task + person memory when the note keeps the promise (the link) and the subject (the lamp/sale), are written deterministically. No model call. If the title says sent but the note never arrives, the beat completes with nothing kept and says so.
  • Resume schema bumped to 3 (older resume states restart at hello). New per-beat event Onboarding Beat Completed (bounded properties only).

Phase 2 — guided first run (desktop)

  • ProactiveAssistants/FirstRun/: a persisted MainActor reducer with a FIFO non-reentrant queue drives five steps from a persistent notch chip: open your work, set a context reminder by voice, drift, get pulled back by the real Suggestion assistant (scripted fallback after 60 s), get the reminder back on return, then read the session summary.
  • ContextReminderStore: reminders bound to (bundle id, normalized title, bucket id), evaluated on every context switch, so "remind me next time I open X" keeps working after onboarding.
  • The session summary is a real conversation created through createConversationFromSegments(source: "onboarding").
  • DesktopUsageDailyReporter accumulates watching/listening seconds and card counts per local day and uploads them.
  • FloatingBarNotificationAction gains four button-bearing cases; buttons post omi.floatingBar.cardAction; new FirstRunNotchCards.swift renders the guide chip and action cards.

Daily summary stats (backend, mobile, desktop)

  • POST /v1/users/desktop-usage/daily (Firebase-authed, max-merge upsert per date + device).
  • DailySummaryDayStats gains memories_created, action_items_created, watching_minutes, proactive_moments; populated by the generator; persisted with the summary.
  • Mobile stats row shows watching time and proactive moments when present (Dart wire models regenerated).
  • Desktop Home shows the daily summary with the same stats row (MainWindow/Dashboard/HomeDailySummary*).
  • Generated API clients regenerated through backend/scripts/openapi_runner.sh for every surface.

Cleanup and measurement

  • Dead onboarding code removed (old wizard, chat view, demo views, retired stages and their tests).
  • Admin onboarding funnel remapped from the dead per-step events to the beat/step events, with a first-run funnel beside it.

Failure class

The fix: commits on this branch correct code introduced by the same branch before any release; they do not repair a shipped failure class.

Failure-Class: none

Product invariants affected

Path-matched invariants, all preserved:

  • INV-CUTOVER-1 — DesktopHomeSignedInStartup only starts the first-run coordinator and the usage reporter after the existing signed-in admission; no cutover authority changes.
  • INV-CHAT-1 — floating-bar changes are presentation and observation hooks; no second transcript store; the onboarding chat stays on the isolated .onboarding() journal surface.
  • INV-VOICE-1 — the first run observes the terminal PTT transcript only; voice lifecycle ownership is unchanged.
  • INV-MEM-1 — backend/database/memories.py gains a created_at aggregation count only; tier authority and visibility are unchanged.
  • INV-AUTH-1 — the app-URL handler in OmiApp.swift goes back to forwarding every callback to AuthService.handleOAuthCallback (the doors return-URL branch is removed); the new APIClient+DesktopUsage request uses the default session-token policy and never invalidates or preserves a session itself.
  • INV-NAV-1 — the Home hub mounts one new section; navigation destinations, routing, and the sidebar are unchanged.
  • INV-MEM-4 — process_conversation.py gains an early return for source=onboarding that skips memory intake entirely; no new intake path, tier, or promotion route is added.
  • INV-TASK-2 — the same early return skips action-item extraction for onboarding conversations; on the desktop, the scenario writes a task only on an explicit gesture ("Remind me" on the card, "Looks right" after the note), never from capture.

Verification

  • Desktop: xcrun swift build -c debug --package-path Desktop clean; xcrun swift test --filter 'OnboardingScenarioTests|FirstRunEngineTests|HomeDailySummaryTests|OnboardingFlowTests|OnboardingPersistenceClearingTests|SBOnboarding|HubSystemInstructionTests|PushToTalk|RealtimeHub|VoiceTurn|FirstRunPTTAccountingTests' green (247 tests in the filtered set); check_desktop_test_quality.py at or below baseline; pinned swift-format lint clean; strict e2e flow coverage 0 uncovered; flow lint clean.
  • Backend: the changed test files (45 tests) plus all three synthetic-module harness families green under the CI runner's per-file isolation; backend-python-format --check clean; Firestore query-coverage ratchet green with two new registered specs (memories_created_range, canonical_memories_captured_range). The full 1,022-file suite could not run on the shared local interpreter (langchain_anthropic missing) and is deferred to CI.
  • Web admin: vitest 215/215, tsc --noEmit clean.
  • Mobile: Flutter is not on the build host; the new widget test and flutter analyze run in CI.
  • Post-QA: three QA rounds on the named bundle drove a focus/hand-off audit (knowledge base evidence/2026-09-01-focus-handoff-audit.md): the browser hand-offs became explicit buttons with a return; the scripted card was never presentable before (the notch window did not exist during onboarding); the note beat is guided from the thread and a notch chip; the title transport was replaced by the loopback receiver. A second codex review of the hand-off commit found five defects, all fixed with tests.
  • Final review: an adversarial codex (gpt-5.6-sol) review found 4 blockers and 4 fix-before-QA items (owner boundary across sign-out, spoofable note transport, resume without effects, canned transcript mined as user facts, card scoping, card controls, PTT accounting, canonical memory count); all eight are fixed on this branch with behavioral tests, including a processing-policy contract test for source=onboarding.
  • scripts/pr-preflight --pr-body-file green with this body.
  • QA bundle: OMI_APP_NAME=omi-first-run ./run.sh --yolo at 3b2517ca6e; scripts/pr-preflight --pr-body-file passed 44/44 checks at that SHA.

Notes for reviewers

  • Follow-up filed: One chat shell: delete the legacy chat, render every content block as an interactable component on macOS and mobile #12598 (one chat shell; the legacy shell had to be handed a rich-block context here so created tasks render as task cards).

  • Supersedes the three-doors ask demo (upstream commits 419f67ea6a, ff96bff7bb): the scenario's talk beat asks about the order page that is already open, so a second demo page would have been a second story. Kept and generalized the part that mattered: the model-note hook (ChatProvider.onboardingDemoContext / the voice system instruction) now carries OnboardingDemoNote.orderPage(...) while the talk beat is active, so the first voice question is answerable before capture has a frame. The doors page, its return-URL scheme handling, and the onboarding_open_doors bridge action are removed.

  • Main merged the first-48h activation work (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) while this PR was open; it carries copies of this branch's HomeDailySummaryStore / HomeDailySummaryTests and its own ChatDailySummary*. The forward merge keeps main's versions of the shared files; this branch's Home section renders through them unchanged.

  • The named bundle talks to the development backend; until this branch's backend lands there, the usage upload retries harmlessly and the daily-summary card shows only the fields that already exist.

  • first_run_focus_snooze currently counts as a card action only; observed return to the project remains the step-4 authority.

  • scripts/check-sources-root-layout.py fails on this checkout for reasons unrelated to the branch (90 loose root files vs a baseline of 77); this branch adds none.

Line-count exceptions

Files already over the ratchet that had to grow by a few lines each; every addition is a hook into an existing switch or lifecycle, not new feature body (the feature bodies live in new files under Onboarding/Scenario/, ProactiveAssistants/FirstRun/, and MainWindow/Dashboard/):

Line-Count-Exception: backend/routers/users.py | 2247 -> 2326 | the desktop-usage ingest endpoint and its request model sit beside the daily-summary endpoints they feed; the route policy is declared with its siblings
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 2628 -> 2642 | the onboarding-source policy is one early return placed immediately after the completed-conversation persist, pinned by a contract test
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift | 3082 -> 3095 | routing branches in barNotification for the first-run chip, action cards, and receipt cards; the card bodies live in FirstRunNotchCards.swift
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift | 5682 -> 5749 | assistant-scoped dismiss, card counters, and dismissal notifications need the manager's private queue; the four new action cases are routed in the existing switch; push-to-talk resize honours a mounted card and a card presented into a just-ordered-front window takes its size at once
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController+SessionDelegate.swift | 1529 -> 1532 | one observation post at the committed-transcript boundary
Line-Count-Exception: desktop/macos/Desktop/Sources/ProactiveAssistants/Services/NotificationService.swift | 1528 -> 1530 | one optional kind parameter passed through to the bar so onboarding receipts journal into chat as Task or Memory instead of a bare Notification
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift | 1689 -> 1708 | the legacy shell builds the same rich-block rendering context the Chat-first shell has, so a task Omi created renders as the check-off task card in either chat
Line-Count-Exception: desktop/macos/Desktop/Sources/Providers/ChatProvider.swift | 7153 -> 7156 | one internal accessor for the send lock so the journal projection can tell a live stream from a turn a previous process abandoned
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Pages/DashboardPage.swift | 4165 -> 4173 | one store property and one section mount on the Home hub; the section itself is HomeDailySummarySection.swift

🤖 Generated with Claude Code

Git-on-my-level and others added 29 commits September 2, 2026 01:01
…card views; admin funnel remapped to beat/step events

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…rding conversation source; mobile stats row

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e fallback, session summary, desktop usage reporter

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…s, scripted card, note extraction, beat analytics

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…action cases, notch card views, write-beat UI, restyled demo pages

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e; retire the three-doors ask demo it supersedes

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…op dead onboarding analytics hooks

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…deleted onboarding views

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…first-run copy; formatter drift

Failure-Class: none

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ce-guarded note transport, resume with effects, onboarding-source policy, card scoping, reducer-driven card controls, single PTT completion, canonical memory count

Failure-Class: none

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…s-right gesture; isolate persisted beat phases in the resume test

Failure-Class: none

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The order page used to open as a side effect of the Screen Recording answer,
covering the sentence that announced it, and the card beat then streamed into
a window the browser was hiding. The note page opened the same way, and after
Send the user had to go find Omi. This makes every trip out of Omi a button the
thread has explained, keeps the notch and the page as the instructions while
the user is away, and brings Omi back once the card is answered, the card
times out, or Send is seen.

- see beat: permission answer -> offer ("Open the order page") -> the click
  opens the browser; the card fires on page detection, not on the streamed
  sentence; the card waits 90 s and Omi returns either way
- write beat: an intro phase with "Open the note" / "Skip for now"; the
  escapes stay on screen while the browser is up; Send polls for five minutes
- the task receipt stays visible through the notifications ask
- the talk beat no longer refers to the retired three-doors page
- first run: closing the guide chip keeps it down for that step instead of
  returning five seconds later; the voice hub is told the reminder step is
  the guide's, so it acknowledges without writing a second task
- pages: the cue lines say a card is coming and that Omi brings you back

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…close the review gaps

QA on the redesigned hand-off found no card at the notch: the floating bar
window is created by the signed-in Home start-up (after onboarding) and by
the talk beat (after this one), so the card beat's one card was dropped with
"window is not set up" while the page said a card was on its way. The card
beat now sets the bar up itself (idempotent).

Also from the codex review of the hand-off commit:
- a Screen Recording relaunch from the see beat resumes on the "Open the
  order page" offer, not one beat past it
- a card blocked by a meeting or another card retries for a minute, then
  brings the user back with the reason instead of retrying forever
- the guide chip's ✕ is routed to the reducer: one close keeps the chip down
  for that step, a second close ends the first run (it used to end it at once)
- the view's disappearance cancels the hand-off watches, and the production
  return path refuses to summon Omi once signed out
- the owner reset clears the first-run hub note
- Back from the card beat lands on the offer, not on a re-armed page watch
- detection timeouts are journaled as timeouts

Tests: Send seen through the injected window observation summons Omi exactly
once; Send never seen leaves the escapes and never summons; relaunch resumes
on the offer; two guide closes end the first run.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
QA: once the note page was open the user had nothing telling them what to
write or why; the chat that explained it was behind the browser and the notch
was empty. Reviewed every beat for what the user knows at that moment, and
fixed the one that left them alone.

- the thread now says what the beat is for (Omi remembers what you write; a
  promise becomes a task, what you tell Sam becomes a memory) and that the
  draft can be sent as it is
- a persistent guide chip sits at the notch while the page is up ("Send the
  note to Sam, as it is or in your words"), retracted on Send, Skip, or Back;
  the scenario gets its own chip id so it renders as guidance, not a card
- the page opens with an "Omi is reading along" banner saying the same, and
  the hint under Send says the draft can go as it is
- the see beat's offer frames the story ("Say you just bought a desk lamp")
- extraction survives edits: the promise is recognised by its subject (the
  link) and the fact about Sam by the lamp or the sale, so a rewritten note
  still teaches the lesson and a note that drops the promise gets no task
- the return lands on "Sent" plus an Omi line about what it kept, so the
  summoned window is already explaining itself

Co-Authored-By: Claude Fable 5.1 <[email protected]>
QA: pressing Send did nothing. The note travelled in the window title, and
the window server middle-truncates window names ("Omi Welcome · Sent ·
8c1d2c…sale%20ends%20Monday."), so the nonce and the note never matched.
The automation bridge is dev-only, so the note gets its own transport.

- `OnboardingNoteReceiver` (codex gpt-5.6-sol): a one-shot NWListener on
  127.0.0.1 with an ephemeral port, alive only while the note page is open;
  GET /onboarding/note?nonce=&note= bound to the model's nonce, 16 KiB head
  cap, eight connections, three-second lifetimes, note bounded to 1 500
  scalars, first accepted note wins, then it stops; parser is a pure static
  with its own tests plus a real loopback round trip
- the page fires an image beacon to that port (no CORS, works from file://)
  and sets a short title, token plus eight nonce characters, as the "sent"
  signal only
- the model starts the receiver before rendering the page, completes on the
  note's arrival, and if the title says sent but the note never arrives it
  completes honestly with nothing kept and a Continue
- the receiver is stopped from every teardown path; no isolated deinit
  (macOS 15 runtime; the app deploys to 14)
- the "Omi is reading along" banner on the page is gone: the notch chip
  says it, and one voice is enough

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Every line the flow says, rewritten as one person talking: short sentences,
one idea each, no self-narration repeated beat to beat, "the top of your
screen" instead of "the notch", and the same tone on the notch chips, the
cards, the page cues, and the first-run guide.

The Screen Recording step keeps its disclosure (capture is ongoing once set
up, the archive is Rewind, it can be turned off); the disclosure tests had
been failing on this branch since the scenario rewrite and now pass.

Capture choices read "Only in meetings" / "Always"; the hand-off buttons read
"Open the page" / "Open the note".

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… that sees, a notch that keeps its size

Three QA findings on the named bundle.

After Send, nothing said what happened. The note beat now leaves a "✓ Task:
Send Sam the lamp link" card at the top of the browser the moment the note
arrives, before the window comes back, and what Omi kept (the task, the
memories) is attached to Omi's line in the thread as receipts that stay for
the rest of the flow instead of living in a widget that vanishes on "Looks
right". The card beat's reminder task gets the same receipt.

After onboarding, opening a document did nothing. The first run only learned
about context switches from the proactive monitoring loop, which runs only
with screen analysis on; a fresh install may not have it and a named dev
bundle never does. `FirstRunFrontmostProbe` now watches the frontmost app and
window title itself while the guide is active (activation notification plus a
two-second poll, posting on change). The voice hub is also told the current
step, so "what am I supposed to do next?" gets the guide's answer.

Push-to-talk shrank the island with the guide chip up: the PTT resize took
the bare listening width and squeezed the card. The resize now keeps a
mounted card's surface (`pushToTalkSurfaceSize`, tested); the glow already
frames whatever surface is current.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
- notch text: the guide chip drops its "OMI · NEXT STEP" eyebrow, and
  buttonless first-run cards ("✓ Task: …", "✓ Reminder set", "✓ That's the
  loop") render as a compact receipt: one bold line, one quiet line, no icon
  tile, no eyebrow
- scrunched cards: a card presented into a window that was ordered front in
  the same pass now takes its size immediately instead of animating from a
  frame nobody saw (observed: a 508 pt card inside a 284 pt island); the
  kept card replaces the guide chip in place instead of retract-then-present
- the kept card puts the task in the line that gets the ink
- "Fix something" is gone: it skipped the task and did nothing visible

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…on chips stay out of it

The chat journals every notch card, and ours arrived as "Notification"
entries: the guide chip's instruction, the reminder confirmation, the kept
task. A guidance chip is not an observation and is no longer journaled.
The receipts carry a kind now (`NotificationService.sendNotification(kind:)`
passes through to the bar), so the chat labels them Task or Memory with the
matching glyph, in the same family as every other proactive card.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The two tasks the onboarding creates (the reminder from the notch card, the
promise from the note) now go into the main chat as `taskCard` content
blocks, the same check-off element every other created task gets, bound to
the live task in TasksStore. The transient notch receipts ("✓ Reminder set",
"✓ Task: …", "✓ That's the loop") are no longer journaled, so a task shows
once, as a task. The scripted heads-up card journals as an Insight.

`OnboardingScenarioWrites.createActionItem` creates through the task API
directly and returns the id; the chat provider's `recordJournalExchange`
carries the block.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ger leaves the last answer pulsing

Two findings from QA on the named bundle.

The onboarding's task cards were journaled as chat-first `taskCard` blocks,
but the legacy shell (which this dev account is sampled into) deliberately
kept journaled rich blocks inert; the card was in the transcript and drew
nothing. The legacy shell now gets the same `ChatFirstRichBlockContext`
(its prompt-materialization coordinator has no driver bound, so that
behaviour stays off), so a task Omi created is the check-off task card
wherever the chat is.

A relaunch under a live voice answer leaves the turn non-terminal in the
journal, and every replay after that shows it pulsing as if still loading;
nothing in the new process owns it, so nothing ever finishes it. The journal
projection now terminalizes a streaming AI turn older than 90 s when this
process holds no send lock and no voice turn, and repairs the journal turn.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@mintlify

mintlify Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Sep 2, 2026, 6:36 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…th the pinned Flutter 3.44.5

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…-run

# Conflicts:
#	desktop/macos/Desktop/Tests/OnboardingFlowTests.swift
Git-on-my-level and others added 2 commits September 2, 2026 03:40
The prior formatting commit (bad5d09) ran with unresolved pub
packages (app/.dart_tool was never populated locally), so
analysis_options.yaml's `package:flutter_lints/flutter.yaml` include
silently failed to resolve and dart format fell back to a different
trailing-comma policy than the project's real one. That produced
formatting CI's pinned toolchain (with packages resolved) rejects.

Ran `flutter pub get` first this time, then reformatted with the
pinned Flutter 3.44.5 dart. The lib file reverts to its original,
already-correct formatting; the test file's DayStats(...) call now
collapses onto one line per the resolved formatter config. Verified
`dart format --set-exit-if-changed` reports 0 changes with packages
resolved.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The desktop_manual source listed three onboarding files this branch deletes
(the old chat view, the paged intro coordinator, the wizard). The manual
task writers from onboarding are now OnboardingScenarioWrites and
FirstRunCoordinator.

Failure-Class: none

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Sep 2, 2026
…on telemetry, day-0 chips, first-real-app card, honest screen evidence, daily summary in Chat (#12608)

## 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.**
`SBOnboardingModel` seeded the value from live `SMAppService` status,
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. `LaunchAtLoginPreference` owns 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) and `question_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,
remote `question_count` prompts), 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.
`DayZeroChips` gates the top-up set 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),
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; `.notAdmitted` transport 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.swift` is 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:)` and
`openMainAppChat(prefilledDraft:)`: prefill, focus, never send.

## Merge note for #12603

`FloatingBarNotificationAction` gains `askOmiPrefilled(prompt:)` here;
#12603 adds four cases and an exhaustive `scenarioDescriptor` switch
whose `nil` arm lists the three original cases. Git merges that switch
cleanly and the build then fails until `.askOmiPrefilled` is added to
the `nil` arm. `HomeDailySummaryStore.swift` diverges 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.py` reports 90 loose root files vs baseline
77 on `origin/main` already; this PR adds none.

## Product invariants affected

- INV-AUTH-1: every new fetch/send is owner-fenced through
`RuntimeOwnerIdentity.captureAuthorizationSnapshot()`.
- INV-CHAT-1: the daily summary is chrome above the transcript; no
synthetic turn, no second transcript store.
- INV-CHAT-2: the summary card is admitted above the thread only while
the transcript is following the live edge, and the live edge is
re-followed after it appears; a reader who has scrolled away sees it on
their next return to the live edge, never as a jump.
- INV-VOICE-1: text updated in the same change; no evidence captured for
a turn is a recoverable tool result, captured-but-stale evidence stays a
deterministic local result.
- INV-NAV-1: both shells consume one composer draft through
`MainChatNavigationRequestStore`.
- INV-TASK-2: "Turn what's on my screen into tasks" is a user-sent chat
question; nothing auto-creates tasks.

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.
- Focused XCTest sweep (`./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.
- Named QA bundle `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"` then
`chat_drafts_snapshot`: main composer draft is exactly that text,
nothing sent.
- App log: `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).
- Not exercised live: a real push-to-talk screen turn on a fresh install
(the honest-failure path is covered by 13 policy tests; live PTT needs a
production-signed bundle), and the first-real-app card on a genuinely
fresh install (37 policy/coordinator tests, injected clock and
defaults).
- Independent review (Opus, adversarial): 4 blockers and 8 should-fix
findings, all addressed in `fbc7b97d33` and 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, realtime `has_screenshot`, the stale calendar sniff).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Git-on-my-level and others added 3 commits September 2, 2026 07:32
…non-protocol sources

Two Desktop Swift CI failures.

SBOnboardingPermissionFlowTests crashed at the shortcut step: `armShortcutSummon`
read the implicitly unwrapped `NSApp`, which is nil in a test process that never
touched the application object, and CI runs each suite in its own process. It
uses `NSApplication.shared` now.

SessionIdentityForbiddenIdentifiersTests forbids the identifier `resume:`
outside the protocol layer. The first-run reducer event `.resume` is now
`.restorePendingEffect`, and the relaunch helper's local is `resumeStep`.

Failure-Class: none

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…-run

# Conflicts:
#	desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarState.swift
#	desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift
#	desktop/macos/Desktop/Sources/MainWindow/Dashboard/HomeDailySummaryStore.swift
#	desktop/macos/Desktop/Tests/HomeDailySummaryTests.swift
#	desktop/macos/Desktop/Tests/SBPostOnboardingGuidanceWiringTests.swift
#	desktop/macos/e2e/flows/onboarding-flow.yaml
…nce offers no calendar chip

Co-Authored-By: Claude Fable 5.1 <[email protected]>
pull Bot pushed a commit to codingwatching/omi that referenced this pull request Sep 2, 2026
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
(BasedHardware#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]>
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Superseded by smaller PRs

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Git-on-my-level added a commit that referenced this pull request Sep 4, 2026
…ers (#12651)

## Summary

Hands-free, a user can say “remind me to ping Priya next time I’m here”
while a document is frontmost. Omi binds that reminder to **that
place**, not a time. The next visit, a notch card offers Done / Remind
me tomorrow.

This re-implements the reusable core from abandoned PR #12603
(`ContextReminderStore`) outside `FirstRun/`. Persistence lives at
`Application
Support/Omi/users/<ownerID>/ContextReminders/context-reminders.json`.
Nothing ever shipped under the abandoned `FirstRun/` segment, so there
is no file to migrate.

Creation is an explicit tool (`create_context_reminder`) on
`desktop_chat` and `realtime_voice`. The place is captured from the live
frontmost window; the model only passes `{ text }`. Timed reminders stay
on `create_action_item`. Context switches are observed from the existing
`AssistantCoordinator.fireContextSwitchOnAllAssistants` path. Cards go
through `NotificationService` (`respectFrequency: false`, `isPersistent:
true`), assistant id `context_reminder`, kind `.task`. Linking a backend
action item is best-effort: the local reminder is the source of truth.

Windows is out of this PR (macOS frontmost-window feature; Windows
already has other macOS-only voice tools).

## Failure class

Failure-Class: none

## Product invariants affected

- **INV-CHAT-1** — `Chat/`, `ChatToolExecutor.swift`,
`FloatingControlBar/**`, `agent/src/runtime/**`. Preserved: no second
transcript or session store; the reminder JSON is owner-scoped place
state, not conversation history. Notifications still go through
`NotificationService`. The new tool is a physical `swiftTool` on the
existing chat/voice surfaces.
- **INV-AGENT-*** — `desktop/macos/agent/src/runtime/**`. Preserved:
Identity / Authority / Lifecycle unchanged. This only adds a physical
tool to the canonical manifest (`piAndStdio()`,
`desktop.tasks.readwrite`) and regenerates surfaces.
- **INV-AUTH-1** — `OmiApp.swift` is on the glob. Preserved: the only
addition is `ContextReminderCoordinator.shared.start()`. No
session-invalidation, 401, or auth-recovery change. Owner scoping is the
existing `RuntimeOwnerIdentity` fence plus `runtimeOwnerDidChange`.
- **INV-UI-1** — the new card uses white/neutral chrome only (no
purple). Named because this PR adds a user-visible card; brand is
unchanged.

## Verification

- `cd desktop/macos && xcrun swift build -c debug --package-path
Desktop` — **Build complete** (175.90s). Local Xcode 26.6 / 17F113.
- `cd desktop/macos && xcrun swift test --package-path Desktop --filter
ContextReminderCoordinatorTests --filter ContextReminderStoreTests
--filter CreateContextReminderToolTests` — **10 passed**, 0 failed.
- `cd desktop/macos && xcrun swift test --package-path Desktop --filter
ChatDiscoverabilityTests` — 22/23 passed.
`testDesktopPromptMentionsEveryDesktopCapability` passed (includes
`**create_context_reminder**`).
-
`ChatDiscoverabilityTests.testDesktopCapabilitiesExistInAgentToolDeclarations`
fails on this branch with `Missing agent tool declaration for
look_at_frame`. It fails identically at origin/main
`15eca77b622ee5ed84d3542a46a4027993f69896` (verified on a throwaway
worktree detached at that commit, with none of this branch’s changes
present). It is not caused by this branch and is not fixed here.
- `cd desktop/macos && python3 scripts/check-e2e-flow-coverage.py
--strict --base $(git merge-base origin/main HEAD)` — **0 uncovered**
(13/13 covered). Context reminder store/coordinator/card are on
`floating-bar-functional.yaml` (notch cards; same surface as
FirstRealApp). The coordinator is also on `ai-chat-settings.yaml` (the
flow that already covers `AssistantCoordinator`).
- `cd desktop/macos && python3 scripts/desktop-flow-lint.py` — **OK**
(74 flows, 188 registered actions).
- `cd desktop/macos/agent && npm run build && node
--experimental-strip-types scripts/generate-tool-surfaces.mjs` — wrote 4
files (manifest `5464d1d592f7`).
- `cd desktop/macos/agent && npx vitest run
tests/omi-tool-manifest.test.ts` — **30 passed**.
- `cd desktop/macos/pi-mono-extension && npx --yes tsx --test
index.test.ts` — **111 passed**, including `create_context_reminder:
["text"]`.
- `desktop/macos/scripts/swift-format-wrapper.sh lint` on every
first-party Swift file this PR touches — **clean**.
- `desktop/macos/scripts/run-swift-ci.sh --select-toolchain` — **could
not run**. This Mac has Xcode 26.6 at `/Applications/Xcode.app`; CI’s
`/Applications/Xcode_16.4.app` is not installed, so local `swift build`
cannot see the strict-concurrency errors CI rejects.

- `scripts/pr-preflight --pr-body-file PR-BODY.md` — **passed** (24
checks in 65.52s), including `desktop-swiftlint` (0 violations) and
`desktop-main-actor-xctest-hooks`.

Not run: full `scripts/run-swift-ci.sh --test` (same missing 16.4
toolchain; also the full suite, not this slice). Backend / Dart / web —
not in this change. Named-bundle / live PTT path — not exercised here;
unit tests cover create, match, persist, owner fence, snooze, done, and
tool dispatch.

## Line-count exceptions

Counts are against this worktree’s starting HEAD `38d95fdca5` (the brief
forbade rebasing; `origin/main` later moved to `c9dc11b7bb`, which also
touches `FloatingControlBarWindow.swift`).

Line-Count-Exception:
desktop/macos/Desktop/Sources/Providers/ChatToolExecutor.swift | 3799 ->
3806 | dispatch `create_context_reminder` onto the existing
ChatToolExecutor switch

Line-Count-Exception:
desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift
| 3112 -> 3116 | one `barNotification` branch to `ContextReminderCard`
(new file) so the freeze file does not take the card body

Line-Count-Exception:
desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift
| 5781 -> 5783 | fall through `.contextReminder` card tap to the
existing open-in-chat path

Line-Count-Exception: desktop/macos/Desktop/Sources/OmiApp.swift | 1656
-> 1657 | start `ContextReminderCoordinator` next to
`FirstRealAppCardCoordinator`


🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/12651?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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