Skip to content

fix(mobile): reuse current workspace on notification taps - #20310

Merged
Jinwoo-H merged 2 commits into
mainfrom
fix/mobile-notification-resume
Sep 13, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
fix/mobile-notification-resume

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28

Tapping a notification for the workspace already open on mobile previously pushed another copy of that screen. Reuse the focused workspace route and update its params, preserving screen state while selecting the notification’s agent tab. Cold navigation and navigation to a different workspace retain the existing path.

Clarify that workspace suppression applies only while Orca is open. Existing policy already checks foreground app state; add regression coverage for backgrounding during asynchronous eligibility reads. No background suppression defect has been reproduced.

Validation: 4,513 mobile tests passed (3 skipped), typecheck and lint passed, Android arm64 release build passed. Navigation tests cover route identity reuse and different-workspace isolation; no device UI verification of the new navigation path yet.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 9601df19-4326-4601-8cce-e0a34e16cd7a

📥 Commits

Reviewing files that changed from the base of the PR and between eedd356 and 68cd4a5.

📒 Files selected for processing (4)
  • mobile/src/navigation/host-stack-navigation.ts
  • mobile/src/notifications/NotificationDeliverySection.tsx
  • mobile/src/notifications/notification-route-coordination.test.ts
  • mobile/src/notifications/push-receive.test.ts

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


📝 Walkthrough

Walkthrough

The host stack now accepts an optional worktreeId and supports SET_PARAMS dispatches. Notification navigation reuses the focused route when both host and workspace match, and pushes a new route for a different workspace. Tests cover both navigation cases and foreground notification delivery when the app backgrounds during host eligibility lookup. The notification preference hint now describes workspace-specific suppression while Orca is open.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to ed417

No actionable merge-blocking risk remains in the reviewed changes.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main change, rationale, behavior boundaries, regression coverage, and validation results. It omits required template items, including a Linked Issue, Visual Proof or an ex… Add the required template sections. Provide a linked issue, add before/after visual proof or write N/A with a reason, complete the Testing and Checklist items, and complete the AI Disclosure section when applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 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 summarizes the primary change: reusing the current workspace when a notification is tapped.
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 change, rationale, behavior boundaries, regression coverage, and validation results. It omits required template items, including a Linked Issue, Visual Proof or an explicit N/A explanation, checklist status, and AI Disclosure details where applicable.

✨ 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.

@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

  • navigateToHostStackRoute now detects that the notification's session route is already the focused route in the committed host stack (matching name, hostId, and worktreeId) and reuses it with a targeted SET_PARAMS dispatch instead of pushing a duplicate screen, returning an already-inactive controller.
  • HostStackRootNavigation.dispatch accepts the new SET_PARAMS action shape (target = host-stack navigator key, source = focused route key); HostStackNavigationRoute.params gains worktreeId.
  • Two navigation tests cover the reuse path (no push, exact action shape, inactive controller) and isolation when a different workspace is focused on the same host.
  • NotificationDeliverySection copy now reads "Skip alerts for this workspace only while Orca is open."
  • A new push-receive test pins that a foreground eligibility read overtaken by backgrounding does not suppress the push.

Verified SET_PARAMS in the installed @react-navigation/[email protected] merges params rather than replacing them, so existing name/created/warning route params survive; only paneKey is overwritten. The 5 related mobile suites pass (37 tests), and oxlint is clean on the changed files.

Pullfrog  | View workflow run | Using openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

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