mirror of
https://github.com/Comfy-Org/embedded-docs.git
synced 2026-11-05 00:17:31 +00:00
[PR #187] [MERGED] fix: grow short node descriptions to the 40-char floor #185
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#185
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?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/embedded-docs/pull/187
Author: @lin-bot23
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @comfyui-wiki
Base:
main← Head:fix/description-min-length📝 Commits (1)
14c5c68fix: grow short node descriptions to the 40-char floor📊 Changes
2 files changed (+110 additions, -9 deletions)
View changed files
📝
docs-generation/scripts/sync_to_comfy_docs.py(+45 -4)📝
docs-generation/tests/test_sync_helpers.py(+65 -5)📄 Description
Fixes #186.
sync_to_comfy_docs.pyseeds every frontmatterdescriptionfrom the first sentence of the first overview paragraph, thenbuild_frontmatter()only caps it at 160 chars. Nothing grew a short seed, so localized pages that open with a one-liner shipped descriptions below the 40-char guideline inComfy-Org/docsAGENTS.md. CJK says the same thing in fewer characters, which is why zh/ja carried most of it.Change
_expand_to_minimum(): keep appending the following sentences from the same overview paragraph while the result is under_MIN_DESCRIPTION_CHARSand the next sentence still fits inMAX_DESCRIPTION_CHARS._trim_to_lengthalready applies to over-long sentences) rather than dropping back to the one-liner;_join_sentences()joins a CJK terminator (。!?) without a space and an ASCII one with a space;get_description_from_content()now returns the grown result (_trim_to_lengthis unchanged and stays a no-op on it).f"Documentation for {node} node."seed. A localized page with no prose paragraph (zh-TW pages that open with## 概述, for example) fell into it and shipped a short description; the empty value now reachesbuild_frontmatter(), which uses its own 40+ char templated fallback.Verification
python3 docs-generation/tests/test_sync_helpers.py: 32 tests, OK. NewDescriptionFloorTestscovers growth, paragraph exhaustion, the 160 ceiling, an already-long first sentence, and the AI-disclaimer skip; three existing tests asserted "first sentence only" and were updated to their new expectation (two of them were rewritten with a first sentence that already clears the floor, so they still test what their names say).Simulated the real code path (
get_description_from_content→build_frontmatter→ frontmatter value) over all 15,810 node docs incomfyui_embedded_docs/docs:The 49 residual pages have a whole opening paragraph shorter than the floor, so there is nothing left to append without inventing text. zh: 429 → 7, zh-TW: 351 → 13, ja: 125 → 4, ko: 87 → 2.
The
MOSSImageLayoutPromptcase the issue was filed from: zh 22 → 106 chars, ja 33 → 107, ko 32 → 158.docs-generation/tests/test_translation_fixes.py::test_persian_outputs_section_detectedfails onorigin/mainas well (verified with the changes stashed), so it is pre-existing and untouched here.Follow-up
The generated pages in
Comfy-Org/docsonly change on the next sync; no hand edits tobuilt-in-nodes/**are part of this PR.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.