Skip to content

docs(window-frame): cut the context down to current behaviour and invariants (#1355) - #1381

Merged
devsuitup merged 2 commits into
mainfrom
docs/1355-window-frame
Nov 29, 2026
Merged

devsuitup merged 2 commits into
mainfrom
docs/1355-window-frame

Conversation

@devsuitup

@devsuitup devsuitup commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Part of #1355: .ai/contexts/window-frame.md cut down to current behaviour and invariants. Rationale stays only where a wrong simplification would otherwise look valid; incident narratives, dated measurements, run ids and issue-by-issue history are dropped (git keeps them).

  • Before: 500 lines, 4718 words. After: 421 lines, 3633 words (77 % of the words). The remaining length is the exit flow's contracts and the test-held selector lists; cutting further would drop still-true constraints.
  • Inventory of the old file: 157 entries — 136 TRUE, 2 FALSE, 17 UNVERIFIABLE (Electron, OS or window-manager behaviour), 1 recorded decision, 1 missing rule added.
  • Corrected before trimming:
    • the main-area header list now matches style.css (agents and Activity trace headers were missing);
    • exit question rows: a conversation reads "<name>" · project · id (Untitled conversation without a name), a plain terminal Plain terminal · project · id, a panel shell Panel shell of "<owner name or id>" · id with no project; the bare-id fallback is the progress notice's, not the dialog's.
  • Scope corrected: a batch row cancels the rows whose send has not started only when it fails before its own send (busy timeout, permission prompt, unreadable status, user cancel) or its send returns refused; declined, cancelled, write-failed and failed sends leave the other rows running (test/bg-handoff-main.test.js, (bg-agents): Move to background goes ahead while a same-name continuation job is in unknown liveness #1295 case); Enter activates the focused button of the exit question; the native-dialog set shields a pending check, not the force path after an unanswered quit; the 5-minute ceiling covers quit, update and reload checks; the session question is skipped for every action when the known inventory has no local rows; after session-end an untagged before-quit stays approved.
  • Restored after review: palette applied before the BrowserWindow is built; terminal container top padding 3px; Save/Discard/Cancel for unsaved edits; on success the tab is re-keyed before the restore mark; launches stay allowed while an attempt is uncommitted.
  • Every quoted section name and anchor cited elsewhere still resolves to a heading holding the cited content and reason (19 pointers, checked by script, no exemptions).
  • The one recorded decision is kept as Decided (JB, 2026-10-21).

Docs

Agent docs only: .ai/contexts/window-frame.md. No user doc describes this content.

no-changelog: agent documentation only; no behaviour change.

Tests

  • node scripts/check-docs.js --validate: passed.
  • node scripts/check-doc-refs.js --root <worktree>: 0 failures.
  • git diff --check: clean.
  • Pointer check (review-1355j/check-pointers.js <worktree>): 19 pointers, 0 failures; the same script fails (3 failures) on a copy with one heading renamed.
  • node --test --test-concurrency=1 test/check-docs.test.js (Node 22.23.5): 99 pass, 0 fail. No other test reads this file's text.

Not verified

  • Statements about Electron, Chromium and window managers (accelerator registration, env(titlebar-area-*) values, caption-area behaviour, unresponsive timing, taskkill) are kept as they were; this PR does not re-measure them.
  • No app, e2e journey or Electron instance was run.

Kept

  • Headings (pointer API, levels unchanged): "Preventing focus from scrolling the app container", "The session header's controls", "Zoom keys", "Closing the window", "Exit handoff backend ((sessions): send a running session to background and bring it back, so it survives a Switchboard restart #546, H1)", "A window that stops answering", "A native dialog pauses the bounds", and every other old heading.
  • Frame: overlay height and colours equal the strip (test-held); --strip-min-height so the strip is never shorter than the controls under zoom.
  • #app-container is overflow: clip, not hidden, and its descendants never use 100vh; what the CSS test can and cannot prove.
  • Insets: the top-row header list, identical drag / inset / min-height lists, the macOS 72px left inset, full-screen reset, no negative top on a terminal container.
  • Drag regions: Chromium subtracts no-drag whatever stacking; the three test-held no-drag lists; a new overlay reaching the top 32 px joins them.
  • Session header: control order and placeHeaderControl; no tool toggle in the header; the 6px state slot and its margins; exit recording and forgetting order; shared banner wording; 2px padding arithmetic; never a raw FitAddon.fit() on file-panel refit.
  • Menu: stays installed (accelerators); no Alt/F10 route and why; quit item per platform; accelerators cannot be pressed through sendInputEvent/CDP.
  • Zoom: main reads the keys itself (US positions, AZERTY, keypad); Digit0 only without Shift; clamp to [−7.5, 8.5] and why.
  • Closing: attempt binding and upgrade ranks; order edits → question → 2 s flush → commit; re-ask on new generations; launch gate; skip rules; dialog structure and wording pinned by the DOM tests; inventory; Move batch, recovery and re-ask rules; external exits, logoff, updater latches.
  • Exit handoff backend: row fields, exit-background admission, one batch per attempt, Cancel across versions, abort kinds, what the backend never does.
  • A window that stops answering: the two destroy cases with their reasons, ping/pong on the main thread, only the window's own close probes, unanswered quit handling and the ActivityWatch wait.
  • A native dialog pauses the bounds: why, the wrapper, the report-before-block order, the 5-minute ceiling, re-arm, crash/navigation clearing, logoff unaffected.

…ariants (#1355)

State the frameless window and the exit flow as they behave now, with the reasons a wrong simplification would need. Correct the main-area header list and the exit question's nameless-row fallback, scope four rules to the code paths they cover, and drop incident history, dated measurements and run ids.
@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Nov 29, 2026
State the exact batch-cancel conditions, the per-type exit-question rows and Enter on the focused button, and restore five still-true constraints dropped by the trim.
@devsuitup
devsuitup merged commit 62134ed into main Nov 29, 2026
10 of 11 checks passed
@devsuitup
devsuitup deleted the docs/1355-window-frame branch November 29, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant