Skip to content

feat(app): flag-gated "Setting up your Omi" onboarding page with store-rating pre-prompt - #20802

Merged
kodjima33 merged 3 commits into
mainfrom
kodjima33/onboarding-setup-rating
Oct 6, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
kodjima33/onboarding-setup-rating

Conversation

@kodjima33

@kodjima33 kodjima33 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

A flag-gated "Setting up your Omi" onboarding page with a store-rating pre-prompt, modelled on the reference Nik sent (Noe's "Setting up your noe" screen).

  • New step between the Knowledge Graph step and "You're all set": a five-row personalization checklist that ticks every 750 ms (active row spinning), then advances once the knowledge-graph prebuild the flow already started has settled (capped at 5 s).
  • 1.2 s in, an adaptive alert (Cupertino on iOS, Material on Android): "While you wait, has Omi been nice to use?" / "Rating us 5 stars really helps us out ❤️". "Yes, I want to support you!" opens the native store review sheet via in_app_review; "Not really" closes it. The page holds until the alert is answered.
  • Gated client-side by PostHog flag onboarding-setup-rating-prompt (project 302298, flag id 935237, created at 0% rollout, fail-closed), read through AnalyticsManager.isFeatureEnabled and prefetched at the voice step. With the flag off the flow is exactly as today, so App Review never sees it. Turn it on by raising the rollout in PostHog. Debug builds can force it with --dart-define=OMI_ONBOARDING_SETUP_RATING_PROMPT=1.
  • Registered in config/feature-flags.yaml; two typed C7 analytics events (prompt shown / answered) wired into the mobile-instrumentation-presence consumer; 11 l10n keys in all 49 locales; changelog fragment added.

Verification

  • flutter test test/widgets/onboarding_setup_page_test.dart test/unit/onboarding_setup_rating_prompt_gate_test.dart → 12 passed (after the heart change too).
  • dart analyze clean on the new files; python3 app/scripts/l10n.py check → ok, 49 locales; event + feature-flag registry checks OK.
  • Driven live on the iPhone 16 Pro simulator (dev debug build, flag forced on): Knowledge Graph → Continue → setup page renders, checklist ticks, alert appears over it, "Yes" and "Not really" both release the page to "You're all set". Screenshots + recordings in ~/Downloads/omi-onboarding-setup-rating/ (1-setup-mid-animation-*.png, 2-setup-rating-dialog-*.png, 3-setup-all-ticked-dialog-holds-yes.png, 4-after-answer-yes.png, setup-yes.mov, setup-no.mov). The screenshots predate the heart glyph change (white heart rendered empty in the simulator; now ❤️).
  • UNVERIFIED: the native review sheet itself (requestReview() is a no-op on the simulator); needs a TestFlight build on a device.

Apple note

Pre-prompting before the native rating sheet is tolerated but discouraged by Apple's guidelines; that is why it ships dark behind the flag.

Product invariants affected

none

Review in cubic

…e-rating pre-prompt

Adds a transitional onboarding step between the Knowledge Graph step and the
"You're all set" completion screen: a five-row personalization checklist that
ticks every 750 ms (active row spinning), then advances itself once the
knowledge-graph prebuild the flow already started has settled (capped at 5 s).
1.2 s in, the adaptive OmiAlertDialog (Cupertino on iOS, Material on Android)
asks "While you wait, has Omi been nice to use?"; "Yes, I want to support you!"
opens the native store review sheet (in_app_review), "Not really" closes it.
The page holds until the alert is answered.

Gated client-side by PostHog flag onboarding-setup-rating-prompt (project
302298, id 935237, created at 0% rollout), read through
AnalyticsManager.isFeatureEnabled and prefetched at the voice step; fail-closed
so the flow is unchanged until the rollout is raised, and store review never
sees it. Debug builds can force it with
--dart-define=OMI_ONBOARDING_SETUP_RATING_PROMPT=1. Registered in
config/feature-flags.yaml; two typed C7 events (prompt shown / answered)
wired into the mobile-instrumentation-presence consumer; 11 l10n keys added
to all 49 locales with scripts/l10n.py.

Verification: flutter test on the new widget + gate tests (16 passed); dart
analyze clean; l10n check ok (49 locales, 3684 keys); check_event_registry
and check_feature_flag_registry OK. Driven on the iPhone 16 Pro simulator
(dev debug build, flag forced on): Knowledge Graph -> Continue -> setup page
rendered, alert over the ticked checklist, "Yes" released the page to
"You're all set". Screenshots in ~/Downloads/omi-onboarding-setup-rating/.
The white heart rendered as an empty glyph on the light alert in the
simulator; the red heart renders everywhere.
@kodjima33
kodjima33 force-pushed the kodjima33/onboarding-setup-rating branch from 0e50d83 to bcccb2a Compare October 6, 2026 10:55
@kodjima33
kodjima33 merged commit a62fbc4 into main Oct 6, 2026
64 of 66 checks passed
@kodjima33
kodjima33 deleted the kodjima33/onboarding-setup-rating branch October 6, 2026 14:53
Git-on-my-level added a commit that referenced this pull request Oct 7, 2026
…mmand capture for Windows/macOS (#20890)

## What changed and why

UI-change PRs now require at least one tracked screenshot, enforced by
the standard checks-manifest so it runs in both the local pre-push gate
and CI Hygiene. Screenshots are siloed under
`.agent-artifacts/ui-evidence/<pr-or-branch>/` with a strict contract
(`<NNN>-<platform>-<slug>.png` + `evidence.json`), and two new
one-command capture tools produce contract-compliant evidence for the
Windows (Playwright E2E) and macOS (`screencapture`) desktop apps.

Motivation: agents (and humans) landing UI changes had no enforced way
to attach visual evidence, so reviewers reviewed rendered behavior
blind. Requiring the artifact — without inspecting its content — makes
visual review cheap and gives future agents in-repo context for the
screens they touch.

Contract (frozen across all three pieces):
- Silo: `.agent-artifacts/ui-evidence/<pr-number-or-branch-slug>/`
- Filename: `<NNN>-<platform>-<slug>.png` — NNN zero-padded 3-digit
ordinal from `001`; platform ∈
`mobile-android|mobile-ios|desktop-macos|desktop-windows|web`; slug
lowercase-kebab ≤40 chars
- `evidence.json` beside the images:
`{"version":1,"images":[{"file","platform","description","captured_by","source"}]}`
(2-space indent, trailing newline)
- Gate passes when the PR body references ≥1 tracked silo image, or
carries the exact line `UI-Evidence: none` (optional ` -- reason`)
- Pre-PR bootstrap works like the Failure-Class gate:
`OMI_PR_BODY_FILE=/tmp/pr-body.md git push`

Pieces:
1. `.github/scripts/check_ui_evidence.py` + 17 hermetic tests +
`checks-manifest.yaml` entries (`ui-evidence` with `requires_pr_body:
true` in both lanes, `ui-evidence-tests`) + PR-template section. Trigger
globs: `app/lib/**/*.dart`, `desktop/macos/Desktop/Sources/**/*.swift`,
`desktop/windows/src/**/*.{ts,tsx}`, `web/frontend/src/**`,
`web/admin/app/**`. Deleted-only UI diffs don't trigger; added images
under the silo are validated against the contract and their
`evidence.json`.
2. `desktop/windows/scripts/capture-evidence.mjs` (+ `pnpm
capture:evidence`, shared `e2e/helpers/capture-helpers.mjs`, 17 vitest
tests): launches the built app exactly like `e2e/bar.spec.mjs`, writes
the PNG and merges `evidence.json`.
3. `desktop/macos/scripts/capture-ui-evidence.sh` (+ hermetic
`tests/test-capture-ui-evidence.sh`): `screencapture` full-screen or
window-targeted via `ctypes` CGWindowList, Screen-Recording TCC
remediation on failure, same contract write.

## Product invariants affected

- none

## How it was verified

All commands run on this branch (and re-run independently by the
reviewer and coordinator):

- `python3 .github/scripts/test_check_ui_evidence.py` — 17 tests OK
- `cd desktop/windows && npx pnpm@10 exec vitest run
scripts/capture-evidence.test.mjs` — 17/17 passed (hermetic, no Electron
launch)
- `bash desktop/macos/tests/test-capture-ui-evidence.sh` — pass
(hermetic; never calls `screencapture`); `bash -n` and `shellcheck`
clean
- `scripts/pr-preflight --pr-body-file <body>` — CI lane dry run: `PR
preflight passed: 15 checks` with `ui-evidence` + `ui-evidence-tests`
selected
- `python3 .github/scripts/run_checks.py --manifest
.github/checks-manifest.yaml --lane ci --list` selects both new entries;
local lane likewise
- CLI fixtures: referenced tracked image → `OK` (exit 0); missing
evidence → `FAIL: UI evidence` with full contract + remediation (exit 1)

Real-path caveat, stated plainly: the two capture tools were validated
hermetically plus launch-env parity review; no Electron app launch or
real screen capture was performed in this lane (no Windows host / TCC
prompt here). First real capture exercises the remaining path.

## Tests

- Gate: `.github/scripts/test_check_ui_evidence.py` (17 cases: trigger
classification incl. deleted-only, escape-line negatives,
tracked-at-HEAD incl. directory/symlink rejection, filename/manifest
validation, glob parity)
- Windows: `desktop/windows/scripts/capture-evidence.test.mjs` (17
cases: filename validator, ordinal allocation, evidence.json
merge/replace/v1 enforcement)
- macOS: `desktop/macos/tests/test-capture-ui-evidence.sh` (bad
platform/slug, NNN padding, merge preserves entries,
replace-by-filename, contract write from fake PNG)

## Failure class (fixes)

Failure-Class: none

## New guards (only when adding a check or ratchet)

This check would have forced visual evidence onto recent UI PRs that
landed without any in-repo artifact for reviewers: #20802 (flag-gated
"Setting up your Omi" onboarding page) and #20744 (knowledge-graph
rebuild UI fix). Not-a-shared-primitive answer: the checker IS the
shared primitive — one contract + one validator consumed by both capture
tools and both lanes; per-platform capture scripts are thin producers
over the same frozen contract rather than N independent guard
implementations.

## UI evidence

UI-Evidence: none -- tooling-only change; the diff touches no product UI
source (check/tests/manifest/template/capture scripts only), so there is
no product screen to screenshot.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/20890?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>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/20890?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F20890&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-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