Repository navigation
fix(mobile): let the newest answer win on the phone's Orca update sheet - #52817
Conversation
Closing a finished sheet republished the version the stage verified under a fresh read number, so it replaced a newer status a later read had shown, and dropped one still on its way. The verified version is now shown when the stage verifies it, and closing only clears the sheet. Restart's recheck of what stops is numbered with the sheet's own reads, so a late recheck never puts an older list back.
[Medium impact] The PR appears safe to merge. SummaryThe phone now keeps newer host status when a finished update sheet closes.
No actionable issues were found. Tests were inspected but not run. Reviews (1) · Last reviewed commit: "fix(mobile): let the newest answer win o..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ELI5
After you update a computer's Orca from the phone, closing the sheet could put the row back to an older version. That happened if the computer had moved on again by then. Separately, the "what this restart stops" list could briefly go back to an older list. Now whichever answer the phone asked for last is the one it shows.
What Changed
host-orca-update-entry.tsto stay under the line cap.Why
Linked Issue
No GitHub issue. These are review follow-ups to #52206 and #52612.
One more item from those reviews no longer reproduces: "a discarded failure should start the download path". Since #52332,
prepareHostOrcaUpdateSheetreads the store after the discard. A run against main went from a failed 2.0.0 todownloaded 3.0.0, with the restart list read.Visual Proof
N/A: no new screens or copy. This fixes which version and list existing rows show in race cases, which a capture can't reproduce on demand. The scripted runs below show it against the real store.
Testing
Scripted runs drive the real phone store against a fake computer (stateful updater, held replies). Before → after:
['a']; now['a','b'].host-orca-update-ordering.test.tspins both orderings through the real store, stages and transport, with a fake client and no real-time waits. It fails on main.pnpm check:changedpasses.Performance
None, because the only new work is one status read when a retry finds the computer already current. That's the same read a finished restart already makes. Closing a sheet now does one store write instead of two. Unchanged or stale answers still publish nothing.
Risk
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Mobile only. The relayed server sheets share this store and get the same ordering.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)