Skip to content

🤖 fix: a held annotate shortcut toggles artifact annotate mode once - #6631

Merged
ThomasK33 merged 1 commit into
mainfrom
artifact-panel-annotate-repeat
Oct 14, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
artifact-panel-annotate-repeat

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Holding the annotate shortcut (KEYBINDS.TOGGLE_ARTIFACT_ANNOTATE) on the Artifacts panel toggled annotate mode at the key-repeat rate. The panel now ignores auto-repeated keydowns for that shortcut, so a held key toggles the mode once.

Fixes #6347

Background

#6341 made the same shortcut work from inside an HTML or SVG artifact frame. That frame path already ignores event.repeat, because a held key would also spend the frame's bridge message budget. The panel's own handler had no such check, so the two paths behaved differently. This was cosmetic and existed before #6341.

Implementation

ArtifactsPanel.tsx: a small matchesAnnotateShortcut helper returns false for e.repeat. The panel's handleKeyDown uses it for the annotate branch. Other panel shortcuts are unchanged.

Validation

  • New test in ArtifactsPanel.test.tsx, "a held annotate shortcut toggles annotate mode once": one press turns annotate mode on, two repeated keydowns leave it on, and the next press turns it off. Removing the e.repeat check makes this test fail.
  • make crap-check passes with 0 violations. It warns that ArtifactsPanel is a large function this PR touches, and its complexity is unchanged.

Risks

Very low. The change only skips repeated keydowns for one single-key shortcut on the Artifacts panel.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $15.40

The panel's annotate shortcut reacted to every auto-repeated keydown, so a held
key toggled annotate mode at the key-repeat rate. Ignore repeats, as the frame's
key bridge already does.

Refs #6347
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T15:01:40.662297Z 88abccd PR opened
🔒 Security Review ✅ Completed 2026-10-14T15:03:50.343802Z 88abccd PR opened
ℹ️ 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.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 2642a62 Oct 14, 2026
32 of 33 checks passed
@ThomasK33
ThomasK33 deleted the artifact-panel-annotate-repeat branch October 14, 2026 15:40
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.

🤖 Artifacts: holding the annotate shortcut on the panel toggles at the repeat rate

1 participant