Remove Onyx.connect() for the key: ONYXKEYS.SESSION in src/libs/SubscriptionUtils Part 1#87510
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot review this |
|
Review: Looks good ✅ Clean mechanical refactor — all callers updated correctly, no missed call sites, no logic changes. DetailsCorrectness: Every caller of Safety when session is undefined: Tests: All test updates consistently prepend the Note: |
|
@shubham1206agra 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] |
|
@hungvu193 Please do this PR in parts |
abef95c to
9e5f850
Compare
|
@shubham1206agra Done 😄 |
| * @param accountID — Session account ID of the current user (used to detect owned paid policies). | ||
| */ | ||
| function shouldShowDiscountBanner( | ||
| accountID: number | undefined, |
There was a problem hiding this comment.
| accountID: number | undefined, | |
| currentUserAccountID: number | undefined, |
|
@hungvu193 Remove NoQA from here and add tests. |
|
Done |
|
No new product considerations here, so unsubscribing and unassigning myself. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-04-10.at.10.42.02.PM.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #66442 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @dangrous 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/dangrous in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR is a purely internal code refactoring — it makes |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
Part 1: Remove usages of
Onyx.connectforONYXKEYS.SESSIONby making the functions "pure":Fixed Issues
$ #66442
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
MacOS: Chrome / Safari
Screen.Recording.2026-04-10.at.14.34.56.mov
Screen.Recording.2026-04-10.at.14.36.11.mov