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
[Due for payment 2026-09-24] Workspace Settings - Double tapping on a category row leads to Not Here page #100436
The "Not Here" page is not coming from the category page's own guards — it is the root NOT_FOUND wildcard screen, produced by a malformed URL that the second tap builds.
WorkspaceCategoriesPage builds every navigation target at press time with a barecreateDynamicRoute(suffix), with no basePath:
Without a basePath, createDynamicRoute appends the suffix to Navigation.getActiveRoute() — whatever route is active at that instant. Its own docstring warns about this.
So on a double tap:
Tap 1 → base is .../categories → navigates to .../categories/category/Advertising. The settings page is an RHP, so the list stays mounted and pressable underneath.
Tap 2 (~100–300ms later, after tap 1 committed) → base is now .../categories/category/Advertising → builds .../categories/category/Advertising/category/Advertising.
getStateFromPath strips the trailing suffix, resolves the base to Dynamic_Category_Settings, and checks entryScreens — which is [SCREENS.WORKSPACE.CATEGORIES] only (ROUTES.ts:962-966). Validation fails.
This is why the bug then spreads to the Add category button. All buttons on the page share one global input — the active route. As long as it still contains /category/<name> after the back press, every subsequent press re-fails the same check: WORKSPACE_CATEGORY_CREATE also declares entryScreens: [SCREENS.WORKSPACE.CATEGORIES] (ROUTES.ts:1100-1103). A per-row or duplicate-push theory cannot explain that spread; this one does.
// Without the binding the suffix lands on whatever screen is active instead.expect(JSON.stringify(getStateFromPath(createDynamicRoute(CARD_DETAILS)))).toContain('not-found');
What changes do you think we should make in order to solve the problem?
Bind the base path to the categories screen's own route instead of reading the live active route. The hook for this already exists: useScreenBoundDynamicRoute, which latches the base via useFocusEffect so a stacked RHP cannot poison it.
In WorkspaceCategoriesPage, call the hook once and use it for bothnavigateToCategory and navigateToCreateCategoryPage (and navigateToCategoriesSettings / import, which share the pattern). The second tap then rebuilds the same path as the first, which react-navigation already dedupes to a no-op.
Wider scope: this is a class of bug, not a categories-only one. WorkspaceTagsPage.tsx:325-331 has the identical pattern, and only 13 files in the repo use the safe hook. Whoever picks this up should decide whether to fix just categories or sweep the sibling list pages.
What alternative solutions did you explore? (Optional)
Alternatives considered and evidence
Alternatives ruled out:
Duplicate push of the same route — already suppressed by areNamesAndParamsEqual in linkTo/index.ts:190-193. An identical duplicate is a no-op, so the bug requires a different path — which is what the doubled suffix is.
A stuck isNavigating / isExecuting flag — no such flag exists; useSingleExecution is a no-op on web.
Lazy-load failure in the Dynamic* pages — they are synchronous require() screens, no React.lazy/Suspense. "Dynamic" refers to dynamic routes, not dynamic imports.
policyCategories not yet loaded — a missing categories list routes to a loading indicator, not to Not Here. CategorySettingsPage.tsx:283-285 is a genuine second source of the same page, but it does not explain the Add-category button breaking.
Alternative fix shape: make createDynamicRoute itself reject a base whose focused screen is not in the suffix's entryScreens, rather than silently producing a Not Here. That is a broader change and would need its own discussion.
Repro attempt: an automated pass on dev web could not reproduce the literal Not Here page. That harness only sends synthetic mouse clicks in Chromium at a desktop split-pane layout — it cannot emulate iOS Safari touch timing, and double-tap is explicitly unsupported for web there. At a mobile-width viewport a fast second tap did land on unintended controls on the newly-opened screen, confirming the underlying "second tap fires after the first navigation committed" timing hazard. So the code trace is not contradicted by the failed repro; it just was not independently confirmed at runtime.
Confirming in production:getStateFromPath.ts:67-71 logs [getStateFromPath.ts][DynamicRoute] None of the N dynamic suffix candidate(s) passed entryScreens validation for path: <PATH>. That line prints the offending path verbatim and would confirm frequency and how far the pattern spreads beyond categories.
Confidence: High on the mechanism for the first Not Here (traced end to end, and asserted by an existing test). Medium on precisely why the active route stays polluted across the back press — the three candidates are a lingering RHP route, a lingering root-level NOT_FOUND route (getActiveRoute() would return /not-found), or the documented late-popstate desync on web that "reset the app to a stale route". All three break identically, so the fix is the same either way.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/100436) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
All at mWeb width. At desktop width the second click hits the RHP overlay instead of the row, so it won't reproduce there.
The two taps must land within ~80ms. At 120ms+ they all look clean. Console confirmation in every case:
[getStateFromPath.ts][DynamicRoute] None of the 1 dynamic suffix candidate(s) passed entryScreens validation for path: ...
1. Tags list, tag row
Precondition: workspace with Tags enabled and at least one tag.
Workspace → More features → enable Tags.
Go to Tags.
Add a tag named Alpha.
Return to the Tags list.
Double tap the Alpha row fast.
Expected: tag settings opens.
Actual: "Hmm... it's not here".
URL: /workspaces/<policyID>/tags/workspace-tag-settings/0/Alpha/workspace-tag-settings/0/Alpha
2. Category settings, Name row
Precondition: workspace with Categories enabled (default categories are enough).
Workspace → Categories.
Tap Advertising to open its settings.
Double tap the Name row fast.
Expected: the name editor opens.
Actual: "Hmm... it's not here".
URL: /workspaces/<policyID>/categories/category/Advertising/edit/edit
3. Tag settings, Name row
Precondition: same as 1, tag Alpha exists.
Workspace → Tags.
Tap Alpha to open its settings.
Double tap the Name row fast.
Expected: the name editor opens.
Actual: "Hmm... it's not here".
URL: /workspaces/<policyID>/tags/workspace-tag-settings/0/Alpha/workspace-tag-edit/workspace-tag-edit
4. Workspace overview, Company address row
Precondition: any workspace you administer.
Workspace → Overview.
Double tap the Company address row fast.
Expected: the address editor opens.
Actual: "Hmm... it's not here".
URL: /workspaces/<policyID>/overview/workspace-address/workspace-address
5. Workspace overview, Plan type row
Precondition: any workspace you administer.
Workspace → Overview.
Double tap the Plan type row fast.
Expected: the plan page opens.
Actual: "Hmm... it's not here".
URL: /workspaces/<policyID>/overview/plan/plan
Why the work exceeded the issue: We identified and fixed multiple occurrences of the same issue across the codebase, rather than only fixing the original reported case.
Regressions caused by this PR: N/A
Optional
Scope expansion: In addition to the original issue, we fixed five similar occurrences that were identified here: #100436 (comment).
Activity
applause-bot commentedon Sep 4, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/274dac1e43c4a253a399294a6007e70158d687f2029a5f61930a098e65821108
MelvinBot commentedon Sep 4, 2026
Proposal
What is the root cause of that problem?
The "Not Here" page is not coming from the category page's own guards — it is the root
NOT_FOUNDwildcard screen, produced by a malformed URL that the second tap builds.WorkspaceCategoriesPagebuilds every navigation target at press time with a barecreateDynamicRoute(suffix), with nobasePath:src/pages/workspace/categories/WorkspaceCategoriesPage.tsx:221-230— category rowsrc/pages/workspace/categories/WorkspaceCategoriesPage.tsx:318-320— Add categoryWithout a
basePath,createDynamicRouteappends the suffix toNavigation.getActiveRoute()— whatever route is active at that instant. Its own docstring warns about this.So on a double tap:
.../categories→ navigates to.../categories/category/Advertising. The settings page is an RHP, so the list stays mounted and pressable underneath..../categories/category/Advertising→ builds.../categories/category/Advertising/category/Advertising.getStateFromPathstrips the trailing suffix, resolves the base toDynamic_Category_Settings, and checksentryScreens— which is[SCREENS.WORKSPACE.CATEGORIES]only (ROUTES.ts:962-966). Validation fails.[SCREENS.NOT_FOUND]: '*'→ "Hmm... it's not here".This is why the bug then spreads to the Add category button. All buttons on the page share one global input — the active route. As long as it still contains
/category/<name>after the back press, every subsequent press re-fails the same check:WORKSPACE_CATEGORY_CREATEalso declaresentryScreens: [SCREENS.WORKSPACE.CATEGORIES](ROUTES.ts:1100-1103). A per-row or duplicate-push theory cannot explain that spread; this one does.The repo already has a test asserting this exact failure,
tests/navigation/useScreenBoundDynamicRouteTests.tsx:107-121— "keeps the base path once another screen is stacked over it":What changes do you think we should make in order to solve the problem?
Bind the base path to the categories screen's own route instead of reading the live active route. The hook for this already exists:
useScreenBoundDynamicRoute, which latches the base viauseFocusEffectso a stacked RHP cannot poison it.In
WorkspaceCategoriesPage, call the hook once and use it for bothnavigateToCategoryandnavigateToCreateCategoryPage(andnavigateToCategoriesSettings/ import, which share the pattern). The second tap then rebuilds the same path as the first, which react-navigation already dedupes to a no-op.Note
useSingleExecutionis not a valid fix here — it is a no-op on web (src/hooks/useSingleExecution/index.ts:10-20), and this is reported on mWeb Safari.Wider scope: this is a class of bug, not a categories-only one.
WorkspaceTagsPage.tsx:325-331has the identical pattern, and only 13 files in the repo use the safe hook. Whoever picks this up should decide whether to fix just categories or sweep the sibling list pages.What alternative solutions did you explore? (Optional)
Alternatives considered and evidence
Alternatives ruled out:
areNamesAndParamsEqualinlinkTo/index.ts:190-193. An identical duplicate is a no-op, so the bug requires a different path — which is what the doubled suffix is.isNavigating/isExecutingflag — no such flag exists;useSingleExecutionis a no-op on web.Dynamic*pages — they are synchronousrequire()screens, noReact.lazy/Suspense. "Dynamic" refers to dynamic routes, not dynamic imports.policyCategoriesnot yet loaded — a missing categories list routes to a loading indicator, not to Not Here.CategorySettingsPage.tsx:283-285is a genuine second source of the same page, but it does not explain the Add-category button breaking.Alternative fix shape: make
createDynamicRouteitself reject a base whose focused screen is not in the suffix'sentryScreens, rather than silently producing a Not Here. That is a broader change and would need its own discussion.Repro attempt: an automated pass on dev web could not reproduce the literal Not Here page. That harness only sends synthetic mouse clicks in Chromium at a desktop split-pane layout — it cannot emulate iOS Safari touch timing, and double-tap is explicitly unsupported for web there. At a mobile-width viewport a fast second tap did land on unintended controls on the newly-opened screen, confirming the underlying "second tap fires after the first navigation committed" timing hazard. So the code trace is not contradicted by the failed repro; it just was not independently confirmed at runtime.
Confirming in production:
getStateFromPath.ts:67-71logs[getStateFromPath.ts][DynamicRoute] None of the N dynamic suffix candidate(s) passed entryScreens validation for path: <PATH>. That line prints the offending path verbatim and would confirm frequency and how far the pattern spreads beyond categories.Confidence: High on the mechanism for the first Not Here (traced end to end, and asserted by an existing test). Medium on precisely why the active route stays polluted across the back press — the three candidates are a lingering RHP route, a lingering root-level
NOT_FOUNDroute (getActiveRoute()would return/not-found), or the documented late-popstatedesync on web that "reset the app to a stale route". All three break identically, so the fix is the same either way.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/100436)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run · no recording available
melvin-bot commentedon Sep 4, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)melvin-bot commentedon Sep 4, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
mukhrr commentedon Sep 6, 2026
@roryabraham i think this is of same bug family from #95364 and we can do this as follow up for #98406? cc @dmkt9
mukhrr commentedon Sep 7, 2026
I think I found more cases related to this bug
mukhrr commentedon Sep 7, 2026
Repro steps
All at mWeb width. At desktop width the second click hits the RHP overlay instead of the row, so it won't reproduce there.
The two taps must land within ~80ms. At 120ms+ they all look clean. Console confirmation in every case:
1. Tags list, tag row
Precondition: workspace with Tags enabled and at least one tag.
Alpha.Alpharow fast.Expected: tag settings opens.
Actual: "Hmm... it's not here".
URL:
/workspaces/<policyID>/tags/workspace-tag-settings/0/Alpha/workspace-tag-settings/0/Alpha2. Category settings, Name row
Precondition: workspace with Categories enabled (default categories are enough).
Advertisingto open its settings.Namerow fast.Expected: the name editor opens.
Actual: "Hmm... it's not here".
URL:
/workspaces/<policyID>/categories/category/Advertising/edit/edit3. Tag settings, Name row
Precondition: same as 1, tag
Alphaexists.Alphato open its settings.Namerow fast.Expected: the name editor opens.
Actual: "Hmm... it's not here".
URL:
/workspaces/<policyID>/tags/workspace-tag-settings/0/Alpha/workspace-tag-edit/workspace-tag-edit4. Workspace overview, Company address row
Precondition: any workspace you administer.
Company addressrow fast.Expected: the address editor opens.
Actual: "Hmm... it's not here".
URL:
/workspaces/<policyID>/overview/workspace-address/workspace-address5. Workspace overview, Plan type row
Precondition: any workspace you administer.
Plan typerow fast.Expected: the plan page opens.
Actual: "Hmm... it's not here".
URL:
/workspaces/<policyID>/overview/plan/plan27 remaining items
dmkt9 commentedon Sep 25, 2026
Price increase request
Mandatory
Proposed amount: $500
Why the work exceeded the issue: We identified and fixed multiple occurrences of the same issue across the codebase, rather than only fixing the original reported case.
Regressions caused by this PR: N/A
Optional
Scope expansion: In addition to the original issue, we fixed five similar occurrences that were identified here: #100436 (comment).
mallenexpensify commentedon Sep 25, 2026
@puneetlath 👀 above on the price increase request plz.
puneetlath commentedon Sep 28, 2026
Ok, seems fair to me.
mallenexpensify commentedon Sep 28, 2026
Payment Summary
Contributor: @mukhrr due $500 via NewDot
Contributor+: @dmkt9 paid $500 via Upwork
@dmkt9 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022104694962573537573
Reminder to self to bump price to $500
dmkt9 commentedon Sep 29, 2026
@mallenexpensify Thanks. I've accepted the offer
flaviadefaria commentedon Sep 29, 2026
Approved: @mukhrr due $500 via NewDot
mallenexpensify commentedon Sep 30, 2026
@dmkt9 paid $500, summary updated above. Thx.