Skip to content

Onboarding#11

Merged
saikumarbt merged 5 commits into
mainfrom
onboarding
Jul 15, 2026
Merged

Onboarding#11
saikumarbt merged 5 commits into
mainfrom
onboarding

Conversation

@saikumarbt

Copy link
Copy Markdown
Owner

No description provided.

saikumarbt and others added 3 commits July 13, 2026 17:20
Onboarding (wires the dead stub):
- 4 steps: value intro → base currency → tap popular brands (real logos)
  → confirm/edit prices with a live spend total → one "Add N" button
  bulk-adds via the create workflow → into the app.
- Gate: signed-in users without the local has_onboarded flag are
  redirected to /onboarding; "Skip" also completes it. Route registered
  in the root Stack. lib/onboarding flag helpers + curated
  constants/onboardingBrands with indicative default prices.
- Dev-only "Reset onboarding" in Settings to re-trigger the flow.
- PostHog: onboarding_started/completed/skipped (counts only).

Fixes:
- Notification deep-link no longer navigates on cold start before the
  router is mounted (was throwing "path.split is not a function"); keeps
  the live tap listener, deferred a tick.
- Sign-in shows friendly inline errors (no account / wrong password)
  instead of a console.error dev overlay, with the sign-up nudge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…aming

- Guest-first: onboarding runs before any auth wall; Home/Settings show
  guest state (Sign in vs Sign out) with a backup/sync nudge.
- Onboarding brand grid now derives from ALL brand icons (not a hardcoded
  subset), with default prices/categories.
- Confirm step: replace the Monthly/Yearly toggle with a single tappable
  cycle chip -> PickerSheet over all real billing cycles, so the spend
  reveal and reminders are correct for weekly/quarterly/etc. Framed as
  "Quick add (optional)" with hand-holding copy pointing to the detail
  screen for the rest.
- Fix react-native-css path.split crash: price TextInput uses auth-input
  class + inline style.
- Remove dev seed (db/seed.ts) so no phantom subscriptions; add
  clearAllSubscriptions + clearAllData and dev "Clear all data" / "Reset
  onboarding" helpers in Settings.
- Update PRODUCTION_PLAN.md to current decisions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Onboarding is now a guided funnel with progress, motion, and a payoff,
built with core Animated + react-native-svg (no new dependencies):

- Steps intro -> goal -> currency -> pick -> confirm -> analyzing -> done,
  each spring-transitioning in, with a top progress bar (n/N).
- A branded guide bubble delivers one short line per step (replaces the
  paragraph subtitles); a "What brings you here?" goal step lightly
  tailors later copy and fires onboarding_goal_selected.
- Confirm reveal counts up (eased) to the real monthly spend; an
  "analyzing your spend" anticipation beat precedes an SVG checkmark +
  confetti celebration with a success haptic.
- Intro shows a single brand mark (fixes the double-"R"); copy rewritten
  to short human lines; type scale enlarged.
- Home: one-time "+" pulse until the first add (persisted via lib/nudges),
  success haptic + count-up hero on add, chevron affordance on cards.

New: components/AnimatedCounter, components/onboarding/{GuideBubble,
ProgressBar,CelebrationOverlay}, lib/haptics, lib/nudges. Character +
one asset renderer (Rive) deferred to the rebrand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f0a7140b-0664-4087-97c4-c987c155f41e

📥 Commits

Reviewing files that changed from the base of the PR and between 7a2455c and b4e52be.

📒 Files selected for processing (5)
  • PRODUCTION_PLAN.md
  • app/(tabs)/index.tsx
  • app/onboarding.tsx
  • components/AnimatedCounter.tsx
  • components/onboarding/CelebrationOverlay.tsx

Summary by CodeRabbit

  • New Features
    • Launched a guided, multi-step onboarding flow with progress, brand/goal selection, billing setup, haptics, and a celebration success screen.
    • Added onboarding quick-add options, celebratory overlay effects, and an animated spending total on Home.
    • Added “On trial” and “Cancelled” tiles to Insights.
  • Bug Fixes
    • Improved sign-in failure messages.
    • Made notification-based deep links more reliable.
  • Improvements
    • Updated tab navigation to be onboarding-first (guest-friendly).
    • Refreshed Home/Settings UX for signed-in vs guest states, including improved subscription add-success and account reset/clear options.

Walkthrough

The PR replaces placeholder onboarding with a multi-step guest-first flow, adds onboarding persistence and routing, creates subscriptions from onboarding selections, removes development seeding, adds data clearing, and updates authentication, home, settings, insights, notifications, and product-plan documentation.

Changes

Guest-first onboarding

Layer / File(s) Summary
Product strategy and roadmap
PRODUCTION_PLAN.md
Updates trial, pricing, currency, roadmap, competitor-adoption, risk, and go-live decisions.
Onboarding flow and presentation
app/onboarding.tsx, constants/onboardingBrands.ts, components/onboarding/*, components/AnimatedCounter.tsx, global.css, lib/haptics.ts
Adds animated onboarding steps for goals, currency, brands, prices, billing cycles, subscription creation, analysis, and celebration.
Onboarding persistence and routing
lib/onboarding.ts, app/(tabs)/_layout.tsx, app/_layout.tsx
Persists completion, redirects incomplete users, registers onboarding, and defers notification navigation until routing is ready.
Subscription data lifecycle
context/SubscriptionsContext.tsx, db/subscriptionsRepo.ts
Removes development seeding and adds hard deletion of subscriptions with reminder cancellation and state clearing.
Guest authentication and subscription screens
app/(auth)/sign-in.tsx, app/(tabs)/index.tsx, app/(tabs)/settings.tsx, components/Insights.tsx, components/SubscriptionCard.tsx, components/SubscriptionFormModal.tsx, lib/nudges.ts
Adds friendly sign-in errors, guest-aware controls, first-subscription nudges, updated insights, success haptics, animated totals, and post-create subscription actions.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Poem

A rabbit hops through onboarding bright,
Picks brands and prices just right.
Confetti twirls, subscriptions grow,
Guest-first paths help the journey flow.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and does not describe the main change in the pull request. Use a concise title that names the primary change, such as adding the onboarding flow or onboarding-first routing.
Description check ❓ Inconclusive No description was provided, so there is no meaningful summary to evaluate. Add a brief description of the change set or its main goal so reviewers can quickly understand the update.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch onboarding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/onboarding.tsx`:
- Around line 216-242: Update addSelected to catch failures from addSubscription
during the selectedBrands loop, surface an appropriate error to the user, and
stop the success flow so setStep("analyzing") is not reached after a partial
write. Preserve successfully persisted subscriptions and ensure the failure path
exits cleanly without reporting an inaccurate added count.
- Line 141: Update the price parsing used by priceFor and addSelected to
normalize comma decimal separators to periods before parsing, so inputs such as
12,99 are preserved correctly. Ensure the “Add N subscriptions” label derives
its count from the same parsed-price validity rule as addSelected, excluding
items whose parsed prices are less than or equal to zero.

In `@components/AnimatedCounter.tsx`:
- Line 23: Replace the render-phase ref initialization in
components/AnimatedCounter.tsx at lines 23-23 with lazy useState initialization
for anim. Apply the same change to addPulse in app/(tabs)/index.tsx at lines
44-44, preserving the existing initial values of 0 and 1 respectively.

In `@components/onboarding/CelebrationOverlay.tsx`:
- Around line 39-63: The CelebrationOverlay animation effect can replay and
invoke completion multiple times when onDone changes identity. In
components/onboarding/CelebrationOverlay.tsx:39-63, keep the animation trigger
independent of the unstable callback by storing the latest onDone in a ref and
stopping the sequence during cleanup; in app/onboarding.tsx:491-497, memoize the
callback passed to CelebrationOverlay with useCallback based on addedCount so
incidental re-renders do not restart the sequence.

In `@PRODUCTION_PLAN.md`:
- Around line 140-142: Update the economics section’s annual revenue assumption
to match the Pro annual price of $39.99/year, approximately $3.33/month, and
ensure the corrected figure is used consistently in downstream COGS and
conversion calculations.
- Around line 23-24: Define and document a migration policy for changing the
app-wide base currency in PRODUCTION_PLAN.md before permitting that setting.
Because existing stored numeric amounts are formatted by lib/notifications.ts
and lib/reminders.ts, either lock the currency once data exists, require a reset
and re-entry of amounts, or explicitly introduce conversion; do not allow
changes that merely relabel existing values.
- Around line 302-303: Update the account and data-boundary plan near the “Data
leak across accounts on one device” and “Clear all data” entries to explicitly
define sign-out behavior: either forbid account switching on a device or require
clearing/namespacing local SQLite data on sign-out, including coverage in the
clear-all-data flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bb56338c-586a-4ede-bb6c-97508062bd0e

📥 Commits

Reviewing files that changed from the base of the PR and between 9b19a4c and 2d0a826.

📒 Files selected for processing (20)
  • PRODUCTION_PLAN.md
  • app/(auth)/sign-in.tsx
  • app/(tabs)/_layout.tsx
  • app/(tabs)/index.tsx
  • app/(tabs)/settings.tsx
  • app/_layout.tsx
  • app/onboarding.tsx
  • components/AnimatedCounter.tsx
  • components/SubscriptionCard.tsx
  • components/onboarding/CelebrationOverlay.tsx
  • components/onboarding/GuideBubble.tsx
  • components/onboarding/ProgressBar.tsx
  • constants/onboardingBrands.ts
  • context/SubscriptionsContext.tsx
  • db/seed.ts
  • db/subscriptionsRepo.ts
  • global.css
  • lib/haptics.ts
  • lib/nudges.ts
  • lib/onboarding.ts
💤 Files with no reviewable changes (1)
  • db/seed.ts

Comment thread app/onboarding.tsx
Comment thread app/onboarding.tsx
Comment thread components/AnimatedCounter.tsx Outdated
Comment thread components/onboarding/CelebrationOverlay.tsx Outdated
Comment thread PRODUCTION_PLAN.md Outdated
Comment thread PRODUCTION_PLAN.md
Comment thread PRODUCTION_PLAN.md Outdated
saikumarbt and others added 2 commits July 15, 2026 12:19
Two quick wins from the reference-flow scan:
- SubscriptionFormModal: after a create, keep the modal open on a
  "Subscription added" prompt with Add another / Done, so users can add
  several in a row (edits still close immediately).
- Insights: show "On trial" and "Cancelled" counts alongside the existing
  spend/active/saved stats.

Also record the net-new reference-scan ideas (social login, spend-over-time
chart, next-month projection, payment history, catalog filters, date
grouping, add-another) into PRODUCTION_PLAN.md, and explicitly reject the
wallet/pay/top-up/transfer payment features as conflicting with our
no-bank-login, local-first positioning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Docs (PRODUCTION_PLAN.md):
- Define base-currency change policy (lock once data exists / reset to
  change; no relabel, no FX), naming the enforcement point + formatters.
- Correct the annual-plan revenue assumption ($8.66 -> $3.33/mo from
  $39.99/yr) and reconcile the downstream COGS figures.
- Define sign-out / account-boundary behavior (no account switching;
  sign-out keeps local data; only Clear-all-data wipes; namespace by
  user id when sync ships).

Code:
- CelebrationOverlay: read onDone via a ref, run the sequence once on
  mount, fire onDone only when finished, stop on cleanup; memoize the
  callback in onboarding so re-renders don't restart it / double-navigate.
- onboarding: normalize comma decimal separators in price parsing
  ("12,99"); derive the "Add N" CTA count from the same price > 0 rule
  addSelected uses.
- Lazy useState init for Animated.Value (AnimatedCounter anim, Home
  addPulse) instead of per-render construction.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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