Repository navigation
Remove useOnyx loading status reads for collection keys and keys with default values - #105374
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.
|
…ded-keys # Conflicts: # config/oxlint/oxlint.seatbelt.tsv # src/pages/Insights/InsightsDashboard.tsx
|
@MelvinBot review |
ReviewOne regression: the ❌
|
|
@MelvinBot review |
ReviewNo issues remain. The PR looks good to merge from a code standpoint. The one regression I flagged is fixed. "Undo risky key change" (3c8df96) restores the session-loading check in That commit is the only change since my last review. My findings for the other 21 source files still stand. Optional: add a note to the PR description that |
|
@nkdengineer 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
@VickyStash conflicts |
…ded-keys # Conflicts: # config/eslint/eslint.seatbelt.tsv # config/oxlint/oxlint.seatbelt.tsv
|
Conflicts resolved! @nkdengineer please take a look |
|
Will take a look today. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-11-02.at.23.17.28.movAndroid: mWeb ChromeScreen.Recording.2026-11-02.at.21.56.27.moviOS: HybridAppScreen.Recording.2026-11-02.at.23.15.00.moviOS: mWeb SafariScreen.Recording.2026-11-02.at.21.55.20.movMacOS: Chrome / SafariScreen.Recording.2026-11-02.at.21.44.01.movScreen.Recording.2026-11-02.at.21.51.24.movScreen.Recording.2026-11-02.at.21.52.03.movScreen.Recording.2026-11-02.at.21.53.18.movScreen.Recording.2026-11-02.at.21.54.22.mov |
mountiny
left a comment
There was a problem hiding this comment.
Gotta merge main to resolve merge conflicts
…ded-keys # Conflicts: # config/eslint/eslint.seatbelt.tsv # src/pages/Insights/InsightsDashboard.tsx
…ded-keys # Conflicts: # config/oxlint/oxlint.seatbelt.tsv
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for pushing this ahead
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny 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/mountiny in version: 9.5.31-0 🚀
|
|
No help site update needed — this PR removes redundant internal loading checks without changing user workflows or making existing article instructions incorrect. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This is the first cleanup batch after the
no-onyx-loading-statuslint rule. It removesuseOnyxstatus reads that can never beloadingonce the app has started.useOnyxreportsloadingin only two cases: beforeOnyx.inithas loaded storage into the cache, or when a key has no cached value and anOnyx.mergefor that key is still pending. Once startup is done, neither case applies to these keys:POLICY,DOMAIN,RULE,BULK_ACTION,EXPORT_DOWNLOAD,WORKSPACE_CARDS_LIST,TRANSACTION,SHARED_NVP_PRIVATE_DOMAIN_MEMBER). Merges are queued under member keys, never under the collection key itself.initialKeyStates(SESSION,ACCOUNT,MODAL,RECENT_SEARCHES). They always have a cached value.All of these files mount after
Onyx.inithas finished, so each removed read was alwaysloadedand eachisLoadingOnyxValuecall was alwaysfalse. The PR deletes those checks, along with the metadata variables and any branches that only ran while loading.This PR only includes files where every status read is one of these keys. The files drop out of the seatbelt baseline in both
eslint.seatbelt.tsvandoxlint.seatbelt.tsv.Fixed Issues
$ #104583
PROPOSAL:
Tests
Search
Workspace pickers
Insights / workspace settings
Account / settings
Offline tests
Same, as in Tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same, as in Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Search
search.mp4
search_pt2.mp4
ios_search.mp4
Workspace pickers
wp_web.mp4
ios_wp.mov
Insights / workspace settings
insights_web.mp4
insights_ios.mov
Account / settings
onboarding_web.mp4
tooltip_web.mp4