Skip to content

feat(mobile): clarify the notification opt-in screen - #20930

Merged
Jinwoo-H merged 2 commits into
mainfrom
mobile-notification-notification
Sep 16, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
mobile-notification-notification

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​160 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​159
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​227 $\color{#cf222e}{\Huge{\mathbf{−}}}$​49 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​178

Summary

  • Rewrites the one-time notification opt-in so it explains the new background alerts: you get a notification on this phone when an agent finishes or is waiting, even if the app is closed.
  • Replaces the generic bell icon with looping sample banners (Codex finished / Claude needs input). Reduce Motion keeps them still.
  • Clarifies the small print: alerts go through Orca’s push service after the desktop has been idle for 3 minutes.

The opt-in gate is unchanged. People who already granted OS notifications still see this once, because the old in-app banners did not cover this path.

notification-onboarding-pr.png

Test plan

  • Fresh pair (or clear the push preference) and confirm this screen appears once
  • Confirm title, body, disclosure, and Enable notifications / Not now
  • Confirm the two banners loop in, hold, and fade; Reduce Motion shows them static
  • Confirm session-view onboarding is unchanged
  • pnpm test src/onboarding/ in mobile/

Replace the generic enable-notifications prompt with copy and a looping
banner preview that show background alerts when an agent finishes or is
waiting, even if the app is closed.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one minor suggestion inline.

Reviewed changes

  • Notification-step copy — MobileOnboardingPage.tsx title/body/disclosure rewritten to explain that alerts arrive when an agent finishes or is waiting, even when the app is closed, and that delivery follows 3 minutes of desktop idle.
  • New NotificationOnboardingPreview — two decorative sample banners ("Codex finished", "Claude needs input") that loop in/out via Animated on the native driver, reset and skip animation when the page is off-screen, stay static under Reduce Motion, and are hidden from assistive tech.
  • Styles — shared content padding split into paddingTop: lg / paddingBottom: md, with a notificationContent override for the notification step only.
  • Tests — new preview suite (off-screen skip, active looping, decorative a11y) plus extended page test asserting the new copy and preview presence.

ℹ️ Nitpicks

  • new Animated.Value(active && reduceMotion ? 1 : 0) (lines 25-26) can never see reduceMotion === true on the first render — usePrefersReducedMotion starts at useState(false), so the condition always evaluates to 0. The effect corrects it on the resolved value, so this is harmless, but the ternary reads as load-bearing. Consider initializing to 0 directly, or noting in the effect why the reduced-motion value is reconciled after mount.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The notification onboarding step now renders an animated preview with “Codex finished” and “Claude needs input” banners instead of a bell icon. A shared hook manages reduced-motion preferences for the preview and carousel. The step copy, disclosure text, and layout styles were updated. Tests cover rendering, accessibility, animation behavior, and notification copy.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 520ea

Reduce Motion users can see an unwanted initial onboarding animation. Keep transitions static until the preference is known before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main behavior changes and includes visual proof and a test plan, but it omits most required template sections. It does not provide a Linked Issue, ELI5, Why, Review, Notes… Complete the required template sections. Add the linked issue after “Fixes #”, provide ELI5 and Why sections, document review and compatibility considerations, complete the Agent skill boundary and checklist items, and record the testing pe…
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: clarifying the mobile notification opt-in screen.
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.
Full details: Description check

Explanation

The description explains the main behavior changes and includes visual proof and a test plan, but it omits most required template sections. It does not provide a Linked Issue, ELI5, Why, Review, Notes, AI Disclosure, Agent skill boundary, or completed checklist details. The testing items remain unchecked.

Resolution

Complete the required template sections. Add the linked issue after “Fixes #”, provide ELI5 and Why sections, document review and compatibility considerations, complete the Agent skill boundary and checklist items, and record the testing performed, including platform coverage and command results.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 5ab22dfe-e542-4c0c-9e0b-59dac01c1aa4

📥 Commits

Reviewing files that changed from the base of the PR and between 615b137 and c951078.

📒 Files selected for processing (5)
  • mobile/src/onboarding/MobileOnboardingPage.test.ts
  • mobile/src/onboarding/MobileOnboardingPage.tsx
  • mobile/src/onboarding/NotificationOnboardingPreview.test.ts
  • mobile/src/onboarding/NotificationOnboardingPreview.tsx
  • mobile/src/onboarding/mobile-onboarding-styles.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Extract the duplicated onboarding reduced-motion probe and hold the
banner loop until the OS preference is known, so Reduce Motion users
do not see the first cycle.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 52ed76a2-54ab-44fd-8809-11f50b63caba

📥 Commits

Reviewing files that changed from the base of the PR and between c951078 and 520ea5f.

📒 Files selected for processing (4)
  • mobile/app/mobile-onboarding.tsx
  • mobile/src/onboarding/NotificationOnboardingPreview.test.ts
  • mobile/src/onboarding/NotificationOnboardingPreview.tsx
  • mobile/src/onboarding/use-reduced-motion.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • mobile/src/onboarding/NotificationOnboardingPreview.test.ts
  • mobile/src/onboarding/NotificationOnboardingPreview.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

// Why: the carousel should preserve continuity without overriding the
// device's reduced-motion preference.
duration: reducedMotionEnabled ? 0 : SLIDE_DURATION_MS,
duration: reducedMotionEnabled === true ? 0 : SLIDE_DURATION_MS,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not animate while the reduced-motion preference is unresolved.

useReducedMotionEnabled() returns null until AccessibilityInfo.isReduceMotionEnabled() resolves. A user can select an onboarding choice during this interval. advanceOrContinue() then starts a 280 ms transition because the current condition treats null like false. The shared preview already remains static until the preference is known. Use reducedMotionEnabled === false ? SLIDE_DURATION_MS : 0.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Shared reduced-motion hook — extracted the duplicated probe into mobile/src/onboarding/use-reduced-motion.ts; mobile/app/mobile-onboarding.tsx and NotificationOnboardingPreview.tsx now both import it, with the local copy in the route file deleted.
  • Waits for the OS preference before animating — the hook now returns boolean | null (null until isReduceMotionEnabled() resolves), and the preview loops only once the preference is known, so reduced-motion devices no longer flash a frame of animation. The carousel duration comparison is tightened to === true.
  • Simplified initial values — both sample banners now initialize as new Animated.Value(0) instead of a ternary that could never be true on first render.
  • New regression test — NotificationOnboardingPreview.test.ts gains a case that resolves the preference after mount and asserts the loop does not start until then; it fails if the guard is removed.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit c33a446 into main Sep 16, 2026
22 checks passed
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
* feat(mobile): clarify the notification opt-in screen

Replace the generic enable-notifications prompt with copy and a looping
banner preview that show background alerts when an agent finishes or is
waiting, even if the app is closed.

* fix(mobile): share reduced-motion hook and wait before animating

Extract the duplicated onboarding reduced-motion probe and hold the
banner loop until the OS preference is known, so Reduce Motion users
do not see the first cycle.
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