Comfy-Org / Comfy-Org/ComfyUI_frontend

fix: update misleading JSDoc on BLUEPRINT_PREFIX_MAP in essentialsDisplayNames.ts

Open
#10,154 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
documentation
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Summary

The JSDoc comment on `BLUEPRINT_PREFIX_MAP` in `src/constants/essentialsDisplayNames.ts` currently states:

> Ordered longest-first so more specific prefixes match before shorter ones.

However, the entries are **grouped by category** (Image Generation, then Video Generation), not by length. Since no prefix is a prefix of another, the ordering does not affect functionality — but the comment is misleading and should be updated to reflect the actual structure.

## Suggested fix

Update the JSDoc to accurately describe the current grouping, e.g.:

```ts
/**
* Blueprint prefix patterns mapped to display name i18n keys and essentials categories.
* Entries are matched by checking if the blueprint filename
* (after removing the SubgraphBlueprint. prefix) starts with the key.
* Grouped by category (image generation, then video generation).
*/
```

## References

- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10113
- Comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10113#discussion_r2945046827

/cc @christian-byrne

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10154-fix-update-misleading-JSDoc-on-BLUEPRINT_PREFIX_MAP-in-essentialsDisplayNames-ts-3266d73d365081399301cf1755a5e8c7) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.