Fix: Add agent rule RHP back button closes the RHP instead of opening the Suggested tab#96557
Fix: Add agent rule RHP back button closes the RHP instead of opening the Suggested tab#96557MelvinBot wants to merge 1 commit into
Conversation
…ching to Suggested tab Co-authored-by: Manan <mananjadhav@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
All the substantive CI checks on this PR are passing — The only failing check is
What's needed: as the human co-author, please fill out the checklist — complete the (The |
|
@MelvinBot Please close this PR. It's not needed. |
|
🤖 Closed this PR as requested — it's not needed. Reopen anytime if that changes. |
Explanation of Change
On the "Add agent rule" flow, the RHP header shows two peer tabs — Suggested and Edit — both selectable via the
TabSelector. The header back button handler was intercepting the press whenever the Edit tab was active and switching back to the Suggested tab instead of closing the RHP. So a user who opened the RHP, clicked the Edit tab, and then pressed back stayed inside the RHP on the Suggested tab rather than exiting (reported as a deploy blocker regression from #95875).This removes the tab-stepping special case so the back button always calls
Navigation.goBack()and closes the RHP. Switching between Suggested and Edit remains fully handled by theTabSelector. As a side benefit, pressing back from the Edit tab now correctly routes throughNavigation.goBack(), so the unsaved-changes discard prompt (wired via thebeforeRemovelistener inuseDiscardChangesConfirmation) fires as expected instead of being bypassed.Fixed Issues
$ #96547
PROPOSAL: #96547 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Suggested flow to verify:
Offline tests
Same as tests.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
Same as 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari