Skip to content

feat(waves): onboarding checklist card for new users - #3333

Merged
feruzm merged 6 commits into
developmentfrom
feature/waves-onboarding-checklist
Jul 11, 2026
Merged

feat(waves): onboarding checklist card for new users#3333
feruzm merged 6 commits into
developmentfrom
feature/waves-onboarding-checklist

Conversation

@feruzm

@feruzm feruzm commented Jul 7, 2026

Copy link
Copy Markdown
Member

Mobile counterpart of ecency/vision-web#1116: a dismissible "Getting started" checklist card at the top of the Waves screen for new accounts (younger than 30 days or fewer than 10 posts), nudging the first wave as the first action.

  • Four items derived from the daily quests API and streak state: post your first wave (opens the wave quick-post sheet), vote on a wave, reply to someone, check in to start your streak (opens Perks).
  • Completion latches per user (realm storage wrapper) so the daily quest reset at 00:00 UTC never un-checks an item; one-time "All done" celebration, then hidden. Dismissible at any point.
  • Pure derivation util with jest tests, mirroring the quest chip pattern; copy and semantics identical to the web card.

Full jest suite 595 passed / 0 failures; prettier and eslint clean on touched files.

Summary by CodeRabbit

  • New Features
    • Added a “Getting started” Waves onboarding checklist card with progress, step-by-step actions (post/vote/reply/check-in), and an “All done 🎉” completion state.
    • The checklist appears for logged-in users on both the Waves and feed entry flows, supports dismiss, and routes each step to the right place.
    • Added the full onboarding copy for the new checklist.
    • New onboarding checklist UI styling.
  • Bug Fixes
    • Preserves checklist progress across reloads and quest-window changes, preventing progress from resetting unexpectedly.
  • Tests
    • Added unit tests for eligibility, derived completion rules (including streak/check-in), and persisted progress behavior.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a Waves onboarding checklist for new users. The main changes are:

  • New dismissible checklist card on Feed and Waves.
  • Completion state derived from quests, streaks, and wave-submit latches.
  • Per-user persisted flags for dismissed, done, and celebrated states.
  • Localized copy, styles, and unit tests for the derivation helper.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/screens/waves/children/wavesOnboardingChecklist.tsx Adds the checklist UI and centralizes persisted onboarding state updates across mounted instances.
src/utils/wavesOnboarding.ts Adds the pure eligibility and checklist completion derivation helper.
src/components/quickPostModal/usePostSubmitter.ts Emits the onboarding latch event after a wave submit path produces post data.
src/screens/feed/screen/feedScreen.tsx Mounts the self-gated onboarding checklist on the feed screen.
src/screens/waves/screen/wavesScreen.tsx Mounts the self-gated onboarding checklist on the Waves screen.

Reviews (6): Last reviewed commit: "fix(waves): serialize per-user onboardin..." | Re-trigger Greptile

Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated

@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: d02d9d23b4

ℹ️ 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 src/utils/wavesOnboarding.ts Outdated

const streak = quests.streak?.current ?? 0;
const items = [
item('wave', dailyProgress(quests, 'post') > 0),

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 Derive the Wave item from wave activity

On mobile _submitWave posts through _submitReply with PostTypes.WAVE and a non-empty waves-container parent (src/components/quickPostModal/usePostSubmitter.ts:442-445), and the SDK records useComment broadcasts with a parent as comment activity. The quests endpoint therefore advances the comment quest for a Wave, not post, so using this card's “Post your first Wave” CTA leaves this item unchecked while potentially checking “Reply to someone”; the checklist cannot reach all-done from the intended flow unless the user also publishes a separate long-form post.

Useful? React with 👍 / 👎.

useEffect(() => {
if (state?.allComplete && persisted && !persisted.celebrated) {
setCelebrating(true);
_persist({ ...persisted, celebrated: 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 Preserve latched items when celebrating

When the last unchecked item completes from live quest data, both effects run in the same commit: the latch effect writes { ...persisted, done }, then this celebration write uses the old persisted object and can overwrite storage/state without the newly latched done ids. After the daily quest reset or a remount, celebrated is true but the missing ids are no longer completed, causing the supposedly hidden checklist to reappear with items unchecked.

Useful? React with 👍 / 👎.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@feruzm, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 14b7b071-91ec-4283-af09-8e829d42ba0f

📥 Commits

Reviewing files that changed from the base of the PR and between 95cc7da and 2868a30.

📒 Files selected for processing (1)
  • src/screens/waves/children/wavesOnboardingChecklist.tsx
📝 Walkthrough

Walkthrough

Adds Waves onboarding state derivation, a persisted checklist card, screen integration in Waves and Feed, wave latch emission, and localized onboarding strings.

Changes

Waves onboarding checklist feature

Layer / File(s) Summary
Onboarding derivation logic and tests
src/utils/wavesOnboarding.ts, src/utils/wavesOnboarding.test.ts
Adds onboarding item/state types, isNewAccount, and deriveWavesOnboardingState, with tests covering eligibility, completion, streak handling, persistence latching, and missing-data cases.
Checklist component implementation
src/screens/waves/children/wavesOnboardingChecklist.tsx, src/screens/waves/styles/wavesOnboardingChecklist.styles.ts
Implements the checklist card with persisted dismissal/celebration state, action handling, progress/all-done rendering, and supporting styles.
Wave latch emission
src/components/quickPostModal/usePostSubmitter.ts
Emits the onboarding latch event after wave submission succeeds so the checklist can persist completion.
Screen wiring and translations
src/screens/waves/screen/wavesScreen.tsx, src/screens/feed/screen/feedScreen.tsx, src/config/locales/en-US.json
Renders the checklist for logged-in users in Waves and Feed, and adds the onboarding translation strings.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • ecency/ecency-mobile#3157: Both PRs modify src/screens/waves/screen/wavesScreen.tsx render logic around the TabView and related content area.
  • ecency/ecency-mobile#3201: Both PRs modify src/components/quickPostModal/usePostSubmitter.ts’s _submitWave flow for waves submission behavior.
  • ecency/ecency-mobile#3292: Both PRs modify src/components/quickPostModal/usePostSubmitter.ts, including the wave submission path where the latch event is emitted.

Poem

A rabbit hops with checklist in paw, 🐰
Wave, vote, reply, check-in — no flaw!
Progress bars fill, one step at a time,
A latch event rings, then all stars align,
Onward to Waves, the burrow says hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a Waves onboarding checklist card for new users.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/waves-onboarding-checklist

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: 2

🤖 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 `@src/screens/waves/children/wavesOnboardingChecklist.tsx`:
- Around line 75-101: The onboarding persistence in wavesOnboardingChecklist.tsx
has a race between the latch and celebration useEffect blocks, both spreading
the same persisted snapshot and overwriting each other. Merge the logic in the
wavesOnboardingChecklist component into a single effect (or otherwise ensure one
atomic update) so the newly completed item is latched and celebrated together
from one consistent persisted value before calling _persist. Keep the update
keyed off state, persisted, and state?.allComplete, and preserve the invariant
that completed items never get removed from persisted.done.

In `@src/utils/wavesOnboarding.ts`:
- Around line 26-36: The `isNewAccount` helper assumes `account.created` is
always a string, but `selectCurrentAccount` may provide a truthy partial object
and `created.indexOf(...)` can throw during Waves onboarding rendering. Update
`isNewAccount` to guard `created` with a `typeof created === 'string'` check
before calling `Date.parse`, and when it is missing or invalid, fall back to the
`post_count` threshold logic in the same function.
🪄 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: CHILL

Plan: Pro

Run ID: a1d23b53-afd6-469b-afff-d7158f9862be

📥 Commits

Reviewing files that changed from the base of the PR and between e382c29 and d02d9d2.

📒 Files selected for processing (6)
  • src/config/locales/en-US.json
  • src/screens/waves/children/wavesOnboardingChecklist.tsx
  • src/screens/waves/screen/wavesScreen.tsx
  • src/screens/waves/styles/wavesOnboardingChecklist.styles.ts
  • src/utils/wavesOnboarding.test.ts
  • src/utils/wavesOnboarding.ts

Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated
Comment on lines +26 to +36
export const isNewAccount = (
account: { created: string; post_count: number },
now = Date.now(),
): boolean => {
// Hive timestamps come without a timezone marker but are UTC.
const { created } = account;
const createdAt = Date.parse(created.indexOf('Z') === -1 ? `${created}Z` : created);
const withinWindow =
Number.isFinite(createdAt) && now - createdAt <= NEW_ACCOUNT_WINDOW_DAYS * DAY_MS;
return withinWindow || account.post_count < NEW_ACCOUNT_MAX_POSTS;
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect selectCurrentAccount and the Account type to confirm whether
# `created`/`post_count` can be missing on a truthy currentAccount object.
fd -e ts -e tsx selectors src/redux --type f | xargs rg -nP -A 10 'selectCurrentAccount'
rg -nP -A 5 'interface Account\b|type Account\b' src

Repository: ecency/ecency-mobile

Length of output: 50377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the relevant files first.
fd -e ts -e tsx 'wavesOnboarding.ts|wavesOnboardingChecklist.tsx|selectors/index.ts|account' src | sort

printf '\n## wavesOnboarding.ts\n'
cat -n src/utils/wavesOnboarding.ts | sed -n '1,120p'

printf '\n## wavesOnboardingChecklist.tsx\n'
cat -n src/screens/waves/children/wavesOnboardingChecklist.tsx | sed -n '1,180p'

printf '\n## redux/selectors/index.ts (current account area)\n'
cat -n src/redux/selectors/index.ts | sed -n '160,210p'

printf '\n## account-related type definitions / state shape\n'
rg -n --glob '*.ts' --glob '*.tsx' -A 8 -B 4 'currentAccount|interface Account|type Account|post_count|created:' src/redux src/screens src/utils | sed -n '1,240p'

Repository: ecency/ecency-mobile

Length of output: 33570


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Narrow the search to the specific flow and account shape.
printf '## wavesOnboarding.ts\n'
cat -n src/utils/wavesOnboarding.ts | sed -n '1,140p'

printf '\n## wavesOnboardingChecklist.tsx\n'
cat -n src/screens/waves/children/wavesOnboardingChecklist.tsx | sed -n '1,220p'

printf '\n## selectCurrentAccount and related account selectors\n'
cat -n src/redux/selectors/index.ts | sed -n '170,205p'

printf '\n## Account type / current account state\n'
rg -n -A 6 -B 4 'created:|post_count:|currentAccount' src/redux src | sed -n '1,260p'

Repository: ecency/ecency-mobile

Length of output: 30674


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Focus on the account model and any places that construct/update currentAccount.
rg -n -A 8 -B 4 '\bcurrentAccount\b|post_count|created:' src/redux src/screens src/utils src/providers | sed -n '1,260p'

printf '\n## files that look like account models\n'
fd -i 'account' src/redux src | sort

Repository: ecency/ecency-mobile

Length of output: 18266


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the account slice/reducer to see what shape `currentAccount` can have.
fd -e ts -e tsx 'account' src/redux src | sort

printf '\n## account reducer / slice candidates\n'
rg -n --glob '*.ts' --glob '*.tsx' -A 12 -B 6 'currentAccount\s*:|updateCurrentAccount|setCurrentAccount|selectCurrentAccount' src/redux src | sed -n '1,260p'

Repository: ecency/ecency-mobile

Length of output: 17548


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the onboarding helper signature and its callers.
rg -n -A 12 -B 6 'deriveWavesOnboardingState|isNewAccount\(' src/utils src/screens | sed -n '1,220p'

Repository: ecency/ecency-mobile

Length of output: 15805


Guard created before parsing it

selectCurrentAccount can be a truthy partial object, so created.indexOf(...) can throw while Waves onboarding is rendering. Check typeof created === 'string' first and fall back to the post-count rule.

🤖 Prompt for 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.

In `@src/utils/wavesOnboarding.ts` around lines 26 - 36, The `isNewAccount` helper
assumes `account.created` is always a string, but `selectCurrentAccount` may
provide a truthy partial object and `created.indexOf(...)` can throw during
Waves onboarding rendering. Update `isNewAccount` to guard `created` with a
`typeof created === 'string'` check before calling `Date.parse`, and when it is
missing or invalid, fall back to the `post_count` threshold logic in the same
function.

Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated
Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated
Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated
Comment thread src/screens/waves/children/wavesOnboardingChecklist.tsx Outdated
Chain same-user setItemToStorage calls so on-disk ordering never depends
on AsyncStorage executor internals, and log write failures instead of
leaking unhandled rejections.
@feruzm
feruzm merged commit d55a9e6 into development Jul 11, 2026
11 of 13 checks passed
@feruzm
feruzm deleted the feature/waves-onboarding-checklist branch July 11, 2026 19:33
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