From 211f3c07dd9334dfd4e7e202d3fbf74f32ca4040 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Fri, 24 Jul 2026 14:50:43 +0200 Subject: [PATCH] feat(ui): clean default header (usage chips, file viewer on; token chip, lifecycle log off) The default desktop header right cluster is now: WS, CPU, MEM, File Viewer folder button, 5H/7D plan-usage chips, gear. The token-count chip and the lifecycle-log document button default OFF (both still honor stored prefs), and the File Viewer button defaults ON (phones keep hiding it via mobile.css). Templates ship the hidden/shown state so nothing flashes before settings load. Capture scripts seed showTokenCount:false so screenshots match regardless of server defaults. Co-Authored-By: Claude Fable 5 --- scripts/capture-readme-real.mjs | 2 +- scripts/capture-real-overview.mjs | 1 + scripts/capture-subagent-gif.mjs | 2 ++ scripts/capture-subagent-screenshots.mjs | 1 + src/web/public/index.html | 6 +++--- src/web/public/settings-ui.js | 16 +++++++++++----- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/scripts/capture-readme-real.mjs b/scripts/capture-readme-real.mjs index 7142c106..2c4c8bf5 100644 --- a/scripts/capture-readme-real.mjs +++ b/scripts/capture-readme-real.mjs @@ -50,7 +50,7 @@ async function newCtx(browser) { try { localStorage.setItem('codeman:skin', skin); localStorage.setItem('codeman-font-size', String(font)); - const blob = { skin, showFileBrowser: false, showProjectInsights: false }; + const blob = { skin, showFileBrowser: false, showProjectInsights: false, showTokenCount: false }; // Don't auto-hide subagent windows that belong to a non-active tab — the // subagent scene re-homes agents and needs both windows visible at once. blob.subagentActiveTabOnly = false; diff --git a/scripts/capture-real-overview.mjs b/scripts/capture-real-overview.mjs index 05889dae..fd1452ad 100644 --- a/scripts/capture-real-overview.mjs +++ b/scripts/capture-real-overview.mjs @@ -79,6 +79,7 @@ const main = async () => { showMonitor: false, showSubagents: false, showProjectInsights: false, + showTokenCount: false, }; if (planUsage) blob.showPlanUsageLimits = true; localStorage.setItem('codeman-app-settings', JSON.stringify(blob)); diff --git a/scripts/capture-subagent-gif.mjs b/scripts/capture-subagent-gif.mjs index 6ec97199..a4213ed8 100644 --- a/scripts/capture-subagent-gif.mjs +++ b/scripts/capture-subagent-gif.mjs @@ -126,6 +126,7 @@ async function capture() { showMonitor: false, showProjectInsights: false, showFileBrowser: false, + showTokenCount: false, }); localStorage.setItem('codeman-app-settings', JSON.stringify(existing)); }); @@ -230,6 +231,7 @@ async function capture() { showMonitor: false, showProjectInsights: false, showFileBrowser: false, + showTokenCount: false, }); localStorage.setItem('codeman-app-settings', JSON.stringify(existing)); }); diff --git a/scripts/capture-subagent-screenshots.mjs b/scripts/capture-subagent-screenshots.mjs index d90411c1..2cc734f4 100755 --- a/scripts/capture-subagent-screenshots.mjs +++ b/scripts/capture-subagent-screenshots.mjs @@ -221,6 +221,7 @@ async function configureSettings(page) { subagentTrackingEnabled: true, subagentActiveTabOnly: false, // Show all subagents regardless of active tab showMonitor: true, + showTokenCount: false, }; localStorage.setItem('codeman-app-settings', JSON.stringify(settings)); }); diff --git a/src/web/public/index.html b/src/web/public/index.html index daa2b2f3..b51c96d1 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -134,7 +134,7 @@ - +
—
@@ -142,9 +142,9 @@ - + -
0 tokens
+ diff --git a/src/web/public/settings-ui.js b/src/web/public/settings-ui.js index d30b4206..6a3a7e25 100644 --- a/src/web/public/settings-ui.js +++ b/src/web/public/settings-ui.js @@ -307,9 +307,9 @@ Object.assign(CodemanApp.prototype, { // Header visibility settings document.getElementById('appSettingsShowFontControls').checked = settings.showFontControls ?? defaults.showFontControls ?? false; document.getElementById('appSettingsShowSystemStats').checked = settings.showSystemStats ?? defaults.showSystemStats ?? true; - document.getElementById('appSettingsShowLifecycleLog').checked = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? true; + document.getElementById('appSettingsShowLifecycleLog').checked = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? false; document.getElementById('appSettingsShowResponseViewer').checked = settings.showResponseViewer ?? defaults.showResponseViewer ?? false; - document.getElementById('appSettingsShowFileViewerButton').checked = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? false; + document.getElementById('appSettingsShowFileViewerButton').checked = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? true; document.getElementById('appSettingsShowAttachmentsButton').checked = settings.showAttachmentsButton ?? defaults.showAttachmentsButton ?? false; document.getElementById('appSettingsSkin').value = settings.skin ?? defaults.skin ?? 'daylight-blue'; // WebGL renderer (desktop only — mobile always uses the DOM renderer, so hide @@ -1893,7 +1893,9 @@ Object.assign(CodemanApp.prototype, { const compactHeader = MobileDetection.getDeviceType() !== 'desktop'; const showFontControls = compactHeader ? false : (settings.showFontControls ?? defaults.showFontControls ?? false); const showSystemStats = compactHeader ? false : (settings.showSystemStats ?? defaults.showSystemStats ?? true); - const showTokenCount = compactHeader ? false : (settings.showTokenCount ?? defaults.showTokenCount ?? true); + // Default OFF: the header stays gear + usage chips + files button unless a + // stored preference explicitly re-enables the token chip (no UI toggle exists). + const showTokenCount = compactHeader ? false : (settings.showTokenCount ?? defaults.showTokenCount ?? false); const fontControlsEl = document.querySelector('.header-font-controls'); const systemStatsEl = document.getElementById('headerSystemStats'); @@ -1910,7 +1912,9 @@ Object.assign(CodemanApp.prototype, { } // Hide lifecycle log button when setting is disabled - const showLifecycleLog = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? true; + // Default OFF: the lifecycle-log document icon is opt-in; the default header + // keeps only WS/CPU/MEM, the file-viewer folder, usage chips, and the gear. + const showLifecycleLog = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? false; const lifecycleBtn = document.querySelector('.btn-lifecycle-log'); if (lifecycleBtn) { lifecycleBtn.style.display = showLifecycleLog ? '' : 'none'; @@ -1934,7 +1938,9 @@ Object.assign(CodemanApp.prototype, { // File Viewer header button — opt-in, default OFF. Marker class (base is // display:inline-flex !important); clicking it toggles the file browser panel. - const showFileViewerButton = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? false; + // Default ON (desktop): the folder button is part of the standard header now; + // phones still hide it via mobile.css (btn-file-viewer in the phone-hidden set). + const showFileViewerButton = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? true; const fileViewerBtn = document.querySelector('.btn-file-viewer'); if (fileViewerBtn) { fileViewerBtn.classList.toggle('btn-file-viewer--hidden', !showFileViewerButton);