Repository navigation
Keep newly created agents editable across browser tabs - #101360
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
dylanexpensify
left a comment
There was a problem hiding this comment.
Good from product POV
|
@KJ21-ENG please resolve the conflict |
|
@MelvinBot review |
Code reviewThe approach works. Keeping the mapping in Onyx fixes the cross-tab case: Onyx's web sync sends only keys, so the other tab re-reads storage and would see an empty mapping if it were deleted. The new hook also covers screens opened after the redirect. CI passes. Two items need attention before approval:
Minor items
Testing gaps. The PR description reports open QA failures:
I didn't find a cause for these in the diff. The hook can't loop, because once the route is updated, |
|
This PR adds a new |
|
@MelvinBot Following up on your review: I merged
I kept valid mappings persisted because another tab or an old temporary-ID URL may still need them after cleanup. Clearing or expiring them can remove that recovery path. No pruning was added, so mapping storage still grows; this change addresses the repeated startup work. Both navigation mechanisms remain intentional: the hook repairs mounted and later-opened screens, while the sweep repairs routes buried in the stack. |
|
@getusha Kind ping here, Thanks! |
|
This PR adds a new |
|
I kept the retained mappings, mounted-screen hook and navigation sweep. Other tabs and old temporary URLs still need the mappings. Skipping repair based only on missing temporary records would miss report-only recovery; a persisted completion marker would need a reliable rule for confirming all repair writes finished. I corrected the mapping comment, shared account-ID validation, added Given/When/Then comments and added the suggested Reassure benchmark. The benchmark measures report processing over already-loaded data, rather than complete app startup. I also fixed a Save/Back mismatch between numeric route writes and string route parameters. Both repair paths now preserve string route IDs while actions use numeric IDs, with regression tests covering the route contract. Existing recordings retain their original-source labels. The repository's Slack-approval rule specifically covers component performance exceptions; this subscription runs in an action outside React. Please confirm whether you also expect a separate Slack discussion for this action-level listener. The earlier approval predates this update, so I am requesting fresh review. |
|
Code looks good, testing. |
|
🚧 deetergp has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
Deploy Blocker #105813 was identified to be related to this PR. |
|
This PR failing because of the issue #105813 |
|
🚀 Deployed to staging by https://github.com/deetergp in version: 9.5.31-0 🚀
|
|
No help site update needed — this PR restores expected agent editing across browser tabs without adding a workflow or making existing article instructions incorrect. |
|
🚀 Deployed to staging by https://github.com/deetergp in version: 9.5.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Keep Edit Agent usable when another tab finishes creating the agent. Retain temporary-to-real ID mappings, resolve them in open agent screens and saved links, and keep Name, Instructions and Avatar Save/Back navigation on the same agent.
Fixed Issues
$ #100865
PROPOSAL: #100865 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Recording from
42e5fcaf7f5: pending-agent editing reached Name Save, then the app became unresponsive.android-qa-inconclusive-2x.mp4
Android: mWeb Chrome
Recording from
42e5fcaf7f5: online editing and second-tab reconnect. This recording contains excerpts.android-mweb-qa-2x.mp4
iOS: Native
Recording from
42e5fcaf7f5: online field saves and offline queued-name reconnect/reopening.ios-qa-trimmed-2x.mp4
iOS: mWeb Safari
Recording from
42e5fcaf7f5: online field saves and offline queued-name Save. Safari became unresponsive before reconnect verification.ios-mweb-qa-2x.mp4
MacOS: Chrome / Safari
Recording from
42e5fcaf7f5.after-fix-short-sanitized-1.5x.mp4