Comfy-Org / Comfy-Org/Comfy-Desktop
Clean up dead code / orphan files only referenced in comments
- Dominant language
- TypeScript
- Stars
- 458
- Forks
- 59
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 45
Description
Several files and symbols in the renderer are no longer imported by any live code path but still exist on disk and get referenced in nearby comments / docstrings. This has actively misled code analysis (both human and AI-assisted) when reasoning about which UI paths reach a given component.
### Concrete example
`src/renderer/src/views/ConsoleModal.vue` is not imported anywhere in the live tree, but `src/renderer/src/components/ModalShell.vue` still mentions it in comments:
```
* Glyph for the corner close (defaults to ✕; ProgressModal/ConsoleModal swap to − while running).
```
That comment makes it look like `ConsoleModal` is a live consumer of `ModalShell`, when in reality it's dead — the only user-triggered stop affordance left in the running UI is the "Close Running & Launch" secondary button on `useLocalInstanceGuard`'s dialog (plus the crash path). There is currently **no user-facing Stop button** in the title bar, instance picker popup, or panel.
### What to do
1. Audit `src/renderer/` (and `src/main/` while we're at it) for files that have no live import — start with anything only mentioned in comments / JSDoc / nearby docstrings.
2. Delete the orphan files outright (git history is the archive).
3. Update / remove any comments that name those deleted symbols so future readers (and tooling) aren't pointed at code that no longer exists.
4. Decide separately whether the missing user-facing Stop affordance should come back somewhere (picker popup, panel header, etc.), or whether the current "launch another instance to evict" flow is the only intended path. That's a product question, not part of this cleanup.
### Why now
This came up while reviewing #646 — the PR redesigns the `stopped` / `crashed` surfaces in `ComfyLifecycleView`, and the dead `ConsoleModal` sent the analysis down a wrong "the user stops from the console modal" path before we caught it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.