Fix infinite category loading after in-flow workspace upgrade#93252
Fix infinite category loading after in-flow workspace upgrade#93252MelvinBot wants to merge 1 commit into
Conversation
…erving original iouType Co-authored-by: huult <huult@users.noreply.github.com>
|
The failing ESLint check is unrelated to this PR — it's a pre-existing Analysis: All 466 reported errors are in one file, Evidence it's not from this PR:
Recommended remediation (separate from this PR): the seatbelt baseline for that file/rule needs to be updated from 450 → 466 (or the 16 newly-unsafe assertions in All other checks (typecheck, Prettier, React Compiler, unit tests, Storybook, perf) passed. The remaining |
|
I can't fix this on PR #93252 — the failing ESLint check is a New evidence since my last comment: the identical ESLint failure is currently hitting other unrelated open PRs — #93251 and #93247 both fail with the exact same message: All 466 errors live in Why I'm not pushing a fix here:
Path forward: a maintainer should push the seatbelt baseline correction to The only other failing check, |
|
@MelvinBot please close this PR |
|
@MelvinBot Please close this PR |
1 similar comment
|
@MelvinBot Please close this PR |
Explanation of Change
After migrating the money-request IOU steps to the dynamic-route system in #92161, the in-flow workspace Upgrade → Category path (self-DM → create manual expense → confirm → Category → Upgrade → Confirm → "Got it, thanks") started showing an infinite loading spinner on the Category step instead of the category list.
Root cause: the
CATEGORIESbranch ofafterUpgradeAcknowledgedinDynamicIOURequestStepUpgradePagenavigated to the Category step with a hardcodedCONST.IOU.TYPE.SUBMITIOU type. Before the migration, this navigation went through the page'sbackToroute, whichCategoryFieldbuilt using the originaliouType; the hardcodedSUBMITwas only a fallback. The migration removedbackTo, so the flow always usedSUBMIT, which caused the Category page to resolve the wrong report/policy context — leavingpolicyIDundefined sofetchData()never fetched categories andisLoadingstayedtrueforever.This change passes the original
iouTypeto the category route, restoring the pre-migration behavior so the Category page resolves the correct policy and loads the category list.Fixed Issues
$ #93228
PROPOSAL: #93228 (comment)
Verification
Verified on a brand-new account with no workspace: after completing the upgrade flow, the Category list loads with default categories and no infinite spinner.
AI checks run locally on the changed file:
prettier✅,lint-changed✅,typecheck(tsgo) ✅,react-compiler-compliance-check✅.Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
Offline tests
N/A
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
Screenshots/Videos
See the Verification section above.