Repository navigation
feat: close the visible Glass terminal tab - #1906
Merged
Merged
Conversation
Exercise real App sessions through public controls and Tauri boundaries. Plan-ID: KR-08c-1 Test-First: src/screens/terminal/TerminalRoute.test.tsx::closes only the visible worker tab without stopping workers Test-First: src/screens/terminal/TerminalRoute.test.tsx::closes only the visible ad hoc session at the PTY boundary Test-First: src/screens/terminal/TerminalRoute.test.tsx::focuses an honest empty state after closing the last worker tab Test-First: src/screens/terminal/TerminalRoute.test.tsx::discards a pending worker lookup when the visible tab is closed Test-First: src/screens/terminal/TerminalRoute.test.tsx::hides close during restore and ignores a late restart after closing a live tab Co-Authored-By: OpenAI gpt-6-astra <noreply@openai.com>
Model the xterm focus boundary instead of swallowing its focus effect. Plan-ID: KR-08c-1 Test-First: src/screens/terminal/TerminalRoute.test.tsx::closes only the visible worker tab without stopping workers Co-Authored-By: OpenAI gpt-6-astra <noreply@openai.com>
Use the existing session close semantics and discard obsolete route results. Keep focus on the remaining tab or the honest empty-state control, including late xterm autofocus. Add one close-action translation and bounded plan status. Plan-ID: KR-08c-1 Test-First: src/screens/terminal/TerminalRoute.test.tsx::closes only the visible worker tab without stopping workers Test-First: src/screens/terminal/TerminalRoute.test.tsx::closes only the visible ad hoc session at the PTY boundary Test-First: src/screens/terminal/TerminalRoute.test.tsx::focuses an honest empty state after closing the last worker tab Test-First: src/screens/terminal/TerminalRoute.test.tsx::discards a pending worker lookup when the visible tab is closed Test-First: src/screens/terminal/TerminalRoute.test.tsx::hides close during restore and ignores a late restart after closing a live tab Co-Authored-By: OpenAI gpt-6-astra <noreply@openai.com>
Cuarroc
marked this pull request as ready for review
October 25, 2026 09:41
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
Root acceptance (INTEGRIEREN) for head
Setting |
30 of 46 tasks
Contributor
Merge Queue Status
This pull request spent 8 minutes 53 seconds in the queue, including 8 minutes 14 seconds running CI. Required conditions to merge
|
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Der sichtbare Terminal-Tab lässt sich jetzt in Glass mit Maus und Tastatur schließen.
Bei Worker-Tabs bleibt der Agent unberührt; bei Ad-hoc-Tabs wird nur das bestehende Schließen der zugehörigen Sitzung ausgelöst.
Die Lieferung umfasst nur diesen Teilschritt; unabhängige Reviews und native Abnahmen stehen noch aus.
Report
Plan-ID: KR-08c-1
srv-kr-08c-1-close; child05fc87d2-ba35-4c75-b8df-391589f54216, parent366c57e2-488c-48c1-9405-90b0cf28fab6remains open.78a1c7c1b9e20e0160f9c4dbd6515f6b6ea68333(merged fix: use Glass controls for shared session restoration #1904; feat(terminal): use design system search controls (KR-08a) #1556 prerequisite also verified merged).3701f90a778faa4c6fc36c20c04d9c00e5a15b9e, branchcodex/kr-08c-1-close.gpt-6-astra, efforthigh, read from this worker's nativeturn_contexton 2026-10-25. Supplied dispatcher admission was read, SHA-256 verified and within 60 minutes at actual start. This server did not independently measure provider quota.get_goal({})returnednull; no prior goal was completed or replaced. This handover covers only the bounded child objective, not parent acceptance.Change and boundaries
A shared design Button beside the tablist calls the existing
SessionProvider.closeonly for the visible session. No close control is offered for restore-only content or an empty view. Worker closing detaches the tab without kill/spawn/restart requests. Ad-hoc closing retains the provider's existing best-effortkill_ptysemantics.The route invalidates obsolete lookup/restart tokens and removes the worker hash using its existing manual-selection pattern. It focuses the remaining selected tab, or the empty state's Classic control. A route-local focus guard handles the remaining viewer's asynchronous autofocus; keyboard/pointer input releases that guard. No provider, reducer, Classic, shared component, IPC, mock or native seam changed.
Exactly one dictionary line was added:
terminal.closeTab = Tab schließen. Removing that insertion reproduces the original dictionary bytes. The hardcoded baseline and its tests are byte-identical. Existing TerminalRoute tests remain byte-identical before the appended regression cases.PLAN changes are limited to the new nine-column child row and the two authorized §10.2 status cells: 08b records #1904/78a1c7c1; 08c/08d records prospective close-only delivery. Ad-hoc launch and split remain open. All other PLAN rows/cells are unchanged.
Evidence — 2026-10-25
Heavy phases used
python3 .pa/kr08c1/phase_guard.py && <command>in the foreground: load1 < 8, available memory >= 3500 MiB, cargo roots < 2, total heavy roots <= 2, exclusive warm assigned target and one Cargo build job. No detached work, installation or reviewer launch.bash scripts/sync.sh startnpm run dev:start-check -- --max-cargo 2 --min-free-gb 3.5gh run list --branch main --workflow ci --limit 1 --json databaseId,headSha,status,conclusion40176849813completed successfully, rechecked before pushgh pr list --state open --json number,title,headRefName,isDraftnpm run typechecknpm run test:unit -- src/screens/terminal/TerminalRoute.test.tsx -t 'closes only|focuses an honest|discards a pending|hides close'(shell argument uses unescaped regex alternation)Tab schließenactionnpm run test:unit -- src/screens/terminal/TerminalRoute.test.tsx -t 'closes only the visible worker'npm run test:unit -- src/screens/terminal/TerminalRoute.test.tsx src/sessions/SessionProvider.test.tsx src/sessions/sessionReducer.test.tsnpm run test:unit -- src/i18n/hardcoded.test.tsbash scripts/ci/red-first.shpython3 .pa/kr08c1/scope-proof.pyandgit diff --checkbash scripts/ci/secret-scan.sh+ normalgit commit -F ...hooksbash scripts/ci/gates.sh lane prepushgit push -u origin codex/kr-08c-1-closegit ls-remote origin codex/kr-08c-1-close3701f90a778faa4c6fc36c20c04d9c00e5a15b9eRed tests were committed before the implementation (
5dc0d890, strengthened xterm-boundary regression10d6def5; implementation3701f90a). The tests mount real App/TerminalRoute/SessionProvider and mock only Tauri/xterm boundaries. They cover worker detach, exactly one ad-hoc kill request, retained output/listeners, empty view/navigation, hidden close during restore, late lookup/restart results and focus. No real OS process termination is asserted.Preparation failures were corrected before publication: test setup timing and unsupported test-query typing; an unknown PLAN dependency was replaced with the verified predecessor PR reference. The added browser focus check exposed and then verified the route-local autofocus fix. No test was weakened or given new skips/retries/timeouts.
Inspected browser evidence
Existing Playwright web-server configuration and the unchanged real-route Tauri browser mock were used, with temporary ignored capture files only. Exact capture commands, each preceded by the phase guard:
All three final commands: exit 0. Input: rich live worker
w1, D1 enabled,/#/leitstand/terminal?worker=w1, 1440×900, dark theme,glasvariant, motion off. BASE and HEAD use identical input. The terminal text is canned mock output, not a native Cargo run.Artifacts retained in the worker's ignored
.pa/kr08c1/directory and inspected withview_image:base-live.pngfbb4f19243348a9c38cd11eb5bf39c4efbac3ed39e74f51cbdf2b745982be638head-live.png724aebac7db501770b96dcab01cff6526f64d8867dfbd35b8d8b68b9664bdb5bhead-closed.png39c99d1336997b994bc9cd4baaf994242254d3e2b0fd8796f40a5351aa3311bbThe head capture asserts zero kill/spawn/restart commands and cleared worker hash. The additional real-browser test seeds an existing ad-hoc session via Classic, closes the worker, verifies focus on the remaining tab, then verifies deliberate pointer focus into xterm. Its final result is exit 0; the earlier failing focus assertion was exit 1. Root must inspect the artifacts before review-ok; these are browser/mock evidence only.
NICHT ABGEDECKT
#[cfg(windows)]tests (run_in_pty,npm_shim, ConPTY, DPAPI), or Windows clippy arms. Windows validation belongs to the merge queue.lage-jetztmemory mirror was absent; current Git/PR/CI, source and dispatch evidence were used. No AgentsRoom-only API was required or fabricated.Review disposition
Review: Stufe A, two non-author families, both bound to head 3701f90 — Anthropic (Claude subagent, observed
claude-opus-5-5[1m]): APPROVE; Moonshot (Kimi CLI v2.1.1, self-reportedkimi-code/k3): APPROVE. No high or medium finding. Root inspected base-live/head-live/head-closed PNGs (sha256 match the table above) on 2026-10-25 ~09:40Z: named sibling "Tab schließen" action, honest empty state with focus on the Klassisch control after close.aria-controls/aria-describedby)errorset hides the empty stateerror(setError(null), TerminalRoute.tsx:95) before closingactionprop not in snapshot.g-terminal > .g-tabsruleTerminal.prototype.focus(boundary coupling)Root owns two independent reviews from different non-author families bound to the exact candidate, final acceptance, ready/review-ok and Mergify. Worker delivery is this DRAFT and checked handover only; no reviewer was launched by the worker.