Skip to content

fix: use Glass controls for shared session restoration - #1904

Merged
mergify[bot] merged 2 commits into
mainfrom
codex/kr-08b-restore-glass
Oct 25, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
codex/kr-08b-restore-glass

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Die gemeinsame Sitzungswiederherstellung verwendet jetzt den vorhandenen Glass-Neustartknopf.
Seine Beschriftung bleibt beim Neustart erhalten, und die Worktree-Warnung ist mit dem gesperrten Knopf verknüpft.
Die lokalen Prüfungen sind grün; unabhängige Reviews und Roots Abnahme stehen noch aus.

Report

Plan-ID: KR-08b
Ticket: 7409db94-2cf9-4457-9c9e-41f2764a1b03
Operator: UMSETZEN. Execution owner: srv-kr-08b-restore-glass. Parent: Nutzbar-1; Root owns acceptance and integration.

Candidate and scope

  • BASE: a9edb9a2f2cd107a362881705948ea955ee74e6a.
  • HEAD: 3bf75e558b81e3a3eb1d0ec5bfe02e5e0840a191, branch codex/kr-08b-restore-glass.
  • Separate RED test commit: e90c8b25a1fd2ab07101ba268aa73caae6ea6569; fix commit is HEAD. Both actual commit messages and exact Test-First trailers checked; no history rewrite.
  • Actual author model: OpenAI gpt-6-astra, effort high, from this session's native turn_context at 2026-10-25T07:41:37.531Z. Root's supplied admission record was read, hash-checked and within its 60-minute start window. No account, cap, model or provider setting changed.
  • Native get_goal({}) returned goal: null, remainingTokens: null, completionBudgetReport: null. No old goal was completed or replaced, and no new goal created. The bounded objective is the shared restoration control port and this checked DRAFT handover; parent acceptance remains with Root.
  • Initial HEAD was the exact clean BASE. No duplicate branch PR or open PR existed. Main CI run 40171601625 succeeded on BASE; live main/CI was checked again at 07:55:48Z before normal push.
  • Actual RAW: 90 added + 7 deleted = 97 lines, including tests, the opt-in fixture and the single new PLAN row. Four authorized files; no native seam, dependency, gate, caller or broader plan change.

What changed

  • Replace the shared panel's legacy button with the existing Glass Button. Its label remains “Agent neu starten”; loading supplies aria-busy and the existing loading indicator. Native disabling still follows the original missing-worktree/busy policy.
  • Associate the missing-worktree warning with the disabled action through a per-instance useId and aria-describedby. The existing status, alerts, saved scrollback and unsent draft remain intact.
  • Preserve worker, busy and onRespawn for both TerminalRoute and Classic App. The callers, IPC normalization, provider, terminal viewer and request-token guards are unchanged. No automatic spawn or new loading/null restart policy.
  • Add exactly one literal restoration fixture, enabled only by ?restore=1: one exited worker with no session and a missing worktree, saved scrollback and draft. Default/rich tables and every pre-existing mock line remain byte-identical. Removing just the two additive scenario blocks reproduces the complete BASE mock source byte-for-byte; the unchanged default and rich browser tests also pass.
  • Add only the KR-08b PLAN row, explicitly describing bounded delivery after merge and retaining native V2-ACC1b/UAT and Root acceptance obligations. Predecessor is feat(design): add standalone UI baseline and port feedback inputs (KR-01a) #1547 (KR-01a).
  • Architecture drift: no new findings or allowlist changes.

Evidence

Heavy phases used a fresh foreground phase_guard && phase: load1 <8, available RAM >=3500 MiB, cargo roots <2, actual heavy roots <=2, assigned warm slot free, one Cargo build job, no profile overrides. The additional browser smoke was initially prevented by load1 8.0249; after a foreground 30-second wait, guard passed at 4.9497 and only then launched the tests. No failed guard was bypassed.

Command / stage Exit / result
bash scripts/sync.sh start 0; own clean branch at exact BASE.
npm run dev:start-check -- --max-cargo 2 --min-free-gb 3.5 0; zero Cargo builds, 13.7 GB available at start. Missing usage-file warning is not quota evidence; Root's supplied admission is the approved evidence.
npm run test:unit -- src/screens/terminal/TerminalRoute.test.tsx -t 'keeps the restart name|describes the disabled restart' on BASE implementation 1, expected RED: both new tests compile and fail on the missing busy name and empty accessible description.
npm run test:unit -- src/components/SessionRestorePanel.test.tsx src/screens/terminal/TerminalRoute.test.tsx src/App.audit.test.tsx 0; 34 tests.
npm run typecheck 0 standalone and in successful commit/prepush/push hooks.
bash scripts/ci/red-first.sh 0; both exact new test names missing at merge-base and green at HEAD; actual BASE assertion failures separately recorded above.
bash scripts/ci/secret-scan.sh through ordinary precommit hooks 0 before both commits; actual LF message files and parsed trailers verified.
git commit -F <message-file> 0 for RED and fix. First fix attempt stopped with exit 1 on the own PLAN row's unknown-dependency syntax; changing only its predecessor wording to “#1547 gemergt (KR-01a)” made plan-check and the complete hook pass.
bash scripts/ci/gates.sh lane prepush 0 at HEAD in own worktree; 1,731 frontend, 995 HQ, 390 Denkraum Node, 33 Denkraum browser and 2,327 Rust tests passed; Clippy passed.
git push -u origin codex/kr-08b-restore-glass 0; normal full prepush hook passed again at the same HEAD.
git ls-remote origin codex/kr-08b-restore-glass 0; exact remote HEAD 3bf75e558b81e3a3eb1d0ec5bfe02e5e0840a191.
npx --no-install playwright test e2e/boot.smoke.spec.ts e2e/terminal-view.mount.spec.ts 0; both unchanged default/rich browser tests passed.
git diff --check / git status --porcelain=v1 0 / 0; no whitespace errors, clean tree.
BASE+scenario and HEAD+scenario captures through scripts/dev/shot.mjs 0 / 0; all four PNGs inspected by the author.
Anonymous GitHub image-blob retrieval and byte comparison 0; HTTP 200 for each image, decoded bytes equal the inspected local PNGs.

The new integration tests mount the real TerminalRoute, SessionProvider, shared panel and IPC normalization; only the existing Tauri core/event and xterm system boundaries are mocked. Assertions cover saved buffer/draft, no spawn/respawn on mount, exactly one restart for a real click, busy disabling, the persistent public accessible name, the warning description, stale restart completion after worker-ID navigation and stale restore data. Existing tests/assertions are unchanged; no skip, retry, timeout or quarantine was added. Classic's App.audit null fixture is not claimed as a real-panel integration proof.

Inspected screenshots: BASE+scenario versus HEAD+scenario

BASE proof setup: extract git archive a9edb9a2f2cd107a362881705948ea955ee74e6a into a new preserved scratch directory, link existing dependencies, and apply only the same opt-in scenario to src/test/tauriBrowserMock.ts. Every tracked BASE blob was compared: this mock is the sole difference; there are no UI changes or commits in the BASE proof tree. HEAD uses the clean committed candidate. Both capture runs were sequential, with VITE_TAURI_MOCKS=true, the real application route and the existing Vite/Playwright/shot machinery. Each foreground invocation closes its Vite server in finally; no native application, daemon, static imitation, new package or committed capture harness.

Capture API/input in each run, with machine-local directory literals shown as named variables (BASE sets Vite root to the preserved BASE+scenario tree; HEAD omits root and uses the assigned worktree):

const server = await createServer({
  // BASE only: root: proofRoot,
  server: { host: '127.0.0.1', port: 0, strictPort: false, hmr: false },
  logLevel: 'error'
});
try {
  await server.listen();
  await captureRoute({
    base: `http://127.0.0.1:${server.httpServer.address().port}`,
    route: '/?restore=1#/leitstand/terminal?worker=restore-demo',
    outDir: outputDirectory,
    variant: 'glas'
  });
} finally { await server.close(); }

captureRoute is imported from the unchanged scripts/dev/shot.mjs behind npm run dev:shot; createServer comes from the installed Vite. Input, viewport 1440x900, Glass variant, reduced-motion setting, saved text and missing-worktree state are identical; light and dark are captured separately by the existing helper. Observed delta: the legacy rectangular action becomes the existing rounded Glass action; the warning, saved output and unsent draft stay visible without clipping in both themes. These images prove browser rendering of this fixture only.

The following links contain the original PNG bytes in GitHub's blob JSON content field (base64), not an HTML preview. They are evidence objects, not extra files/commits in the source branch. All local originals and the BASE scratch tree are preserved for Root. Root must download/decode and inspect both BASE and HEAD before review-ok.

Image GitHub PNG source SHA-256
BASE+scenario, light PNG source e17f43df6ca70e2942843bbe8948f722dd5d22cdb5588580ecf47808a1dce20d
HEAD+scenario, light PNG source 10b1004191a8080429ef8829ff90ed1d09f7ac778735d4691b966615acff2a5c
BASE+scenario, dark PNG source 857f9505cb1073ae54111468fcb58eb060b8c23acbb959abb0a03f5876b7e4e9
HEAD+scenario, dark PNG source 5afacc17f73018dd688b70201f4b6fb4786aee96fba516f43137301f8a9046e1

Download an image with gh api repos/Cuarroc/ProjectA/git/blobs/<blob-sha> --jq .content and decode base64 into a PNG; use set -o pipefail if piping. Public HTTP 200 and exact-byte roundtrip were verified without authentication. No durable branch reference is added for these image objects; preserved originals are also available in the checked coordinator handover.

NICHT ABGEDECKT

  • Linux does not compile #[cfg(windows)] tests (run_in_pty, npm_shim, ConPTY, DPAPI) or check Windows Clippy branches. The Windows lane remains a merge-queue obligation.
  • Existing skips: seven Rust, three HQ Node and one Denkraum Node test. No added skips or weakened assertions.
  • Prepush is not the full Linux workflow. Frontend production build and remaining workflow/browser suites were not run separately; the two named application browser tests were run above.
  • Browser/Tauri-mock evidence does not prove native PTY behavior, real disk restoration, native V2-ACC1b, assistive-technology operation, UAT, full Glass acceptance, or installed/effective delivery. Busy semantics are tested through public DOM roles, not a native screen reader.
  • Classic caller compatibility is supported by unchanged props/call path and existing tests; the audit's null panel mock is not independent integration evidence.
  • External services (updater endpoint, provider routing, mirror) were not verified. No actual provider workers or messages were started.
  • Offline plan-check does not verify live GitHub/plan-age or jobs. The project-memory mirror and graph tools were unavailable; bounded direct source and live Git/GitHub/runner checks were used.
  • Image sources are API-backed downloadable PNG data; Root inspected all four PNGs (hashes match) on 2026-10-25 ~08:08Z: HEAD shows the Glass primary pill, labels and saved content unchanged; the disabled label has low contrast in both themes (shared Button disabled style, follow-up R1904-V1).
  • Classic restore button not visually observed (R1904-C1/K1): the shared panel now renders the Glass primary Button (spinner while busy instead of "…") also inside Classic App.tsx:1268. No Classic screenshot or App-level restore test exists; App.audit.test.tsx:234 mocks the panel to null. controls.css is already loaded by other Classic-shared components (TerminalView, EmergencyStop, ErrorBoundary) and has only .g-btn*-scoped selectors, so no global style leak.

Reviews and handover

Review: Stufe A, two non-author families, both bound to head 3bf75e5 — Anthropic (Claude subagent, observed claude-opus-5-5[1m]): APPROVE WITH CONDITIONS; Moonshot (Kimi CLI v2.1.1, self-reported kimi-code/k3): APPROVE WITH CONDITIONS. No high finding.

ID Source Sev Finding Disposition (Root)
R1904-C1 / K1 Anthropic / Kimi medium Classic restore button changes visually (Glass pill) without Classic evidence; K1 also feared Glass CSS leaking into Classic Accepted as evidence gap: recorded under NICHT ABGEDECKT (no code change). CSS-leak part rejected: controls.css is already imported by Classic-shared TerminalView/EmergencyStop/ErrorBoundary and has only .g-btn* selectors
R1904-C2 Anthropic low ?restore=1 scenario has no repo consumer/test Accepted as report item: exact capture route is in this report (/?restore=1#/leitstand/terminal?worker=restore-demo); test → follow-up
R1904-C3 / K2 Anthropic / Kimi low busy button is disabled + loading, contradicting Button keep-focus contract (same as before, not a regression) Follow-up
R1904-C4 Anthropic low panel does not import tokens.css like siblings Follow-up (nit)
R1904-C5 Anthropic low BoardView.tsx:525 still uses busy ? "…" restart label Follow-up (out of scope)
R1904-K3 Kimi low PLAN row says "Erledigt nach Merge" before merge Rejected: AGENTS_REFERENCE.md:130 requires the row to state the post-merge truth
R1904-K4 Kimi low controls.css not in review snapshot Rejected: Root verified selector scope at head (see C1/K1)
R1904-V1 Root (screenshots) low disabled primary label low contrast (shared Button) Follow-up, design-system scope

Root arranges two distinct non-author review families bound to HEAD, inspects the BASE/HEAD image pair, dispositions findings and owns acceptance, ready/review-ok and Mergify. No independent review or finding closure is claimed. The worker opens this as DRAFT and does not set labels, ready state or queue.

State: implemented, locally tested, committed and pushed with verified remote SHA. Independent reviews, Root acceptance, merge, native/UAT and installed/effective delivery remain open. No blocker or scope expansion; no follow-on dispatch by this worker. The parent goal remains open.

Cuarroc and others added 2 commits October 25, 2026 08:44
Cover the busy restart name, missing-worktree description, saved content,
explicit restart, and stale worker completions at the Tauri boundary.
Both new route tests fail on the unchanged implementation at the base.

Plan-ID: KR-08b
Test-First: src/screens/terminal/TerminalRoute.test.tsx::keeps the restart name while busy and isolates a late restart after a worker change
Test-First: src/screens/terminal/TerminalRoute.test.tsx::describes the disabled restart with the missing worktree warning and ignores stale restore data
Co-Authored-By: OpenAI gpt-6-astra <noreply@openai.com>
Keep the restart label and busy state with the existing Glass Button and
associate the disabled action with its missing-worktree warning. Preserve
both callers and the existing restore and restart policies. Add one explicit
browser restoration scenario without changing any default mock responses.
Record the bounded post-merge delivery and remaining native acceptance.

Plan-ID: KR-08b
Test-First: src/screens/terminal/TerminalRoute.test.tsx::keeps the restart name while busy and isolates a late restart after a worker change
Test-First: src/screens/terminal/TerminalRoute.test.tsx::describes the disabled restart with the missing worktree warning and ignores stale restore data
Co-Authored-By: OpenAI gpt-6-astra <noreply@openai.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 25, 2026 08:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T08:12:19.137506Z 3bf75e5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Cuarroc

Cuarroc commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Root acceptance — review-ok bound to head 3bf75e558b81e3a3eb1d0ec5bfe02e5e0840a191

  • Tier A (PTY restart-facing surface): two non-author families on this exact head — Anthropic (Claude subagent, observed claude-opus-5-5[1m]) APPROVE WITH CONDITIONS; Moonshot (Kimi CLI v2.1.1, self-reported kimi-code/k3) APPROVE WITH CONDITIONS. No high. Conditions (C1/K1 Classic evidence gap, C2 capture route) satisfied in the report text; disposition table in the PR body. Author family OpenAI.
  • Root inspected the four BASE/HEAD screenshots (sha256 match the report): Glass primary pill, content unchanged; R1904-V1 (low) disabled label contrast → follow-up.
  • Size +90/-7 = 97 RAW incl. tests/PLAN; own KR-08b PLAN row; red-first: two Test-First trailers, red-first check pass.
  • Checks on 3bf75e5: gates (linux), gates (windows), linux_1/linux_2, red-first pass. Codex connector review on 3bf75e5: no findings.
  • Limits: browser/Tauri-mock only; native PTY, Classic visual, V2-ACC1b/UAT unproven.

@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 25, 2026
@mergify mergify Bot added the queued label Oct 25, 2026
@mergify mergify Bot mentioned this pull request Oct 25, 2026
30 of 46 tasks
@mergify
mergify Bot merged commit 78a1c7c into main Oct 25, 2026
25 checks passed
@mergify

mergify Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-25 08:20 UTC · Rule: default · triggered by merge protections
  • ✅ Checks passed · on draft merge queue: checking #1904 on main (a9edb9a) #1905
  • ✅ Merged — 2026-10-25 08:29 UTC · at 78a1c7c1b9e20e0160f9c4dbd6515f6b6ea68333 · merge

This pull request spent 8 minutes 59 seconds in the queue, including 8 minutes 20 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant