Repository navigation
design: device-first onboarding + soft trial paywall prototype (Graphite / Aurora) - #21412
reidofpa-cell wants to merge 7 commits into
Conversation
Clickable Flutter prototype of a device-first first-run flow: pairing gates onboarding, users without an Omi are sent to buy one and wait for delivery, and onboarding ends in a soft paywall with a 3/7/14/30-day trial-length test. Two visual directions share one flow. Self-contained under prototypes/, so it does not touch app/. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
… buy screen Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
|
Thanks @reidofpa-cell — this is a thoughtful, well-structured prototype. I reviewed the full diff; some notes for the maintainers. Engineering: clean as a standalone package. Everything lives under Two product flags for maintainer review:
Minor: the description says this was opened as a draft, but the PR isn't marked as one — flipping that would signal "feedback wanted, not merge" clearly. Leaving the direction decisions to the maintainers; from a code-quality standpoint this is a strong contribution. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…gated web onboarding (#21450) ## What changed and why Mobile free→paid conversion is ~20% against ~50% for Pocket/Plaud. Nik is trialing several paywall redesigns and wants each one split-tested through PostHog, switchable per variant, and ideally changeable over the air. This PR adds that framework and the first variant. **Paywall A/B test (`paywall-variant`, PostHog multivariate flag 957521, experiment 482365, dashboard 2207880)** - `PaywallExperiment` resolves the arm once per session from the flag + payload; anything unexpected is `control`. Debug builds can force an arm with `--dart-define=OMI_PAYWALL_VARIANT=outline|web`. - `PaywallRouter.openVariant` sits in front of every opener (usage page incl. the locked-row/deep-link routes, chat quota, freemium meter, contextual plans). Control, paid readers and hidden-subscription-UI builds (App Review) return false and the `PlansSheet` opens exactly as before. - `outline` = native port of the soft paywall from #21412 (Graphite direction) on the real catalog (Unlimited tier, yearly/monthly, saving derived from prices) and the shared checkout (`PaywallCheckout`, the same Stripe session + webview + analytics the sheet uses). "Use Free Plan" is always visible. - `web` = a webview rendering the page named in the payload (`web/paywall/index.html`, deployed at https://omi-paywall.vercel.app). The page only renders; checkout stays native via a JS bridge. Dead page (error, 4xx/5xx, 10 s silence) falls back to the native sheet (`forceNativePaywall`). - Payload `onboarding_paywall: true` adds a placement at the end of first-run onboarding (variants only; control is unchanged). - Exposures: `$feature_flag_called` once per analytics identity and arm, control included (the denominator), recorded by the router right before any paywall opens; the SDK's own exposure events are off. PostHog Experiments attribute Upgrade Succeeded, new MRR, dismissals and Product Error per arm; `$feature/paywall-variant` is registered as a super property for breakdowns. New events `Paywall Variant Shown` / `Paywall Variant Fallback`; `onboarding` added to the paywall source enums. **Web onboarding (`onboarding-webview`, flag 957522, 0%)** - After sign-in and consent, `OnboardingWebviewGate` can route to `WebOnboardingPage` (`web/paywall/onboarding.html`). Bridge: `set_name`, `permission` (notifications/location/background via the existing `PlatformOnboardingPermissionsSource`), `complete`, `fallback`. Completion stays in the wrapper (`_finishOnboarding`, shared with the native completion screen). Any failure lands on the native step the reader left off at. - Debug builds: `--dart-define=OMI_ONBOARDING_WEBVIEW_URL=https://…` and `OMI_ONBOARDING_RERUN=1` to walk onboarding again on a signed-in account. Adding a variant later: native = one new widget + a `PaywallVariant` case + a variant row in the flag; web = edit the page and redeploy, no app release. Both flags are live with control at 100% / rollout 0%, so no user sees any change until the split is set once this build is in the stores. ## Product invariants affected none ## How it was verified Simulator (iPhone 16 Pro, dev flavor built against the production profile + api.omi.me with a local, uncommitted profile-guard bypass; signed in as the free test account [email protected] via a Firebase custom token through the VM service, the repo's documented simulator workaround). Screenshots in `.agent-artifacts/ui-evidence/paywall-ab/` (evidence.json inside).    - `--dart-define=OMI_ONBOARDING_RERUN=1 OMI_ONBOARDING_WEBVIEW_URL=https://omi-paywall.vercel.app/onboarding OMI_PAYWALL_VARIANT=outline`: after launch the web onboarding page rendered inside the app with the name pre-filled; Continue → step 2 greeted by name (set_name reached native); Location → native request → status posted back and the page re-labelled the button; Start using Omi → native completion ran and the end-of-onboarding placement showed the Outline paywall with the prod catalog (Unlimited $269.91/yr shown as $22.49/mo, $29.99/mo, Save ~25%, 300 free minutes from the subscription). Upgrade to Unlimited → real Stripe Checkout for Omi Unlimited v2 at $269.91/yr in the shared payment webview (cancelled, nothing paid) → back on the paywall → Use Free Plan → Home. - Same build, in-app entry: Settings → Plan & Usage → Upgrade → Outline paywall; X → back to Plan & Usage. - `OMI_PAYWALL_VARIANT=web`: Plan & Usage → Upgrade → the webview paywall (omi-paywall.vercel.app) with prices and name from the bridge URL and the native close overlay; its Upgrade button → the same native Stripe session (cancelled) → Use Free Plan → Plan & Usage. - Analytics (same build with the PostHog project token in the local dev env): after opening and dismissing the paywall from Plan & Usage, PostHog project 302298 received for the test account, within ~1 minute: `$feature_flag_called` (`$feature_flag=paywall-variant`, `$feature_flag_response=outline`), `Paywall Opened` (source usage_page), `Paywall Variant Shown` (variant outline, source usage_page) and `Upgrade Modal Dismissed`, every one carrying `$feature/paywall-variant`. (That property read `control` in the debug run because the SDK reports the server's assignment while the dart-define forced the arm; without the override both agree.) - `flutter analyze` clean on every touched file; `flutter test`: 40 unit/widget tests pass (paywall_experiment_test 13 incl. identity scoping and mid-read account switch, paywall_router_test 3 incl. control exposure and hidden/paid readers, analytics_is_feature_enabled_test incl. per-identity exposure dedupe, onboarding_webview_gate_test 5, outline_paywall_page_test 4, onboarding_setup_rating_prompt_gate_test). `make preflight` passes (ui-evidence included). - PostHog objects created with control at 100%: flag 957521 (`paywall-variant`, payloads set), flag 957522 (`onboarding-webview`, 0%), experiment 482365 (draft, not started), dashboard 2207880 (every metric broken down by `$feature/paywall-variant`). Not verified: a completed purchase (no live charge was made); the chat-quota and freemium-meter openers only through the shared router (same code path as the usage page); Android. ## Failure class none **Exposure dedupe, verified on device (Oct 14, prod backend, uid nikbasedhardware):** the first `$feature_flag_called` per identity and arm reaches PostHog and spawns `$experiment_exposure` (fresh arms sent through `recordFeatureFlagExposure` today all landed within seconds). A repeat of an already-reported (identity, flag, response) pair is dropped downstream of the app (SDK/PostHog side — a raw HTTP repeat lands, the same event through the SDK does not), so the in-app once-per-identity set and PostHog agree: exposure counts once per person per arm, which is exactly what the experiment needs.
…and flag-gated web onboarding paywall-variant multivariate flag (PostHog 957521) decides which paywall a free reader sees: control = the shipped PlansSheet, outline = native port of the soft paywall from PR BasedHardware#21412, web = a webview whose page is the variant (changed over the air). One router in front of every opener; paid readers and App Review builds (subscription UI hidden) never see a variant. Exposures are emitted as $feature_flag_called once per arm so PostHog Experiments attribute conversion, revenue, dismissals and Product Error per arm; every later event carries $feature/paywall-variant. onboarding-webview flag (957522) renders first-run onboarding from a web page after sign-in and consent; completion stays native. Both webviews fail open to the native UI on error, 4xx/5xx or a 10 s silence. Web pages: web/paywall (omi-paywall.vercel.app).
…from main (#21782) ## Summary - Commits Reid's `prototypes/device_first_onboarding` (from #21412) plus the webview bridge patches that the live https://omi-reid-onboarding.vercel.app build already runs: `OmiOnboarding.postMessage` bridge (`bridge*.dart`), embed mode in `main.dart`, `flow.dart` hooks, and `web/index.html` that posts `ready` before Flutter boots. - Adds `.github/workflows/reid_onboarding_vercel.yml`: on push to `main` touching the prototype, run its flow tests, `flutter build web --release` (Flutter 3.44.5, same pin as mobile-app-checks), and `vercel deploy --prod` into the existing project (`VERCEL_TOKEN` repo secret, `VERCEL_ORG_ID` / `VERCEL_PROJECT_ID_REID_ONBOARDING` repo variables, already set; classified in `config/deployment-setting-classification.json`, registered in `.github/ci-budget.yaml`). - Concurrency group `deploy-reid-onboarding-vercel-production`, `cancel-in-progress: false`; `workflow_dispatch` for a manual redeploy. Before this the site was three manual CLI uploads from a scratch directory and the patched source was not in git. ## Test plan - [x] `flutter test test/flow_test.dart` locally: 90 passed - [x] `flutter build web --release` locally from the committed tree; `build/web/index.html` carries the bridge handshake - [x] `actionlint -shellcheck ""` and `check_workflow_apt_network_bounds.py` clean - [ ] After merge: workflow run green, Vercel deployment tagged with the main SHA, the embed URL in the `onboarding-variant` flag payload still serves ## Product invariants affected none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/21782?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="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/21782?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F21782&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-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
…from main Commit Reid's device_first_onboarding prototype (PR BasedHardware#21412) with the webview bridge patches that the live omi-reid-onboarding.vercel.app build already carries (OmiOnboarding.postMessage bridge, embed mode, index.html ready handshake), and add a workflow that rebuilds it for web and publishes it to the Vercel project on every push to main touching the prototype. Until now the site was uploaded by hand from a local build and the patched source lived nowhere in git.
Pocket-style flow: sign in, paywall (web checkout or App Store), a one-time 30-day winback on close, then soft setup and required pairing. Adds the main app screens mirroring app/lib with sample data, the Aurora Light look with Instrument Serif headlines, and a launcher that keeps the device-first v1 flow for comparison. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp
|
Since my last review: addressed (README now documents both flows, a real-vs-stubbed table, and the App Store web-checkout region caveat; tests now cover the app screens and the paywall-first flow end to end) - still open (the direction decisions below; the PR is also still not marked draft) - newly introduced (the paywall-first flow drops the Data & Privacy consent step v1 had, and the default look is now glow-based Aurora Light). Verdict: the prototype engineering remains clean and the new material is high quality; this still needs a product-direction ruling before anything moves toward the app. New-code notes:
Blast radius: none on the shipping app - everything sits under prototypes/, no dependencies beyond Flutter, publish_to: none. USER IMPACT: none until a direction is adopted - this adds a standalone design prototype; users see nothing different. What I'd still want as a reviewer: a maintainer call on (1) paywall-first vs device-first ordering and where the data-consent step lives, and (2) whether a glow direction can ship given the brand policy. Flipping the PR to draft would keep the "feedback wanted, not merge" framing explicit. Human review needed for these two design decisions; no engineering blockers found. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What changed and why
A clickable design prototype (not production code) of a device-first first-run flow, in two visual directions, for Nik to review. Proposed with Reid Moncada.
TrialLengthinlib/src/content.dart); headline, button, caption and reminder day follow the length.DfTheme), so mapping a direction ontoOmiColors/OmiTypelater is mechanical.It lives in
prototypes/device_first_onboarding/as a standalone Flutter package that depends only on Flutter. It does not touchapp/, so it can't affect the shipping app. Theapp/libUX contract and ARB localisation rules don't apply until a direction moves into the app; the README describes that path. Opened as a draft for direction/feedback, not to merge as is.Figma: "Omi — Paywall Redesign", pages E · Device-first · Graphite and F · Device-first · Aurora.
Product invariants affected
none
How it was verified
Flutter can't be installed in my sandbox, so I ran checks on GitHub Actions in my fork (Flutter 3.44.5, matching
mobile-app-checks.yml), on a fork-only branch whose sole workflow is the check below:I reviewed the rendered screens (below) for both directions. Not verified: running on a physical device. To try it:
flutter create --platforms=ios,android,web . && flutter runinside the folder; the launcher picks direction and trial length.Tests
test/flow_test.dart:test/screenshots_test.dart(tagscreenshots) renders review images only.UI evidence
UI-Evidence: none -- standalone prototype outside app/; screens rendered by flutter test in CI and shown below.
Graphite

Aurora

Open questions for review
trial_period_daystoday, or App Store / Play intro offers.Failure-Class: none
🤖 Generated with Claude Code
https://claude.ai/code/session_01F4DaU8i2iCWabU1xfM1wQp