Skip to content

Commit 211f3c0

Browse files
committed
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 <noreply@anthropic.com>
1 parent 876f9a7 commit 211f3c0

6 files changed

Lines changed: 19 additions & 9 deletions

File tree

scripts/capture-readme-real.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async function newCtx(browser) {
5050
try {
5151
localStorage.setItem('codeman:skin', skin);
5252
localStorage.setItem('codeman-font-size', String(font));
53-
const blob = { skin, showFileBrowser: false, showProjectInsights: false };
53+
const blob = { skin, showFileBrowser: false, showProjectInsights: false, showTokenCount: false };
5454
// Don't auto-hide subagent windows that belong to a non-active tab — the
5555
// subagent scene re-homes agents and needs both windows visible at once.
5656
blob.subagentActiveTabOnly = false;

scripts/capture-real-overview.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const main = async () => {
7979
showMonitor: false,
8080
showSubagents: false,
8181
showProjectInsights: false,
82+
showTokenCount: false,
8283
};
8384
if (planUsage) blob.showPlanUsageLimits = true;
8485
localStorage.setItem('codeman-app-settings', JSON.stringify(blob));

scripts/capture-subagent-gif.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ async function capture() {
126126
showMonitor: false,
127127
showProjectInsights: false,
128128
showFileBrowser: false,
129+
showTokenCount: false,
129130
});
130131
localStorage.setItem('codeman-app-settings', JSON.stringify(existing));
131132
});
@@ -230,6 +231,7 @@ async function capture() {
230231
showMonitor: false,
231232
showProjectInsights: false,
232233
showFileBrowser: false,
234+
showTokenCount: false,
233235
});
234236
localStorage.setItem('codeman-app-settings', JSON.stringify(existing));
235237
});

scripts/capture-subagent-screenshots.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ async function configureSettings(page) {
221221
subagentTrackingEnabled: true,
222222
subagentActiveTabOnly: false, // Show all subagents regardless of active tab
223223
showMonitor: true,
224+
showTokenCount: false,
224225
};
225226
localStorage.setItem('codeman-app-settings', JSON.stringify(settings));
226227
});

src/web/public/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@
134134
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>
135135
<span class="attachment-history-badge" id="attachmentHistoryBadge" style="display:none;">0</span>
136136
</button>
137-
<button class="btn-icon-header btn-file-viewer btn-file-viewer--hidden" onclick="app.toggleFileBrowserButton()" title="File Viewer" aria-label="Open file viewer" aria-expanded="false"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></button>
137+
<button class="btn-icon-header btn-file-viewer" onclick="app.toggleFileBrowserButton()" title="File Viewer" aria-label="Open file viewer" aria-expanded="false"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></button>
138138
<button class="btn-icon-header btn-multimonitor btn-multimonitor--hidden" onclick="app.launchMultiMonitor()" title="Open Codeman across all displays" aria-label="Open Codeman across all displays"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="13" height="9" rx="1.5"/><rect x="11" y="9" width="11" height="8" rx="1.5"/></svg></button>
139139
<button class="btn-icon-header btn-ultracode-agents btn-ultracode-agents--hidden" onclick="app.toggleUltracodeAgentsPanel()" title="Ultracode / Workflow agents" aria-label="Open ultracode workflow agents"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="6" cy="6" r="2.5"/><circle cx="6" cy="18" r="2.5"/><circle cx="18" cy="12" r="2.5"/><path d="M8.2 7.2 15.6 11M8.2 16.8 15.6 13"/></svg></button>
140140
<div class="header-plan-usage header-plan-usage--hidden" id="planUsageChip" title="Claude plan usage limits"></div>
141141
<button class="btn-icon-header btn-notifications" onclick="app.toggleNotifications()" title="Notifications" aria-label="Toggle notifications" style="display:none;">
142142
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
143143
<span class="notification-badge" id="notifBadge" style="display:none;">0</span>
144144
</button>
145-
<button class="btn-icon-header btn-lifecycle-log" onclick="app.openLifecycleLog()" title="Session Lifecycle Log" aria-label="Open session lifecycle log"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg></button>
145+
<button class="btn-icon-header btn-lifecycle-log" style="display: none" onclick="app.openLifecycleLog()" title="Session Lifecycle Log" aria-label="Open session lifecycle log"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg></button>
146146
<button class="btn-icon-header btn-settings" onclick="app.openAppSettings()" title="App Settings" aria-label="Open app settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></button>
147-
<div class="header-tokens" id="headerTokens" title="Total tokens across all sessions">0 tokens</div>
147+
<div class="header-tokens" id="headerTokens" style="display: none" title="Total tokens across all sessions">0 tokens</div>
148148
</div>
149149
</header>
150150

src/web/public/settings-ui.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ Object.assign(CodemanApp.prototype, {
307307
// Header visibility settings
308308
document.getElementById('appSettingsShowFontControls').checked = settings.showFontControls ?? defaults.showFontControls ?? false;
309309
document.getElementById('appSettingsShowSystemStats').checked = settings.showSystemStats ?? defaults.showSystemStats ?? true;
310-
document.getElementById('appSettingsShowLifecycleLog').checked = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? true;
310+
document.getElementById('appSettingsShowLifecycleLog').checked = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? false;
311311
document.getElementById('appSettingsShowResponseViewer').checked = settings.showResponseViewer ?? defaults.showResponseViewer ?? false;
312-
document.getElementById('appSettingsShowFileViewerButton').checked = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? false;
312+
document.getElementById('appSettingsShowFileViewerButton').checked = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? true;
313313
document.getElementById('appSettingsShowAttachmentsButton').checked = settings.showAttachmentsButton ?? defaults.showAttachmentsButton ?? false;
314314
document.getElementById('appSettingsSkin').value = settings.skin ?? defaults.skin ?? 'daylight-blue';
315315
// WebGL renderer (desktop only — mobile always uses the DOM renderer, so hide
@@ -1893,7 +1893,9 @@ Object.assign(CodemanApp.prototype, {
18931893
const compactHeader = MobileDetection.getDeviceType() !== 'desktop';
18941894
const showFontControls = compactHeader ? false : (settings.showFontControls ?? defaults.showFontControls ?? false);
18951895
const showSystemStats = compactHeader ? false : (settings.showSystemStats ?? defaults.showSystemStats ?? true);
1896-
const showTokenCount = compactHeader ? false : (settings.showTokenCount ?? defaults.showTokenCount ?? true);
1896+
// Default OFF: the header stays gear + usage chips + files button unless a
1897+
// stored preference explicitly re-enables the token chip (no UI toggle exists).
1898+
const showTokenCount = compactHeader ? false : (settings.showTokenCount ?? defaults.showTokenCount ?? false);
18971899

18981900
const fontControlsEl = document.querySelector('.header-font-controls');
18991901
const systemStatsEl = document.getElementById('headerSystemStats');
@@ -1910,7 +1912,9 @@ Object.assign(CodemanApp.prototype, {
19101912
}
19111913

19121914
// Hide lifecycle log button when setting is disabled
1913-
const showLifecycleLog = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? true;
1915+
// Default OFF: the lifecycle-log document icon is opt-in; the default header
1916+
// keeps only WS/CPU/MEM, the file-viewer folder, usage chips, and the gear.
1917+
const showLifecycleLog = settings.showLifecycleLog ?? defaults.showLifecycleLog ?? false;
19141918
const lifecycleBtn = document.querySelector('.btn-lifecycle-log');
19151919
if (lifecycleBtn) {
19161920
lifecycleBtn.style.display = showLifecycleLog ? '' : 'none';
@@ -1934,7 +1938,9 @@ Object.assign(CodemanApp.prototype, {
19341938

19351939
// File Viewer header button — opt-in, default OFF. Marker class (base is
19361940
// display:inline-flex !important); clicking it toggles the file browser panel.
1937-
const showFileViewerButton = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? false;
1941+
// Default ON (desktop): the folder button is part of the standard header now;
1942+
// phones still hide it via mobile.css (btn-file-viewer in the phone-hidden set).
1943+
const showFileViewerButton = settings.showFileViewerButton ?? defaults.showFileViewerButton ?? true;
19381944
const fileViewerBtn = document.querySelector('.btn-file-viewer');
19391945
if (fileViewerBtn) {
19401946
fileViewerBtn.classList.toggle('btn-file-viewer--hidden', !showFileViewerButton);

0 commit comments

Comments
 (0)