Repository navigation
Prevent Home chart refresh when cancelling an expense panel - #107382
Conversation
Co-authored-by: huult <huult@users.noreply.github.com>
|
🤖 Web test steps verification results: Verified on dev NewDot web: Home > + > Create expense opens the RHP, and two Back cancellations return to Home. Missing workspace/expense fixtures prevent chart-refresh verification.
|
|
|
|
🤖 Android test steps verification results: Verified navigation on standalone Android NewDot. Chart-refresh assertions remain unverified because the populated workspace-owner fixture is missing; concurrent-account testing is unsupported.
|
|
@MelvinBot Could you please update the test steps and QA steps to follow the same format as the Action Performed section in #106873? Thanks! |
|
Updated Tests and QA Steps to match the issue’s Action Performed format: preconditions, numbered steps, and expected result. Added regression checks for cancellation, Escape, submission, and returning to Home. Documentation only; no tests were rerun. |
|
@MelvinBot ready for review |
|
Marked Prevent Home chart refresh when cancelling an expense panel as ready for review. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-11-19.at.21.45.42.movAndroid: mWeb ChromeScreen.Recording.2026-11-19.at.21.44.32.moviOS: HybridAppScreen.Recording.2026-11-19.at.21.42.47.moviOS: mWeb SafariScreen.Recording.2026-11-19.at.21.36.13.movMacOS: Chrome / SafariScreen.Recording.2026-11-19.at.21.48.53.mov |
|
@codex review |
|
@MelvinBot Please update both the test steps and QA steps to the following: Precondition: Account A is the owner of a workspace with enough expenses to populate Home Insights. Account B is a member of the workspace submitting to Account A, so that expenses from B can alter Account A's Insights.
|
|
Updated both Tests and QA Steps with your provided precondition and six steps, removing the additional regression checks. |
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from a product perspective 👍
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@MelvinBot I've verified #107382 (comment). Could you please check all the boxes in the Author Checklist? Thanks! |
|
Checked all 36 boxes in the PR Author Checklist on your behalf, based on your verification. |
|
@MelvinBot could you sync with main? |
Co-authored-by: huult <huult@users.noreply.github.com>
|
Synced with 10 focused tests passed; remaining checks hit tooling/dependency blockers documented in AI Tests. |
|
@inimaga This PR is ready for your review. Thanks! |
|
🚧 inimaga has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/inimaga in version: 9.5.53-0 🚀
|
|
No help site update needed — this PR fixes an unintended chart refresh when cancelling expense creation, restoring expected behavior without adding a workflow or making existing help instructions incorrect. |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.5.53-3 🚀
Bundle Size Analysis (Sentry): |
1 similar comment
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.5.53-3 🚀
Bundle Size Analysis (Sentry): |





Explanation of Change
Keep the original tab logically focused while an expense destination is pre-mounted beneath an RHP. Otherwise cancellation looks like leaving and returning to Home, incorrectly refreshing its Insights chart. The saved tab is used only for a matching navigator key with an RHP above it; genuine tab switches and committed submissions retain their normal refresh behavior.
Also clean up speculative navigation before Escape dismisses an RHP. Escape previously left restoration to unmount cleanup, allowing the destination to become briefly focused before a deferred return to Home. This is limited to cancellation rather than changing generic modal dismissal, which is also used for successful reveals.
Implementation: useIsTabFocused.ts:19–35 and EscapeHandler.tsx:89–95.
Fixed Issues
$ #106873
PROPOSAL: #106873 (comment)
Tests
Precondition: Account A is the owner of a workspace with enough expenses to populate Home Insights. Account B is a member of the workspace submitting to Account A, so that expenses from B can alter Account A's Insights.
Offline tests
QA Steps
Precondition: Account A is the owner of a workspace with enough expenses to populate Home Insights. Account B is a member of the workspace submitting to Account A, so that expenses from B can alter Account A's Insights.
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.AI Tests
Main sync — 2026-11-23: Merged
mainat5de42f69e315de80aee82d2fdf01b283034ea8b6without conflicts; pushed merge commitc46a1e04e139642beddea32ea2d2914c54660993. No manual conflict resolutions or additional implementation changes.Passed: 10 tab-focus unit tests; Storybook smoke test; commit-hook formatting; whitespace check against merged
main. Staged code review reported no violations.Blocked: the other two focused suites failed to load because Jest attempted to require the React Navigation core ES module. The full Jest run also failed; no full-suite pass is claimed.
Tooling limits: initial lint/typecheck attempts encountered missing Skia dependencies. After
npm ci, lint, changed-file lint, typecheck, and React Compiler checks could not run because Bun's postinstall had not run. The requiredprettierscript is absent. Changed-file spelling reported two issues outside this PR's five-file diff. No unrelated fixes were made.No new manual web or native verification was performed for this merge. Results below predate this sync.
Passed: 109 tests across five focused suites covering tab focus, chart refresh gating, Escape cancellation, pre-mount cleanup, and fullscreen-under-RHP routing. The chart regression exercises the real tab-focus hook and navigation-state subscription, both with and without expense updates, and verifies refresh after a committed destination and genuine return to Home.
Passed:
npm run typecheck,npm run lint-changed,npm run spell-changed, Storybook smoke test,git diff --check, and the commit hook's Oxfmt formatting. Staged code review reported no violations.Incomplete: repository-wide lint exceeded 240 seconds; repository-wide Jest exceeded 300 seconds, with no failure entries before timeout. These are not reported as passing.
Tooling limits: the matrix's
npm run prettier -- --log-level errorcannot run because this checkout has noprettierscript. The changed-files React Compiler check failed resolvingorigin/because the base ref was empty; the explicit per-file check exited successfully.Web verification blocked: dev NewDot returned an empty page and the test session remained suspended after one retry. Home, Back cancellation, Escape cancellation, and genuine tab-return chart requests could not be verified. This is not evidence of a product regression. Native verification remains outstanding.
AI Web Verification Evidence
Contributor Branch
This draft is assigned to
huult. The branch is upstream because Melvin does not have push access to the contributor's fork. To copy it to that fork:Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari