Repository navigation
fix(cli): a {@link} in a template description resolves as astryx docs resolves it - #12224
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
eac553a to
345c3e6
Compare
There was a problem hiding this comment.
Changes requested: the four commands now resolve template description links, but the search index path regressed and the new link pass duplicates an existing one.
rankSearchIndex()ignores the shown text this change stores on template candidates, becausewithDisplayDescriptionsinpackages/cli/api/search/search-index.mjsapplies it only to components, so template results now carry raw{@command …}and{@link …}tokens where the base rendered{@command}, which also makes the description's claims about search indexes and command-token rendering false.linkOwnedTextsinpackages/cli/api/docs/_adapter.mjsrepeats the catalog load, provider map and guardedlinkComponentDoccall thatlinkComponentResponseinpackages/cli/api/component/_adapter.mjsalready owns, and the two already differ when the owner is not a provider id, so please move that logic into one helper that both call.
A template case with a token in the "answers as search() does" tests in search-index.test.mjs would lock in the first fix. As a follow-up, doctor does not yet warn on a template description link that names no doc.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: a link in a template's description no longer prints as written in template list, skeleton and read, build, search and component --blocks. Verified: four new cases in template-doc-tokens.test.mjs; the template read checked by hand in JSON.
- Changeset: text shows the project's command, JSON the bare command. Verified: the new cases assert both.
- Changeset: the JSON shape does not change. Verified: description stays a string in every response.
- Description: the four surfaces printed the raw link before. Verified: the new cases fail on the base.
- Description: the new helper resolves against the owning package's docs (Core's against the CLI's), renders tokens in the same pass, keeps an escaped token written, and loads the docs catalog only when a text links. Verified: packages/cli/api/docs/_adapter.mjs:407-440; an escaped token checked by hand.
- Description: template list, skeleton and read go through the new wrapper and the leaves return the authored text. Verified: packages/cli/api/template/template.mjs:195, 269, 276.
- Description: build resolves every template description when it loads templates. Verified: packages/cli/api/build/_adapter.mjs:113-119.
- Description: component --blocks resolves each block description. Verified: packages/cli/api/component/component.mjs:475, 525, 658.
- Description: search resolves template results in the existing search pass. Verified: packages/cli/api/component/_adapter.mjs:835-851.
- Description: search indexes keep the shown text beside the scored one for templates as they do for components. False: the index stores it, but rankSearchIndex() applies it only to components (packages/cli/api/search/search-index.mjs:259-284).
- Description: text views show the project's command. Verified: the new cases assert it.
- Description: no new option, no JSON shape change, no change to template sources. Verified: no option or command doc changed; the existing byte-for-byte source case passes.
- Description: command-token descriptions render as in the base pull request. False for rankSearchIndex(): it renders them on the base and returns them raw on the head.
- Description: a link that names no doc prints as written. Verified by hand.
- Description: four new test cases, each failing on the base. Verified: 4 fail on the base, 10 of 10 pass on the head.
- Description: the full CLI suite, repository checks, strict typecheck, structure check, lint and format pass. Not verified: no CI ran at this head; 20 related CLI test files (591 tests) pass in this review.
.changeset/template-doc-links.md: clearpackages/cli/api/build/_adapter.mjs: clearpackages/cli/api/component/_adapter.mjs: finding (one search response now links through two copies of the link loop)packages/cli/api/component/component.mjs: clearpackages/cli/api/component/detail/blocks/blocks.mjs: clearpackages/cli/api/docs/_adapter.mjs: finding (linkOwnedTextscopies the link loop oflinkComponentResponse)packages/cli/api/search/_gather-templates.mjs: finding (rendering removed;rankSearchIndex()not updated)packages/cli/api/search/search-index.mjs: finding (template display text stored but never applied)packages/cli/api/template/_adapter.mjs: clearpackages/cli/api/template/list/list.mjs: clearpackages/cli/api/template/show/show.mjs: clearpackages/cli/api/template/skeleton/skeleton.mjs: clearpackages/cli/api/template/template.mjs: clearpackages/cli/clients/cli/commands/template-doc-tokens.test.mjs: clear (no case forrankSearchIndex()or a template read)
ae46ee0 to
afbb893
Compare
There was a problem hiding this comment.
Changes requested: the four commands now resolve template description links, but the search index path regressed and the new link pass duplicates an existing one.
rankSearchIndex()ignores the shown text this change stores on template candidates, becausewithDisplayDescriptionsinpackages/cli/api/search/search-index.mjsapplies it only to components, so template results now carry raw{@command …}and{@link …}tokens where the base rendered{@command}, which also makes the description's claims about search indexes and command-token rendering false.linkOwnedTextsinpackages/cli/api/docs/_adapter.mjsrepeats the catalog load, provider map and guardedlinkComponentDoccall thatlinkComponentResponseinpackages/cli/api/component/_adapter.mjsalready owns, and the two already differ when the owner is not a provider id, so please move that logic into one helper that both call.
A template case with a token in the "answers as search() does" tests in search-index.test.mjs would lock in the first fix. As a follow-up, doctor does not yet warn on a template description link that names no doc.
Claims and files checked
Review mode: carry-forward; reason: none
- Changeset: a link in a template's description no longer prints as written in template list, skeleton and read, build, search and component --blocks. Verified: four new cases in template-doc-tokens.test.mjs; the template read checked by hand in JSON.
- Changeset: text shows the project's command, JSON the bare command. Verified: the new cases assert both.
- Changeset: the JSON shape does not change. Verified: description stays a string in every response.
- Description: the four surfaces printed the raw link before. Verified: the new cases fail on the base.
- Description: the new helper resolves against the owning package's docs (Core's against the CLI's), renders tokens in the same pass, keeps an escaped token written, and loads the docs catalog only when a text links. Verified: packages/cli/api/docs/_adapter.mjs:407-440; an escaped token checked by hand.
- Description: template list, skeleton and read go through the new wrapper and the leaves return the authored text. Verified: packages/cli/api/template/template.mjs:195, 269, 276.
- Description: build resolves every template description when it loads templates. Verified: packages/cli/api/build/_adapter.mjs:113-119.
- Description: component --blocks resolves each block description. Verified: packages/cli/api/component/component.mjs:475, 525, 658.
- Description: search resolves template results in the existing search pass. Verified: packages/cli/api/component/_adapter.mjs:835-851.
- Description: search indexes keep the shown text beside the scored one for templates as they do for components. False: the index stores it, but rankSearchIndex() applies it only to components (packages/cli/api/search/search-index.mjs:259-284).
- Description: text views show the project's command. Verified: the new cases assert it.
- Description: no new option, no JSON shape change, no change to template sources. Verified: no option or command doc changed; the existing byte-for-byte source case passes.
- Description: command-token descriptions render as in the base pull request. False for rankSearchIndex(): it renders them on the base and returns them raw on the head.
- Description: a link that names no doc prints as written. Verified by hand.
- Description: four new test cases, each failing on the base. Verified: 4 fail on the base, 10 of 10 pass on the head.
- Description: the full CLI suite, repository checks, strict typecheck, structure check, lint and format pass. Not verified: no CI has run at this head; 20 related CLI test files (591 tests) passed on the same patch before the rebase.
.changeset/template-doc-links.md: clearpackages/cli/api/build/_adapter.mjs: clearpackages/cli/api/component/_adapter.mjs: finding (one search response now links through two copies of the link loop)packages/cli/api/component/component.mjs: clearpackages/cli/api/component/detail/blocks/blocks.mjs: clearpackages/cli/api/docs/_adapter.mjs: finding (linkOwnedTextscopies the link loop oflinkComponentResponse)packages/cli/api/search/_gather-templates.mjs: finding (rendering removed;rankSearchIndex()not updated)packages/cli/api/search/search-index.mjs: finding (template display text stored but never applied)packages/cli/api/template/_adapter.mjs: clearpackages/cli/api/template/list/list.mjs: clearpackages/cli/api/template/show/show.mjs: clearpackages/cli/api/template/skeleton/skeleton.mjs: clearpackages/cli/api/template/template.mjs: clearpackages/cli/clients/cli/commands/template-doc-tokens.test.mjs: clear (no case forrankSearchIndex()or a template read)
There was a problem hiding this comment.
Approved pending CI: the test and lint workflows have not run on this head yet, because this pull request targets the #12214 branch; they run once it targets main.
The template, build, search and component-blocks outputs now print a linked doc's command, and both earlier findings are fixed: rankSearchIndex() returns the same template descriptions as search(), and component reads and template descriptions share one link helper. Two optional follow-ups: the DISPLAY_FIELD comment in packages/cli/api/search/search-index.mjs still describes component candidates only, and doctor does not yet warn on a template description link that names no doc.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules since the last review (0): none
- Changeset: a link in a template's description no longer prints as written in the template list, skeleton and read, build, search and component blocks. Verified: four new cases in template-doc-tokens.test.mjs fail on the base and pass on the head; the template read was checked by a probe.
- Changeset: text shows the project's command, JSON the bare command, and the JSON shape does not change. Verified: the new cases assert both;
descriptionstays a string in every response. - Description: the four surfaces printed the raw link before, in text and JSON. Verified: the four new cases fail on the base.
- Description: component docs and topics resolve links on read, template descriptions never did. Verified: on the base the template leaves only call
renderTokens. - Description: the shared linker owns the catalog load, provider map and guarded link pass, resolves against the writing package's docs (Core's against the CLI's), renders tokens in the same pass so an escaped token stays written, and an owner with no provider renders tokens and leaves links as written. Verified: packages/cli/api/docs/_adapter.mjs:407-431; the escaped token was checked by a probe.
- Description: component reads call the shared linker, and the text helper loads the docs catalog only when a text links. Verified: packages/cli/api/component/_adapter.mjs:928 and packages/cli/api/docs/_adapter.mjs:440-455.
- Description: the template list, skeleton and read go through the new wrapper and the leaves return the authored text. Verified: packages/cli/api/template/template.mjs:213, 287, 294; list.mjs:53, show.mjs:57, skeleton.mjs:260.
- Description: build resolves every template description when it loads templates. Verified: packages/cli/api/build/_adapter.mjs:113-119.
- Description: component blocks resolve each block description and the leaf returns the authored text. Verified: packages/cli/api/component/component.mjs:475, 525, 658 and blocks.mjs:29.
- Description: search resolves template results in its existing link pass. Verified: packages/cli/api/component/_adapter.mjs:816-863.
- Description: search indexes keep the shown text beside the scored one for templates, and the index ranker applies it to template results. Verified: packages/cli/api/search/search-index.mjs:123-150 and 259-291, with tests.
- Description: text views show the resolved command with the project's command. Verified: the new cases assert it.
- Description: the cited navigable-output requirement governs the change. Not authority: that record is a draft; the current CLI-surface and global-mode records settle every delta.
- Description: no new option, no JSON shape change and no change to template sources. Verified: no command doc or option changed; the byte-for-byte source case passes.
- Description: with an integration that declares its own command, text prints that command, JSON the bare one, and no output keeps a raw link. Verified: the new cases.
- Description: template sources, command tokens and a link that names no doc behave as before. Verified: the existing source and command-token cases pass; a link to a missing doc prints as written in a probe.
- Description: the search-index fixture, parity queries and printed-description case all fail without the ranker change. Verified: exactly those three fail with the earlier search-index.mjs.
- Description: the four new command cases each fail on the base. Verified.
- Description: doctor does not yet warn on a template link that names no doc. Verified: no doctor check reads template descriptions.
- Description: the CLI suite, repository checks, strict typecheck, structure check, ESLint and Prettier were run. Partly verified: 143 related CLI test files, ESLint, the structure check and the changeset check pass; the strict typecheck reports only two unbuilt-theme errors that the base shares; the full suite and the full repository check were not rerun, and no CI has run at this head.
.changeset/template-doc-links.md: clearpackages/cli/api/build/_adapter.mjs: clearpackages/cli/api/component/_adapter.mjs: clear (the link loop now lives only in the shared linker)packages/cli/api/component/component.mjs: clearpackages/cli/api/component/detail/blocks/blocks.mjs: clearpackages/cli/api/docs/_adapter.mjs: clearpackages/cli/api/search/_gather-templates.mjs: clearpackages/cli/api/search/search-index.mjs: clear (non-blocking: theDISPLAY_FIELDcomment still names only component candidates)packages/cli/api/search/search-index.test.mjs: clearpackages/cli/api/template/_adapter.mjs: clearpackages/cli/api/template/list/list.mjs: clearpackages/cli/api/template/show/show.mjs: clearpackages/cli/api/template/skeleton/skeleton.mjs: clearpackages/cli/api/template/template.mjs: clearpackages/cli/clients/cli/commands/template-doc-tokens.test.mjs: clear
edce5c9 to
29e64a6
Compare
There was a problem hiding this comment.
Approved pending CI: CI and Lint have not run on this head yet. It was pushed while the pull request still targeted the #12214 branch, and moving the base to main does not start them; the next push, or closing and reopening the pull request, does.
The template, build, search and component-blocks outputs now print a linked doc's command, rankSearchIndex() returns the same template descriptions as search(), and component reads and template descriptions share one link helper. One optional follow-up: the DISPLAY_FIELD comment in packages/cli/api/search/search-index.mjs still describes component candidates only.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: a link in a template's description no longer prints as written in the template list, skeleton and read, build, search and component blocks. Verified: the four new cases in
template-doc-tokens.test.mjsfail at the merge base and pass on the head; a template read in JSON was checked separately. - Changeset: text shows the project's command, JSON the bare command, and the JSON shape does not change. Verified: the new cases assert both;
descriptionstays a string in every response. - Description: the four surfaces printed the raw link before, in text and JSON. Verified: the four new cases fail at the merge base.
- Description: component docs and topics resolve links on read, and template descriptions never did. Verified: at the merge base the template leaves only render tokens.
- Description: the fix reuses the link functions the docs and component reads already use. Verified:
packages/cli/api/docs/_adapter.mjs:423and:429. - Description checklist: no new public API, visual change, default or interaction model, and no internal context. Verified: no export, command or option changes, nothing renders differently in a browser, and none of the added lines, the title, the body or the commit message carries internal context.
- Description: the shared linker owns the catalog load, the provider map and the guarded link pass, resolves against the writing package's docs (Core's against the CLI's), renders tokens in the same pass so an escaped token stays written, and an owner with no provider renders tokens and leaves links as written. Verified:
packages/cli/api/docs/_adapter.mjs:407-431; the escaped token was checked separately. - Description: component reads call the shared linker, and the text helper loads the docs catalog only when a text links. Verified:
packages/cli/api/component/_adapter.mjs:928andpackages/cli/api/docs/_adapter.mjs:440-455. - Description: the template list, skeleton and read go through the new wrapper, and the leaves return the authored text. Verified:
packages/cli/api/template/template.mjs:213,:287,:294;list.mjs:53,show.mjs:57,skeleton.mjs:260. - Description: build resolves every template description when it loads templates. Verified:
packages/cli/api/build/_adapter.mjs:113-119. - Description: component blocks resolve each block description, and the leaf returns the authored text. Verified:
packages/cli/api/component/component.mjs:475,:525,:658andblocks.mjs:29. - Description: search resolves template results in its existing link pass. Verified:
packages/cli/api/component/_adapter.mjs:816-864. - Description: search indexes keep the shown text beside the scored one for templates, and the index ranker applies it to template results. Verified:
packages/cli/api/search/search-index.mjs:123-150and:259-290, with tests. - Description: text views show the resolved command with the project's command. Verified: the new cases assert it.
- Description: the cited navigable-output requirement governs the change. Not authority: that record is a draft; the current CLI-surface and global-mode records settle every delta.
- Description: no new option, no JSON shape change and no change to template sources. Verified: no command doc or option changed; the byte-for-byte source case passes.
- Description: with an integration that declares its own command, text prints that command, JSON the bare one, and no output keeps a raw link. Verified: the new cases.
- Description: template sources, command tokens and a link that names no doc behave as before. Verified: the existing source and command-token cases pass; a link to a missing doc prints as written.
- Description: the search-index fixture, parity queries and printed-description case all fail without the ranker change. Verified: exactly those three fail with the earlier
search-index.mjs. - Description: the four new command cases each fail on the base. Verified.
- Description: doctor does not yet warn on a template link that names no doc. Verified: no doctor check reads template descriptions.
- Description: the CLI suite, repository checks, strict typecheck, structure check, ESLint and Prettier were run. Partly verified: 179 related CLI test files, ESLint and the structure check pass; Prettier flags only untouched, pre-existing lines in
blocks.mjs, as it does at the merge base; the strict typecheck reports only two unbuilt-theme errors that the merge base shares; the full suite and the full repository check were not rerun. .changeset/template-doc-links.md: clearpackages/cli/api/build/_adapter.mjs: clearpackages/cli/api/component/_adapter.mjs: clear (the link loop now lives only in the shared linker)packages/cli/api/component/component.mjs: clearpackages/cli/api/component/detail/blocks/blocks.mjs: clearpackages/cli/api/docs/_adapter.mjs: clearpackages/cli/api/search/_gather-templates.mjs: clearpackages/cli/api/search/search-index.mjs: clear (non-blocking: theDISPLAY_FIELDcomment still names only component candidates)packages/cli/api/search/search-index.test.mjs: clearpackages/cli/api/template/_adapter.mjs: clearpackages/cli/api/template/list/list.mjs: clearpackages/cli/api/template/show/show.mjs: clearpackages/cli/api/template/skeleton/skeleton.mjs: clearpackages/cli/api/template/template.mjs: clearpackages/cli/clients/cli/commands/template-doc-tokens.test.mjs: clear
PR Analysis Report🔎 Preview ·
|
… resolves it
Template, build, search and component --blocks printed a template
description's {@link} as written. ownedDocLinker owns the catalog load,
provider map and guarded link pass that component reads already used;
linkOwnedTexts reads packages' doc text through it, resolving links against
the docs of the package that wrote them and rendering doc tokens in the same
pass. Template reads, component --blocks, build's template load and search's
link pass run descriptions through it, and stored search indexes keep the
shown text for templates as for components. JSON carries the bare command;
text shows it with the project's command.
29e64a6 to
ce0fec9
Compare
|
/approve-spec ce0fec9 |
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head.
The template list, skeleton and read, build, search and component --blocks outputs now print a linked doc's command, the stored search index returns the same template text as live search, and component reads share the one link helper. The rebase keeps the template read's component list from main inside the new link pass. One optional follow-up: the DISPLAY_FIELD comment in packages/cli/api/search/search-index.mjs still describes component candidates only.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: a link in a template's description no longer prints as written. Verified: the four new cases in
template-doc-tokens.test.mjsfail on the base and pass on the head. - Changeset: the template list, skeleton and read, build, search and component blocks resolve it to the command that opens the linked doc. Verified: the new cases; the template read was checked separately in JSON.
- Changeset: text shows the project's command and JSON the bare command. Verified: the new cases assert both.
- Changeset: the JSON shape does not change. Verified:
descriptionstays a string in every response. - Description: the four surfaces printed the raw link before, in text and JSON. Verified: the four new cases fail on the base.
- Description: component docs and topics resolve links on read, and template descriptions never did. Verified: on the base the template, block, build and search leaves only render tokens.
- Description: no output may show token syntax; JSON gets the bare command and text the project's command. Verified: the new cases.
- Description: the fix reuses the link code the docs and component reads use. Verified:
packages/cli/api/docs/_adapter.mjs:423and:429. - Description: the shared linker owns the catalog load, the provider map and the guarded link pass, resolves against the writing package's docs (Core's against the CLI's), renders tokens in the same pass so an escaped token stays written, and an owner with no provider renders tokens and leaves links as written. Verified:
packages/cli/api/docs/_adapter.mjs:407-431; a relative link to an integration's own doc and an escaped link were checked separately. - Description: component reads call the shared linker, and the text helper loads the docs catalog only when a text links. Verified:
packages/cli/api/component/_adapter.mjs:928andpackages/cli/api/docs/_adapter.mjs:441-444. - Description: the template list, skeleton and read go through the new wrapper, and the leaves return the authored text. Verified:
packages/cli/api/template/template.mjs:214,:288,:300;list.mjs:53,show.mjs:66,skeleton.mjs:260. - Description: build resolves every template description when it loads templates. Verified:
packages/cli/api/build/_adapter.mjs:131-137. - Description: component blocks resolve each block description, and the leaf returns the authored text. Verified:
packages/cli/api/component/component.mjs:475,:525,:658andblocks.mjs:29. - Description: search resolves template results in its existing link pass. Verified:
packages/cli/api/component/_adapter.mjs:830-847. - Description: search indexes keep the shown text beside the scored one for templates, and the index ranker applies it to template results. Verified:
packages/cli/api/search/search-index.mjs:123-150and:262-294, with tests. - Description: text views show the resolved command with the project's command. Verified: the new cases.
- Description: the cited navigable-output requirement governs the change. Not authority: that record is a draft; the current CLI-surface and global-mode records settle every delta.
- Description: every printed command starts with the picked command name. Verified against the current global-mode record by the new cases.
- Description: no new option, no JSON shape change and no change to template sources. Verified: no command doc or option changed; the byte-for-byte source case passes.
- Description: with an integration that declares its own command, text prints that command, JSON the bare one, and no output keeps a raw link. Verified: the new cases.
- Description: template sources, command tokens and a link that names no doc behave as before. Verified: the existing source and command-token cases pass; a link to a missing doc prints as written.
- Description: the search-index fixture, parity queries and printed-description case all fail without the ranker change. Verified: exactly those three fail with the base's
search-index.mjs. - Description: the four new command cases each fail on the base. Verified.
- Description: doctor does not yet warn on a template link that names no doc. Verified: no doctor check reads template descriptions.
- Description checklist: one defect restored, no tagalongs, no new public API, visual change, default or interaction model, and no internal context. Verified.
- Description: the CLI suite, repository checks, strict typecheck, structure check, ESLint and Prettier were run. Partly verified: 197 related CLI test files pass and Lint passed in CI on this head; the full suite and the other checks are still running in CI.
.changeset/template-doc-links.md: clearpackages/cli/api/build/_adapter.mjs: clearpackages/cli/api/component/_adapter.mjs: clearpackages/cli/api/component/component.mjs: clearpackages/cli/api/component/detail/blocks/blocks.mjs: clearpackages/cli/api/docs/_adapter.mjs: clearpackages/cli/api/search/_gather-templates.mjs: clearpackages/cli/api/search/search-index.mjs: clear (non-blocking: theDISPLAY_FIELDcomment names only component candidates)packages/cli/api/search/search-index.test.mjs: clearpackages/cli/api/template/_adapter.mjs: clearpackages/cli/api/template/list/list.mjs: clearpackages/cli/api/template/show/show.mjs: clearpackages/cli/api/template/skeleton/skeleton.mjs: clearpackages/cli/api/template/template.mjs: clear (keeps the template read's component list frommain)packages/cli/clients/cli/commands/template-doc-tokens.test.mjs: clear
- #12635 fix(cli): export loads and gives back a page whose modules import TypeScript files by .js names Author: @josephfarina - #12727 fix(cli): export loads a served package's subpath exported only to imports Author: @josephfarina - #12224 fix(cli): a {@link} in a template description resolves as astryx docs resolves it Author: @josephfarina - #12278 fix(core): a Theme given a value that is not a theme keeps the page running Author: @josephfarina - #12751 feat(Layout): LayoutContent names its container, so a theme styles a dialog's body apart from its header and footer Author: @josephfarina - #12168 fix(templates): header, footer and toolbar rows wrap for longer translated labels Author: @josephfarina - #12399 [experimental] export: the dropped-text warning checks Core's docs, and text not drawn yet inside Core components that take children no longer warns Author: @josephfarina - #12541 [docs] Core: list the props ComplexSelector, Selector, Toast and ContextMenuItem take Author: @josephfarina - #12676 docs(cli): a short form keeps its own 640 column inside a wide template frame Author: @josephfarina - #12458 fix(core): Field labels use the primary text colour Author: @josephfarina - #12373 [experimental] export: a link to a place in the page stays in the file in a srcdoc viewer frame Author: @josephfarina
|
Landed in #12827. |
User impact
A template's description can link to a doc with
{@link …}, the same way a component's or a topic's text does.astryx template,astryx build,astryx searchandastryx component <Name> --blocksprinted the link as written, in text and in--json, so a reader saw{@link @astryxdesign/cli:generic:theme}instead of the command that opens the doc.Problem and solution fit
astryx docsandastryx componentresolve links with (linkComponentDocandcomponentLinkProviderin the docs adapter):ownedDocLinker(cwd)(docs adapter) owns the catalog load, the provider map and the guarded link pass thatastryx componentused on its own: it resolves a doc's links against the docs of the package that wrote it, a Core item's against the CLI's own, and renders its doc tokens in the same pass, so an escaped token stays written. An owner that names no provider renders its tokens and leaves its links as written.linkComponentResponsenow calls it, andlinkOwnedTexts(items, cwd)reads text fields through it, loading the docs catalog only when a text links.astryx template(list,--skeleton, a template read) runs its response through it (linkTemplateDescriptions, template adapter). The leaves go back to the authored text, so nothing renders twice.astryx buildresolves every template description through it when it loads templates.astryx component <Name> --blocksresolves each block's description through it (linkBlockDescriptions, component adapter); the leaf goes back to the authored text.astryx searchresolves template results inlinkSearchResponse, the pass that already resolves component results, and search indexes keep the shown text beside the scored one for templates as they do for components, andrankSearchIndexapplies it to template results too.docText(fix(cli): template docs never print a raw {@command} or {@pm} token; build and search text show doc commands with the project's command #12214).Expected behavior and authority
spec:AST-047FR9: a read resolves each{@link <target>}to the command that opens its doc, in text and JSON.spec:AST-081FR5: every printed command starts with the command name the picker chooses.Smallest restoration
api/docs/_adapter.mjs:linkOwnedTexts.api/template/_adapter.mjs+template.mjs:linkTemplateDescriptionsaround list, show and skeleton; the leaves stop rendering on their own.api/build/_adapter.mjs,api/component/_adapter.mjs(linkSearchResponse,linkBlockDescriptions) +component.mjs,api/component/detail/blocks/blocks.mjs,api/search/search-index.mjs,api/search/_gather-templates.mjs.Evidence
cliCommand: 'acme astryx'and ships a template whose description is "theme it as{@link @astryxdesign/cli:generic:theme}says", the four surfaces printed the raw link in text and JSON.`acme astryx docs theme`, JSON`astryx docs theme`, no output contains{@link.{@command}descriptions render as in fix(cli): template docs never print a raw {@command} or {@pm} token; build and search text show doc commands with the project's command #12214; a link that names no doc prints as written, as inastryx docs.search-index.test.mjsadds a template with a{@command}and a{@link}to its fixture integration, to the "answers as search() does" queries, and to one case that checks the printed description (all three fail without therankSearchIndexchange). Four new cases inpackages/cli/clients/cli/commands/template-doc-tokens.test.mjs(template list and skeleton, build, search,component --blocks), each failing on the base.Scope
Not in this change: doctor does not yet warn about a template description link that names no doc.
Components: CLI
template,build,search, docs adapterTesting
pnpm exec vitest run --project node packages/clipnpm check:repo,pnpm -F @astryxdesign/cli typecheck:strict,node scripts/check-cli-structure.mjs, ESLint and Prettier on the changed files.