You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-10-02] [$250] [Exploratory] iOS-Expense rules - Unable to select a rule when navigating via link from the expense details #95132
the RHP SettingsModalStackNavigator (reached when navigating from a context that is already inside the RHP — e.g. tapping the personal-expense-rule link inside the expense-details/concierge message, which is displayed in the RHP on mobile).
When the page is mounted inside the RHP, isInNarrowPaneModal is true, so long-press is only enabled if the table opts in via shouldEnableSelectionInNarrowPaneModal. PersonalExpenseRulesTable does not pass that prop, so shouldEnableMobileSelectionLongPress is false and handleRowLongPress early-returns — long-press does nothing.
Arriving via Settings → Rules opens the page in the split navigator (not a narrow-pane modal), so !isInNarrowPaneModal is true and long-press works — which is why the bug only reproduces through the in-app link.
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
Alternatively, close the RHP before navigating so the page always opens in the split navigator (Link.openLink only calls Navigation.closeRHPFlow() on wide layout). That is a broader, riskier change; the table-prop fix is the minimal one and matches existing convention.
Verification notes & confidence
Confidence: Medium. The gating logic, the missing prop, and the sibling tables that opt in are all confirmed in code. The one piece not confirmed statically is that tapping the link mounts the page in the RHP (isInNarrowPaneModal === true) — this is strongly implied by the dual registration and by the fact that all four other RHP-reachable selectable tables already set this prop, but a runtime check would make it certain.
To confirm on-device: open the Rules page via the expense-details link and log isInNarrowPaneModal / shouldEnableMobileSelectionLongPress inside TableRow, or inspect navigationRef.getRootState() to verify the page sits under RIGHT_MODAL_NAVIGATOR. Repro precondition: 2+ personal expense rules + an expense that went through the expense-rule flow (per the issue steps).
No related open issue found that already tracks this.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95132) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-][Exploratory] iOS-Expense rules - Unable to select a rule when navigating via link from the expense details[/-][+][$250] [Exploratory] iOS-Expense rules - Unable to select a rule when navigating via link from the expense details[/+]on Jul 17, 2026
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
two or more personal expense rules, and an expense created through a rule so the Concierge message with the personal expense rules link exists.
Test:
On iOS or Android, open the report containing that expense, open the expense, and tap the personal expense rules link in the Concierge message
Long-press any rule and tap Select
Verify selection mode stays on: Select multiple header, 1 selected, and checkboxes visible
Repeat on a report with two or more expenses and verify selection is kept there too
Open Settings > Expense rules directly and verify long-press to select still works
Enter selection mode on any list, navigate away, come back, and verify the selection is cleared
On iOS, with selection mode on in Expense rules, swipe back to the report and verify the report header is its normal header the whole way, never Select multiple
Activity
applause-bot commentedon Jul 2, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/e5563a8abe1ea3c72a1b367b5ffa52a18a85a5e22d0661c2b503e62aec1924f6
MelvinBot commentedon Jul 17, 2026
Proposal
What is the root cause of that problem?
The Expense Rules screen is registered in two navigators:
SettingsSplitNavigator(reached via Settings → Rules), andSettingsModalStackNavigator(reached when navigating from a context that is already inside the RHP — e.g. tapping the personal-expense-rule link inside the expense-details/concierge message, which is displayed in the RHP on mobile).Long-press-to-select is gated in
TableRow.tsx:73:When the page is mounted inside the RHP,
isInNarrowPaneModalistrue, so long-press is only enabled if the table opts in viashouldEnableSelectionInNarrowPaneModal.PersonalExpenseRulesTabledoes not pass that prop, soshouldEnableMobileSelectionLongPressisfalseandhandleRowLongPressearly-returns — long-press does nothing.Arriving via Settings → Rules opens the page in the split navigator (not a narrow-pane modal), so
!isInNarrowPaneModalistrueand long-press works — which is why the bug only reproduces through the in-app link.What changes do you think we should make in order to solve the problem?
Pass
shouldEnableSelectionInNarrowPaneModalto the<Table>inPersonalExpenseRulesTable/index.tsx, exactly as the other RHP-reachable tables already do —RoomMembersTable,ReportParticipantsTable,WorkspaceViewTagsTable, andWorkspaceReportFieldListValuesTable. This keys the selection UX off the real screen size instead of suppressing it inside the RHP.What alternative solutions did you explore? (Optional)
Alternatively, close the RHP before navigating so the page always opens in the split navigator (
Link.openLinkonly callsNavigation.closeRHPFlow()on wide layout). That is a broader, riskier change; the table-prop fix is the minimal one and matches existing convention.Verification notes & confidence
Confidence: Medium. The gating logic, the missing prop, and the sibling tables that opt in are all confirmed in code. The one piece not confirmed statically is that tapping the link mounts the page in the RHP (
isInNarrowPaneModal === true) — this is strongly implied by the dual registration and by the fact that all four other RHP-reachable selectable tables already set this prop, but a runtime check would make it certain.To confirm on-device: open the Rules page via the expense-details link and log
isInNarrowPaneModal/shouldEnableMobileSelectionLongPressinsideTableRow, or inspectnavigationRef.getRootState()to verify the page sits underRIGHT_MODAL_NAVIGATOR. Repro precondition: 2+ personal expense rules + an expense that went through the expense-rule flow (per the issue steps).No related open issue found that already tracks this.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95132)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jul 17, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ChavdaSachin (
External)[-][Exploratory] iOS-Expense rules - Unable to select a rule when navigating via link from the expense details[/-][+][$250] [Exploratory] iOS-Expense rules - Unable to select a rule when navigating via link from the expense details[/+]85 remaining items
mallenexpensify commentedon Oct 5, 2026
@neerajbachani apologies for missing that. can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022107254573134194720
neerajbachani commentedon Oct 6, 2026
@mallenexpensify I've accepted the job offer, thanks!!
mallenexpensify commentedon Oct 6, 2026
@neerajbachani paid, summary updated above. Thx.
mallenexpensify commentedon Oct 6, 2026
@ChavdaSachin plz complete the Contributor+ checklist and tag me in a post once you have. Thx
ChavdaSachin commentedon Oct 6, 2026
On it
ChavdaSachin commentedon Oct 8, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: Update the personal expense rules table to the new style #93705 (comment)
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
ChavdaSachin commentedon Oct 8, 2026
@mallenexpensify checklist^
flaviadefaria commentedon Oct 9, 2026
Approved: @mukhrr due $125 via NewDot
melvin-bot commentedon Oct 16, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
quinthar commentedon Oct 27, 2026
Approved $250 to @ChavdaSachin