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
[$250] Agent - Account page is displayed blank on background when user copilots into agent from RHP #97843
Version Number: 9.4.50-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#95631 Email or phone of affected tester (no customers):ibellicotest+2766@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: User Settings
Action Performed:
Open the staging.new.expensify.com website.
Navigate to "Account" > "Agent" > Create a new agent.
Note that when RHP is opened, new created agent is visible on background.
Click on RHP header > "Copilot into account"
Note that now a blank space is displayed on background instead of "Profile" page.
Close RHP.
Note that now, "Profile" page appears.
Expected Result:
Content on background should still be visible after user copilots into agent´s account from RHP.
Actual Result:
Blank space is displayed on background instead of "Profile" page, after user copilots into agent´s account from chat RHP.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #95631 - "Open the agent DM via an optimistic reportID" by @mjasikowski (High confidence it enables the reported repro; the underlying guard gap is pre-existing) Related Issues: #94395 (the feature request #95631 implemented)
Recommendation: REVERT
Reverting #95631 removes the newly added "open the agent DM in an RHP after creation" flow, which is the only path that lets a user reach Copilot into account from an unguarded RHP sitting over the guarded Agents pane — the precondition for the blank background. It is the only new agent code in this deploy (checklist #97828) and reverting cleanly clears the blocker. A targeted roll-forward fix is also viable (see Root Cause) and would be the better long-term path, but revert is the safe action to unblock the deploy now.
Assigned: @mjasikowski (PR author), @chuckdries and @eVoloshchak (approving reviewers) — already auto-assigned by Melvin, no change needed. Labels: No change. DeployBlockerCash is kept (frontend bug, App PR involved). No DeployBlocker (web) label is present, so nothing to remove.
📋 Detailed Analysis
Evidence
The repro is only reachable through the flow Open the agent DM via an optimistic reportID #95631 introduced: after creating an agent on a wide layout, the app now opens the owner↔agent DM in a dedicated RHP (AGENT_REPORT) over the Agents settings pane, and the agent's name in that RHP header opens the agent Profile which exposes Copilot into account.
Reproducible on staging only — the entire Agents feature is not in production yet, so N/A in prod is expected and does not weaken the frontend classification.
Tapping Copilot into account calls switchToDelegator → connect (delegate), which swaps the session email to the agent. The bug then surfaces on the background pane, not on the API call.
Verification
Guarded background pane: AgentsPage (SCREENS.SETTINGS.AGENTS.ROOT) is wrapped in withAgentAccessDenied in the settings split navigator — SettingsSplitNavigator.tsx#L25.
withAgentAccessDenied performs its actual redirect (to Profile) inside a useFocusEffect, and renders null whenever shouldRedirect is true. On a wide/split layout the guarded Agents pane is the central pane and stays mounted but unfocused while the agent DM lives in the RHP.
When the owner taps Copilot into account from that RHP:
Session email becomes the agent's, so isAgent flips true and the guarded Agents pane's shouldRedirect becomes true → it renders null = blank background.
The redirect that would push Profile lives in useFocusEffect, which does not fire because the pane isn't focused (the RHP holds focus).
Closing the RHP returns focus to the Agents pane → useFocusEffect finally runs → redirects to Profile → "Profile page appears."
The designed path (copilot from the guarded EditAgentPage RHP) works because that focused RHP is guarded and its own effect dismisses the modal then redirects (see the comments at withAgentAccessDenied.tsx#L51-L60). #95631 added a path where copilot is triggered from an unguarded report RHP over the guarded pane, which the guard doesn't cover.
Targeted roll-forward alternative (if the team prefers not to revert): dismiss the agent-DM RHP as part of the copilot switch, or make withAgentAccessDenied redirect the guarded central pane even while it is mounted-but-unfocused (drive the redirect off the isAgent state transition rather than solely off focus).
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Aug 5, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #95631
applause-bot commentedon Aug 5, 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/5b406ea95803e531ec43863db230bed9c039839083eece2464f43b66efb4ac7a
melvin-bot commentedon Aug 5, 2026
@chuckdries @eVoloshchak you have been assigned to this deploy blocker because you reviewed the offending PR: #95631
melvin-bot commentedon Aug 5, 2026
@mjasikowski you have been assigned to this deploy blocker because you authored the offending PR: #95631
melvin-bot commentedon Aug 5, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 5, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Aug 5, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #95631 - "Open the agent DM via an optimistic reportID" by @mjasikowski (High confidence it enables the reported repro; the underlying guard gap is pre-existing)
Related Issues: #94395 (the feature request #95631 implemented)
Recommendation: REVERT
Reverting #95631 removes the newly added "open the agent DM in an RHP after creation" flow, which is the only path that lets a user reach Copilot into account from an unguarded RHP sitting over the guarded Agents pane — the precondition for the blank background. It is the only new agent code in this deploy (checklist #97828) and reverting cleanly clears the blocker. A targeted roll-forward fix is also viable (see Root Cause) and would be the better long-term path, but revert is the safe action to unblock the deploy now.
Assigned: @mjasikowski (PR author), @chuckdries and @eVoloshchak (approving reviewers) — already auto-assigned by Melvin, no change needed.
Labels: No change.
DeployBlockerCashis kept (frontend bug, App PR involved). NoDeployBlocker(web) label is present, so nothing to remove.📋 Detailed Analysis
Evidence
AGENT_REPORT) over the Agents settings pane, and the agent's name in that RHP header opens the agent Profile which exposes Copilot into account.StagingDeployCashchecklist (Deploy Checklist: New Expensify 2026-08-04 #97828, item 24).N/Ain prod is expected and does not weaken the frontend classification.switchToDelegator→connect(delegate), which swaps the session email to the agent. The bug then surfaces on the background pane, not on the API call.Verification
AgentsPage(SCREENS.SETTINGS.AGENTS.ROOT) is wrapped inwithAgentAccessDeniedin the settings split navigator — SettingsSplitNavigator.tsx#L25.AGENT_REPORTreport screen — RightModalNavigator.tsx#L506-L514 — and navigates to it after agent creation on wide layouts — AddAgentPage.tsx#L127-L138.withAgentAccessDenied.tsx) was introduced in June/July 2026, well before this deploy — it is pre-existing, not part of Open the agent DM via an optimistic reportID #95631. This is why Open the agent DM via an optimistic reportID #95631 exposes a latent guard gap rather than containing the buggy line itself.Root Cause
withAgentAccessDeniedperforms its actual redirect (to Profile) inside auseFocusEffect, and rendersnullwhenevershouldRedirectis true. On a wide/split layout the guarded Agents pane is the central pane and stays mounted but unfocused while the agent DM lives in the RHP.When the owner taps Copilot into account from that RHP:
isAgentflips true and the guarded Agents pane'sshouldRedirectbecomes true → it rendersnull= blank background.useFocusEffect, which does not fire because the pane isn't focused (the RHP holds focus).useFocusEffectfinally runs → redirects to Profile → "Profile page appears."The designed path (copilot from the guarded
EditAgentPageRHP) works because that focused RHP is guarded and its own effect dismisses the modal then redirects (see the comments at withAgentAccessDenied.tsx#L51-L60). #95631 added a path where copilot is triggered from an unguarded report RHP over the guarded pane, which the guard doesn't cover.Targeted roll-forward alternative (if the team prefers not to revert): dismiss the agent-DM RHP as part of the copilot switch, or make
withAgentAccessDeniedredirect the guarded central pane even while it is mounted-but-unfocused (drive the redirect off theisAgentstate transition rather than solely off focus).32 remaining items
mallenexpensify commentedon Aug 27, 2026
Please comment and tag me if/when payment is due, thx
NEXAITECHAU commentedon Aug 30, 2026
melvin-bot commentedon Aug 30, 2026
melvin-bot commentedon Aug 31, 2026
@chuckdries, @mjasikowski, @eVoloshchak Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Oct 2, 2026
This issue has not been updated in over 15 days. @chuckdries, @mjasikowski, @eVoloshchak eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!