fix(docs): serve agents real pipe tables and unbroken code blocks - #534
Merged
Conversation
Ports `12722057`, partially. Its subject is upstream's agent-discovery surface, which this fork deliberately does not have — `9ef3ee39` built it and `ae243116` refactored it into `nuxt-agent-discovery`, both recorded as skips — so the reflex answer was a third skip. Reading the diff rather than the subject splits it: half is that module, and half fixes two defects in `minimark/stringify`, which this fork uses through the same call in `docs/server/routes/raw/[...slug].md.get.ts`. Both defects were measured against our own installed minimark, not inferred. A `table` node comes out as a literal `<table>` block, the format having no pipe-table handler. And the `pre` handler always opens a three-backtick fence, so code carrying fences of its own has its block closed early by the inner pair — the rest becomes prose plus a second block. Not hypothetical: `docs/content/` carries markdown tables in 28 files and four-backtick fences in 7, and all of it reaches `/raw/**.md`, which is what our own skill references link to. `docs/server/utils/markdown.ts` is taken as upstream wrote it. The two passes are written against our `transformMDC.ts` rather than applied as a patch, ours being 1202 lines and diverging in its core. They run *after* `processLinks`, and here the order is load-bearing in a way it is not upstream: upstream absolutises links in the stringified document, ours rewrites `a.href` on the tree, and `pipeTable` flattens an `a` node into text. Render the tables first and those hrefs are strings before anything rewrites them. The `llms.txt` half turned up a gap of our own. Widening the filters is not cosmetic — `/docs/components/%` excludes the section's own index page, so the listing carried 120 component pages and not the page introducing them (120 → 121 across a regenerate). And we had no Typography section at all: 20 pages matched none of the four, so the prose components were absent from `llms.txt` entirely. Not taken: the `nuxt-agent-discovery` bump, the `prerenderRoutes()` deletions that depend on the module serving those routes, and a `minimumReleaseAgeExclude` entry for a package this fork does not install. Twelve tests run against the real `stringify`, two of them asserting the premise so the workaround is reported as dead weight if minimark ever grows a table handler. Five mutations verified. They also needed `minimark` declared at the root — the gate caught that from two sides, `TS2307` and one test file failing with zero failed tests. Gate: lint, typecheck, build (3.86 MB), test (342 files, 7838 passed), test:module, install --frozen-lockfile. docs:generate verified separately. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
IgorShevchik
force-pushed
the
sync/nuxt-12722057
branch
from
September 4, 2026 11:48
4b12d1c to
47d60cc
Compare
IgorShevchik
added a commit
that referenced
this pull request
Sep 4, 2026
`12722057` went in with `pending-merge` in both `pr` and `b24ui_sha`, because the entry is written in the same commit as the port. #534 squash-merged as `19fe6cdf`; this points it there. Bookkeeping only — no entry is added, the cursor does not move, and no decision changes. The cursor is `12722057`, which is nuxt/ui v4 HEAD, so the sync is caught up and no entry carries the placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports
12722057, partially. Cursor moves to it, which isnuxt/uiv4HEAD.Why a commit on skipped infrastructure was not a skip
The subject is upstream's agent-discovery surface, which this fork deliberately does not have:
9ef3ee39built it,ae243116refactored it intonuxt-agent-discovery, and both are recorded as skips. The reflex answer here was a third skip, and it would have been wrong.Reading the diff rather than the subject splits it in two. Half is the module — the
^0.1.1 → ^0.4.0bump, theprerenderRoutes()deletions that depend on it serving those routes instead — and none of that exists here. The other half fixes two defects inminimark/stringify, which this fork uses through the same call indocs/server/routes/raw/[...slug].md.get.ts.The defects, measured on our own dependency
table<table>block — the format has no pipe-table handlerprewhose code holds a fenceNot hypothetical here.
docs/content/carries markdown tables in 28 files and four-backtick fences in 7 (the typography pages documenting code blocks), and all of it reaches/raw/**.md— which is whatskills/b24-ui-nuxt/references/components.mdpoints agents at.The port
docs/server/utils/markdown.tsis taken as upstream wrote it. The two passes are written against ourtransformMDC.tsrather than applied as a patch — ours is 1202 lines and diverges in its core (castMaprather thanCAST_TEMPLATES, our owngenerateComponentCode,generateThemeConfig,convertIcon,processLinks). Upstream's other additions in the same commit belong to its own MDC vocabulary and were left alone.The ordering is load-bearing here and is not upstream
Upstream absolutises links after stringifying, inside the module, so its table pass can sit anywhere. Ours does it on the tree —
processLinksrewritesa.hrefin place — andpipeTableflattens ananode into[text](href)text. Render the tables first and those hrefs are strings before anything rewrites them: relative, and pointing nowhere from a raw file served to an agent.Confirmed in built output rather than argued — a generated cell reads
[TanStack Virtual](https://tanstack.com/virtual/latest/docs/api/virtualizer), rendered and absolute.The
llms.txthalf turned up a gap of our ownWidening the filters is not the cosmetic tidy-up it looks like.
LIKE '/docs/components/%'matches everything under the section but not the section's own page, and ours exists —docs/content/docs/2.components/0.index.md. The listing carried all 120 component pages and not the page introducing them.The Typography gap is ours independently of upstream: 20 pages under
docs/content/docs/4.typography/matched none of our four sections, so the prose components were missing fromllms.txt— the only occurrence of the word in the whole file was inside another page's description.Not taken: the
nuxt-agent-discoverybump, theprerenderRoutes()deletions, and aminimumReleaseAgeExcludeentry fornuxt-agent-discovery@0.4.0— a supply-chain exception for a package this fork does not install.Tests
test/utils/raw-markdown.spec.ts, twelve cases, running against the realstringifyrather than a description of it. Two assert the premise — that minimark writes a table as HTML and breaks out of a self-fencing block — so if the dependency grows a table handler the workaround is reported as dead weight instead of quietly staying wrong.Five mutations verified, each failing its own assertion: fence fixed at three backticks (3 red), pipe escape dropped in a code span, link collapsed to its text, short row not padded, header separator dropped.
A dependency this repository had not declared
Importing the real
stringifyneededminimarkat the root —docs/package.jsondeclares it, the root did not, and the root is what typecheckstest/. The gate caught it from two sides, each easy to misread alone:typecheck→TS2307: Cannot find module 'minimark/stringify'test→ one file failed with zero failed tests — the shape of an import error, in thevueprojectDeclared as
minimark: ^0.2.0, the rangedocsalready uses. The package was in the tree already, so the lockfile gains three lines (the importer entry) and resolves nothing new.dep-parity.jsonneeds no reconciliation: it compares only packages both trees declare in the same section, and upstream declaresminimarkunderdocs.Verification
lint·typecheck·build(3.86 MB) ·test— 342 files, 7838 passed, 6 skipped ·test:module·install --frozen-lockfile.docs:generatewas run separately against these changes — it is where the/rawandllms.txtnumbers above come from.🤖 Generated with Claude Code
https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
Generated by Claude Code