diff --git a/README.md b/README.md index 957cc76..90d7beb 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A ComfyUI custom node package that silently tracks which nodes, packages, and mo - **Expandable detail** — click any package to see individual node-level stats - **One-click disable** — disable unused packages straight from the dialog via ComfyUI Manager (per-package or in bulk), reversible at any time - **Workflow tab** — on loading a workflow, splits unresolved nodes into *Missing* (install via Manager) and *Disabled*, with a temporary **Enable 7d** trial that auto-disables packages left unused -- **Mirror search** — a standalone palette (⌕ button / `Ctrl/Cmd+Shift+D`) that searches nodes belonging to currently-disabled packages and re-enables them on the spot +- **Mirror search** — a standalone palette (⌕ button / `Ctrl/Cmd+Shift+D`) that searches nodes belonging to currently-disabled packages, previews the owning package + its sibling nodes, and re-enables them on the spot - **Non-blocking** — DB writes happen in a background thread, no impact on workflow execution ## Package Classification @@ -119,15 +119,21 @@ package* and lets you re-enable the owning package right from the results. **`Ctrl/Cmd+Shift+D`** (ignored while typing in an input). - Type to filter — results are ranked (node-name prefix first, then word-start, substring, finally pack-name matches) and show the `class_type` and its pack. +- Hover a result (or use ↑/↓) to open a **preview panel** on the right with the + owning package's title, author, description, repo link, and the full list of + sibling nodes in that pack — the active node highlighted. (A true rendered node + graphic isn't possible here: the pack is disabled, so ComfyUI hasn't loaded the + node's slot definition; the panel shows the package metadata we do have.) - Each result offers **Enable 7d** (re-enable under a 7-day trial) and **Enable** - (re-enable permanently) — the same enable path as the Workflow tab. + (re-enable permanently) — in the row and in the preview panel — the same enable + path as the Workflow tab. - Enabling takes effect after a ComfyUI restart; enabled rows mark *"✓ enabled · restart"*. The catalog is built once per session by joining ComfyUI Manager's node→pack -mappings with the list of disabled packs, and cached; use the **↻** button to -rebuild it. The palette is inert (with a clear message) when ComfyUI Manager is -absent or there are no disabled packages. +mappings with the disabled packs (matched across dir name, registry id, and repo +URL), and cached; use the **↻** button to rebuild it. The palette is inert (with +a clear message) when ComfyUI Manager is absent or there are no disabled packages. **Models tab** - Summary bar with counts for each tier across all model types diff --git a/js/nodes_stats.js b/js/nodes_stats.js index 59672bc..03d8666 100644 --- a/js/nodes_stats.js +++ b/js/nodes_stats.js @@ -546,19 +546,36 @@ function buildDisabledCatalog(mappings, managerInfo) { } const catalog = []; const seen = new Set(); + const packMeta = {}; // dir -> shared { pack, title, author, description, repo, version, info, nodes:[] } for (const [packKey, entry] of Object.entries(mappings || {})) { const rec = byAnyKey[normalizeRepoUrl(packKey)]; if (!rec || rec.info.state !== "disabled") continue; const list = entry && entry[0]; if (!Array.isArray(list)) continue; - const title = rec.info.title || rec.dir; + const m = (entry && entry[1]) || {}; + let meta = packMeta[rec.dir]; + if (!meta) { + const repo = (rec.info.files || []).find((f) => /^https?:\/\//i.test(f)) || ""; + meta = packMeta[rec.dir] = { + pack: rec.dir, + title: m.title || m.title_aux || rec.info.title || rec.dir, + author: m.author || "", + description: m.description || "", + repo, + version: rec.info.version || "", + info: rec.info, + nodes: [], + }; + } for (const ct of list) { - const dedup = rec.dir + " " + ct; + const dedup = rec.dir + "\n" + ct; if (seen.has(dedup)) continue; seen.add(dedup); - catalog.push({ class_type: ct, pack: rec.dir, title, info: rec.info }); + meta.nodes.push(ct); + catalog.push({ class_type: ct, pack: rec.dir, title: meta.title, info: rec.info, meta }); } } + for (const meta of Object.values(packMeta)) meta.nodes.sort((a, b) => a.localeCompare(b)); return catalog; } @@ -868,42 +885,105 @@ async function openMirrorSearch() { const box = document.createElement("div"); box.style.cssText = - "margin-top:10vh;background:#1e1e1e;color:#ddd;border:1px solid #444;border-radius:8px;width:90%;max-width:640px;max-height:70vh;display:flex;flex-direction:column;font-family:monospace;font-size:13px;overflow:hidden;"; + "margin-top:10vh;background:#1e1e1e;color:#ddd;border:1px solid #444;border-radius:8px;width:90%;max-width:880px;max-height:70vh;display:flex;flex-direction:column;font-family:monospace;font-size:13px;overflow:hidden;"; box.innerHTML = `