Skip to content

feat(annotate): comark-annotate tour turns each compare into a video, with no browser - #428

Merged
vite-hub[bot] merged 2 commits into
mainfrom
feat/annotate-tour
Nov 14, 2026
Merged

vite-hub[bot] merged 2 commits into
mainfrom
feat/annotate-tour

Conversation

@onmax

@onmax onmax commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

A before/after doc proves a change, but a reviewer skimming a PR rarely studies two half-width screenshots. Agents have started ending PRs with a short video that walks through the same captures (danielroe/my-bad#123 has a good one). Each is built by hand for its PR, takes tens of thousands of tokens, and can drift from the marks on the page.

This adds comark-annotate tour. It reads the document's ::compare blocks with the reader the renderer uses and plays them: the whole before, then for each change a zoom to it, its mark drawn with the page's own wobble, its note written beside it, a cut to the after at the same place, and the whole after to close. Marks that sit within a fifth of the image of each other on both sides share one shot. The agent writes nothing new, so a tour costs only the look at its sheet.

pnpm add -D @napi-rs/canvas
vp exec comark-annotate tour pr.md --sheet sheet.png  # 12 frames on one image
vp exec comark-annotate tour pr.md -o tour.mp4        # 1920×1080 at 30 fps

It draws with @napi-rs/canvas, an optional peer dependency with prebuilt Skia binaries, so there's no browser. A 1080p frame takes about 4 ms. ffmpeg encodes the MP4; the sheet doesn't need it. comark-annotate/tour exports tour() with shots, frame(t), sheet() and write(). seed() moves from the HTML renderer to marks.ts, so both draw the same marks. A none mark gets a loop in the tour, since a video has no side-note arrow to point with.

Four published docs rendered in 14 to 26 s each, most of it the x264 encode. A Chromium prototype that screenshotted every frame took 54 to 80 s for the same docs. Node 24.21, @napi-rs/canvas 1.1.1, ffmpeg 8.0.1, on a busy 16-core Linux machine.

Evidence on Drop: the input compare, its tour, the sheet, and a tour of a doc with two compares.

Not in this PR: the before-after-evidence skill step that tells agents when to make a tour (stacked on this one), and playing a tour live in the HTML renderer.

…o, with no browser

`tour` zooms to each change in a document's `::compare` blocks, draws its mark with the page's own wobble, writes its note, and cuts from before to after at the same place. It draws with @napi-rs/canvas, an optional peer dependency, and encodes with ffmpeg; `--sheet` writes 12 frames on one image without ffmpeg. `comark-annotate/tour` exports the same as `tour()`.

The mark seed moves from the HTML renderer to `marks.ts`, so the tour and the page draw the same marks.
@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-14T13:40:19.625521Z
We couldn’t complete this review. Comment @codex review to try again.
2638c9a 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 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

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

comark-badge

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

comark-bundle

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

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-comments

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-git-graph

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

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-magic-move

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

comark-mark

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

markdown-it-to-comark

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

marked-to-comark

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

comark-mathml

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

comark-media

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

comark-metrics

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

migrate-to-comark

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

remark-to-comark

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-time

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: 837df5a

@vite-hub

vite-hub Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed 2026-11-14T16:27:43.265Z 8s
View session Waiting 2026-11-14T16:17:36.480Z 8m 59s
View session Starting Not started —
View session Last seen running 2026-11-14T14:49:16.900Z 0s

Latest result

Merged 837df5a directly: required checks passed and review threads were resolved.

Final answers

Session

Merged 837df5a directly: required checks passed and review threads were resolved.

View session

Ready: verified the expected HEAD, existing repairs, resolved threads, and passing hosted checks. No valid findings remain and no changes were needed. Package builds, publint, and lint passed. Local tests passed 84 cases; two CLI assertions were blocked by sandbox subprocess output restrictions, independently reproduced with a trivial Node subprocess.

Session

Pull request evidence changed.

Session

Pull request evidence changed.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

@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

Two supported tour paths lose part of the comparison: brackets can point along the wrong edge, and changes annotated on only one side skip the corresponding view of the other side. Two smaller note-layout defects are also reproduced inline.

Reviewed changes — Reviewed the new browser-free annotation tour, its public API and CLI, shared mark rendering, packaging, documentation, and tests.

  • Tour loading and API: Adds compare discovery, screenshot loading, and the public tour(), frame(), sheet(), and write() interfaces.
  • Planning and drawing: Adds change pairing, camera movement, before/after transitions, animated marks, Caveat notes, and contact sheets.
  • Video and packaging: Streams RGBA frames to ffmpeg, adds the optional canvas peer, and exposes the tour through the package and CLI.
  • Existing integration: Shares mark seeds with HTML and documents the workflow in the package docs, README, and agent reference.

Validation: package builds and publint passed; focused annotate/tour tests passed 78 tests, with the MP4 integration test skipped because ffmpeg is not installed. Additional public-API frame reproductions confirmed the findings below.

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

Comment thread packages/annotate/src/tour/draw.ts Resolved
Comment thread packages/annotate/src/tour/plan.ts Resolved
Comment thread packages/annotate/src/tour/plan.ts Resolved
Comment thread packages/annotate/src/tour/plan.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 — Re-reviewed 837df5a against the previous Pullfrog review at 2638c9a, focusing on the comparison and note-layout repairs.

  • Preserved bracket orientation: Carried the reader’s resolved edge through detail shots and the closing overview.
  • Restored counterpart views: Showed Before and After for every change, including changes annotated on only one side.
  • Corrected note layout: Wrapped oversized unbroken text and clamped candidate cards before scoring their collisions.
  • Added regression coverage: Checked bracket propagation, one-sided screenshot transitions, corner placement, and URL/CJK wrapping.

Validation: package builds and publint passed; focused annotate/tour tests passed 85 tests, with the MP4 integration test skipped because ffmpeg is unavailable. Additional public-API frame checks confirmed the repaired notes fit within the frame.

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

@vite-hub
vite-hub Bot merged commit 176db01 into main Nov 14, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/annotate-tour branch November 14, 2026 16:27
@github-actions github-actions Bot mentioned this pull request Nov 14, 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