Repository navigation
[NoQA] Fix import/no-cycle - part 16 - #103180
roryabraham merged 2 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…mport linking config leaves
10c5f2c to
fc2eb00
Compare
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@MelvinBot Deep review |
Deep reviewNo blocking issues. The refactor moves the code without changing it, and each rewired import points to the same object as before. I have two small suggestions and one test gap below. Suggestions
What I verified
Web test: blockedI could not run the PR's test steps on web. The test account signed in and reached the "Welcome! Join" screen. After it pressed Join, the app showed a blank white page and never reached "What's your work email?". The page stayed blank for more than a minute, and the dev server was still responding. The test tools can't read the browser console on web, so I can't tell whether this is an environment flake or a module load-order problem. Load order is plausible here because this PR changes which modules view run · no recording available |
|
No product review needed. |
|
Regarding Melvin fidnings:
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-10-12.at.13.51.57.mov |
|
🚧 roryabraham 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.10-0 🚀
|
|
No help site update needed. This PR only reorganizes navigation imports to remove circular dependencies, so nothing users see or do changes. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.12-0 🚀
|
|
No help site update needed. This PR only moves navigation helpers and changes import paths to remove circular dependencies, so nothing users see or do changes. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Navigation.tsout of theimport/no-cyclegraph. Before this change it reachedReportUtilsthrough two paths that only needed config or route helpers:Navigation -> linkingConfig/index -> getAdaptedStateFromPath -> ReportUtils, andNavigation -> linkTo -> getAdaptedStateFromPath -> ReportUtils.getMatchingFullScreenRouteand its three helpers move verbatim fromgetAdaptedStateFromPath.tsto the newNavigation/helpers/getMatchingFullScreenRoute.ts, which imports nothing from the cycle.linkToandswapBackgroundTabForRHPTargetimport it from there.Navigation.ts(goUp),linkToandOnboardingFlow(getOnboardingInitialPath) only readlinkingConfig.configfrom thelinkingConfigbarrel, so they now importlinkingConfig/configdirectly.ReportUtils(getRouteFromLink) now importslinkingConfig/prefixesinstead of reading.prefixes. These are the same objects the barrel exports.main+ 15 = 99 findings / 40 files,main+ 15 + 16 = 71 / 30. That is -28 findings and -10 files, with no new findings. Every import ofNavigationfromReportUtils,PolicyUtils,TaskUtilsand 9 action modules stops being a cycle.getAdaptedStateFromPath -> ReportUtils, andactions/SessionandWelcome/OnboardingFlowboth importgetAdaptedStateFromPath. That follow-up needs Onyx subscription changes so it belongs to the separateOnyx.connectmigration effort and is out of scope here.ReportUtilsexports.no-cycle 99 findings -> 71
Fixed Issues
$ #99650
PROPOSAL:
Tests
Test 1: Cold start into a deep link (smoke test)
/settings/profile/display-namedirectly (on native, use a deep link).Test 2: Navigating inside a running app (smoke test)
Test 3: Onboarding flow for new accounts
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Android: Native
android.mov
Android: mWeb Chrome
android.web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios.web.mov
MacOS: Chrome / Safari
web.mov
Test 3. Onboarding
web-onboarding.mov