Conversation
Mobile selection mode is a single global Onyx flag. Opening Expense rules via the Concierge link from an expense pushes a fullscreen tab entry, so the report screen stays mounted underneath and clears the flag as soon as the Rules page sets it. Focus-gate both clears: the mount cleanup in useMobileSelectionMode, and the single-transaction auto-exit in MoneyReportHeader.
|
@ChavdaSachin 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-09-15.at.6.18.43.AM.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-09-15.at.6.37.27.AM.moviOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-09-15.at.5.53.30.AM.mov |
|
@ChavdaSachin kindly bump |
|
Reviewing ♻️ |
|
@Julesssss kindly bump |
# Conflicts: # tests/ui/components/MoneyReportHeaderSelectionModeTest.tsx
The focus guard only covered the turn-off, so a report mounted behind the Expense rules page still painted the "Select multiple" header the moment selection mode was enabled there. Swiping back revealed it for ~0.6s until the report regained focus and cleared the flag. Gate the whole selection branch on focus, so an unfocused report renders its normal header and never shows selection UI another screen owns.
|
@Julesssss I found one related bug here. Do you think it makes sense to fix it in a separate folow up issue? |
Okay yeah looks like it was introduced here, so lets try and resolve before this PR is merged please. |
@Julesssss nice. it is already handled here. so we are good to merge |
|
Thanks @mukhrr, unfortunately there are new conflicts please fix and we can merge |

Explanation of Change
Mobile selection mode is a single global Onyx flag. The Concierge rules link pushes a fullscreen tab entry rather than an RHP, so the report you came from stays mounted underneath, and two of its subscribers clear the flag as soon as the Rules page sets it:
MoneyReportHeaderclears it in its render body when the report has one visible transactionuseMobileSelectionModeclears it on mount, andSelectionToolbarGatemountsSelectionToolbarexactly when the flag flipsFocus-gating both clears fixes it, verified red/green on iOS. The hook cleanup is deferred rather than skipped, so the existing stale-selection cleanup still runs once the screen is focused.
The existing
MoneyReportHeaderSelectionModeTestmocks navigation withoutuseIsFocused, so it now stubs it as focused. The new focus-gating tests live inMoneyReportHeaderFocusSelectionModeTest.The focus guard has to cover the render, not just the turn-off. An unfocused report mounted behind the Rules page otherwise still paints the
Select multipleheader the moment selection mode turns on, and iOS swipe-back reveals it for about 0.6s until the report regains focus. Gating the whole branch on focus removes that, verified frame by frame on the iOS simulator. The inner focus check on the single-transaction turn-off is folded into the outer one, so an unfocused report still never clears the flag, same as before.Fixed Issues
$ #95132
PROPOSAL: #95132 (comment)
Tests
Precondition: two or more personal expense rules, and an expense created through a rule so the Concierge message with the
personal expense ruleslink exists.personal expense ruleslink in the Concierge messageSelectSelect multipleheader,1 selected, and checkboxes visibleSelect multipleOffline tests
Selection mode is a RAM-only Onyx value and the flows above make no API calls, so behaviour is identical offline.
QA Steps
Same as Tests.
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
android_web.mp4
iOS: Native
IOS_app.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4