Skip to content

Referral page: Pocket layout (QR card, milestone timeline, pinned Share) - #24737

Merged
kodjima33 merged 10 commits into
mainfrom
mux/referral-pocket-design
Nov 11, 2026
Merged

kodjima33 merged 10 commits into
mainfrom
mux/referral-pocket-design

Conversation

@kodjima33

@kodjima33 kodjima33 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Nik: "ours looks like shit, just copy from pocket". The referral campaign page (shown only to the preview cohort while OMI_REFERRAL_CAMPAIGN_ENABLED is off) now mirrors Pocket's referral screen:

  • Scannable QR of the referral link with an avatar badge; tapping it copies the link. Screen readers hear one localized "Copy link" button (the QR and avatar are decorative).
  • Two-line bold title, grey subtitle.
  • Milestone timeline card (dashed circles, connector, filled check when earned). Claim pill logic unchanged. Past 1.3x body text the Claim pill moves under its milestone copy (as the payment issue row does), because beside it at the largest sizes the column got so narrow that words split mid-word ("Whe/n 2 frien/ds").
  • Full-width Share pill pinned at the bottom (shared OmiButton: icon, spinner while busy, 56 pt minimum height that grows with text), close control top right. Share sits in the Scaffold bottom bar slot, so copy and error toasts float above it at any text size (UX contract §6).
  • Visible link row, "Your rewards" header, progress counters and the affiliate link are gone, as in Pocket.

Adds qr_flutter 4.1.0 (pure Dart).

Metric: referral page is preview-only today, so no owner-facing move until the campaign launches; goal is share rate on the referral page.

Verification

  • flutter test test/widgets/referral/: 18 passed, 1 skipped; dart analyze clean. Regression tests tap Share right after a copy and retry right after a share failure with no wait for the toast, and check the QR's "Copy link" button semantics plus Share keeping its size with a spinner while busy (all three fail on the previous page source). New: Claim sits beside its milestone at default text and under it at 320 % and still claims (fails without the stacking change: pill top 401 vs copy bottom 2023), and pending_paid_subscription shows the saved-reward note with no Claim while active does not.
  • iPhone 17 Pro simulator, final source, local backend with the preview cohort, light, dark and largest accessibility text: page renders, reopened 3 times from Settings with the same link, QR copy shows "Copied" above Share, and tapping Share while that toast is up opens the native share sheet with the full link.
  • Reward states on the simulator, build of 58d6412: the local backend in preview mode reads the real Firestore-emulator ledger for the preview owner, seeded through the backend's own ledger code (attribute, bind_checkout, settle_order, claim_months, then a paid Pro month through update_user_subscription). State A: 2 qualified orders, 0 claimed, so 2 claimable months (007-010). State B: those 2 months claimed while free, then the paid period requeued the grant behind it, so pending_paid_subscription (011-014). Light, dark, largest accessibility text and dark plus largest; the max-text shots are scrolled to the rewards card and, for the note, to the end of the page above Share. No production data touched.

UI evidence:

  • .agent-artifacts/ui-evidence/referral-pocket/001-mobile-ios-referral-pocket-layout.png
  • .agent-artifacts/ui-evidence/referral-pocket/002-mobile-ios-referral-pocket-reopen.png
  • .agent-artifacts/ui-evidence/referral-pocket/003-mobile-ios-referral-pocket-dark.png
  • .agent-artifacts/ui-evidence/referral-pocket/004-mobile-ios-referral-pocket-max-text.png
  • .agent-artifacts/ui-evidence/referral-pocket/005-mobile-ios-referral-pocket-copied-toast.png
  • .agent-artifacts/ui-evidence/referral-pocket/006-mobile-ios-referral-pocket-share-after-copy.png
  • .agent-artifacts/ui-evidence/referral-pocket/007-mobile-ios-referral-pocket-claimable.png
  • .agent-artifacts/ui-evidence/referral-pocket/008-mobile-ios-referral-pocket-claimable-dark.png
  • .agent-artifacts/ui-evidence/referral-pocket/009-mobile-ios-referral-pocket-claimable-max-text.png
  • .agent-artifacts/ui-evidence/referral-pocket/010-mobile-ios-referral-pocket-claimable-dark-max-text.png
  • .agent-artifacts/ui-evidence/referral-pocket/011-mobile-ios-referral-pocket-pending.png
  • .agent-artifacts/ui-evidence/referral-pocket/012-mobile-ios-referral-pocket-pending-dark.png
  • .agent-artifacts/ui-evidence/referral-pocket/013-mobile-ios-referral-pocket-pending-max-text.png
  • .agent-artifacts/ui-evidence/referral-pocket/014-mobile-ios-referral-pocket-pending-dark-max-text.png

Product invariants affected

none

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

Nik: "ours looks like shit, just copy from pocket". The campaign page now
mirrors Pocket's referral screen: scannable QR of the referral link with an
avatar badge (tap copies the link), two-line title, milestone timeline card,
full-width Share pinned at the bottom and a close control. Claim pill and
pending-reward note keep their existing logic.
@kodjima33 kodjima33 added the mux-proposal Mobile UX improver (MUX) proposal; waits for Nik's ship label Nov 5, 2026

@cubic-dev-ai cubic-dev-ai 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.

3 issues found across 8 files

Confidence score: 3/5

  • referral_page.dart removes the affiliate-program link, and the PR description doesn’t say whether that’s intentional. Restore the referral-affiliate button or document the removal.
  • referral_page.dart replaces the leading back button even though ReferralPage is pushed from Settings, so users lose the expected back control. Restore OmiBackButton in the leading header and reserve the close X for modal surfaces.
  • 20261105-referral-pocket-layout.json announces a layout that users won’t see while the campaign flag is off. Confirm the flag state for this release or hold the changelog fragment until launch.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/changelog/unreleased/20261105-referral-pocket-layout.json">

<violation number="1" location="app/changelog/unreleased/20261105-referral-pocket-layout.json:2">
P2: This note announces the new referral layout, but the PR says the campaign flag stays off, so owners won't see it until launch. Confirm the flag state for this release, or hold the fragment until the campaign ships.</violation>
</file>

<file name="app/lib/pages/referral/referral_page.dart">

<violation number="1" location="app/lib/pages/referral/referral_page.dart:319">
P2: `ReferralPage` is pushed from Settings with `routeToPage`, but this replaces its leading back control with a trailing X. Restore an `OmiBackButton` in the leading header; reserve the close X for modal surfaces.</violation>

<violation number="2" location="app/lib/pages/referral/referral_page.dart:335">
P2: This removes the in-page link to the affiliate program, and the PR description does not mention it. If the removal is unintended, restore the `referral-affiliate` TextButton; if it is intended, note it in the PR description.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@@ -0,0 +1,3 @@
{
"change": "The referral page has a cleaner look: a QR code for your invite link, your rewards on one card, and one Share button."

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: This note announces the new referral layout, but the PR says the campaign flag stays off, so owners won't see it until launch. Confirm the flag state for this release, or hold the fragment until the campaign ships.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/changelog/unreleased/20261105-referral-pocket-layout.json, line 2:

<comment>This note announces the new referral layout, but the PR says the campaign flag stays off, so owners won't see it until launch. Confirm the flag state for this release, or hold the fragment until the campaign ships.</comment>

<file context>
@@ -0,0 +1,3 @@
+{
+  "change": "The referral page has a cleaner look: a QR code for your invite link, your rewards on one card, and one Share button."
+}
</file context>

Center(
child: TextButton(
key: const Key('referral-affiliate'),
onPressed: () => routeToPage(context, _affiliate(context)),

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: This removes the in-page link to the affiliate program, and the PR description does not mention it. If the removal is unintended, restore the referral-affiliate TextButton; if it is intended, note it in the PR description.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/referral/referral_page.dart, line 335:

<comment>This removes the in-page link to the affiliate program, and the PR description does not mention it. If the removal is unintended, restore the `referral-affiliate` TextButton; if it is intended, note it in the PR description.</comment>

<file context>
@@ -256,90 +304,113 @@ class _ReferralPageState extends State<ReferralPage> with WidgetsBindingObserver
+                Center(child: _qrCard()),
+                const SizedBox(height: OmiSpacing.xxl),
+                Text(l10n.referralCampaignTitle.replaceFirst('. ', '.\n'),
+                    textAlign: TextAlign.center,
+                    style: OmiType.largeTitle.copyWith(height: 1.12, letterSpacing: -0.6, fontWeight: FontWeight.w800)),
+                const SizedBox(height: OmiSpacing.md),
</file context>

shape: const CircleBorder(),
elevation: 3,
shadowColor: Colors.black.withValues(alpha: 0.25),
child: IconButton(

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: ReferralPage is pushed from Settings with routeToPage, but this replaces its leading back control with a trailing X. Restore an OmiBackButton in the leading header; reserve the close X for modal surfaces.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/referral/referral_page.dart, line 319:

<comment>`ReferralPage` is pushed from Settings with `routeToPage`, but this replaces its leading back control with a trailing X. Restore an `OmiBackButton` in the leading header; reserve the close X for modal surfaces.</comment>

<file context>
@@ -256,90 +304,113 @@ class _ReferralPageState extends State<ReferralPage> with WidgetsBindingObserver
+                shape: const CircleBorder(),
+                elevation: 3,
+                shadowColor: Colors.black.withValues(alpha: 0.25),
+                child: IconButton(
+                  key: const Key('referral-close'),
+                  tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
</file context>

kriegcloud pushed a commit to kriegcloud/omi that referenced this pull request Nov 6, 2026
ubuntu-latest is rolling to ubuntu-26.04, whose default JDK 25 makes Gradle
fail with "Unsupported class file major version 69" (BasedHardware#24737 run
42207263552, twice). The emulator job already pins temurin 21; the compile
smoke and JVM unit test jobs relied on the runner default.
kodjima33 and others added 5 commits November 11, 2026 13:46
…se OmiButton

- Share moves into the Scaffold bottom bar slot, so copy confirmations and
  errors float above it at any text size (UX contract §6); tests now tap
  Share right after a copy and retry right after a failure, no 9 s wait.
- The QR card announces one localized "Copy link" button; the QR and avatar
  are excluded from semantics (qr_flutter's label was hardcoded English).
- Share is the shared OmiButton (pill, expand, ios_share icon, isLoading,
  56 pt minimum height that grows with text) instead of a fixed 58 pt
  FilledButton.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… then share

Final source (911944b) on the iPhone 17 Pro simulator via the MUX
pipeline: light and dark layouts, the largest accessibility text size, the
Copied toast floating above Share, and Share opening the native sheet when
tapped while that toast is still up.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
At the largest accessibility size the Claim pill beside the milestone copy left a column so
narrow that words broke mid-word. Past 1.3x body text the pill moves under the detail, as the
payment issue row does. Adds the large-text claimable and pending-subscription widget tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tion rewards

Light, dark, largest text and dark plus largest captures of a claimable milestone and the
pending paid subscription note, from the 58d6412 build against a seeded emulator ledger.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kodjima33
kodjima33 merged commit cd734f7 into main Nov 11, 2026
51 checks passed
@kodjima33
kodjima33 deleted the mux/referral-pocket-design branch November 11, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mux-proposal Mobile UX improver (MUX) proposal; waits for Nik's ship

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant