Skip to content

docs(app-dialogs): cut the context down to current behaviour and invariants (#1355) - #1383

Merged
devsuitup merged 4 commits into
mainfrom
docs/1355-app-dialogs
Nov 29, 2026
Merged

devsuitup merged 4 commits into
mainfrom
docs/1355-app-dialogs

Conversation

@devsuitup

@devsuitup devsuitup commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Part 11 of #1355: .ai/contexts/app-dialogs.md states the current behaviour and its invariants, with corrections found while checking every statement against the code.

  • Before: 463 lines, 5340 words. After: 566 lines, 4925 words (92 %). The file had almost no narrative; nearly every sentence is a constraint, a reason or exact wording that tests or other docs cite, so the cut stays far above the 55 % target. Lines grew because long paragraphs became short lists.
  • Inventory: 237 statements of the old file checked against the code at 8d7792b — 228 true, 2 false, 7 imprecise or incomplete. All corrected, none dropped. 1 clause depends on OS behaviour (abrupt termination can lose the last partial rate-limit window) and is kept.

Corrections:

  • Exit question skip: the skip also requires the startup restore setting not to be Don't restore (read at quit), a known snapshot where every row moves, and no background task (public/file-panel.js confirmSessionExit). With no snapshot, an external exit or nothing running, no question is asked at all.
  • "appAlert is not used for a failure" was stated as fact. public/archived-manager.js, public/settings-panel.js and public/viewer-toolbar.js still report failures with it, so it is now written as a rule that names those callers.
  • replace: true: when another queued question is active and no choice dialog is open, it opens at once on top of it instead of queueing (public/choice-dialog.js).
  • The restoreFocus: false list now includes Resume, which shares New Session's registration.
  • A session live elsewhere (a background one without a job id included) gets no notice from guardResume on an automatic open: the guard reports it through onBlocked, and the caller owns what follows. Working-set restore and reload recovery show Restore:batch, and a trigger-file open fails its trigger. An interactive open of a background session without a job id gets the guard's own error notice.
  • Restore:ended also appears for an interactive retire answer that has a reason, and for a refusal marked missing (the job no longer exists).
  • CODEX_CHOICES supplies only the sandbox, approval and effort choices; Codex models come from the optional model catalog.
  • More precise wording for Detach Undo line order, the exit progress line, the Restore:background action rule, appChoose's initial focus (its confirm button, sometimes labelled Continue) and its callers, and when notices are logged as unmarked.
  • Added from code: the overlay z-index ordering at registration (test/modal-stack-order.test.js), and the fact that rendered plan details are part of the logged dialog text.

Docs

Agent docs only: .ai/contexts/app-dialogs.md. No other file changed. All pointers into this file still resolve: the anchors #ui-notice-history-1196 (ipc-bridge.md) and #notice-layout-and-severity-1023-item-2 (BUILDING-BLOCKS.md), and the bare pointers from contexts, product docs and code comments. No user docs: there is no behaviour change.

no-changelog: documentation only; users see nothing.

Tests

  • node scripts/check-docs.js --validate: passed.
  • node scripts/check-doc-refs.js --root <worktree>: 0 failures.
  • git diff --check: clean.
  • Review round 1 (Codex): two critical findings (the scope of the silent automatic block, the missing-job branch of Restore:ended) and one major (CODEX_CHOICES scope) are fixed, plus three size nits: the intro that repeated covers, and two repeated sentences.
  • Pointer check (every reference to this file, names split across lines included, cited content under each anchor): OK, 13 pointer sites. It fails on copies with a renamed anchored heading or removed cited content.
  • node --test --test-concurrency=1 test/check-docs.test.js (Node 22): 99 pass, 0 fail. test/check-doc-refs.test.js: 16 pass, 0 fail.

Not verified

  • That abrupt termination loses the final partial rate-limit window. This is OS and Electron behaviour, not exercised.
  • No app run, no e2e. The doc describes code read at 8d7792b.

Kept

Headings and levels are unchanged. Kept: every invariant, every reason (main is the authority for trace deletion; the caller ID may contain a label; onData must stay open for protocol replies; planWaitManaged because of the 21 s / 20 s watchdog, now with the constant names; why the router sees keys first), every cap and rate limit, every redaction rule, every exact UI string the tests pin, every focus and keyboard rule, the refusal-code table, and every test pointer, with new pointers for the modal router, the choice dialog, the notice log and the unsaved guard. Dropped: change-relative phrasing only ("as before", "existing", "unchanged").

…riants (#1355)

State the current behaviour and invariants, correct the exit-question skip conditions, the appAlert rule, replace: true, the restoreFocus list and the background-refusal scope, and drop change-relative phrasing.
@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Nov 29, 2026
@devsuitup
devsuitup merged commit ece9003 into main Nov 29, 2026
10 checks passed
@devsuitup
devsuitup deleted the docs/1355-app-dialogs branch November 29, 2026 08:49
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