Comfy-Org / Comfy-Org/ComfyUI_frontend
nodeApi docs: derive the reference member index from the compiler, not a hand-kept table
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
Follow-up owned from review of #16792 (thread on `docs/node-api/reference.md:43`).
## Context
The reference's navigable table is hand-maintained and omits reachable public roots and members — `Comfy.system` / `SystemHandle.monitor()`, `playSound()`, `documentId()`, `onPromptSerialize`, `PromptInputProjection`, `PromptInputProjector`. The generated capability block names some omissions but gives no usage route.
## Decision
Ticket rather than hand-edit. Adding the missing rows fixes today's list and leaves the mechanism that let it drift. `scripts/node-api/gen_api_surface.mjs` already walks the type graph from the exported `Comfy` root to derive the conformance allowlist; the same walk can emit a member index for the reference, and `capabilityDoc.test.ts` already shows the pattern for failing when docs and code disagree.
## Done looks like
- A generated public-member index (root → member → type) embedded in `reference.md`, derived from the `Comfy` type graph
- A test that fails when the embedded index differs from the derived one, like the existing capability-list check
- Prose sections link into the index rather than maintaining their own partial member lists
Contributor guide
Research direction
Start with scripts/node-api/gen_api_surface.mjs and trace how it walks the exported Comfy type graph and produces the conformance allowlist. Then read docs/node-api/reference.md:43 and capabilityDoc.test.ts for the existing documentation-check pattern. Done means reference.md contains a generated root → member → type index, a test detects drift, and prose sections link to it instead of keeping partial lists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- documentation, testing
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100