Skip to content

fix: keep app pop-out exits, shortcuts and labels honest - #32865

Merged
KiroCrewCaptain merged 1 commit into
kirodotdev:mainfrom
cixuuz:fix/app-popout-review-followups
Nov 8, 2026
Merged

KiroCrewCaptain merged 1 commit into
kirodotdev:mainfrom
cixuuz:fix/app-popout-review-followups

Conversation

@cixuuz

@cixuuz cixuuz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In a popped-out app window, every way out of the app reaches the main window without reloading or remounting the app, keyboard shortcuts keep working beside the sidebar's pop-out action, and the pop-out controls say which app they act on and what they do.

Follow-ups from the review of #22926 (pop out an app page into its own window), each still reproducible on main:

  • With the sidebar's pop-out action focused, which a click leaves it in Chrome, the shell's keyboard shortcuts do nothing: the button stops every keydown.
  • Code Review Sage's "Open shared copy" is a bare <a href>, so in a pop-out it loads the whole dashboard in that window and the window stops being a pop-out.
  • An "Ask the agent" in a pop-out commits /chat there before handing it to main, so the app remounts and loses its state, and Forward onto the leftover entry hands the exit to main a second time.
  • Opening /popout/app/apps/<name>/extra, or a differently cased route, hands a bogus exit to main as the window loads.
  • Every row's pop-out action has the same accessible name with no app in it, and the popped-out mark's hint and name are two different strings.
  • The title bar's Return says it returns "this app to the main window", and nine catalogs translate the button as "bring back"; it only focuses the main window and closes the pop-out.
  • The routing, sidebar, error hand-off and pop-out applier specs say nothing about the app pop-out.

Why it matters

The pop-out exists to keep an app on screen beside the chat. Each defect above either takes the app away (a reload, a remount, a window that turns into a second dashboard) or breaks something the user does next to it (shortcuts, a screen reader's list of buttons). The wrong Return wording makes the button promise something it does not do in ten languages.

Not a goal

  • Changing what Return does: it still focuses the main window and closes the pop-out, and the main window does not navigate to the app.
  • Intercepting bare <a href> links inside installed (third-party) app bundles. The App SDK's navigation contract is useNavigate() (docs/app-kit/getting-started.md), which the frame already hands to main; this PR fixes the one built-in page that linked with a bare anchor.
  • Any change to the chat, artifact or terminal pop-outs.
  • Removing feat(apps): pop out an app page into its own window #22926's committed review media (temp-screenshots/app-popout/), which docs/ci/ci-and-reviews.md leaves to the merging maintainer's chore(evidence) PR.

What changed (motivation → approach → change)

A pop-out window keeps showing its app: when the app navigates to any other page, the window does not go there itself but hands that navigation to the main window over the pop-out channel. Each defect below was a path that skipped or repeated that hand-off.

Symptom Cause Change
Shortcuts dead while the rail action has focus onKeyDown={stop} on the button; the rail has no keyboard drag sensor, so the stop guarded nothing The action stops only the mouse and touch presses dnd-kit starts a drag from (shell/nav/appRowPopoutAction.tsx)
"Open shared copy" reloads the dashboard in the pop-out A bare <a href> never reaches the frame's pinned navigator A router <Link> (code-review-sage/components/ReportView.tsx); in the main window it is an in-app navigation
Ask the agent remounts the app; Forward replays the exit The shell installed the router as the pop-out's soft navigator, so /chat committed before the hand-off In an app pop-out the shell installs hardNavigate, the frame's hand-off sink, with no leave guard because the pop-out's page is not left (shell/appShell.tsx)
A deep link or a Forward hands a bogus exit to main The committed-exit handler forwarded a POP too A POP is never handed off; the window only settles back on the app (pages/AppPopoutFrame.tsx)
One generic name for every row's action No app name in the string; the mark's hint and name differed One string per state names the app, used for both (Pop out {{label}} to its own window, {{label}} is open in its own window — focus it); navRail.tsx passes the row's label
Return promises to bring the app back Wording and translations The artifact pop-out's Return wording, "Return to main window and close this popout", with its translations; Hindi and Bengali written in the informal register their style guides require

The new strings live in the namespaces of the files that use them (shell.nav.appRowPopoutAction, components.appPopoutTitleBar), the six components.appPopoutControl keys are gone from all twelve catalogs and the pseudolocale, and en.context.json describes the four new keys. The specs (learn-cron-dashboard.md routing and nav sidebar, error-handling.md, artifacts.md) describe the app pop-out window, its rail action, its exits and the shared applier and no-main fallback.

Backwards compatibility

Compatible: every route, pop-out URL and NavIntent shape is unchanged; the pop-out window only stops committing or forwarding navigations that were defects.

The diff deletes the six components.appPopoutControl.* catalog keys. Their readers:
Reader: website/src/shell/nav/appRowPopoutAction.tsx:AppRowPopoutAction -- app -- reads shell.nav.appRowPopoutAction.* instead; AppPopoutEntryPoints.test.tsx "says which app it is for, with one string per state for the hint and the accessible name"
Reader: website/src/components/AppPopoutTitleBar.tsx:AppPopoutTitleBar -- app -- reads components.appPopoutTitleBar.* instead; AppPopoutEntryPoints.test.tsx "names the app and offers Return, which goes back to the main window and closes this one"

Tests

Proof: not provable -- frontend test (prove.py runs Python only)

Run by hand instead, in a throwaway worktree at this head: each production hunk reverted alone turns exactly its own tests red, and the head is green (84 tests in the five files below).

Reverted hunk Tests that fail without it
onKeyDown={stop} back on the rail action AppPopoutEntryPoints: "lets a key pressed on it reach the document, where the shell's shortcuts listen"
the rail action's names AppPopoutEntryPoints rail cases, "says which app it is for…", and navRailAppPopoutAction's accessible-name case
the title bar's Return wording AppPopoutEntryPoints: both title-bar cases
<Link> back to <a href> in ReportView CodeReviewSageReportView: "links to the shared artifact copy … through the router" (the click must route)
the shell's soft navigator back to the router App.appPopoutAskAgent: the app is mounted twice instead of once
POP handed off again AppPopoutFrame: "Forward onto an exit already handed off…", "opens a deep link to a page under the pinned app's route…", "settles a differently cased deep link…"
  • test/App.appPopoutAskAgent.test.tsx (new): through the real shell, in a document at /popout/app/<route>, a soft "Ask the agent" from an ErrorNotice hands /chat and the prompt to main once, spends this window's queue, and leaves the app mounted on the same history entry.
  • test/AppPopoutFrame.test.tsx: the three POP cases above; a committed exit from outside the frame is still handed off and stepped back; the shell's rule is read from source for the windows that must not install a soft navigator.
  • test/AppPopoutEntryPoints.test.tsx, test/navRailAppPopoutAction.test.tsx, apps/code-review-sage/CodeReviewSageReportView.test.tsx: as in the table.

Determinism: the five files (84 tests) ran three times plain and three times shuffled (--sequence.shuffle --sequence.seed=7311, =48219, =9137), all green and with no act() warning. Locally green on this tree: tsc, eslint (0 warnings), i18n:check, i18n:render, the src/i18n/ tests including the locale style tests, phantom-classes, restyle ratchet, gen:ui --check, jscpd, the bundle-size and chunk-cycle gates, test:electron, the scoped frontend suite, the backend tests that reference a changed file (35 files), isort, flake8, mypy, and the 18 cheap gates of the pre-push gate.

Manual verification

In Chromium through Playwright against this head's website/dist, every /api/** answered from fixtures: hovering Dev Fleet's rail action showed "Pop out Dev Fleet to its own window"; clicking it opened /popout/app/dev-fleet through window.open, the window registered, and the row's mark showed "Dev Fleet is open in its own window — focus it"; a German pop-out window's title bar reads "Zurückkehren". Not checked by hand: the keyboard shortcut beside the focused action, Ask the agent and the deep links in a real pop-out (each covered by the tests above), the Electron app.

Screenshots / video

Committed under temp-screenshots/app-popout-followups/ (this fork PR's gh cannot --attach), rendered from this head's website/dist:

The Dev Fleet row hovered: the pop-out action's hint reads "Pop out Dev Fleet to its own window"

Dev Fleet popped out: the row's mark and its hint "Dev Fleet is open in its own window — focus it"

A German pop-out window's title bar: the app name and Return as "Zurückkehren"

Related Issues

Closes #32841

Follow-up to #22926. #26430 (IncidentChat's hard exit) and #26431 (?autoSend=1 and the ?sid= rewrite) were fixed on main by #31314 and #27229.

Sibling sweep

Swept: git grep -nE "onKeyDown={(stop|e => e.stopPropagation()|(e) => e.stopPropagation())}" -- website/src/shell/ website/src/components/
Sibling: website/src/components/SessionColorSwatches.tsx:199 -- not affected -- keeps keys from the enclosing menu's handler, which would close the popover
Sibling: website/src/components/SideSheet.tsx:77 -- not affected -- deliberately keeps the page's shortcuts from firing while typing in the sheet
Sibling: website/src/components/appstore/AppListRow.tsx:83 -- not affected -- keeps the enclosing row's own Enter from activating it
Sibling: website/src/components/appstore/FeaturedSpotlight.tsx:126 -- not affected -- same, its row is the activatable ancestor
Sibling: website/src/components/ApprovalModePicker.tsx:370 -- not affected -- inside a dropdown menu, keeps keys from the menu's typeahead
Swept: same-origin <a href> tags with no target, download or click handler under website/src/apps/
Sibling: website/src/apps/code-review-sage/components/ReportView.tsx:526 -- changed here
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:530 -- not affected -- opens in a new tab (target="_blank")
Sibling: website/src/apps/pptx-maker/DeckViewer.tsx:205 -- not affected -- a download link, which the browser does not navigate
Swept: git grep -n "installSoftNavigate(" -- website/src
Sibling: website/src/shell/appShell.tsx:374 -- changed here

Pattern harvest

Rule candidate: lint
Pattern: a same-origin <a href="/…"> to a dashboard route in app page code, which bypasses the router (and a pop-out window's pinned navigator) where a <Link> would not

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Follow-ups from the review of the app pop-out window.

- The sidebar's pop-out action no longer stops keydown, so the
  shell's document-level shortcuts fire while it has focus; the rail
  has no keyboard drag sensor that needed the stop.
- An Ask the agent in an app pop-out hands its prompt to the main
  window without committing /chat in the pop-out, so the app is not
  remounted and no /chat entry is left for Forward to replay.
- A POP onto a location that is not the pinned app (a deep link such
  as /apps/foo/extra, a differently cased route, a Forward) settles
  the window on the app without handing anything to main.
- Code Review Sage's "Open shared copy" is a router Link, so in a
  pop-out it opens in the main window instead of loading the
  dashboard in the pop-out.
- The action's tooltip and accessible name are one string per state
  that names the app; the title bar's Return says what it does (go
  back to the main window and close this one), with the artifact
  pop-out's wording and translations. The strings move to their
  components' namespaces.
- The routing, sidebar, error hand-off and pop-out applier specs
  describe the app pop-out.
@cixuuz
cixuuz requested review from a team and KiroCrewCaptain as code owners November 8, 2026 03:06
@cixuuz
cixuuz requested a review from Zedmor November 8, 2026 03:06
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of c98530c7826c56a6a350f8cf8aef2c11617c2fde via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the deleted catalog keys had only the two readers this patch rewrites, and the PR commits three screenshots of the reshaped controls.

Notes

  • An app pop-out's soft "Ask the agent" now depends on AppPopoutHardExit installing its sink before any click. If that sink is ever missing, hardNavigate falls back to location.assign, which loads the dashboard inside the pop-out. A test that renders the shell without AppPopoutHardExit would pin that dependency.

[DESIGN-REVIEWED] c98530c

Description read

[DESCRIPTION-READ] 88cbca488a76289801580dc94c01be0261e01404d573a2da372a2e869f5af954

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of c98530c7826c56a6a350f8cf8aef2c11617c2fde via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The three committed screenshots show every changed visible element: the rail tooltip in both states and the German Return. This fork lane has no blind read, so nobody has cold-read these labels yet. Pushing the branch to this repository adds that read.

[UX-REVIEWED] c98530c

Description read

[DESCRIPTION-READ] ae5b57c2b251ce6d97f8aed1f38e7d9f577549e8ba78fc64d4ac97d28d9ed382

That sha256 names everything this verdict read: the PR description, plus the 6 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of c98530c7826c56a6a350f8cf8aef2c11617c2fde via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Each item fixes a defect that can be reproduced on main, and the pins it reverses come with the cause stated. Nothing here meets the BLOCK bar.

Notes

  • Item 6 — inherited: the new Return string is chosen by symmetry ("The artifact pop-out's Return wording"). The harm it fixes stands on its own, though: the old text promised "Return this app to the main window", which Return does not do. en.json already holds return_to_main_window_and_close_this_popout twice (lines 6935 and 11556). This PR adds a third copy, which the i18n rule that keys live in the namespace of the file using them requires.

What this change ships

Inventory (8 items) — 7 justified

Intent: in an app pop-out, every way out reaches the main window without reloading or remounting the app, shortcuts keep working, and the pop-out controls say what they do — FIX.

  1. Shell keyboard shortcuts fire while the rail's pop-out action has focus — justified
  2. "Open shared copy" in Code Review Sage opens in the main window instead of loading the dashboard in the pop-out — justified
  3. A soft "Ask the agent" in a pop-out hands /chat to main without remounting the app — justified
  4. Deep links, differently cased routes and Forward in a pop-out no longer hand a bogus exit to main — justified
  5. The rail action's accessible name and hint are one string per state, and it names the app — justified
  6. Return's tooltip and accessible name say "Return to main window and close this popout", with the translations — inherited (symmetry with the artifact pop-out)
  7. Six components.appPopoutControl.* keys removed from every catalog — justified
  8. The routing, nav-sidebar, error-handling and artifacts specs now describe the app pop-out — justified

[FIRST-PRINCIPLES-REVIEWED] c98530c

Description read

[DESCRIPTION-READ] bf22eb705cc2888d92d1dd999f5cd044c45c24d8fdb5c34228ce6eb29879bee2

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed c98530c7826c56a6a350f8cf8aef2c11617c2fde via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c98530c

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed c98530c7826c56a6a350f8cf8aef2c11617c2fde via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c98530c

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 8, 2026 04:58

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. On head c98530c the review traced every exit from a popped-out app window. The soft Ask-the-agent path now reaches the pop-out's hard-exit sink, which hands the staged prompt to the main window, and installSoftNavigate has one caller, so no other path changes. The new POP guard in AppPopoutHandoff still hands off every deliberate PUSH or REPLACE exit, including the desktop menu path, while a reload or Back/Forward only settles on the app. The new i18n keys are in every locale catalog, the three committed screenshots cover the changed controls, and nothing in this change is already on main. PR Readiness is green on this head.

Done well: the removed components.appPopoutControl.* keys each have a Reader: line, and the leave-guard change is explained where it is made.

  • Optional: the Russian components.appPopoutTitleBar.return still says "Вернуть" (bring back). "Вернуться" would match the rest of the fix.
  • Optional: a test that renders the shell without AppPopoutHardExit would pin the location.assign fallback of a soft Ask-the-agent.

@KiroCrewCaptain
KiroCrewCaptain merged commit 3535135 into kirodotdev:main Nov 8, 2026
94 of 99 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 9, 2026
Follow-ups from the review of the app pop-out window.

- The sidebar's pop-out action no longer stops keydown, so the
  shell's document-level shortcuts fire while it has focus; the rail
  has no keyboard drag sensor that needed the stop.
- An Ask the agent in an app pop-out hands its prompt to the main
  window without committing /chat in the pop-out, so the app is not
  remounted and no /chat entry is left for Forward to replay.
- A POP onto a location that is not the pinned app (a deep link such
  as /apps/foo/extra, a differently cased route, a Forward) settles
  the window on the app without handing anything to main.
- Code Review Sage's "Open shared copy" is a router Link, so in a
  pop-out it opens in the main window instead of loading the
  dashboard in the pop-out.
- The action's tooltip and accessible name are one string per state
  that names the app; the title bar's Return says what it does (go
  back to the main window and close this one), with the artifact
  pop-out's wording and translations. The strings move to their
  components' namespaces.
- The routing, sidebar, error hand-off and pop-out applier specs
  describe the app pop-out.

(cherry picked from commit 3535135)

# Conflicts:
#	website/src/i18n/locales/en.json
buluoray added a commit that referenced this pull request Nov 9, 2026
Follow-ups from the review of the app pop-out window.

- The sidebar's pop-out action no longer stops keydown, so the
  shell's document-level shortcuts fire while it has focus; the rail
  has no keyboard drag sensor that needed the stop.
- An Ask the agent in an app pop-out hands its prompt to the main
  window without committing /chat in the pop-out, so the app is not
  remounted and no /chat entry is left for Forward to replay.
- A POP onto a location that is not the pinned app (a deep link such
  as /apps/foo/extra, a differently cased route, a Forward) settles
  the window on the app without handing anything to main.
- Code Review Sage's "Open shared copy" is a router Link, so in a
  pop-out it opens in the main window instead of loading the
  dashboard in the pop-out.
- The action's tooltip and accessible name are one string per state
  that names the app; the title bar's Return says what it does (go
  back to the main window and close this one), with the artifact
  pop-out's wording and translations. The strings move to their
  components' namespaces.
- The routing, sidebar, error hand-off and pop-out applier specs
  describe the app pop-out.

(cherry picked from commit 3535135)

# Conflicts:
#	website/src/i18n/locales/en.json
KiroCrewCaptain added a commit to KiroCrewCaptain/kirocrew-app-code-review-sage that referenced this pull request Nov 15, 2026
Carries every change that landed on the built-in Code Review Sage after
this repository's snapshot and was not here yet, so a user on this copy
has each of them:

- kirodotdev/KiroCrew#32970: the Enterprise Edition is now the LTS
  Edition. The review floor asked only edition.is_enterprise and
  enterprise_boot, which a current host no longer has, so an LTS build
  read as oss and a review fell back to Kiro CLI. It now asks is_lts and
  lts_boot first and the old names second. The test dependency pins
  Kiro Crew main af94fac51f so the suite runs against the names a
  current host has.
- kirodotdev/KiroCrew#31136: a namespace body that is JSON but not an
  object answers 400 body_not_object.
- kirodotdev/KiroCrew#21307: the poster pipes the draft review on stdin
  (gh api --input -) instead of a temp file.
- kirodotdev/KiroCrew#32618: a review that finishes while open shows its
  report.
- kirodotdev/KiroCrew#33108: Dismiss finding and Undo keep focus while
  they save.
- kirodotdev/KiroCrew#32865: Open shared copy goes through the host's
  navigator, so an app pop-out hands the page to the main window.
- kirodotdev/KiroCrew#29272: comment citations follow the split files.

Each fix has a test that fails without it. PORTING.md lists them under
"Fixes since the port", with the GitLab port (kirodotdev/KiroCrew#33491)
that had no row yet.

Part of kirodotdev/KiroCrew#26967.

Co-authored-by: Bolin Chen <bolichen@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App pop-out follow-ups: shortcuts swallowed, plain-link and Ask-the-agent exits, labels, stale specs

2 participants