Skip to content

[NoQA] Fix import/no-cycle - part 18 - #103203

Merged
roryabraham merged 29 commits into
Expensify:mainfrom
callstack-internal:fix/no-cycle-part18-pure-helper-leaves
Oct 19, 2026
Merged

roryabraham merged 29 commits into
Expensify:mainfrom
callstack-internal:fix/no-cycle-part18-pure-helper-leaves

Conversation

@LukasMod

@LukasMod LukasMod commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

  • Part 18 of the import/no-cycle cleanup. Seven pure helpers move out of heavy, cyclic modules into new modules. No helper body changes.
  • New leaf modules that import only CONST, types, and Onyx: DistanceUnitConversionUtils (meters to km/mi and back), WorkspaceDisplayUtils (unit translation key, address street lines), isTransactionGroupListItemType, and actions/getMakeDefaultPaymentOnyxData.
  • buildOnboardingMessages (moved out of OnboardingFlow into src/libs/) is not a strict leaf: it also imports Localize, IntlStore, and selectors/Onboarding. None of them are part of a cycle with it.
  • shouldShowQBOReimbursableExportDestinationAccountError moves from actions/connections/QuickbooksOnline into PolicyUtils, which removes the PolicyUtils to QBO actions edge.
  • DistanceRequestUtils, SearchUIUtils, OnboardingFlow.getOnboardingMessages, and PolicyUtils (via export *) keep re-exporting the moved helpers. WorkspacesSettingsUtils (getUnitTranslationKey, getWorkspaceAddressStreetLines), QuickbooksOnline (shouldShowQBOReimbursableExportDestinationAccountError), and PaymentMethods (getMakeDefaultPaymentOnyxData) drop those exports, and every caller now imports from the new location.
  • ReportUtils (getValidateEmailTaskDescription, prepareOnboardingOnyxData) now calls buildOnboardingMessagesWithoutManageTeam() instead of OnboardingFlow.getOnboardingMessages(). Onboarding data only changes the Manage team message, so the helper builds without it and its return type omits that key, which makes a Manage team read a type error. Output for the validate email, Personal spend, and Submit messages is identical, and no module-level Onyx value is read.

No behavior change: every hunk moves a helper verbatim or updates an import. One smoke test checks the app still boots and the screens that import the new modules still render.

no cycle drop from 169 -> 153 (16), measured with oxlint 1.88 import/no-cycle

Fixed Issues

$ #99650
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Test 1: Smoke

  1. Sign in and confirm the app loads to the Inbox with no crash or red error screen.
  2. Open the Reports tab and press the action button (View, Submit, or Approve) on a report row.
  3. Confirm the action runs or the report opens.
  4. Open the workspace > More features, enable Distance rates, then open Distance rates > Settings.
  5. Tap the Unit row, confirm the picker lists "Miles" and "Kilometers", and pick the one not currently selected.
  6. Confirm the Unit row on the Settings page now shows the picked unit as its value.

Offline tests

QA Steps

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

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

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
src/components/UnitPicker.tsx 0.00% <ø> (ø)
src/hooks/usePolicyIndicatorChecks.ts 100.00% <ø> (ø)
src/libs/DistanceRequestUtils.ts 95.54% <ø> (+0.39%) ⬆️
src/libs/PolicyUtils/errors.ts 100.00% <100.00%> (ø)
src/libs/ReportActionsUtils.ts 84.05% <ø> (ø)
src/libs/ReportUtils.ts 88.55% <100.00%> (ø)
src/libs/SearchUIUtils.ts 73.54% <ø> (-0.06%) ⬇️
src/libs/TransactionUtils/getDistanceInMeters.ts 100.00% <100.00%> (ø)
src/libs/WorkspaceDisplayUtils.ts 100.00% <100.00%> (ø)
src/libs/WorkspacesSettingsUtils.ts 43.05% <ø> (-6.33%) ⬇️
... and 19 more
... and 8 files with indirect coverage changes

@LukasMod
LukasMod force-pushed the fix/no-cycle-part18-pure-helper-leaves branch from 478fb46 to 3adf64d Compare October 7, 2026 06:50
…hods

BankAccounts imports the helper from its leaf module, so the re-export in
PaymentMethods is dead. Fixes the knip 'exports' regression.
@LukasMod
LukasMod marked this pull request as ready for review October 7, 2026 12:50
@LukasMod
LukasMod requested review from a team as code owners October 7, 2026 12:50
@melvin-bot
melvin-bot Bot requested review from dylanexpensify and thelullabyy and removed request for a team October 7, 2026 12:50
@melvin-bot

melvin-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

@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]

dylanexpensify
dylanexpensify previously approved these changes Oct 7, 2026

@dylanexpensify dylanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a product perspective 👍

…ure-helper-leaves-v1

# Conflicts:
#	src/libs/DistanceRequestUtils.ts
#	src/pages/workspace/distanceRates/PolicyCommuterExclusionsPage.tsx
@thelullabyy

Copy link
Copy Markdown
Contributor

@MelvinBot Deep review

@thelullabyy thelullabyy closed this Oct 7, 2026
@thelullabyy thelullabyy reopened this Oct 7, 2026
@thelullabyy

Copy link
Copy Markdown
Contributor

@MelvinBot Deep review

@MelvinBot

Copy link
Copy Markdown
Contributor

Deep review: no blocking issues

Every moved helper is byte-identical to its original, every caller now uses the new location, and prepareOnboardingOnyxData returns the same messages as before. Typecheck, ESLint (including import/no-cycle), and 15 related Jest suites all pass on e240437.

Non-blocking nits

  1. New read of a deprecated module-level Onyx value. ReportUtils.ts:12684 and :12689 now pass ReportUtils' onboarding, which comes from the Onyx.connect at ReportUtils.ts:1213-1217. This adds a new consumer of that variable. Only the Personal spend and Submit messages are read here, so buildOnboardingMessages(undefined) gives identical output without the new dependency.
  2. Export position. shouldShowQBOReimbursableExportDestinationAccountError sits first in the PolicyUtils export block at PolicyUtils/index.ts:2780. Recent additions are appended at the end. This is cosmetic.
  3. PR description wording. It says old modules keep their public exports. WorkspacesSettingsUtils drops getUnitTranslationKey and getWorkspaceAddressStreetLines, and QuickbooksOnline drops shouldShowQBOReimbursableExportDestinationAccountError. All callers were updated, so only the description needs a fix.
What I verified

Moved code is identical. I diffed each moved body against base 7acb09d.

  • getOnboardingMessages → buildOnboardingMessages: only the signature (now takes onboardingData as a parameter) and the export changed. The types moved unchanged.
  • getMakeDefaultPaymentOnyxData, convertDistanceUnit, convertToDistanceInMeters, the METERS_TO_* constants, getWorkspaceAddressStreetLines, getUnitTranslationKey, isCollectPolicy, isTransactionGroupListItemType, and shouldShowQBOReimbursableExportDestinationAccountError are all byte-identical.

No stale references.

  • No import, jest.mock, or spyOn still points at an old location of a removed export.
  • SearchUIUtils still re-exports isTransactionGroupListItemType, and five components still import it from there. The DistanceRequestUtils default export still includes both conversion helpers.
  • No test mocks isCollectPolicy through @libs/PolicyUtils, so moving the connections/index.ts import to the leaf breaks no mock.
  • Tests that mock DistanceRequestUtils also mock TransactionUtils, so the new getDistanceInMeters import doesn't bypass a mock.

Onboarding parity.

  • Before and after, no locale is passed, so both fall back to IntlStore.getCurrentLocale().
  • The onboarding value only reaches the Manage team message through hasCompletedGuidedSetupFlowSelector. That message isn't read in prepareOnboardingOnyxData.
  • OnboardingFlow's connectWithoutView is still loaded on the boot path through actions/Report, Policy, and other modules, so dropping the ReportUtils import doesn't skip it.

Exports.

  • No export * name collision in PolicyUtils/index.ts.
  • The import/prefer-default-export disable in isCollectPolicy.ts is justified because export * skips default exports. About 95 other files use the same disable.

Checks run.

  • npm run typecheck: passed.
  • npm run lint on all 29 changed files: clean.
  • Jest: 15 suites, 3352 tests, all passing, including ReportUtilsTest, OnboardingFlowTest, PolicyUtilsTest, DistanceRequestUtilsTest, SearchUIUtilsTest, BankAccountsTest, QuickbooksOnline, usePolicyIndicatorChecksTest, and getWorkspaceMenuItemsTest.

Not checked.

  • The "142 → 122" cycle count. There is no repo script for it.
  • The UI smoke test. Static checks and unit tests cover this pure move.

@MelvinBot

Copy link
Copy Markdown
Contributor

This request duplicates the earlier Deep review comment. I already posted the deep review for the current head (e240437), and the PR hasn't changed since. It found no blocking issues and three optional nits.

…ure-helper-leaves-v1

Conflicts in src/libs/actions/Welcome/OnboardingFlow.ts: this branch extracted the
onboarding message builder into the leaf module buildOnboardingMessages.ts to break the
import cycle, while main extended the inline builder with join-workspace tasks and
messages. Kept the extraction and ported main's additions (addWorkEmail/validateEmail/
joinWorkspace tasks, join-workspace messages, extra OnboardingTaskLinks fields) into the
leaf module, keeping the builder body byte-identical to main's.

ReportUtils picked up main's getValidateEmailTaskDescription(), which called
getOnboardingMessages() and would re-introduce the cycle; switched it to the leaf
buildOnboardingMessages(onboarding) using ReportUtils' existing onboarding connection.
…ure-helper-leaves-v1

Conflict in src/libs/PolicyUtils/index.ts: this branch moved isCollectPolicy into the
leaf isCollectPolicy.ts, while main moved the role permission bundles and
isControlPolicyOnlyRole into the leaf permissions.ts. Both extractions are kept, so the
import block is the union of the two and index.ts keeps re-exporting both leaves.
…ure-helper-leaves-v1

Conflicts in src/libs/PolicyUtils/index.ts: main extracted the policy-type helpers
(isCollectPolicy, isControlPolicy, isPaidGroupPolicy, canPolicyAccessFeature, archived/pending
delete and Submit/Group helpers) into a new leaf policyType.ts, which supersedes this branch's
narrower isCollectPolicy.ts leaf and the local canPolicyAccessFeature definition. Took main's
side in both hunks, deleted our now-redundant isCollectPolicy.ts, and repointed the only
cycle-breaking importer (libs/actions/connections/index.ts) at PolicyUtils/policyType, which is
also a leaf (CONST and types only) so the cycle stays broken.

Also applied main's new patch-package patch for react-native-live-markdown via
bun scripts/applyPatches.ts and cleared stale *.tsbuildinfo so typecheck sees the patched
declarations.
…ure-helper-leaves-v1

Conflicts in src/libs/actions/Welcome/OnboardingFlow.ts and src/libs/ReportUtils.ts. Main
reverted the join-workspace onboarding feature that a previous merge had brought in: the
addWorkEmail/validateEmail/joinWorkspace tasks, joinWorkspaceMessages, the ONBOARDING_TASK_TYPE
and ONBOARDING_CHOICES entries, and ReportUtils.getValidateEmailTaskDescription.

Kept this branch's extraction of the message builder into the leaf buildOnboardingMessages.ts
and reverted that leaf to main's builder body (now byte-identical), and dropped the now
unreferenced getValidateEmailTaskLink/getValidateEmailTaskDescription helpers from ReportUtils.
…ure-helper-leaves-v1

# Conflicts:
#	src/pages/workspace/accounting/PolicyAccountingPage.tsx
…ure-helper-leaves-v1

Conflicts in src/libs/actions/Welcome/OnboardingFlow.ts and src/libs/PolicyUtils/index.ts.
Main re-landed the join-workspace onboarding feature after a previous merge had seen it
reverted, and extracted more PolicyUtils helpers into leaves (customUnits.ts, tax.ts,
connections.ts, xero.ts, sageIntacct.ts).

Kept this branch's extraction of the message builder into the leaf buildOnboardingMessages.ts
and ported main's re-landed join-workspace additions (addWorkEmail/validateEmail/joinWorkspace
tasks, join-workspace messages, extra OnboardingTaskLinks fields) into the leaf, keeping the
builder body byte-identical to main's. In PolicyUtils took main's leaf extractions and restored
shouldShowQBOReimbursableExportDestinationAccountError as a local definition: main moved it to
actions/connections/QuickbooksOnline, whose new isPolicyAdmin import from PolicyUtils would
reintroduce the index<->QuickbooksOnline cycle this branch exists to break.
…ure-helper-leaves-v1

Conflicts in src/libs/PolicyUtils/index.ts and PolicyCommuterExclusionsPage.tsx. Main kept
splitting PolicyUtils into leaves (rules.ts, features.ts, workflows.ts, errors.ts) and moved
shouldShowQBOReimbursableExportDestinationAccountError into actions/connections/QuickbooksOnline,
whose isPolicyAdmin import from PolicyUtils would reintroduce the cycle this branch breaks. Kept
the helper cycle-safe: defined in the PolicyUtils/errors.ts leaf next to its only user
(getPolicyBrickRoadIndicatorStatus) and re-exported via the barrel, so all @libs/PolicyUtils
callers and the existing test mock keep working without any QuickbooksOnline edge.

CommuterExclusionsPage took a union: main's new hasCompanyAddress from PolicyUtils plus our
getUnitTranslationKey import from the WorkspaceDisplayUtils leaf (main re-inlined it into
WorkspacesSettingsUtils, which imports the PolicyUtils barrel; the leaf bodies are identical).
Repointed main's new WorkspaceOfficeLocationForm at the same leaf for
getWorkspaceAddressStreetLines.

Refreshed node_modules via npm ci for main's victory-native 42 / repack 5.4 bumps, reapplied
patches, and cleared tsbuildinfo caches.
@thelullabyy

thelullabyy commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-10-18.at.18.03.34.mov

@thelullabyy thelullabyy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I checked the moves hunk by hunk: every helper body is moved verbatim, every caller is updated, and buildOnboardingMessagesWithoutManageTeam() gives the same output for the validate-email, Personal spend and Submit messages that ReportUtils uses. CI is green. I only left two minor inline comments.

One optional follow-up: DistanceRequestUtils, SearchUIUtils and OnboardingFlow.getOnboardingMessages still re-export the moved helpers. That's fine for this PR, but moving the remaining callers to the new leaves later and dropping those re-exports would stop new code from importing through the heavy modules again.

onboardingMessages: Omit<OnboardingMessages['onboardingMessages'], typeof CONST.ONBOARDING_CHOICES.MANAGE_TEAM>;
};

function buildOnboardingMessagesWithoutManageTeam(locale?: Locale): OnboardingMessagesWithoutManageTeam {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Manage team key is hidden only at the type level. At runtime this still builds the full object with onboardingData = undefined, so onboardingManageTeamMessage is created with isOnboardingFlow computed from undefined. That's fine today, because only Manage team reads onboardingData. But if anyone later makes another message depend on onboardingData, ReportUtils would quietly diverge from getOnboardingMessages() and nothing would flag it.

Could you add a short JSDoc here explaining why this variant exists (it avoids the module-level Onyx read and the cycle) and that it is only valid for messages that don't depend on onboardingData? The reason isn't obvious from the name alone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Added in 3007ebc92fe. The JSDoc names both reasons, the import cycle and the module-level Onyx read, and says the variant is only valid for messages that don’t use onboarding data

@@ -0,0 +1,327 @@
import {translate} from '@libs/Localize';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: this is now a pure builder, so libs/actions/Welcome/ is a slightly odd home for it. Also, unlike the other new leaves, it imports Localize, IntlStore and a selector, not only CONST, types and Onyx, so the description's "leaf modules" claim doesn't quite cover it. The no-cycle count shows it's fine today. Maybe just update the description, or consider moving it under libs/ in a later part.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I moved it to src/libs/buildOnboardingMessages. Only the path and imports changed. Description updated too

@melvin-bot
melvin-bot Bot requested a review from roryabraham October 18, 2026 10:05

@thelullabyy thelullabyy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with non-blocking comments

Mirrors the committed .claude config for Codex-based agents: skill copies under
.agents/skills and .codex config (MCP servers, hooks, agents).
@LukasMod

Copy link
Copy Markdown
Contributor Author

Comments addressed. Thank you for review

…-pure-helper-leaves-v1

Conflicts:
	src/libs/actions/Search.ts
Our branch drops the @libs/SearchUIUtils import to break the cycle; main adds
getExpenseReportIDs and TODO_SEARCH_KEYS to it. Keep the type guard from the
@libs/isTransactionGroupListItemType leaf and take only the new symbols from
SearchUIUtils.
…nk it

Our import/no-cycle work removed route param entries that main later
deleted too, leaving the file at exactly 4000 lines. The max-lines rule
errs at 4001+, so the file-top disable became an unused directive and
lint fails on it.
@roryabraham
roryabraham merged commit 86551af into Expensify:main Oct 19, 2026
34 of 35 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.15-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed. This PR is a refactor that moves helpers into new modules and updates imports, with no user-facing behavior change.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants