Comfy-Org / Comfy-Org/ComfyUI_frontend

Over-exposed store internals: 3 stores with unused public exports

Open
#11,050 0 comments 0 reactions 0 assignees View on GitHub
audit:wiring-gap code-audit
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Recommendation

### ♻️ REFACTOR: Make internal store helpers private

Three stores export internal helpers that are never consumed externally.

## What Was Found

### modelToNodeStore.ts — 3 Unused Public Exports
- `registerNodeProvider`, `quickRegister`, `registerDefaults` — only used internally
- Public API (`getRegisteredNodeTypes`, `getCategoryForNodeType`, etc.) is actively used by 10+ consumers

### maskEditorDataStore.ts — 3 Unused Exported Getters
- `loadError`, `hasValidInput`, `hasValidOutput` — zero external consumers

### templateRankingStore.ts — 1 Unused Export
- `computeFreshness` — only used internally by `computeDefaultScore` and `computePopularScore`

## Context

Reducing the public surface area of these stores improves encapsulation and makes the API clearer for consumers.

---

**Category:** Wiring Gap | **Confidence:** HIGH | **Tools:** Semantic analysis
_Filed by audit-code skill_

Part of #11022

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11050-Over-exposed-store-internals-3-stores-with-unused-public-exports-33e6d73d365081ffb715e12543007cb3) 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.