Repository navigation
feat(annotate): draw a screenshot a table cell names as a thumbnail - #485
Conversation
A cell holds one line, so it names a ::screenshot written elsewhere with :screenshot{of="id"}. The block moves into the cell as a thumbnail with a dot per mark and opens as the whole figure, laid out at data-zoom-width.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Latest result Pull request merged. Final answersSession Pull request merged. Session Merged f62cb89 directly: required checks passed and review threads were resolved. Session Pull request evidence changed. Session Pull request evidence changed. Session Pull request evidence changed. Session Pull request evidence changed. Session Pull request evidence changed. Session GitHub is still calculating mergeability for this PR head. |
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-motion
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
The thumbnail opens with its annotations, but Copy with marks exports an unannotated PNG. When scripts are blocked, readers also lose access to the notes and caption.
Approach: Resolving screenshot references during parsing and reusing the existing zoom renderer makes sense, but the collapsed preview cannot serve as the source for copying or as the only script-free presentation.
Reviewed changes across the parser, renderer, zoom runtime, table layout, and linter:
- References: Table cells resolve named screenshots, repeated references render copies, and invalid references get Doctor diagnostics.
- Rendering and zoom: The cell shows a thumbnail with dots;
data-zoom-widthgives the opened figure a wider layout. - Table layout: Annotated thumbnails contribute to column sizing without counting their notes as text.
- Verification: The workspace build and focused annotate, zoom, table-layout, linter, and Doctor tests passed. Targeted Chromium checks reproduced the copy, script-free, link, and sizing issues below.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
Important
The new regression tests fail CI for two separate reasons: the clipboard test does not typecheck, and the delayed-image fixture never starts zoom. A UTF‑8 Chromium fixture confirmed that the thumbnail itself holds its 96 × 64 size while the image loads.
Reviewed changes in 0b880e8:
- Restored the full figure when scripts are blocked and the captured-page link when zoom opens.
- Exported clipboard PNGs from a full-size copy and reserved a 3:2 stage for unsized thumbnails.
- Clarified which screenshots can be referenced, excluded hidden note chips from table sizing, and changed how lint locates thumbnail references.
The package build and 156 focused unit tests passed. Chromium passed the clipboard, link, and script-free checks; the delayed-image test failed both locally and in CI.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
✅ No new issues found in
f62cb89; no P0 or P1 findings remain.
Reviewed changes in the latest commit. All four thumbnail regressions passed in Chromium, and e2e/annotate.e2e.ts passed a focused strict typecheck.
- Declared UTF‑8 in both raw HTML fixtures so the delayed-image test runs the zoom script and the script-blocking test exercises CSP.
- Narrowed the clipboard test’s figure to
HTMLElementbefore passing it tocapture().
gpt-6.2-sol(high) | 𝕏

A table cell holds one line, so it can't hold a
::screenshotand its annotations. #482 gave tables image thumbnails, but an annotated screenshot still had to sit outside the table.A cell now names a screenshot written anywhere in the document:
The block moves into the cell as a thumbnail the size of comark-zoom's, with a dot where each mark sits. A click opens the whole figure: marks, side notes, and numbered notes. Nothing is drawn where the block was written.
Evidence: https://drop.vitehub.dev/d/wt9qe6jsb2xp/annotated-screenshots-as-table-thumbnails
Changes
thumbnails()insrc/read.tsmoves each named screenshot into its cell and marks itdata-thumbnail. A second cell naming the same screenshot gets a copy without the id. The thumbnail styles apply only outside the zoom dialog, so the opened copy is the ordinary figure.data-zoom-widthsets the width the zoomed copy is laid out at, capped at 92% of the stage, since a thumbnail's own width is too small to lay a figure out in.comark/annotate/unknown-screenshot(COMARK0127) for anofthat names no screenshot, andcomark/annotate/thumbnail-outside-table(COMARK0128) for:screenshot{of}outside a cell, each with a doctor page.data-zoom-widthrow on the Zoom page, and the skill's annotate reference.Checked
pnpm checkandpnpm run doctorpass.pnpm testand the full e2e suite. Copy and Hide marks from an opened thumbnail are present but not exercised by a test.Open choice
The thumbnail shows dots, not the drawn marks: a box drawn at 128px is a smudge. If the drawn marks are preferred, it is a CSS change in
packages/annotate/src/styles.ts.🤖 Generated with Claude Code