Skip to content

chore(e2e): review screenshots for #2551 - #2562

Closed
copse-release-bot[bot] wants to merge 3 commits into
mainfrom
screenshots/pr-2551/79f212ae878a
Closed

copse-release-bot[bot] wants to merge 3 commits into
mainfrom
screenshots/pr-2551/79f212ae878a

Conversation

@copse-release-bot

Copy link
Copy Markdown
Contributor

Screenshot candidates rendered for parent PR
#2551 at
79f212ae878a36dc9faedded00d955c4af2d8e34 by
CI run 34152645664.

Review GitHub's image diffs, then merge this PR (or enable auto-merge) to apply the
accepted references to claude/dialog-guard-cmd-w-2474. This branch contains
only PNG candidates from the immutable
reference-screenshot-candidates-34152645664 artifact and never targets main.

If the parent branch has advanced beyond the source SHA above, do not merge this PR;
the successful CI run for the new head will replace it.

claude and others added 3 commits September 7, 2026 19:35
Cmd/Ctrl+W deletes the active thread. Nothing checked whether the user was
looking at a dialog when they pressed it, so closing Settings with the keystroke
that closes things everywhere else destroyed a conversation instead. There is no
undo.

The guard reads the DOM — is any `<dialog>` open — rather than asking a list of
`isXOpen()` predicates. The renderer has seventeen dialogs and the one
hand-maintained list of them, three lines above this in the Cmd/Ctrl+F handler,
named four: settings, the command palette, file search, keyboard shortcuts. That
list is the failure mode the issue anticipates when it says "or any other dialog
for that matter", so the fix is shaped so a new dialog is covered the moment it
exists. The find bar now uses the same check, which is a behaviour change worth
noticing: it also defers to the thirteen the list missed — an approval, an SSH
passphrase, a confirm — each a question it should not open underneath.

`show()` counts as well as `showModal()`. The approval prompt appears inline over
the chat rather than modally, and it is still something the user is answering.

`preventDefault()` deliberately stays outside the guard. It is what keeps the
keystroke from also reaching macOS's File ▸ Close accelerator, and moving it
inside would hand Cmd+W back to the menu exactly when a dialog is up. So the
keystroke is still swallowed; only the delete is skipped. Doing nothing is the
right answer rather than closing the dialog for them — Esc already does that,
in the handler immediately below, and every dialog honours it.

Left alone deliberately: the shortcut is matched inline as `meta && e.key === 'w'`
rather than through a `matchXShortcut` helper like its neighbours, so Caps Lock
(which makes `e.key` `'W'`) silently disables it. Routing it through a matcher
would be tidier, but it would also widen which keystrokes delete a thread, and
that is the wrong direction to move a destructive shortcut without being asked.

main.ts binds its shortcuts inside a boot function with no seam to call, so the
wiring is pinned at the source level — the file's existing test does the same
for the layout boot — while the guard itself is unit-tested against real
`<dialog>` elements. The wiring assertions check the property rather than the
text: every `confirmDeleteThread()` call site is guarded, not just the one that
exists today.

Verified locally: 8641 tests, 8631 pass, 10 skipped, 0 fail, plus typecheck,
lint, format, dead-code, oracle, e2e-syntax and demo:site. All three wiring
assertions were confirmed to fail with the guard removed.

Refs #2474

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hpk1gEma9LhMUuvr2TwUj6
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🖥️ PR preview

Base automatically changed from claude/dialog-guard-cmd-w-2474 to main September 7, 2026 19:29
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Closing automatically: parent PR #2551 is closed, so these candidates have no review context left. Reference screenshots only ever move through a live parent PR.

@github-actions github-actions Bot closed this Sep 7, 2026
@github-actions
github-actions Bot deleted the screenshots/pr-2551/79f212ae878a branch September 7, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants