Repository navigation
fix: hand incident chat exits in an app pop-out to the main window - #31314
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only changes which window a link from the incident chat opens in. It adds or changes no control, string or layout, so no screenshot is needed. [UX-REVIEWED] 593f5c5 Description read[DESCRIPTION-READ] b099e8c03f18e2454a64a1d819dd82073fd3764e5ba5afafedec8011c2f67ccd That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This is a linked-issue fix (#26430) that sends the panel through the hard-exit sink the pop-out already had; no second mechanism is added. What this change shipsInventory (4 items) — 4 justifiedIntent: when someone follows a link out of an incident's chat inside a popped-out Ops Mission Control, the page should open in the main window and the pop-out should stay on the app. This is a FIX.
Sibling count: I grepped [FIRST-PRINCIPLES-REVIEWED] 593f5c5 Description read[DESCRIPTION-READ] 55672fab70316caa6fdc44663cae62f98f5e8e3ff5e7dee8b4ecd0d4cc48109d That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the hard-exit sink is the right place to send the panel's exit through, and it now takes the destination from its callers. [DESIGN-REVIEWED] 593f5c5 Description read[DESCRIPTION-READ] 9f400d966888edac70574a491d4ce8a2cf565704a6f61aa1d9433c69faa74971 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
The ops-mission-control incident chat panel leaves through a full page load. Inside an app pop-out that load ran in the pop-out itself, which turned the window into a second dashboard and dropped its pop-out registration. The panel now leaves through hardNavigate, which uses the hard exit an app pop-out installs and keeps the full page load everywhere else. The pop-out's hard exit takes the destination, so it hands the panel's path and query to the main window the way the frame's other exits do. Closes #26430
322e052 to
593f5c5
Compare
|
Rebased: main moved in website/src/pages/ and test/test_apps_* (neighbours of this PR's files) since this head's CI ran (4d208a0 -> 07ab5da); CI re-running. The previous head's only red was [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (5 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: routes the incident chat's full-page exits through hardNavigate so an app pop-out hands them to the main window, with tests.
…31314) The ops-mission-control incident chat panel leaves through a full page load. Inside an app pop-out that load ran in the pop-out itself, which turned the window into a second dashboard and dropped its pop-out registration. The panel now leaves through hardNavigate, which uses the hard exit an app pop-out installs and keeps the full page load everywhere else. The pop-out's hard exit takes the destination, so it hands the panel's path and query to the main window the way the frame's other exits do. Closes #26430 (cherry picked from commit 57030af)
…31314) The ops-mission-control incident chat panel leaves through a full page load. Inside an app pop-out that load ran in the pop-out itself, which turned the window into a second dashboard and dropped its pop-out registration. The panel now leaves through hardNavigate, which uses the hard exit an app pop-out installs and keeps the full page load everywhere else. The pop-out's hard exit takes the destination, so it hands the panel's path and query to the main window the way the frame's other exits do. Closes #26430 (cherry picked from commit 57030af)
Problem / Motivation
Goal: When the ops-mission-control incident chat panel leaves for another page inside an app pop-out, the main window opens that page and the pop-out stays on the app.
The incident chat panel leaves through a full page load. In an app pop-out that load runs in the pop-out window itself: the window turns into a second full dashboard and drops its pop-out registration, so the main window no longer shows the app as popped out. Every other exit from a popped-out app is handed to the main window instead.
Why it matters
Anyone who pops out Ops Mission Control and follows a link out of an incident's chat loses the pop-out: the window becomes a second dashboard, and the main window's pop-out state is wrong until they close it by hand.
Not a goal
#...) to the main window. The pop-out's other exits do not carry one either.What changed (motivation → approach → change)
The panel's navigator called
window.location.assigndirectly, so it never reached the hard-exit sink an app pop-out installs for exactly this case. That sink only knew one destination,/chat, because its one caller was the hard "Ask the agent" hand-off.The sink now receives the destination, an app-space path with its query. A new
hardNavigate(to)inutils/errorReport.tsuses the sink when one is installed and falls back to the same full page load otherwise;sendErrorToChat's hard path calls it with/chat, so that path behaves as before. The pop-out's sink (AppPopoutHardExitinpages/AppPopoutFrame.tsx) splits the destination into path and query and hands it to the main window through the frame's existinghandOffToMain.IncidentChat.tsx(the ops-mission-control panel) passeshardNavigateas its navigator.Backwards compatibility
Compatible: outside an app pop-out no sink is installed, so the panel and the hard "Ask the agent" hand-off still do the same full page load; in a pop-out the hard "Ask the agent" still hands
/chatto the main window.Removes nothing: the hard-exit sink gains a parameter its one installer now reads; no path, key or behaviour is taken away.
Tests
IncidentChat.cov80.test.tsx: with a hard exit installed, the panel's exit goes to it with the destination and loads no page. Fails onmain, where the panel callswindow.location.assign.AppPopoutFrame.test.tsx: in the pop-out asApp.tsxmounts it,hardNavigate('/chat?sid=chat-9')is handed to the main window with path/chat, query?sid=chat-9and sessionchat-9, and this window does not navigate. Fails onmain, where the sink always forwards/chatwith no query.--sequence.shuffleand different seeds, all green; each new test restores itslocation.assignspy and clears the module-level sink infinally(or on unmount).Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — unit coverage sufficient: the two tests drive both ends of the seam (the panel's navigator and the pop-out's sink as
App.tsxmounts it), and the existing hard "Ask the agent" pop-out tests still pass unchanged.Screenshots / video
Why no screenshot: the change is where a navigation goes; no component, layout or string changes.
Related Issues
Closes #26430
Sibling sweep
Swept: git grep -nE "location.(assign|href\s*=|replace()" -- website/src
Sibling: website/src/components/AddJobSplitButton.tsx:63 -- not affected -- rendered by the Schedule page and the mobile connect modal, neither of which runs in an app pop-out
Sibling: website/src/pages/chat/BrowserLiveCard.tsx:267 -- not affected -- uses the router's navigate whenever a router is mounted, so a pop-out's pinned navigator hands its exits off
Sibling: website/src/hooks/useRefreshScheduler.ts:131 -- not affected -- a forced re-authentication reload of the whole window, not an exit from an app
Sibling: website/src/utils/popoutController.ts:474 -- not affected -- the chat and artifact pop-outs' own navigator, outside an app pop-out
Pattern harvest
Rule candidate: review-prompt
Pattern: a component that can render inside an app pop-out leaves with
window.location.assigninstead of the router's navigate orhardNavigate, so the pop-out turns into a dashboard.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)