Comfy-Org / Comfy-Org/Comfy-Desktop

Evaluate removal of legacy content script selectors based on min frontend version

Open
#365 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

**Context:** In #357 Phase 3 we evaluated removing the legacy CSS selectors in `comfyContentScript.ts` but kept them because there is no enforced minimum frontend version.

The content script currently supports three scraping strategies for Missing Models downloads:

### Selectors to evaluate

| Strategy | Selector / pattern | Introduced for | Can remove when |
|----------|-------------------|----------------|-----------------|
| Legacy dialog | `.comfy-missing-models .p-listbox-option` | Original PrimeVue Listbox-based missing models dialog | Frontend dropped this dialog |
| New dialog — Strategy 1 | `[aria-labelledby="global-missing-models-warning"] button[title]` with per-model download buttons | Redesigned badge-based dialog (older frontend versions with per-model buttons) | Frontend switched to "Download all" only |
| New dialog — Strategy 2 | `[aria-labelledby="global-missing-models-warning"] span[title]` paired with badge `[class*="rounded-full"]` | Newer frontend versions with "Download all" button | N/A — this is the current pattern |
| Errors tab | `[data-testid="properties-panel"]` with `p[class*="text-destructive-background-hover"]` category headers | Right side panel Missing Models section | N/A — this is the current pattern |

### Tasks

1. Look up which `ComfyUI_frontend` version introduced `[aria-labelledby="global-missing-models-warning"]` (replacing `.comfy-missing-models`)
2. Look up which version switched from per-model download buttons to "Download all" only
3. If the Launcher already enforces or can enforce a minimum frontend version that post-dates (1), remove `scrapeLegacyDialog()` and its `.comfy-missing-models` check in `updateMissingModelsCache()`
4. If the min version also post-dates (2), simplify `scrapeNewDialog()` to only use Strategy 2

**Files:** `src/main/lib/comfyContentScript.ts`
**Related:** #357

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.