Fix agent chat RHP background reverting to Inbox on refresh - #98589
Fix agent chat RHP background reverting to Inbox on refresh#98589MelvinBot wants to merge 5 commits into
Conversation
Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
I looked into the failing checks — none are genuine code failures, so there's nothing to push a fix for. What's actually failing:
I verified the change itself is sound. This PR adds Recommendation: Re-run the canceled Jest workflow (or push any trivial update) to get a clean test run. There's no code fix needed from me here. |
Co-authored-by: Eugene Voloshchak <eVoloshchak@users.noreply.github.com>
|
Re-triggered CI — there was no code defect to fix. The red Since The PR change itself is verified correct: adding |
|
Update: a fresh CI run is now green — the earlier red test jobs were just a canceled run, not a real failure. On the current run, every check that has completed passes: The only red checks are There's no code fix needed from me. Once the queued shards get a runner they should pass too, and the two remaining reds resolve through the normal review/checklist steps. |
|
The one remaining failing check ( What's failing: Why it's unrelated: This PR only changes two files — The failure is a test-mock gap that exists independently of this PR: the test mocks Everything else is green — typecheck, ESLint, Bun tests, and the other 7 Jest shards all pass. The remaining Recommendation: The |
|
The one real failing check ( What's failing: Why it's unrelated: This PR only adds an entry to The remaining reds — Recommended next steps:
|
|
@MelvinBot merge main |
…Background Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
|
🤖 Merged The branch was 1 commit behind |
|
I re-ran through all the checks — the ones that were genuinely running have all gone green (typecheck, every The only remaining non-passing check is Check independent approval, and there's nothing to fix in code:
No fix needed. Once you (or another reviewer) approve, that check will clear and the PR will be mergeable. |
|
🚧 mjasikowski 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! 🧪🧪
|
|
@MelvinBot remove this comment: |
Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
|
🤖 Removed the regression-test comment block from This was a comment-only deletion with no functional impact, so the test's behavior is unchanged. |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
|
@eVoloshchak 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] |
Explanation of Change
PR #95631 added a new Right-Hand-Panel (RHP) screen
AGENT_REPORT(routesettings/agents/r/:reportID) so the newly created agent DM opens in a dedicated RHP over the Account > Agents settings page on wide layouts. The screen was wired intoROUTES,SCREENS,RightModalNavigator, andlinkingConfig/config.ts, but it was not registered in any of theRHP → backgroundrelation tables undersrc/libs/Navigation/linkingConfig/RELATIONS/.On refresh/deep-link,
getMatchingFullScreenRoutereconstructs the central-pane screen behind an RHP by looking the RHP screen name up in those relation tables. With no relation entry, it returnsundefinedand control falls through togetDefaultFullScreenRoute. BecauseAGENT_REPORTcarries areportIDparam, the default builds a reports split navigator (Inbox + report) as the background instead of the Agents settings page — which is exactly the reported symptom: after refreshing while the agent chat RHP is open, the background changes to Inbox.This change registers
SCREENS.RIGHT_MODAL.AGENT_REPORTunderSCREENS.SETTINGS.AGENTS.ROOTinSETTINGS_TO_RHP.ts. That makesRHP_TO_SETTINGS[AGENT_REPORT] === SCREENS.SETTINGS.AGENTS.ROOT, sogetMatchingFullScreenRouterebuilds the Settings split with the Agents page as the central pane, keeping the background on Account > Agents after a refresh. A regression unit test is added to lock in this relation.Fixed Issues
$ #97833
PROPOSAL:
Tests
Offline tests
QA Steps
// 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari