Skip to content

feat(git-graph): draw git-graph fences, titled by their [label] - #422

Merged
vite-hub[bot] merged 3 commits into
mainfrom
feat/git-graph-fence
Nov 14, 2026
Merged

vite-hub[bot] merged 3 commits into
mainfrom
feat/git-graph-fence

Conversation

@onmax

@onmax onmax commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Writing a git graph today takes a ::git-graph directive around a fence, usually with a $ git log … line on top. With this PR the fence alone is enough:

```git-graph [A normal week]
* 51a6db1 59fa021 (HEAD -> main) Revert "Deploy on a Friday"
…
```

It renders the same figure as ::git-graph{title="A normal week"}. On GitHub, or anywhere else the plugin doesn't run, the fence still shows the log. The directive shows nothing useful there. The $ git log line was already optional, because read.ts reads everything before the first $ git as log output.

The fence takes a title and nothing else. Comark drops a fence's {…} attributes and keeps only the [label], as filename. So reverse, max-count, #title and #footer still need ::git-graph, which works as before, and the docs say so under "Props and slots". I didn't patch Comark for it. A fence with no commits stays a code block and reports missing-log.

The git-graph page now leads with the fence, and no example on it has a $ git log line, so the playground loses it too. The backport example, the one with cherry-pick status, moved down to Examples. The top three are now History, Release branches and Stack. The cherry-pick code is unchanged. The missing-log and missing-parents doctor pages use the fence. unknown-branch and unknown-commit keep their transcripts, since their $ git log … main line is what shows the mistake. The skill reference, README and AGENTS.md follow.

Three new tests check that a fence renders byte for byte what ::git-graph renders, with and without a [label], for all three fixtures, plus a fence inside a list and an empty fence. They fail on main and pass here. git-graph's tests, test/doctor.test.ts, test/workspace.test.ts and pnpm typecheck pass, and all ten examples on the page render through comark-ui/html with no issues. I didn't run pnpm docs:build or the e2e tests.

Two gaps I left:

  • comark-linter puts a fence's issue on line 1, as it does for comark-diagrams' fences. place() only finds blocks it can count, like "::git-graph 2" or "Code block 3", and a code block count drifts once diagrams or Mermaid turn earlier fences into drawings.
  • pnpm run doctor in packages/git-graph fails on 5 performance warnings. The same 5 fail on main.

Open before the release, not this PR's job:

A ```git-graph fence holding pasted `git log` output now renders the same
figure as `::git-graph`, and degrades to a code block of the log where the
plugin doesn't run. Comark keeps only a fence's `[label]`, so the fence takes
a title and nothing else; `reverse`, `max-count`, and the slots still need
`::git-graph`. A fence with no commits stays code and reports missing-log.

The docs lead with the fence, drop the `$ git log` line, and move the
backport (cherry-pick status) example below the basics.
@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-13T17:29:20.189714Z
We couldn’t complete this review. Comment @codex review to try again.
72411fd 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.

@vite-hub

vite-hub Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Last seen running 2026-11-14T04:30:37.519Z 0s
View session Completed 2026-11-14T01:20:49.682Z 5m 40s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

Pushed c9613d6 resolving both merge conflicts while preserving fence rendering, diff inputs, raw HTML, and main’s bundle reference. Dependencies refreshed; lint passed with warnings. Focused tests require workspace builds, which the sandbox’s pnpm database error blocked. The base changed during CI comparison, so the Doctor failure remains unverified. Awaiting hosted checks; no unresolved review findings remain.

Session

CI reconciliation completed; the same-head repair budget is exhausted.

View session

HEAD matches 8753ee8, but the host rejected base CI evidence because the base changed. The prepared merge targets 2086381 while repair state still assigns f69708d, with conflicts in packages/git-graph/src/index.ts and skills/comark-ui/SKILL.md. No edits or push made. Refresh the host’s assigned base and prepared merge, then retry conflict repair and validation.

@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 fence conversion can silently erase a ::diff comparison. Two matching edge cases are detailed inline.

Reviewed changes — Reviewed the complete PR, including fence conversion, preservation of the directive API, preset interactions, tests, and documentation.

  • Fence syntax: Adds git-graph fences with [label] titles through a shared figure builder; invalid logs remain code and report an issue.
  • Directive compatibility: Retains ::git-graph props and slots while separating directive and fence issue numbering.
  • Documentation and coverage: Updates examples, Doctor pages, README, and agent references; adds equivalence, nesting, and fallback tests.

Validation passed: workspace build and typecheck, 833 tests across the focused suites, and all ten package-page examples rendered through comark-ui/html without issues.

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

Comment thread packages/git-graph/src/index.ts Resolved
Comment thread packages/git-graph/src/index.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 8753ee8, the fix commit since the previous review at 72411fd.

  • Preserved diff inputs. Left direct git-graph source fences inside ::diff intact while continuing to render ordinary fences in nested content.
  • Preserved raw HTML. Excluded raw HTML pre elements from fence conversion, retaining their attributes and fragment targets.
  • Added regression coverage. Verified raw HTML preservation and the default HTML preset’s comparison counts and rows.

Validation passed: workspace build, TypeScript checks, and 778 tests across nine suites. Additional parse-and-render checks covered mixed and nested fences, both plugin orders, and diagnostic numbering.

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

@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@422

comark-badge

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

comark-bundle

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

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-comments

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-git-graph

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

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-magic-move

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

comark-mark

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

markdown-it-to-comark

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

marked-to-comark

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

comark-mathml

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

comark-media

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

comark-metrics

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

migrate-to-comark

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

remark-to-comark

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-time

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: c9613d6

@vite-hub
vite-hub Bot merged commit bcf2f67 into main Nov 14, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/git-graph-fence branch November 14, 2026 04:47
@github-actions github-actions Bot mentioned this pull request Nov 13, 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