Skip to content

feat(desktop): onboarding three-doors ask demo, screen context in chat history, semantic_search text fallback - #12565

Merged
kodjima33 merged 5 commits into
mainfrom
kodjima33/onboarding-three-doors
Sep 1, 2026
Merged

kodjima33 merged 5 commits into
mainfrom
kodjima33/onboarding-three-doors

Conversation

@kodjima33

@kodjima33 kodjima33 commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Onboarding's ask demo ("Here's the fun part") now opens a bundled three-door riddle page and the voice hub can actually answer all three doors.

Onboarding step

  • The page (Resources/three-doors.html) opens only from a new "Open the doors" button; "Skip for now" appears only after it was opened. "Open the doors again" reopens it.
  • The page is rendered per user with the real push-to-talk chord and this bundle's URL scheme (Launch Services drops fragments on file: URLs, so the chord is baked into the HTML).
  • Opening the doors starts Rewind capture with the home view's gates (setting on, Screen Recording granted, keys loaded). Capture used to start only after onboarding completed, so screen history was empty during the demo.
  • While the step is active the kernel gets the demo's content (riddles + answers) as response context and the voice hub gets it in its system instruction (RealtimeHubTools.systemInstruction(onboardingDemoContext:)). Door 3 ("last word of the first riddle") is answerable even before any frame is OCR'd or embedded (measured on a named bundle: 156 s from capture start to searchable text).
  • Finishing opens <scheme>://onboarding/doors-complete: the app comes forward and the step shows Continue. A "Back to Omi" button does the same.
  • Bridge action onboarding_open_doors drives the step without the cursor.

Screen text in chat history (voice turns)

  • The accepted report_screen_observation text is journaled as metadata.screen_context on the user row; the kernel surfaces it per turn as recentTurns[].screenContext (bounded to 800 chars, historical) with a guidance line. "Do you remember what that page said?" resolves from conversation history.

semantic_search text fallback

  • When the vector pass returns nothing (embeddings flush in 60 s batches), fall back to the screenshots FTS index, newest first, same OCR preview and citations. Verified live: vector returned 0 results → text fallback returned 1 results.

Verification

  • swift test --filter 'ThreeDoorsDemoPageTests|VoiceTurnJournalTruthfulnessTests|HubSystemInstructionTests|KernelContractWireTests|MessageMetadataTests': 60 passed.
  • npx vitest run tests/context-snapshot.test.ts tests/conversation-journal.test.ts tests/context-cache-delivery.test.ts tests/context-snapshot-turn-revision-index.test.ts: 92 passed.
  • Named bundle omi-doors (this branch) exercised on the step: onboarding_open_doors → page opened with rendered key, log SBOnboarding: screen history capture for the demo started, log RealtimeHub: onboarding demo note included in voice instructions (533 chars); step screenshots before/after opening. Nik ran the three doors by voice on builds About Firebase #4–Fixes boot #6.
  • UNVERIFIED in CI: the voice-lane answer itself depends on a spoken turn.

Product invariants affected

  • INV-AGENT-*
  • INV-AUTH-1
  • INV-CHAT-1
  • INV-VOICE-1

Failure-Class: none

Review in cubic

The screen-demo step ("Here's the fun part") used to say "ask me about it,
out loud" with nothing specific on screen, and a third of users skipped it.
It now opens a bundled three-door riddle page in the default browser as soon as
push-to-talk is armed: a typed riddle, a timed question nobody knows offhand,
and a recall question about text that is no longer on screen. The page reads
the user's push-to-talk chord from the URL fragment so its hint matches the
key they chose. Step copy points at the page; an "Open the doors again"
button reopens it.

Verification: swift test --filter ThreeDoorsDemoPageTests (3 passed); local
named bundle exercised in the follow-up commit's PR body.
…ame is embedded yet

OCR embeddings flush in 60-second batches, so a question about something read
a moment ago found no vector hits and the model answered that it had never
seen it. When the vector pass returns nothing, search the screenshots FTS
index (written with the frame) and return the newest matches with the same
OCR preview and citations.

Verified live on the omi-doors named bundle: 'search_screen_history("riddle")'
logged 'vector returned 0 results' then 'text fallback returned 1 results'.

Failure-Class: none
…open, demo note, Back to Omi; journal screen context on voice turns

Onboarding step:
- The three-doors page opens only from the step's "Open the doors" button; Skip appears only after it was opened.
- The page is rendered per user with the real push-to-talk chord and this bundle's URL scheme (Launch Services drops fragments on file: URLs, so the chord is baked into the HTML).
- Opening the doors starts Rewind capture (same gates as the home view); capture used to start only after onboarding, so screen history was empty during the demo.
- While the step is active, the kernel receives the demo's own content (riddles and answers) as response context and the voice hub gets it in its system instruction; door 3 ("last word of the first riddle") is answerable even before any frame is OCR'd or embedded (measured: 156 s from capture to searchable text).
- Finishing the page opens <scheme>://onboarding/doors-complete: the app comes forward and the step shows Continue. A "Back to Omi" button does the same.
- Bridge action onboarding_open_doors drives the step without the cursor.

Voice turns now journal what Omi saw: the accepted screen observation is stored as metadata.screen_context on the user row and the kernel surfaces it per turn as recentTurns[].screenContext (bounded, historical), so "do you remember what that page said?" resolves from conversation history.

Verification: swift test (ThreeDoorsDemoPageTests 4, VoiceTurnJournalTruthfulnessTests, HubSystemInstructionTests, KernelContractWireTests pass); vitest context-snapshot/conversation-journal/context-cache-delivery (92 pass); omi-doors named bundle exercised on the step via omi-ctl (open doors, capture started, page rendered), screenshots in PR.
… the doors demo

Move the semantic_search text fallback into ChatToolExecutor+ScreenTextFallback.swift, register
onboarding_open_doors from the realtime-hub bridge extension, hold the demo note on
ThreeDoorsDemoPage.activeModelNote, and fold the remaining insertions so no ratcheted file grows.
@kodjima33
kodjima33 merged commit 94ab022 into main Sep 1, 2026
@kodjima33
kodjima33 deleted the kodjima33/onboarding-three-doors branch September 1, 2026 22:05
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