Skip to content

feat(app): end onboarding with a first capture - #21396

Merged
Git-on-my-level merged 10 commits into
mainfrom
lane/onb-m-firstcapture
Oct 13, 2026
Merged

Git-on-my-level merged 10 commits into
mainfrom
lane/onb-m-firstcapture

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The final onboarding screen deferred value for days. In the measured new-mobile-signup cohort, 55% started a recording but only 37% received a conversation in week 1 (iOS 44%, Android 28%). Short phone tests with no transcript account for much of the gap. This change ends setup with a capture choice and an immediate phone-recording payoff.

Changes and evidence

Behavior Implementation Test layer
“How will you capture?” offers Omi, phone, iOS-only Watch, and Skip Completion remains persisted index 9; child routes return to the wrapper before Home replaces it Widget routing, choice/person-property assertions (successful pair or saved device only), persisted-index resolution, Back tests
Omi opens existing pairing; cancel returns to choices; failed attempts retain Connect and How to Pair; success enters Home Additive callbacks through Connect/FindDevices; Home retains the existing CV1 tutorial eligibility gate Widget choice tests, existing pairing-failure regression, real Connect-page render; CV1 physical acceptance not performed
Guided phone capture shows a timer, target, and live transcript Existing CaptureProvider.streamRecording; Finish allowed at any duration with a short-capture confirmation; target 30 seconds; automatic finish at 60 seconds Fake-IO widget tests exercise timer, short-stop warning, Back confirmation, automatic finish, retry, cancellation
Finish requests processing immediately and shows title/summary Existing coordinator Finish/Process Now; exact response and polling only the confirmed conversation id Capture replay executes the actual coordinator; widget tests drive processing → result and confirm no early completion
Empty speech gets the requested explanation, Retry, and Skip Null/404 results always show delayed feedback. Only terminal discarded or completed empty conversations show insufficient-speech feedback. Late transcript is re-read after Finish Empty-result, start-failure, delayed-result and retry widget tests
Watch uses existing paired/app-installed bridge state Instructions vary by state; two-second bridge timeout falls back to instructions; no new Watch capture implementation iOS-only routing and instructions widget tests; no physical Watch acceptance
Analytics remain additive Seven First Capture events, capture_choice/has_omi_device person properties, unified step-exit event with dwell time/skip/platform/exit_reason (answered, skipped, back); restored steps are seeded before listeners; existing per-step events retained Event/property trigger tests, timed step visits and deduplication, generated registry/consumer validation

Review corrections

  • Resume starts the tab controller and step tracker at the restored index, so no phantom auth completion fires.

  • has_omi_device reflects successful pairing or a saved Omi, never a route tap.

  • Short Finish shows a warning; Back confirms before stopping an owned recording.

  • Finish drops recording ownership immediately. Polling stops when its controller is disposed or its attempt changes.

  • Choice, recording, result and empty-result actions are pinned to the bottom safe area; scrollable content stays vertically balanced. Empty feedback has its own title.

  • The result restores the iOS 16+ App Shortcuts/Siri tip with the existing native availability gate.

  • The guided route temporarily owns informational feedback through OmiFeedback; generic capture explanations from feat(mobile): explain empty recordings and instrument onboarding funnel gaps #21398 are suppressed while this page is mounted, and normal info feedback resumes after it is disposed. Error and undo feedback remain available. Tests cover suppression and restoration.

  • Main including fix(onboarding): recover guided voice answers and show a grounded payoff #21401 was merged with a merge commit. Main’s generated files were taken and regenerated from the combined l10n and event catalogs. feat(mobile): explain empty recordings and instrument onboarding funnel gaps #21398 subsequently merged during validation and was also merged normally; its typed processing outcome feeds this lane’s exact response future, and guided feedback ownership suppresses generic notices.

  • Re-review: failed pairing stays on Connect with its in-page error and How to Pair action; only explicit Back/cancel returns to choices. A real-route widget test exercises the failure, opens its guide, and returns with Back.

  • Re-review: short-Finish confirmation no longer drives the underlying button spinner. Tests assert its label remains visible and processing starts only after confirmation.

  • Merged-outcome regression guard: the exact-result future is created only for guided Finish, so ordinary Process Now failures retain main’s handled-error path. A capture-coordinator replay failed before the guard and passes with it.

Screenshots

Light theme, 393×852 logical pixels at 3x. Production widgets, real SF Pro Display/Roboto fonts, local synthetic I/O. Files are under .agent-artifacts/ui-evidence/onb-m-firstcapture/; evidence.json records the reproduction command and limitations.

State iOS Android
Choice iOS Android
Recording, 5 seconds iOS Android
Recording, 30 seconds iOS Android
Processing iOS Android
Result card iOS Android
Empty result iOS Android
Omi hand-off iOS Android
Watch instructions iOS Not offered

Additional reviewed states (delayed result and both confirmations):

Validation

  • Earlier focused Flutter/widget/capture/feedback suite: 84 passed; latest combined first-capture/pairing/IO/large-text/empty-feedback/capture-ownership regression suite: 68 passed. All 23 real-font renders were regenerated, opened and checked, including dialog-presence assertions.
  • Latest full flutter analyze: 93 existing findings; the full analyzer ratchet passes without baseline changes. No new diagnostics in lane files.
  • Earlier pre-integration full hermetic TZ=UTC bash app/test.sh: green (5,374 tests passed; 16 existing skips; 138 protected opt-in spine tests passed). Latest integrated full-suite CI result is recorded below.
  • Event registry, l10n consistency, make preflight, PR-body preflight: green (24 repository preflight checks and 5 PR-metadata checks).
  • Latest head 8c421e923a04d9ac529ee792f62a82bec361900e: Dart Analyze & Tests concluded FAILURE. Analyzer ratchet passed; the full Flutter suite reported 5 failures (5,493 passed, 16 skipped). All five failures reproduce locally in four unchanged test files: device_service_connection_failure_test.dart (launch timeout), apps_category_section_large_text_test.dart (two cases), settings/ai_app_generator_large_text_test.dart, and settings/settings_search_header_stability_test.dart. The corresponding device/apps/settings feature code is unchanged by this lane. These failures remain unresolved; CI is not green. Settings fixes are outside this lane’s ownership.
  • Logs: /private/tmp/onb-m-firstcapture/; CI failure log: review-b-ci-dart-failure.log; local reproductions: review-b-ci-failures-local.log.

Risks and limitations

  1. Recognition, summary generation and networking still determine real latency; processing has a 90-second UI deadline. Offline/batch capture cannot promise the immediate payoff and offers a retry instead.
  2. Process Now can lose a race to websocket finalization. Every null or 404 Process Now result is shown as delayed, not incorrectly labeled insufficient speech; Home can recover it through normal sync/list refresh.
  3. Physical phone, BLE/CV1 tutorial and Watch end-to-end acceptance were not performed. Evidence is hermetic widget rendering and capture-coordinator replay, not production acceptance.
  4. New copy falls back to English in other locales, as authorized for this lane. Generated ARB/localization files make the diff larger.
  5. Shared edits are limited to result/error plumbing, pairing success callback and registry additions. Sibling voice and feedback/telemetry lanes will need normal additive conflict resolution in wrapper/registry/l10n.

Product invariants

  • INV-CAP-1: The existing capture coordinator continues to own phone/pendant hand-off and resume. No new pendant uplink pause or retention policy is added; the capture one-source replay remains green.

Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4351 -> 4376 | Expose the exact existing Process Now response to onboarding while preserving main’s typed outcomes and generic empty-recording feedback; capture orchestration remains in the existing coordinator.

Failure-Class: FC-protocol-status-mapped-to-wrong-cause

This activation flow uses existing capture/server contracts. Review regression: protocol pointer absence was incorrectly assigned the insufficient-speech cause; terminal-only classification and adjacent-status controls now guard it. No backend, flag, workflow, or production-data changes.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T15:23:38.025006Z 8c421e9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7be5b4a4e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@override
Future<ServerConversation?> finish() async {
final response = await capture.finishCaptureWithResult();
_started = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fence a timed-out finish before allowing retry

When Process Now takes longer than the controller's 90-second deadline, Future.timeout returns control without cancelling this finish() future, so the UI enables Try Again and start() begins a new recording on the same IO instance. If the old request then completes, this assignment clears the new attempt's shared _started flag; pressing Back or Skip afterward makes cancel() return early and leaves the phone microphone recording after onboarding has been exited. Track finish/start state per attempt or prevent retry until the timed-out operation is fenced.

AGENTS.md reference: app/AGENTS.md:L106-L110

Useful? React with 👍 / 👎.

_controller = TabController(length: kPageCount, vsync: this);
_controller!.addListener(() {
if (!mounted) return;
_stepTelemetry.enter(_controller!.index);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark acquisition-source skips before advancing

When the user presses the explicit Skip button on FoundOmiWidget, _skip() invokes the same goNext callback as a submitted source, so this new transition tracker exits acquisition_source while skipped is still false. Consequently every acquisition-survey skip is recorded as a completed, non-skipped step, corrupting the onboarding funnel this event was added to measure; pass a distinct skip callback or set the tracker flag before advancing.

Useful? React with 👍 / 👎.

Comment on lines +106 to +108
paired = !failed &&
context.read<OnboardingProvider>().isConnected &&
context.read<OnboardingProvider>().deviceType == DeviceType.omi;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict the Omi pairing handoff to Omi devices

When a user selects any supported non-Omi device from the reused ConnectDevicePage, FoundDevices._devicesList permits the connection and its onboarding callback pops the pairing route, but this type check then silently rejects the successful connection. The generic page includes Apple Watch, Ray-Ban, and other device types, so those users are returned to the choice screen with no error despite having paired successfully; filter this handoff's device list to Omi devices or handle the other successful types explicitly.

Useful? React with 👍 / 👎.

final process = _processInProgressConversationOverride ??
() => processInProgressConversation(throwOnFailure: confirmedProcessing);
final request = process();
_lastProcessRequest = request;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the guided capture's Process Now request attempt-scoped

If another Process Now trigger starts while the guided Finish is awaiting its request—for example, a connected pendant's configured double-tap handler calls forceProcessingCurrentConversation()—this shared slot is overwritten by the later request. finishCaptureWithResult() reads the slot only after its coordinator dispatch completes, so it can return the later request's 404/null or conversation instead of the response for the guided phone capture, incorrectly showing Delayed/Empty or the wrong result. Return the request through the owning coordinator outcome or key it by capture/session generation.

AGENTS.md reference: app/AGENTS.md:L106-L110

Useful? React with 👍 / 👎.

Comment thread app/lib/pages/onboarding/wrapper.dart Outdated
surface: ProductSurface.onboarding,
);
}
_stepTelemetry; // Start timing the first visible step.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Initialize telemetry at the resumed onboarding step

For an already-signed-in user resuming incomplete onboarding, the wrapper constructs this tracker at its default auth index and only moves the TabController to _resumeStep() in the post-frame callback. That automatic move calls enter(), which emits an Onboarding Step Completed event for Auth even though no authentication occurred; every restart can therefore add another false Auth completion and distort step conversion and dwell metrics. Initialize or reset the tracker to the resolved starting index without emitting an exit.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 465eaa1060

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Completion belongs to the persisted wrapper route, even when invoked
// from a phone/Watch child. Replace that owner with Home, not the child.
final owner = ModalRoute.of(context);
if (owner != null) Navigator.of(context).popUntil((route) => route == owner);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wait for completion persistence before popping the result

When a phone or Watch child invokes _complete(), this pops the child before the wrapper's asynchronous OnboardingSyncRuntime.enqueue(completed: true) has succeeded. If that enqueue returns false, the wrapper correctly remains in onboarding and shows an error, but the successful capture result or Watch instructions have already been discarded, leaving the user at the choice screen and forcing them to repeat the flow or skip rather than retry completion. Keep the child mounted until the completion callback reports success, or preserve a retryable completed state.

Useful? React with 👍 / 👎.

Comment on lines +93 to +94
final connected = await Navigator.of(context).push<bool>(omiPageRoute(
builder: (routeContext) => ConnectDevicePage(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bypass pairing when the Omi is already connected

If Omi pairing succeeds but completion persistence fails, OnboardingProvider.isConnected remains true when the user returns to this choice screen. Pressing the Omi option again always pushes ConnectDevicePage, whose connected state hides both the device list and bottom actions, while onConnected is only fired by a new device tap; the user is therefore stranded on a “Pairing successful” page with no way to retry completion except backing out and choosing another path. Detect the already-connected Omi before pushing this route or expose a Continue action for that state.

Useful? React with 👍 / 👎.

fontWeight: FontWeight.w600, fontFamily: Theme.of(context).textTheme.labelLarge?.fontFamily),
key: const Key('onboarding_complete_start'),
label: context.l10n.firstCaptureSkip,
onPressed: _routing ? null : _skip),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable Skip before emitting its completion events

On the capture-choice screen, _skip returns synchronously and never sets _routing, even though its onComplete callback starts an asynchronous persistence operation. OmiButton therefore does not enter its Future-backed loading state, so a normal double tap before enqueue completes calls _choose, emits OnboardingFirstCaptureSkipped, and invokes onSkipped twice; the wrapper's downstream _finishing guard prevents the second save but cannot undo the duplicate analytics events. Disable this action immediately or return the completion Future through the button callback.

Useful? React with 👍 / 👎.

Comment on lines +92 to +93
if (widget.onConnected != null) {
widget.onConnected!();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Drop pairing completion after Connect is dismissed

If the user presses Back while a device connection is still running—especially during handleTap's two-second post-connect settle—the provider can later invoke this goNext closure after ConnectDevicePage has been disposed. The closure still calls onConnected, which performs Navigator.of(routeContext) on the deactivated route context; that throws into OnboardingProvider.handleTap's broad catch, which then marks DeviceProvider disconnected even though the hardware connection succeeded. Check this state's mounted status or otherwise invalidate the pending callback when the route is dismissed.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c421e923a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/lib/l10n/app_fr.arb
"reviewProposalConflict": "Ceci a changé depuis la suggestion de Dream, donc rien n'a été appliqué.",
"itemLinkListTitle": "{count, plural, =0{Aucun élément} =1{1 élément} other{{count} éléments}}"
"itemLinkListTitle": "{count, plural, =0{Aucun élément} =1{1 élément} other{{count} éléments}}",
"firstCaptureTitle": "How will you capture?",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Supply locale-specific translations for the new copy

For every non-English ARB checked, including French here and Arabic, all new firstCapture* values are copied verbatim from English, so users selecting those locales see this entire mandatory onboarding step in English. Generate these keys with actual locale translations rather than English placeholders, as required by the app localization guide.

AGENTS.md reference: app/AGENTS.md:L119-L119

Useful? React with 👍 / 👎.

},
),
OnboardingCompleteScreen(
onSkipped: () => _stepTelemetry.skipped = true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear the skip marker before a non-skip retry

When Skip's OnboardingSyncRuntime.enqueue fails, the wrapper remains on index 9 but this flag is never cleared. If the user responds to the error by completing via Phone, Omi, or Watch, the eventual _stepTelemetry.exit() still emits skipped: true and exit_reason: skipped, misclassifying the successful retry; reset the marker when a non-skip path begins or when the completion save fails.

Useful? React with 👍 / 👎.

static void info(BuildContext context, String message) =>
_show(context, message, kind: OmiFeedbackKind.info, duration: OmiFeedbackTiming.info);
static void info(BuildContext context, String message) {
if (_infoOwners > 0) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the recording-interruption notice

While FirstCapturePage is mounted, it calls ownInfoFeedback(), so this process-wide guard suppresses every informational toast. In particular, a phone socket close calls AppSnackbar.showSnackbar with transcriptionPausedReconnecting in capture_controller.dart, but the guided controller remains in its recording phase and continues telling the user to keep talking; the user therefore receives no indication that transcription has paused. Suppress only the duplicate empty-recording notice or surface the interruption in the guided page.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit bb941f3 into main Oct 13, 2026
46 of 48 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/onb-m-firstcapture branch October 13, 2026 16:02
YinkaAdepoju pushed a commit to YinkaAdepoju/omi that referenced this pull request Oct 14, 2026
…eriment (BasedHardware#21450)

Brings in Nik's paywall A/B test (PaywallRouter, flag paywall-variant) and flag-gated web
onboarding. Resolution:
- openUpgradePaywall: Superwall pilot (when on) -> PaywallRouter arm -> plans sheet; logs
  Paywall Opened once; forceNative carries the web variant's fallback so it never loops.
- Onboarding: the activation ending's paywall asks the router before the onboarding sheet;
  the experiment's end-of-onboarding placement is skipped when the ending already offered a
  plan, so nobody sees two paywalls in a row. Keeps the debug onboarding rerun and the web
  onboarding entry; the first-capture step telemetry stays removed (BasedHardware#21396 revert).
- l10n: main's keys kept; the reverted first-capture strings dropped again; regenerated.
- Flag registry re-rendered; onboarding-activation-flow notes name its PostHog flag/experiment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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