Fix: keep multi-level tags import navigation after upgrade and 'Switch Tag Levels'#91450
Open
fedirjh wants to merge 7 commits into
Open
Fix: keep multi-level tags import navigation after upgrade and 'Switch Tag Levels'#91450fedirjh wants to merge 7 commits into
fedirjh wants to merge 7 commits into
Conversation
…h confirmation Force-replace the navigation to the tags import page and disable history.back() on the confirm modals so the route doesn't get undone after confirming the 'Switch Tag Levels' or 'Override Multi-level Tags' modal. Also use a ref for the post-upgrade flag so it doesn't race the upgrade re-render. Fixes the case where, on a Collect workspace, choosing 'Multi-level tags' -> upgrade -> 'Switch Tag Levels' left the user stuck on the import-options screen instead of opening the spreadsheet import.
…h flow Adds regression coverage to ensure: - selecting 'Multi-level tags' on a Collect workspace navigates to the workspace upgrade page; - confirming the 'Switch Tag Levels' modal navigates to the tags import page with forceReplace, so the modal's history.back() can't undo the navigation and leave the user on the import-options screen.
…r review Address PR review comments: with React Compiler enabled, wrapping navigateToTagsImport and handlePostConfirmTagSwitch in useCallback is redundant since the compiler memoizes closures automatically.
50 tasks
dmkt9
reviewed
May 26, 2026
Contributor
|
@fedirjh There are conflicts. |
dmkt9
reviewed
May 26, 2026
…evel-tag-import-navigation
…firmation Use useFocusEffect to continue the import flow when returning from workspace upgrade on Collect. Deduplicate switch-tag-levels confirmation, await modals before navigating, and defer navigation after cleanPolicyTags via the microtask queue so the user reaches the spreadsheet import page instead of staying on import options.
…h flow Add regression tests for Collect upgrade navigation and Control switch-tag-levels confirmation leading to the tags import page.
…rt-navigation' Keep simplified fix and tests after splitting commits locally.
Contributor
Author
|
@dmkt9 Thanks for the review — I've pushed an update that addresses your feedback and refreshed the PR description to match the current approach. Changes since last review:
Please take another look when you have time. 🙏 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Contributor
|
@fedirjh Thanks for the quick update. However, I noticed that we failed to fix the original issue: 2026-05-26.21-07-03.mp4 |
joekaufmanexpensify
approved these changes
May 27, 2026
Contributor
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
On a Collect (Team) workspace, opening Tags → Import spreadsheet → Multi-level tags sends the user through the workspace upgrade flow. After confirming the upgrade and the Switch Tag Levels modal (shown because tags already exist), the user was left stuck on the Import Tags Options screen instead of landing on the spreadsheet import page (the "Choose file" screen). This regression was specific to Collect workspaces with existing tags — Control workspaces or workspaces with no tags worked fine.
Two underlying issues:
import-options.This PR:
await showConfirmModalbefore navigating, so work runs after the modal close transition completes (seecontributingGuides/INTERACTION_MANAGER.md).Navigation.setNavigationActionToMicrotaskQueueaftercleanPolicyTagson the switch-tag-levels path so navigation is not raced by synchronous Onyx updates.useRef+useFocusEffectto resume the multi-level import flow when the screen regains focus after upgrade (instead of fragileuseState+ policy timing).setImportedSpreadsheetIsImportingMultiLevelTags(true)before navigating to upgrade so import intent is preserved.confirmSwitchTagLevels(multi-level menu + single-level menu).Navigation.navigate(noforceReplace) so users can go back to re-pick single vs multi-level import if they chose the wrong option.shouldHandleNavigationBack: falseon confirm modals, so Android Chrome hardware back still closes the modal as expected.tests/ui/ImportTagsOptionsPageTest.tsxfor Collect upgrade navigation and Control switch-tag-levels → import navigation.Fixed Issues
$ #90463 (comment)
PROPOSAL:
Tests
Precondition: Have a Collect workspace with tags enabled and at least one tag added.
Precondition: Control workspace with existing single-level tags.
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
CleanShot.2026-05-22.at.19.05.07.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari