Skip to content

feat(annotate): let readers hide marks and dim the others on hover - #454

Merged
vite-hub[bot] merged 7 commits into
mainfrom
feat/annotate-hide-marks
Nov 17, 2026
Merged

vite-hub[bot] merged 7 commits into
mainfrom
feat/annotate-hide-marks

Conversation

@onmax

@onmax onmax commented Nov 17, 2026

Copy link
Copy Markdown
Owner

When marks crowd a screenshot, readers can't see what's under them. They had no way to move them aside, and hovering one mark didn't set it apart from the others.

This adds two things to every screenshot with marks:

  • A Hide marks toggle beside the Copy button. It shows on hover and focus, always on touch screens and when zoomed, and stays while the marks are hidden so the reader can bring them back. It's a checkbox inside a label.ca-hide, and .ca-frame:has(>.ca-hide>:checked) hides the marks and arrows, so it works without the script. The zoomed view keeps the reader's choice. Copy still draws the marks, since its button says "Copy with marks". Sliders and annotateHtml() (charts) get no toggle, the same as Copy.
  • Dimming. While a mark or its note is hovered, focused, or linked, the other marks and arrows fade to 35%, through a --ca-dim next to the existing --ca-on. A copy paints them at rest.

The screenshot docs and the class and token lists name the toggle.

Validation: two new cases in e2e/annotate.e2e.ts (hide, including zoom, Copy, and the keyboard; dim on note and mark hover) fail on main and pass here, with the other 17 annotate e2e cases. The annotate unit tests pass (73), and so do vp check, tsrs, the docs typecheck, and Vite Doctor. In pnpm test, only remark-to-comark's "refuses to migrate with no git repository" times out, the same on the U106 branch, which doesn't touch it. I checked the hover, dim, and hidden states in screenshots from Chromium.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T11:43:48.654044Z
We couldn’t complete this review. Comment @codex review to try again.
d3112c8 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@454

comark-badge

pnpm add https://pkg.pr.new/comark-badge@454

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@454

comark-cards

pnpm add https://pkg.pr.new/comark-cards@454

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@454

comark-cast

pnpm add https://pkg.pr.new/comark-cast@454

comark-charts

pnpm add https://pkg.pr.new/comark-charts@454

comark-chat

pnpm add https://pkg.pr.new/comark-chat@454

comark-chips

pnpm add https://pkg.pr.new/comark-chips@454

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@454

comark-code

pnpm add https://pkg.pr.new/comark-code@454

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@454

comark-colors

pnpm add https://pkg.pr.new/comark-colors@454

comark-comments

pnpm add https://pkg.pr.new/comark-comments@454

comark-critic

pnpm add https://pkg.pr.new/comark-critic@454

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@454

comark-details

pnpm add https://pkg.pr.new/comark-details@454

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@454

comark-diff

pnpm add https://pkg.pr.new/comark-diff@454

comark-embed

pnpm add https://pkg.pr.new/comark-embed@454

comark-fields

pnpm add https://pkg.pr.new/comark-fields@454

comark-figure

pnpm add https://pkg.pr.new/comark-figure@454

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@454

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@454

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@454

comark-github

pnpm add https://pkg.pr.new/comark-github@454

comark-icon

pnpm add https://pkg.pr.new/comark-icon@454

comark-include

pnpm add https://pkg.pr.new/comark-include@454

comark-keys

pnpm add https://pkg.pr.new/comark-keys@454

comark-links

pnpm add https://pkg.pr.new/comark-links@454

comark-linter

pnpm add https://pkg.pr.new/comark-linter@454

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@454

comark-mark

pnpm add https://pkg.pr.new/comark-mark@454

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@454

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@454

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@454

comark-media

pnpm add https://pkg.pr.new/comark-media@454

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@454

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@454

comark-outline

pnpm add https://pkg.pr.new/comark-outline@454

comark-properties

pnpm add https://pkg.pr.new/comark-properties@454

comark-qr

pnpm add https://pkg.pr.new/comark-qr@454

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@454

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@454

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@454

comark-sources

pnpm add https://pkg.pr.new/comark-sources@454

comark-steps

pnpm add https://pkg.pr.new/comark-steps@454

comark-table

pnpm add https://pkg.pr.new/comark-table@454

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@454

comark-tests

pnpm add https://pkg.pr.new/comark-tests@454

comark-time

pnpm add https://pkg.pr.new/comark-time@454

comark-ui

pnpm add https://pkg.pr.new/comark-ui@454

comark-xref

pnpm add https://pkg.pr.new/comark-xref@454

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@454

commit: 67b7ac6

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The new Hide marks checkbox is unreachable by keyboard inside the zoomed view.

Reviewed changes Reviewed the mark-visibility controls across screenshot rendering, zoom and copy integration, documentation, and tests.

  • Hide marks: Adds a script-independent checkbox for annotated screenshots, preserves its state when entering zoom, and excludes the control from copied images and thumbnails.
  • Dimming: Fades inactive marks and arrows during annotation interaction while keeping captured images at rest.
  • Documentation and validation: Updates screenshot and theming documentation; the workspace build, 73 annotate unit tests, and all 19 annotate browser tests passed. Additional browser testing reproduced the keyboard issue below.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

Comment thread packages/annotate/src/html.ts Resolved
@vite-hub

vite-hub Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Starting Not started —
View session Failed 2026-11-17T19:57:11.986Z 7m 4s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

Session

Pushed 67b7ac6 and resolved the keyboard-test finding. Bounded forward Tab navigation now accommodates native dialog focus handling while preserving Space, Close navigation, and Escape assertions. Lint, formatting, and diff checks passed. Local browser validation was blocked by sandbox localhost binding EPERM; awaiting hosted CI and automated review.

View session

Prepared the keyboard-test repair using bounded forward Tab navigation while preserving Space, Close navigation, and Escape assertions. Lint and diff checks passed; browser validation was blocked by sandbox port-binding EPERM. The host connection failed and commitRepair stalled, so the edit remains uncommitted and unpushed. Retry is needed to commit, push, and resolve the review thread.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The keyboard-access fix works, but its new regression test fails because it assumes the wrong Copy location and tab order.

Reviewed changes Reviewed 38f65a0, the changes since the prior Pullfrog review.

  • Expanded keyboard coverage: Included native form controls in zoom's focus trap while excluding disabled controls and elements with tabindex="-1".
  • Added regression assertions: Exercised Shift+Tab, Tab, and Space inside the zoomed screenshot; the new Copy assertion fails before reaching the toggle.
  • Validated the runtime fix: Passed 83 unit tests and 43 of 44 annotate/zoom browser tests; an independent browser test confirmed the checkbox is reachable and toggles correctly using the actual focus order.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

Comment thread e2e/annotate.e2e.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. No P0 or P1 findings remain.

Reviewed changes Reviewed e1e59de, the keyboard-test correction since the previous substantive review; the intervening merge introduced no changes to the PR's own hunks.

  • Corrected keyboard navigation: Removed the nonexistent stage-local Copy assertion and extra Shift+Tab, matching the actual path from the dialog to Hide marks.
  • Preserved regression coverage: Retained Space toggling and reverse/forward navigation between Hide marks and Close.
  • Validated the correction: All 44 annotate/zoom browser tests and the modified file's formatting/lint checks passed.

Pullfrog  | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The native-dialog merge makes the Hide marks keyboard regression fail again; the control itself remains keyboard-accessible.

Approach: Native <dialog> now owns focus handling, but the regression still assumes the removed manual trap's initial wrap behavior.

Reviewed changes Reviewed b7bebce, the merge resolution since the previous Pullfrog review at e1e59de.

  • Removed the custom focus trap: Adopted main's native modal-dialog implementation instead of retaining the PR's expanded focusable-element selector.
  • Checked annotation integration: Confirmed Hide marks remains reachable using forward Tab navigation and toggles with Space, but the retained initial Shift+Tab assertion fails.
  • Validated the merge: Passed 83 unit tests, targeted formatting/lint checks, and 51 of 52 focused browser tests. GitHub CI independently reports 303 passes and the same single failure.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

Comment thread e2e/annotate.e2e.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. No P0 or P1 findings remain.

Reviewed changes Reviewed 67b7ac6, the keyboard-test correction since the previous substantive Pullfrog review; the intervening base merge did not change the PR's own hunks.

  • Replaced initial wrapping assumptions: Used bounded forward Tab navigation to reach Hide marks under native dialog focus handling.
  • Preserved keyboard regression coverage: Retained the focus assertion, Space toggling, reverse/forward navigation with Close, and Escape closure.
  • Validated the correction: All 44 annotate/zoom browser tests and the modified file's formatting/lint checks passed.

Pullfrog  | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

@vite-hub
vite-hub Bot merged commit 51e3262 into main Nov 17, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/annotate-hide-marks branch November 17, 2026 20:30
@github-actions github-actions Bot mentioned this pull request Nov 17, 2026
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.

1 participant