Comfy-Org / Comfy-Org/ComfyUI_frontend
refactor: remove app.ts re-exports and update internal importers to use appUtil
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 702
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 512
Description
## Summary
Follow-up to #11400 (and the DDD relocation refactor).
After the extraction of `sanitizeNodeName`, `isApiJson`, `positionBatchLayout`, and `stackNodesVertically` into `src/scripts/appUtil.ts`, `src/scripts/app.ts` currently re-exports these four utilities solely for backwards-compatibility:
```ts
export {
isApiJson,
positionBatchLayout,
sanitizeNodeName,
stackNodesVertically
}
```
A search of the ComfyUI custom node ecosystem (via codesearch) confirmed that **no external custom nodes** import any of these symbols from `app.ts`. The only internal consumer is `src/platform/nodeReplacement/useNodeReplacement.ts`, which imports `sanitizeNodeName` from `app.ts`.
## Work Items
- [ ] Remove the four re-exports from `src/scripts/app.ts`
- [ ] Update `src/platform/nodeReplacement/useNodeReplacement.ts` to import `sanitizeNodeName` from `./appUtil` (or the appropriate relative path to `src/scripts/appUtil.ts`)
- [ ] Verify no other internal files import these symbols from `app.ts` (run `rg 'from.*app'` scoped to these symbol names)
- [ ] This can be done alongside any broader DDD relocation work for the `appUtil` module
## References
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11400
- Comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11400#discussion_r3114740558
/cc @christian-byrne
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11533-refactor-remove-app-ts-re-exports-and-update-internal-importers-to-use-appUtil-34a6d73d365081649fa0dd981302d298) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.