mirror of
https://github.com/Comfy-Org/embedded-docs.git
synced 2026-11-05 00:17:31 +00:00
[GH-ISSUE #186] Generated built-in node descriptions fall below the 40-char guideline in localized pages #23
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/embedded-docs#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lin-bot23 on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Comfy-Org/embedded-docs/issues/186
Built-in node pages in
Comfy-Org/docsare generated bydocs-generation/scripts/sync_to_comfy_docs.py, which seeds every frontmatterdescriptionfrom the first sentence of the first overview paragraph of the localized.md:get_description_from_content()(line ~860) returns one sentence.build_frontmatter()(line ~1057) then hard-slices toMAX_DESCRIPTION_CHARS = 160._MIN_DESCRIPTION_CHARS = 40already exists but is only used as a lower bound when trimming; nothing expands a short seed.Comfy-Org/docsAGENTS.md asks every page for a 40-160 char description, so localized pages that inherit a short first sentence end up below the minimum. CJK carries the same scope in fewer characters, so this hits zh hardest.Counted in
Comfy-Org/docsatf3f932396(*/built-in-nodes/*.mdx,descriptionshorter than 40 chars):Found while reviewing Comfy-Org/docs#1984, where CodeRabbit flagged the Japanese/Korean/Chinese
MOSSImageLayoutPromptdescription; it was withdrawn as a page-level finding because hand edits to generated frontmatter are reverted by the next sync, and the fix belongs here.Proposed fix
In
get_description_from_content()(or at the call sites at lines ~1195 / ~1211): keep appending following sentences from the same paragraph while the result is shorter than_MIN_DESCRIPTION_CHARSand does not exceedMAX_DESCRIPTION_CHARS, using the same CJK sentence boundaries_first_sentence()already handles; fall back to the next paragraph only if the overview paragraph runs out.Why not in the node-docs sync PR
It rewrites frontmatter on roughly 700 localized pages across every locale, i.e. it is a separate generator change + full re-sync, not part of one node sync. Opening this so the decision and the re-sync stay tracked outside docs#1984.