Refactor Account settings menu data into a shared hook - #96870
Refactor Account settings menu data into a shared hook#96870nabi-ebrahimi wants to merge 7 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
4101db0 to
085d77e
Compare
|
@marufsharifi 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] |
|
No product review needed |
|
@marufsharifi this is waiting on you to be reviewed, right? (CC: @carlosmiceli) |
|
@trjExpensify, yep—I’ll prioritize this today. Thanks! |
|
Thank you 👍 |
|
@MelvinBot review |
|
🤖 Review: LGTM — clean, behavior-preserving extraction. No blocking issues found. The menu-building logic (Onyx reads, brick-road indicators, sign-out, classic-redirect, account/general items) moves cleanly into Verification performed
Equivalences I checked (all preserve behavior):
Optional (non-blocking): the hook rebuilds |
|
@nabi-ebrahimi, could you please take a look at the above comments. thanks. |
Thanks for the review. The optional memoization is unchanged from the previous behavior, and both React compilers pass, so I’ll keep this PR focused on the extraction. |
|
@marufsharifi conflicts are resolved and all review comments have been addressed. Please take another look when you have a chance. Thanks! |
|
@MelvinBot Review |
|
🤖 Re-review: LGTM — still a clean, behavior-preserving extraction after the I re-verified the current head ( Verification performed
The added full-order test is a nice behavior-lock for a refactor like this. Nothing else to flag. |
|
@marufsharifi thanks for the review. All comments have been addressed. Please take another look when you have a chance. |
|
@nabi-ebrahimi, could you please merge the main. thanks. |
Merged the main, thanks |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-08-04.at.4.08.48.PM.movAndroid: mWeb ChromeScreen_Recording_20260804_161314_Chrome.mp4iOS: HybridAppScreen.Recording.2026-08-04.at.4.53.07.PM.moviOS: mWeb SafariScreen.Recording.2026-08-04.at.4.16.20.PM.movMacOS: Chrome / SafariScreen.Recording.2026-08-04.at.11.59.53.AM.movScreen.Recording.2026-08-04.at.11.57.03.AM.movScreen.Recording.2026-08-04.at.11.59.02.AM.mov |
Explanation of Change
Extracts the existing Account and General Settings menu definitions from
InitialSettingsPageinto a shareduseInitialSettingsPageMenuDatahook.InitialSettingsPagenow consumes this shared source while continuing to own rendering, styles, focus handling, scrolling, account-switch cleanup, and page initialization.This is a behavior-preserving prerequisite for adding Account navigation suggestions in a follow-up PR. It does not add Account destinations to Search Router.
Fixed Issues
$ #92752
PROPOSAL: #92752 (comment)
Tests
Account menu order and navigation
Profile, optionalSubscription,Wallet,Expense rules, optionalAgents,Preferences,Copilot,Security.General menu order and actions
optional
Go to Expensify Classic,Help,What's new,About,Troubleshoot,Save the world, andSign out.What's newopens the existing external page.Sign-out action
Sign out.Settings layout
Offline tests
Same as Tests.
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: Native
Screen_Recording_20260724_095514_New.Expensify.Dev.mp4
Android: mWeb Chrome
Screen_Recording_20260724_094125_Chrome.mp4
iOS: Native
Screen.Recording.2026-07-24.at.10.32.35.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-07-24.at.10.35.28.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-24.at.9.15.42.AM.mov
Screen.Recording.2026-07-24.at.9.17.21.AM.mov
Screen.Recording.2026-07-24.at.9.21.08.AM.mov
Screen.Recording.2026-07-24.at.9.22.36.AM.mov
Screen.Recording.2026-07-24.at.9.36.11.AM.mov
Screen.Recording.2026-07-24.at.9.33.49.AM.mp4