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.
|
LukasMod
force-pushed
the
fix/no-cycle-part12-report-action-subscribers
branch
3 times, most recently
from
September 17, 2026 12:54
be1e316 to
876c8a6
Compare
Move the new-action subscriber registry into Report/reportActionSubscribers and the task deletion paths into Task/TaskDeletion, so action modules can notify subscribers or cancel a task without importing the Report hub. buildOldDotURL and openExternalLink become leaves too, which lets actions/Session drop its dependency on actions/Link. Each hub keeps re-exporting the names callers still reach it for, so those imports are unchanged. Drop the buildOldDotURL re-export from actions/Link and the SubscriberCallback type export, both dead once Session moved to the leaf. import(no-cycle) findings drop 264 -> 261 on this base; the wider -55 in the plan stays gated on parts 8-11 landing.
LukasMod
force-pushed
the
fix/no-cycle-part12-report-action-subscribers
branch
from
September 17, 2026 13:22
876c8a6 to
78d61c1
Compare
Contributor
Author
|
@codex review |
1 similar comment
Contributor
Author
|
@codex review |
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
Part 12 of the
import/no-cycleseries.Task.ts,IOU/Hold.ts, andSession/index.tseach import the Report actions hub (src/libs/actions/Report/index.ts) oractions/Linkto reach one helper that has nothing else to do with those files. This PR moves each helper into a leaf module and points the caller at it, so no caller needs the hub for it anymore.Report/reportActionSubscribers.tsnow holdsnotifyNewActionandsubscribeToNewActionEvent. The registry is a module-scope array that imports only theReportActiontype.Report/index.tsre-exports both names, souseReportActionsNewActionLiveTailandMoneyRequestReportActionsListkeep subscribing through the hub.IOU/Hold.tsandTask.tsimport the leaf. Eight more modules callnotifyNewAction(Chronos.tsplus sevenIOUpayment flows). They already pull other functions from the hub, so they keep that import and this PR leaves them for a later part.Task/TaskDeletion.tsnow holdsdeleteTask,clearTaskErrors, andgetNavigationUrlOnTaskDelete. Those three were the only reasonTask.tsimported the hub: they neednavigateToConciergeChatAndDeleteReport,getMostRecentReportID, andoptimisticReportLastData.TaskViewandDynamicReportDetailsPageimport them from the new path, and the bodies are unchanged.actions/buildOldDotURL.tsandsrc/libs/openExternalLink.tsare new leaves.buildOldDotURLreads the current email fromCurrentUserStore, which replaces theONYXKEYS.SESSIONmirrorLink.tskept for it.Session/index.tsimports both leaves and dropsLink.tsentirely.Link.tsstill re-exportsopenExternalLink, since 25 modules import it from there, and drops thebuildOldDotURLre-export that knip flagged once Session stopped using it.npx oxlint src -c .oxlintrc.no-cycle.jsonreports 261 findings across 82 files on this branch, down from 264 across 82 files at the merge base. One cycle per repointed import:Task.ts8 to 7,Session/index.ts9 to 8,IOU/Hold.ts6 to 5. Parts 8 through 11 are still open and remove parallel paths, so the combined drop is larger than what any single branch shows on its own.Nothing here touches the UI or adds a dependency.
Fixed Issues
$ #99650
PROPOSAL:
Tests
Test 1: Live message in the open report
Covers
notifyNewActionin its new module. Smoke check only: the list renders from the report actions data, so this catches load and runtime errors, not a missed notification.Test 2: Delete a task that is the only comment
Covers
deleteTask,getNavigationUrlOnTaskDelete, and theTask/TaskDeletionimport path inDynamicReportDetailsPage.Test 3: OldDot link keeps the email param
Covers
buildOldDotURLandopenExternalLink. The email now comes fromCurrentUserStoreinstead of the mirrorLink.tsused to keep, so that param is the thing to watch.email=<your email>, with a single separator before it and no doubled?or&.authTokenin the URL is expected, though a missing one is also fine: the request for it falls back to no token.email=<your email>and now has noauthToken.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Test1:
web.1.mov
Test2:
web-2.mov
Test 3:
web-3.mov