Repository navigation
feat(git-graph)!: add per-commit slots and move apply, clean and conflict marks to them - #467
Conversation
…lict marks to them A #commit-<sha> slot puts one line of Markdown under that commit in every renderer. The block now reads only git log: git cherry and git cherry-pick output is no longer drawn, and the plugin reports it under the new comark/git-graph/unread-command rule. comark/git-graph/unknown-branch is removed, and comark/git-graph/unknown-commit now reports a slot whose hash the log doesn't show. BREAKING CHANGE: git cherry, git switch and git cherry-pick output in a git graph is no longer drawn. Write each result in a #commit-<sha> slot.
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. |
There was a problem hiding this comment.
Important
A commit note can silently land on the wrong row. The new notes can also be clipped entirely under the prose styles already used in the browser tests.
Approach: Replacing backport-specific parsing with Markdown slots is a good simplification, provided each slot resolves to the same commit regardless of which rows are visible.
Reviewed changes across the parser, renderers, docs, and tests.
- Commit notes: Reviewed hash matching, row layout,
max-count, and rendering across HTML, Vue, React, and Svelte. - Transcript migration: Reviewed the removal of pick markers, the replacement lint rule, and the updated examples and agent reference.
- Verification: All 21 git-graph package tests and both Playwright tests passed. Docs content preparation passed; the full docs build was not run.
ℹ️ P2 — Class: public API descriptions advertise removed parsing
The npm package description and the gitGraph preset option still advertise automatic pick results from pasted Git output. A reader following that guidance now gets an unread-command diagnostic instead of the promised marks.
Technical details
# Update the public descriptions for the breaking change
## Affected sites
- [packages/git-graph/package.json:4](https://github.com/onmax/comark-ui/blob/1aa68441904fd22caf1dfea5fcd1e20258a45711/packages/git-graph/package.json#L4) — still promises which branches have each fix from pasted output.
- [packages/ui/src/index.ts:139](https://github.com/onmax/comark-ui/blob/1aa68441904fd22caf1dfea5fcd1e20258a45711/packages/ui/src/index.ts#L139) — still advertises picks from `git cherry` and `git cherry-pick`.
## Required outcome
- Describe `git log` as the input and explicit `#commit-<sha>` notes as the way to show backport results.gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Session this host is full; svc-fleet@servarica: full (3/3) Pushed ab672dc and resolved the P1 review thread. Mixed-width Git logs now connect parents and deduplicate commits without conflating distinct full hashes or misplacing notes. Both reported cases passed with real Git output, all 28 package tests passed, and lint reported no issues in edited files. The previous e2e run was canceled during WebKit dependency installation before tests began; fresh checks are pending. Session Pull request evidence changed. Session Pull request evidence changed. |
There was a problem hiding this comment.
Important
Pasting a short git log and a long git log into the same graph can now split a single branch or draw the same commit twice.
Reviewed changes in cf5cf63:
- Resolved notes before limiting rows. Kept printed hashes for matching, added an ambiguity diagnostic, and updated the docs and Doctor example.
- Kept notes visible under host prose styles. Verified that a short note stays readable and a long note truncates without moving the commit dots.
- Preserved unsupported-command diagnostics. Reported unsupported commands even when no log was pasted and updated the package and preset descriptions.
All 25 Git graph package tests and both Chromium tests passed. The new Doctor examples also produced the expected diagnostics in a focused linter check. The mixed-format regression was reproduced separately with real Git output and the HTML renderer.
gpt-6.2-sol(high) | 𝕏
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-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
An ambiguous first-parent abbreviation can make a known merge disappear and put its side branch on the main lane.
Reviewed changes in ab672dc since the previous review:
- Reconciled short and long hashes. Verified with real Git output that the original split-branch and duplicate-row cases are fixed.
- Preserved printed spellings for notes. Checked that both spellings resolve to the same row and that distinct full hashes remain separate.
- Changed how unresolved parents are handled. Reproduced a lost merge and branch label with real Git output. All 28 Git graph package tests passed.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
✅ No new issues found. No P0 or P1 findings remain.
Reviewed changes in 61ea64b since the previous Pullfrog review:
- Preserved parent positions. An unresolved first parent now stops the mainline walk without hiding the known second-parent edge.
- Added regression coverage. Verified that the merge dot and side-branch label render whether the side branch still has a ref or has been deleted. All 30 git-graph package tests passed, and a separate HTML render check covered omitted first and second parents.
gpt-6.2-sol(high) | 𝕏

A
::git-graphmostly shows a plain git tree, but the block read and drewgit cherryandgit cherry-pickoutput as a built-in feature: numbered pick dots, rings, a status legend, and conflict notes. That took a big share of the parser and the docs for one use case, and it couldn't say anything else about a commit, like a review, a CI result, or "reverted later".This PR adds a
#commit-<sha>slot that puts one line of Markdown under that commit's row, and removes the cherry-pick parsing. A backport now reads thegit logof every branch, with each result written in the fix's slot. The slot matches the hash as the log prints it, or any prefix of four characters or more. It needs thecommit-prefix because Comark drops slot names that start with a digit.Breaking (0.x):
git cherry,git switch, andgit cherry-pickoutput in the block isn't drawn anymore. The plugin reports it under a new rule,comark/git-graph/unread-command, and says to move the result into a#commit-<sha>slot.comark/git-graph/unknown-branchis gone, andcomark/git-graph/unknown-commitnow reports a slot whose hash the log doesn't show. The.cgg-pick,.cgg-has, and.cgg-note[data-status]markup is gone too;.cgg-noteis now the slot's line.Before and after in all four renderers, light and dark: https://drop.vitehub.dev/d/rtf4nz12yz2m/before-after
Validation:
vp test run test/inpackages/git-graph: 21 passed. The HTML, Vue, React, and Svelte renders of a block with a#commit-<sha>slot give the same markup; Svelte is now server-rendered in the test instead of only compiled.#commit-8bb4fd2note renders on this branch and not onmain's source.playwright test e2e/git-graph.e2e.ts: 2 passed, including a note that stays one line at 360px.vp lintand the root typecheck: nothing in the changed files. I didn't runpnpm ready, since the typecheck needs every package built.Not checked: a full docs build. One thing I noticed that is not from this PR: under a host's unlayered
line-heightrule ondiv(the e2e's prose host), a note collapses to about 2px, andmain's conflict notes do the same.🤖 Generated with Claude Code