Comfy-Org / Comfy-Org/Comfy-Desktop

Dead-code / stale-comment cleanup pass (follow-up to #795)

Open
#796 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
458
Forks
59
Avg merge
22h 18m
Merged PRs (30d)
45

Description

While investigating #779, I removed an obviously dead chain of files (legacy `SettingsModal`/`SettingsView`/`SettingField`/`DirectoriesView`/`views/DownloadsView`/`SettingsSections`/`AppUpdateAction` plus the orphaned `useGlobalSettings.ts` composable) in PR #795. That sweep was scoped to the settings surface; the rest of the repo likely has additional dead or stale-comment surfaces that didn't fall out of that thread.

This issue is a placeholder to do a deliberate pass:

## Suggested scope
- **Static dead-code scan.** Run a "find files with no live importer" pass across `src/renderer`, `src/main`, `src/preload`, and `src/shared`. Exclude tests, `vitest.setup.ts`, and the entry HTML files; anything else that nothing imports is a candidate.
- **TODO(brand-cleanup) audit.** Several files still carry `TODO(brand-cleanup)` headers from the pre-brand-redesign migration. Some of them are accurate, some are stale (the file they reference has shipped, been deleted, or moved). Walk every one and either ship the cleanup it suggests or refresh the wording.
- **Stale "legacy ..." prose.** Multiple comments still say things like *"replaces the legacy X"*, *"previously routed to Y"*, *"mirrors the legacy Z"*. Per `ComfyUI-Launcher/AGENTS.md`, comments shouldn't narrate history; rewrite each to describe what the code does today (or just delete the historical clause).
- **Handoff docs.** `docs/global-settings-handoff.md`, `docs/per-install-settings-handoff.md`, `docs/unified-window-phase3-notes.md` etc. - some are still useful, some describe a state of the world that no longer exists. Decide per-doc: archive, update, or delete.
- **i18n keys.** `locales/en.json` and `locales/zh.json` should be diffed against the live key references in code; the `settingsModal` namespace is still consumed by `ManageInstallModal.vue` / `GlobalSettingsView.vue`, but other keys may be orphans now.

## Already done in #795 (so you don't redo it)
- Deleted the legacy settings chain listed above.
- Refreshed stale prose in `DetailModal.vue`, `ManageInstallModal.vue`, `titlePopup.ts`, `comfyTitlePopupPreload.ts`, `ipc.ts`, `UpdatesSection.vue`.
- Dropped the orphan `vi.mock` calls in `PanelApp.test.ts`.

## Out of scope
- Functional refactors. This is a pure cleanup pass - nothing here should change runtime behaviour.
- Renaming the `settingsModal` i18n namespace (it still works fine as a key name even though the legacy component is gone; renaming requires touching `en.json` + `zh.json` + every consumer).

Tracking this as a follow-up because doing it inside #795 would have ballooned that PR well past its stated scope (fix #779 + adjacent dead code).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.