You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): save drafts to the phone while the desktop is offline - #39464
The phone app keeps chat drafts and queued messages in its own encrypted store, so they survive Orca being closed. But while the desktop was unreachable, the app held every save back until the desktop came back. Close Orca during that time and the save never happened. Now saves to the phone's own store go through at once, desktop or not.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$15
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$15
Prod
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$4
$\color{#cf222e}{\Huge{\mathbf{−}}}$1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$3
What Changed
Before: the shell holds every page request until the connection's verdict opens (perf(mobile): render the cached page build first and talk only after the connection's verdict #39174), except a short list of phone-only native verbs. native.store.rows, the page's device-store verb, wasn't on that list. A draft typed or a message queued while the desktop was out sat in the bridge until the phone reconnected, and was lost if Orca closed first.
After:native.store.rows is on the phone-only list in bridge-host-verdict-hold.ts. The shell serves it from the phone's own store, scoped to the host as before, so it never needed the desktop.
Why
The store verb never reaches the desktop (serveDeviceStoreVerb in MobileWebShellScreen.tsx), so holding it for the desktop's verdict protects nothing. It only delays writes whose whole point is to outlive a disconnect. This was found while building the offline chat send queue (#39423): a queued message, and also a plain draft typed offline (#39342), came back after a kill only if the desktop had been reachable when it was saved.
Linked Issue
Orca Mobile speed program, part of S8a / S5 (offline drafts and queued sends survive a kill). No GitHub issue.
Visual Proof
iOS simulator, desktop cut with a toxiproxy disable, then the app killed (simctl terminate), the desktop restored and the app reopened.
Before: text typed offline (" plus offline words")
Before: after the kill, the offline words are gone
Shell JS from this tree via Metro (dev client), page from the #39423 stack. A temporary log in the store verb server counted the writes:
Check
without the fix
with the fix
Store writes reaching the shell while the desktop is out
0 (they landed only after reconnect)
written at once
Draft typed offline, kept after a kill
0/1
n/a (covered by the queue runs, same write path)
Message queued offline, back after a kill
0/1
3/3, sent 0 times before Resume, 1 time after
Testing
New verdict-hold test: a native.store.rows request is served before the verdict opens. It fails without the fix.
bridge-host* tests, pnpm check:changed.
iOS simulator runs above.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Shell (native JS), so it ships with the app (Store release), not Page OTA. Until a shell with this ships, an offline queue or draft is still saved, but only on reconnect. The verb is already scoped to the screen's host by the shell and never forwarded to the desktop, so serving it early changes no wire traffic. Plain revert.
Level: Low
AI Disclosure
Review
Small fix, one list entry plus a test.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Mobile shell only. #39419 also edits bridge-host-verdict-hold.ts (stream replay); this touches only the phone-only verb list.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
The phone-only native verb set now includes BRIDGE_STORE_VERB, so native store messages bypass desktop verdict parking. A test sends a native.store.rows draft-read request before the connection verdict and verifies that the native store receives the call.
Merge Risk: Minimal · up to f1899
Store requests can proceed while the desktop is offline. No merge-blocking issue was established.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the main change: saving mobile drafts while the desktop is offline.
Description check
The description is mostly complete. It explains the change, testing, visual proof, and rollback. The risk section could better describe what users would see if early store access failed. An outside co…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is mostly complete. It explains the change, testing, visual proof, and rollback. The risk section could better describe what users would see if early store access failed. An outside contributor must also link an issue.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
The phone app keeps chat drafts and queued messages in its own encrypted store, so they survive Orca being closed. But while the desktop was unreachable, the app held every save back until the desktop came back. Close Orca during that time and the save never happened. Now saves to the phone's own store go through at once, desktop or not.
What Changed
native.store.rows, the page's device-store verb, wasn't on that list. A draft typed or a message queued while the desktop was out sat in the bridge until the phone reconnected, and was lost if Orca closed first.native.store.rowsis on the phone-only list inbridge-host-verdict-hold.ts. The shell serves it from the phone's own store, scoped to the host as before, so it never needed the desktop.Why
The store verb never reaches the desktop (
serveDeviceStoreVerbinMobileWebShellScreen.tsx), so holding it for the desktop's verdict protects nothing. It only delays writes whose whole point is to outlive a disconnect. This was found while building the offline chat send queue (#39423): a queued message, and also a plain draft typed offline (#39342), came back after a kill only if the desktop had been reachable when it was saved.Linked Issue
Orca Mobile speed program, part of S8a / S5 (offline drafts and queued sends survive a kill). No GitHub issue.
Visual Proof
iOS simulator, desktop cut with a toxiproxy disable, then the app killed (
simctl terminate), the desktop restored and the app reopened.With #39423 on top (offline queue):
Numbers
Shell JS from this tree via Metro (dev client), page from the #39423 stack. A temporary log in the store verb server counted the writes:
Testing
New verdict-hold test: a
native.store.rowsrequest is served before the verdict opens. It fails without the fix.bridge-host*tests,pnpm check:changed.iOS simulator runs above.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Shell (native JS), so it ships with the app (Store release), not Page OTA. Until a shell with this ships, an offline queue or draft is still saved, but only on reconnect. The verb is already scoped to the screen's host by the shell and never forwarded to the desktop, so serving it early changes no wire traffic. Plain revert.
Level: Low
AI Disclosure
Review
Small fix, one list entry plus a test.
Agent skill upstream boundary
Notes
Mobile shell only. #39419 also edits
bridge-host-verdict-hold.ts(stream replay); this touches only the phone-only verb list.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)