From dd320047e05b6c8c8a72e7b518062e5696907896 Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Sat, 18 Apr 2026 03:22:47 +0200 Subject: [PATCH] Default to Missing tab and add category headers Add a visual category header to each model section in the Linker dialog and ensure the dialog defaults to the "Missing Models" tab when opened. Also skip rendering the missing-models list when the active tab isn't "missing" to avoid unnecessary DOM work. Minor UI tweaks include toggling tab classes and showing download/auto-resolve buttons when switching to the missing tab. --- web/linker.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/web/linker.js b/web/linker.js index 2a1b223..ef9c5da 100644 --- a/web/linker.js +++ b/web/linker.js @@ -884,6 +884,11 @@ class LinkerManagerDialog extends ComfyDialog { html += `
`; + // Add category header + html += `
+ ${displayName.toUpperCase()} +
`; + if (hasActive) { const activeStr = modelsObj.active.map(m => { const fullName = m.name || m.original_path?.split(/[\/\\]/).pop() || 'Unknown'; @@ -1066,6 +1071,16 @@ class LinkerManagerDialog extends ComfyDialog { // Update button state in case there are active downloads this.updateDownloadAllButtonState(); + // Always default to Missing Models tab when opening dialog + if (this.activeTab !== 'missing') { + // Manually switch tab without loading + this.activeTab = 'missing'; + this.missingTab.classList.add('ml-tab-active'); + this.loadedTab.classList.remove('ml-tab-active'); + this.downloadAllButton.style.display = 'inline-flex'; + this.autoResolveButton.style.display = 'inline-flex'; + } + // Use provided workflow or fetch from current graph await this.loadWorkflowData(workflow); } @@ -1242,6 +1257,12 @@ class LinkerManagerDialog extends ComfyDialog { `; html += '
'; + // Skip rendering if active tab is not "missing" + if (this.activeTab !== 'missing') { + container.innerHTML = ''; + return; + } + // Sort missing models: those with 100% confidence matches first, then others const sortedMissingModels = missingModels.sort((a, b) => { const aMatches = a.matches || [];