fix(dashboard): normalize platform names for lock cards

- Update `platformStyle` in `dashboard/index.html` to be case-insensitive and handle aliases (e.g., 'Claude' -> 'claude-code').
- Update summary statistics to use the normalized label for consistency.
- Ensure platforms like "Jules", "Codex", and "Claude" are displayed correctly instead of "Unknown".

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-14 05:29:10 +00:00
1 parent 3536c54d1b
commit e03cb64f80
1 file changed
+5 -2
+5 -2
View File
@@ -391,7 +391,9 @@
};
function platformStyle(platform) {
return PLATFORM_COLORS[platform] || PLATFORM_COLORS.unknown;
const raw = String(platform || '').toLowerCase().trim();
if (raw === 'claude' || raw.includes('claude')) return PLATFORM_COLORS['claude-code'];
return PLATFORM_COLORS[raw] || PLATFORM_COLORS.unknown;
}
// -----------------------------------------------------------------------
@@ -416,7 +418,8 @@
const active = locks.filter((l) => !isExpired(l));
const platforms = {};
for (const l of active) {
platforms[l.platform] = (platforms[l.platform] || 0) + 1;
const label = platformStyle(l.platform).label;
platforms[label] = (platforms[label] || 0) + 1;
}
const cards = [