Repository navigation
feat(diff): move ::diff out of comark-annotate into its own package, comark-diff - #73
Conversation
Latest result Pull request merged. Final answersSession Pull request merged. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed README.md, packages/charts/package.json, test/workspace.test.ts after its checks ran; waiting for checks on the new head. |
comark-annotate
comark-carousel
comark-charts
comark-chips
comark-code
comark-diff
comark-embed
comark-github
comark-icon
comark-include
comark-linter
comark-tabs
comark-zoom
commit: |
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
View all previews: View all previews ↗ |
There was a problem hiding this comment.
Important
The package-specific publication path can fail from a clean checkout because the new package's build depends on comark-zoom artifacts that this prepack command does not create.
Reviewed changes
- Package extraction — Reviewed the new
comark-diffparser, HTML renderer, styles, package metadata, tests, docs, e2e coverage, and removal of::difffromcomark-annotate. - Integration — Reviewed registration in the docs/playground and automatic plugin/component discovery in
lint-comark. - Behavior — Traced the shared parse/render validation path, nested diff traversal, line/word diff generation, Shiki handling, and new
.cdstyling.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The prior package publication issue remains unresolved: comark-diff's prepack still builds only itself even though its build imports the comark-zoom/theme workspace export. A clean package-specific pack can therefore fail before comark-zoom has generated dist/theme.mjs.
Reviewed changes
- Docs build conflict resolution — Updated the docs icon name and restored the
diffpackage navigation entry and blurb after the merge conflict.
⚠️ Package publication still depends on an unbuilt workspace artifact
comark-diff remains unable to guarantee its standalone prepack path from a clean checkout because packages/diff/package.json runs only its own build, while packages/diff/src/styles.ts imports comark-zoom/theme and that export resolves to a generated file. The existing review thread at packages/diff/package.json:40 contains the affected sites and required outcome; build the prerequisite as part of this package's publication path before merging.
gpt-5.6-sol | 𝕏
|
Fixed Pullfrog’s P1 publication-path finding: comark-diff prepack now builds comark-zoom before building comark-diff, ensuring comark-zoom/theme exists from a clean checkout. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the commits since the prior Pullfrog review, focusing on the package publication path and the docs conflict resolution.
- Fixed package publication — Updated
comark-diff'sprepackscript to buildcomark-zoombefore the diff package, resolving the previously reported clean-checkout failure. - Restored docs integration — Preserved the
diffnavigation entry andfile-difficon after the docs merge conflict.
The package-specific pnpm --filter comark-diff pack --dry-run path now builds both packages and produces a publint-clean tarball. Broader pnpm commands remain limited by this environment's read-only .git/config during the automatic prepare step.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one documentation consistency suggestion is inline.
Reviewed changes — Reviewed the commits since the prior Pullfrog review, focusing on the linter documentation conflict resolution and confirming the earlier package publication fix remains valid.
- Updated linter documentation — Added
comark-diffto the installed package list and adjusted the linter README and getting-started content. - Revalidated package publication — Confirmed
comark-diff'sprepackbuildscomark-zoomfirst and that the package-specific dry run produces a publint-clean tarball.
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
packages/lint/README.md:2157(RIGHT) — line 2157 (RIGHT) is not inside a diff hunk
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one documentation consistency suggestion is inline.
Reviewed changes — Reviewed the commits since the prior Pullfrog review, focusing on the docs merge resolution and confirming the package publication fix remains intact.
- Restored annotate examples — Reconciled the annotate components examples and kept the
::diffdocumentation in its new package context. - Updated linter integration docs — Added
comark-diffto the installed package list and preserved the linter's automatic plugin discovery configuration. - Revalidated package publication — Confirmed the
comark-diffprepackpath buildscomark-zoombefore the diff package.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the commits since the prior Pullfrog review, focusing on the final linter README correction and confirming the package publication and docs conflict fixes remain valid.
- Closed the README code span — Fixed the
defineConfig({ plugins, components })Markdown span so the remainder ofpackages/lint/README.mdrenders normally. - Preserved package publication — Confirmed
comark-diffstill buildscomark-zoombefore its own package in theprepackpath. - Preserved docs and linter integration — Confirmed the
diffdocs registration and automatic linter package discovery remain intact.
gpt-5.6-sol | 𝕏
|
Reproduced the required |
There was a problem hiding this comment.
Important
The new contextmenu forwarding can break host cancellation of annotated screenshot menus because it replaces the trusted event with an independent synthetic event.
Reviewed changes — Reviewed the changes since the prior Pullfrog review, focusing on the merge-main delta and its playground, documentation, e2e, and annotated-image runtime updates.
- Added playground controls — Added Markdown/config copy controls, preset reset confirmation, and stale hash-load protection.
- Updated playground presentation — Adjusted the generated playground markup and responsive styling, and clarified the fictional code example.
- Hardened e2e timing — Waited for the screenshot image to decode before measuring annotation geometry and added coverage for reset and copy behavior.
- Changed screenshot menu forwarding — Replaced the earlier eager synthetic notification with contextmenu forwarding to the prepared overlay.
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
packages/annotate/src/client.ts:570(RIGHT) — file not in PR diff
gpt-5.6-sol | 𝕏
|
Pullfrog: P1 finding verified in |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the merge-main delta since the prior Pullfrog review, with the full PR diff as context.
- Merged chips integration — Added
comark-chipsto the docs builder and playground alongsidecomark-diff, while keeping chips disabled for the site's own links and enabled for examples. - Preserved linter discovery — Kept
comark-diff/htmlin optional peer dependency metadata and automatic package loading; the explicit linter fixture remains intentionally scoped to annotate components. - Preserved diff extraction fixes — Confirmed the package publication prerequisite, linter README correction, docs registration, and
.cdstyling remain intact.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the commits since the prior Pullfrog review, focusing on the comark-github rename merge and its integration with the docs site, playground, linter discovery, and workspace metadata.
- Resolved GitHub integration conflicts — Updated the docs builder and playground to register
callouts,references, and the raw HTML plugin fromcomark-github, with the matching component map. - Preserved linter discovery — Kept
comark-diffdiscovery intact while mapping the renamed GitHub package's namedcalloutsexport to the linter's plugin slot and retaining optional dependency metadata. - Validated package publication — Confirmed
comark-diff's package-specific dry run still buildscomark-zoomfirst and produces a publint-clean tarball.
The focused package tests could not start because pnpm's automatic prepare step cannot lock the read-only .git/config in this environment.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The merge-main delta leaves the new package's published Comark peer contract on the pre-upgrade 0.7.x range, so this PR cannot be installed cleanly with the workspace's current Comark 0.8.x release.
Reviewed changes — Reviewed the merge-main commits since the prior Pullfrog review, with the full PR diff as context, focusing on the Comark 0.8 migration and its effects on the extracted comark-diff package, code rendering, linting, and existing annotate behavior.
- Upgraded Comark dependencies — Raised the workspace catalog and existing package peer ranges to Comark
0.8.x, and adapted code-block attribute handling and linter token scanning to the new parser. - Preserved diff integration — Confirmed the extracted parser, HTML renderer, package publication prerequisite, docs registration, and linter auto-discovery remain present after the merge.
- Retained runtime changes — Rechecked the annotate context-menu overlay behavior and the security-plugin test adjustment carried through the merge.
gpt-5.6-sol | 𝕏
…everywhere, lint ::embed, give chips its own class, and correct four LICENSE files docs/pages/code.md came back in a merge and hid docs/pages/code/index.md, so /code/ rendered the old single page; build.ts now refuses both. The lint docs called the command and config file comark-lint, but the bin is lint-comark. The linter didn't load comark-embed, so ::embed read as an unknown component. comark-chips used .cch, which comark-charts already uses, so a page with both gave chips a chart's margin, padding, and border; chips is now .cp, and AGENTS.md lists each package's prefix. charts, chips, and icon ship no Lucide icons, and embed's aren't callout icons.
…rowser script script.ts like zoom's Each package's tsdown.config.ts calls definePackage() or defineComponentsPackage() from the root tsdown.shared.ts instead of repeating the format, publint, Svelte copy, and style.css plugin.
…ke VueUse docs/pages/<pkg>/ moves to packages/<pkg>/docs/, and the overview's frontmatter gives the package's rail group, icon, blurb, and credits, so build.ts keeps only the order. files: ["dist"] keeps the pages out of npm. docs/pages keeps the landing page, guides, recipes, and comparisons. The build refuses pages left in docs/pages/<pkg> by a branch from before the move, and a package docs folder with no place in the rail. The rendered site is unchanged.
… to be test/workspace.test.ts checks each package's shared manifest fields, prepack, tsdown preset, LICENSE, docs, README row, and, for one with a renderer, its place in the linter's peers and loaders and in the docs' plugins. charts gets the engines field the others have.
comark-diff's pages move to packages/diff/docs with its rail metadata in their frontmatter, and it builds with the shared tsdown preset, registers in docs/plugins.ts and packageOrder, and takes the cd prefix in AGENTS.md's list. Its LICENSE credits Lucide's icons rather than callout icons.
There was a problem hiding this comment.
Important
The previously reported peer dependency contract is still unresolved; the restructure delta itself introduces no additional issue.
Reviewed changes — Reviewed the restructure-stack commits since the prior Pullfrog review, with the complete PR diff as context, focusing on package layout, shared build configuration, docs/playground registration, and the extracted comark-diff integration.
- Moved package documentation — Relocated package pages into per-package
docs/folders and preservedcomark-diff's navigation metadata and examples. - Centralized plugin registration — Consolidated the docs and playground plugin/component lists while retaining
comark-diffand linter auto-discovery. - Shared package builds — Switched the new package to the shared
definePackage()configuration and retained itscomark-zoompublication prerequisite. - Added workspace coverage — Added registration checks for the package locations and integration points required by the restructure.
⚠️ comark-diff still publishes incompatible Comark peer ranges
The extracted package still declares @comark/html and comark as ^0.7.0, while this branch's workspace and the package's own development dependencies use Comark 0.8.1. Consumers following the package's documented install path can receive an invalid peer dependency warning or installation failure against the current release.
Technical details
# Align the published peer contract with the Comark 0.8 migration
## Affected sites
- `packages/diff/package.json:48-49` — the published peers remain on `^0.7.0`.
- `pnpm-workspace.yaml:21-22` — the workspace catalog resolves `@comark/html` and `comark` from `^0.8.1`.
## Required outcome
- Publish `comark-diff` with peer ranges compatible with the Comark `0.8.x` release used by this workspace and regenerate the lockfile importer if required.
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
packages/diff/package.json:1329(RIGHT) — line 1329 (RIGHT) is not inside a diff hunk
gpt-5.6-sol | 𝕏
|
Pullfrog: P1 peer-contract finding verified: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the incremental delta since the prior Pullfrog review, including the workspace restructure range-diff and final Comark peer dependency correction.
- Reconciled workspace layout — Preserved per-package docs discovery, shared
tsdownbuilds, workspace registration checks, and thecomark-diffpackage's docs, linter, and playground integration. - Aligned peer dependencies — Updated
comark-diffto publish@comark/htmlandcomarkpeer ranges compatible with the workspace's Comark0.8.xrelease. - Retained diff behavior — Confirmed the extracted parser, renderer, styles, public registration, and lockfile importer remain coherent after the restructure and final fix.
Focused build and test commands were attempted but pnpm's automatic prepare step was blocked by the environment's read-only .git/config.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the incremental delta since the prior Pullfrog review, with the full authoritative PR diff as context.
- Merged current main — Reconciled the PR with the current
mainbranch; the merge commit introduces no additional file changes relative to the PR head. - Preserved workspace registration — Confirmed
comark-diffremains registered in the shared package checks, docs and playground plugin lists, linter auto-discovery, package metadata, and lockfile importer. - Retained publication contract — Confirmed the
comark-zoomprepack prerequisite and Comark0.8.xpeer ranges remain intact.
Focused Vitest commands were attempted but were blocked by the environment's automatic prepare step: could not lock config file .git/config: Read-only file system.
gpt-5.6-sol | 𝕏

::diffmoves out of comark-annotate into a new package,comark-diff. It's unreleased (it ships in v0.3.0, #22), so nothing breaks for anyone.The diff shares nothing with screenshots: no marks, zoom, or carousel. Keeping it in annotate meant installing zoom and carousel to get a diff, and nobody looking for a diff block looks in a package called "annotate". comark-code was the other option, but it decorates any
prein Vue, React, Svelte, and HTML, while a diff is one HTML-only block that reads two fences into a table.What moved
packages/diff, with the same behavior, messages, and tests.src/read.tsholdsreadDiff, the line and word LCS, the prop checks, and the block naming.src/html.tsis the renderer, with no script.comark-zoom/themeand has no runtime dependencies.ca-diff/ca-*becamecd/cd-*.--ca-red,--ca-green, and--ca-code-fontbecame--cd-red,--cd-green, and--cd-font.comark-diff/htmlas an optional peer.diffsection with index, getting started, and syntax pages;e2e/diff.e2e.ts.Before releasing
comark-diffis already claimed (0.0.0 placeholder), and its trusted publisher is set torelease.yamlwith environmentnpm, like the other packages.Stacked on #80
This PR now targets
test/workspaceand merges after #77, #78, #79, and #80. A merge of that stack moved comark-diff onto the new layout:packages/diff/docs/, with its rail group, icon, and blurb in the overview's frontmatter;packageOrder, and its plugin indocs/plugins.ts;definePackage();cdprefix is in AGENTS.md's list;pnpm build,node docs/build.ts,vp check,pnpm run doctor, andvp testpass (313 tests).test/workspace.test.tschecks every one of those registrations.Checked
pnpm readypasses:vp check, and 214 tests;Recordannotation the strict preset flagged.e2e/annotate.e2e.tsare also on main.playwright test e2e/diff.e2e.ts e2e/docs.e2e.ts: 6 passed./diff/, light and dark, renders the same as before the move.🤖 Generated with Claude Code