Skip to content

Commit ca164d7

Browse files
Tiwasclaude
andcommitted
feat(flow-doctor): show total + severity breakdown on Flows and Apps tabs
The tab badges used to show a single number that mixed total counts with "needs attention" counts depending on the tab — confusing because "14" next to Apps looked like an installed-app count when it was really the union of updates+unused+crashed. Now both tabs show: Flows: <total> (E:<errors> · W:<warns> · I:<info> · OK:<ok>) Apps: <total> (X:<crashed> · U:<updates> · !:<unused> · OK:<ok>) Color-coded (red/amber/blue/green) so the breakdown reads at a glance. The total is unambiguous; each bucket is exclusive so the categories sum to the total. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bcc16db commit ca164d7

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/tools/flow-doctor.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,16 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
989989
document.getElementById('count-warnings').textContent = nWarn;
990990
document.getElementById('count-info').textContent = nInfo;
991991
document.getElementById('count-ok').textContent = nOk;
992-
document.getElementById('tab-flows-count').textContent = nErr + nWarn;
993-
document.getElementById('tab-apps-count').textContent = (this.appsList || []).filter(a => a.hasUpdate || (a.usage === 0 && (a.deviceCount || 0) === 0) || a.crashed).length;
992+
const total = nErr + nWarn + nInfo + nOk;
993+
document.getElementById('tab-flows-count').innerHTML =
994+
`${total} (<span class="text-red-600">E:${nErr}</span> · <span class="text-amber-600">W:${nWarn}</span> · <span class="text-blue-600">I:${nInfo}</span> · <span class="text-green-700">OK:${nOk}</span>)`;
995+
const allApps = this.appsList || [];
996+
const nCrashed = allApps.filter(a => a.crashed).length;
997+
const nUpdate = allApps.filter(a => a.hasUpdate && !a.crashed).length;
998+
const nUnused = allApps.filter(a => !a.crashed && !a.hasUpdate && a.usage === 0 && (a.deviceCount || 0) === 0).length;
999+
const nAppsOk = allApps.length - nCrashed - nUpdate - nUnused;
1000+
document.getElementById('tab-apps-count').innerHTML =
1001+
`${allApps.length} (<span class="text-red-600">X:${nCrashed}</span> · <span class="text-amber-600">U:${nUpdate}</span> · <span class="text-blue-600">!:${nUnused}</span> · <span class="text-green-700">OK:${nAppsOk}</span>)`;
9941002

9951003
const sevWanted = new Set([...document.querySelectorAll('.sev-toggle')].filter(cb => cb.checked).map(cb => cb.getAttribute('data-sev')));
9961004
const search = (document.getElementById('flow-search').value || '').toLowerCase().trim();

0 commit comments

Comments
 (0)