Skip to content

Commit 7c5e9f4

Browse files
committed
feat: update UI branding for multi-harness
1 parent b6c7f42 commit 7c5e9f4

3 files changed

Lines changed: 80 additions & 10 deletions

File tree

src/ui/app.js

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ async function init() {
146146
selectedScopeId = getInitialSelectedScopeId();
147147
initializeScopeState();
148148
setupUi();
149+
updateHarnessBranding();
149150
updateCapabilityVisibility();
150151
setupScopeNotice();
151152
// Load cached scan results + check for new servers BEFORE first render
@@ -273,7 +274,8 @@ async function switchHarness(harnessId) {
273274
localStorage.setItem("cco-selected-harness", harnessId);
274275
const loading = document.getElementById("loading");
275276
if (loading) {
276-
loading.textContent = "Scanning selected harness...";
277+
const nextHarness = availableHarnesses.find((harness) => harness.id === harnessId);
278+
loading.textContent = `Scanning ${(nextHarness?.displayName || nextHarness?.shortName || harnessId)} inventory...`;
277279
loading.classList.remove("hidden");
278280
}
279281

@@ -303,6 +305,7 @@ async function switchHarness(harnessId) {
303305

304306
initializeScopeState();
305307
updateHarnessSelector();
308+
updateHarnessBranding();
306309
updateCapabilityVisibility();
307310
if (hasCapability("mcpSecurity")) {
308311
await loadCachedSecurityResults();
@@ -318,7 +321,7 @@ function setupScopeNotice() {
318321
if (!tree) return;
319322
const notice = document.createElement("div");
320323
notice.className = "scope-notice";
321-
notice.innerHTML = `<span class="scope-notice-dismiss" id="scopeNoticeDismiss">✕</span><strong>How scopes work:</strong> Different categories have different inheritance rules. Use <strong>✦ Show Effective</strong> to see what actually applies in each project. Hover any category pill for its specific rule.`;
324+
notice.innerHTML = `<span class="scope-notice-dismiss" id="scopeNoticeDismiss">✕</span><strong>How ${esc(getHarnessShortName())} scopes work:</strong> Different categories can have different inheritance rules. Use <strong>✦ Show Effective</strong> to see what actually applies in each project. Hover any category pill for its specific rule.`;
322325
tree.parentElement.insertBefore(notice, tree);
323326
document.getElementById("scopeNoticeDismiss").addEventListener("click", () => {
324327
localStorage.setItem(NOTICE_KEY, "1");
@@ -383,6 +386,30 @@ function updateHarnessSelector() {
383386
select.disabled = harnesses.length <= 1;
384387
}
385388

389+
function updateHarnessBranding() {
390+
const harness = getHarnessDescriptor();
391+
const name = getHarnessName();
392+
const shortName = getHarnessShortName();
393+
const icon = harness.icon || "✳️";
394+
const executable = getHarnessExecutable();
395+
396+
document.title = `${name} Organizer`;
397+
const logo = document.getElementById("harnessLogoIcon");
398+
if (logo) logo.textContent = icon;
399+
const title = document.getElementById("sidebarTitle");
400+
if (title) title.textContent = `${shortName} Organizer`;
401+
const loading = document.getElementById("loading");
402+
if (loading) loading.textContent = `Scanning ${name} inventory...`;
403+
const promptLabel = document.getElementById("detailPromptLabel");
404+
if (promptLabel) promptLabel.textContent = `${shortName} Prompt`;
405+
const footerHint = document.getElementById("sidebarFooterHint");
406+
if (footerHint) {
407+
footerHint.innerHTML = executable === "claude"
408+
? `Type <code>/cco</code> in ${esc(name)} to reopen`
409+
: `Selected harness: <code>${esc(executable)}</code>`;
410+
}
411+
}
412+
386413
function updateCapabilityVisibility() {
387414
const ctxBtn = document.getElementById("ctxBudgetBtn");
388415
const mcpBtn = document.getElementById("mcpControlsBtn");
@@ -903,6 +930,7 @@ function renderAll() {
903930
normalizeState();
904931
updateCapabilityVisibility();
905932
updateHarnessSelector();
933+
updateHarnessBranding();
906934
renderSidebar();
907935
renderContentHeader();
908936
renderPills();
@@ -1702,6 +1730,11 @@ function getHarnessName() {
17021730
return harness.displayName || harness.shortName || harness.id || "Selected Harness";
17031731
}
17041732

1733+
function getHarnessShortName() {
1734+
const harness = getHarnessDescriptor();
1735+
return harness.shortName || harness.displayName || harness.id || "Harness";
1736+
}
1737+
17051738
function getHarnessExecutable() {
17061739
return getHarnessDescriptor().executable || selectedHarnessId || "harness";
17071740
}

src/ui/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
6-
<title>Claude Code Organizer</title>
6+
<title>Harness Organizer</title>
77
<link rel="stylesheet" href="/style.css">
88
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet">
99
<script src="https://cdn.jsdelivr.net/npm/marked@15/marked.min.js"></script>
@@ -12,10 +12,10 @@
1212
<div class="app" id="app">
1313
<div class="sidebar" id="sidebar">
1414
<div class="sidebar-hdr">
15-
<div class="sidebar-logo">
16-
<svg viewBox="0 0 248 248" fill="none" aria-hidden="true"><path d="M52.4285 162.873L98.7844 136.879L99.5485 134.602L98.7844 133.334H96.4921L88.7237 132.862L62.2346 132.153L39.3113 131.207L17.0249 130.026L11.4214 128.844L6.2 121.873L6.7094 118.447L11.4214 115.257L18.171 115.847L33.0711 116.911L55.485 118.447L71.6586 119.392L95.728 121.873H99.5485L100.058 120.337L98.7844 119.392L97.7656 118.447L74.5877 102.732L49.4995 86.1905L36.3823 76.62L29.3779 71.7757L25.8121 67.2858L24.2839 57.3608L30.6515 50.2716L39.3113 50.8623L41.4763 51.4531L50.2636 58.1879L68.9842 72.7209L93.4357 90.6804L97.0015 93.6343L98.4374 92.6652L98.6571 91.9801L97.0015 89.2625L83.757 65.2772L69.621 40.8192L63.2534 30.6579L61.5978 24.632C60.9565 22.1032 60.579 20.0111 60.579 17.4246L67.8381 7.49965L71.9133 6.19995L81.7193 7.49965L85.7946 11.0443L91.9074 24.9865L101.714 46.8451L116.996 76.62L121.453 85.4816L123.873 93.6343L124.764 96.1155H126.292V94.6976L127.566 77.9197L129.858 57.3608L132.15 30.8942L132.915 23.4505L136.608 14.4708L143.994 9.62643L149.725 12.344L154.437 19.0788L153.8 23.4505L150.998 41.6463L145.522 70.1215L141.957 89.2625H143.994L146.414 86.7813L156.093 74.0206L172.266 53.698L179.398 45.6635L187.803 36.802L193.152 32.5484H203.34L210.726 43.6549L207.415 55.1159L196.972 68.3492L188.312 79.5739L175.896 96.2095L168.191 109.585L168.882 110.689L170.738 110.53L198.755 104.504L213.91 101.787L231.994 98.7149L240.144 102.496L241.036 106.395L237.852 114.311L218.495 119.037L195.826 123.645L162.07 131.592L161.696 131.893L162.137 132.547L177.36 133.925L183.855 134.279H199.774L229.447 136.524L237.215 141.605L241.8 147.867L241.036 152.711L229.065 158.737L213.019 154.956L175.45 145.977L162.587 142.787H160.805V143.85L171.502 154.366L191.242 172.089L215.82 195.011L217.094 200.682L213.91 205.172L210.599 204.699L188.949 188.394L180.544 181.069L161.696 165.118H160.422V166.772L164.752 173.152L187.803 207.771L188.949 218.405L187.294 221.832L181.308 223.959L174.813 222.777L161.187 203.754L147.305 182.486L136.098 163.345L134.745 164.2L128.075 235.42L125.019 239.082L117.887 241.8L111.902 237.31L108.718 229.984L111.902 215.452L115.722 196.547L118.779 181.541L121.58 162.873L123.291 156.636L123.14 156.219L121.773 156.449L107.699 175.752L86.304 204.699L69.3663 222.777L65.291 224.431L58.2867 220.768L58.9235 214.27L62.8713 208.48L86.304 178.705L100.44 160.155L109.551 149.507L109.462 147.967L108.959 147.924L46.6977 188.512L35.6182 189.93L30.7788 185.44L31.4156 178.115L33.7079 175.752L52.4285 162.873Z" fill="#fff"/></svg>
15+
<div class="sidebar-logo" id="harnessLogo">
16+
<span class="harness-logo-icon" id="harnessLogoIcon">✳️</span>
1717
</div>
18-
<span class="sidebar-title">Claude Code Organizer</span>
18+
<span class="sidebar-title" id="sidebarTitle">Harness Organizer</span>
1919
<span style="flex:1"></span>
2020
<button class="theme-btn" id="treeViewBtn" type="button" title="Toggle tree view (shows filesystem structure)">🌲</button>
2121
<button class="theme-btn" id="collapseAllBtn" type="button" title="Collapse all scopes"></button>
@@ -30,7 +30,7 @@
3030
<button class="sidebar-export-btn" id="exportBtn" type="button">☁ Backup Center</button>
3131
<a href="https://github.com/mcpware/claude-code-organizer" target="_blank" rel="noopener">⭐ Star me on GitHub</a>
3232
<a href="https://github.com/mcpware/claude-code-organizer/issues" target="_blank" rel="noopener">💡 Bug? Feedback? Same-day fix promise</a>
33-
<span class="sidebar-footer-hint">Type <code>/cco</code> in Claude Code to reopen</span>
33+
<span class="sidebar-footer-hint" id="sidebarFooterHint">Scanning selected harness...</span>
3434
</div>
3535
</div>
3636

@@ -54,7 +54,7 @@
5454
</div>
5555

5656
<div class="item-list" id="itemList"></div>
57-
<div class="empty-state" id="loading">Scanning ~/.claude/ ...</div>
57+
<div class="empty-state" id="loading">Scanning selected harness...</div>
5858
</div>
5959

6060
<div class="resizer" id="resizerRight"></div>
@@ -132,7 +132,7 @@ <h2 id="detailTitle">Select an item</h2>
132132
</div>
133133

134134
<div class="detail-cc-actions hidden" id="detailCcActions">
135-
<div class="d-label">Claude Code Prompt</div>
135+
<div class="d-label" id="detailPromptLabel">Harness Prompt</div>
136136
<div class="cc-btn-row" id="ccBtnRow"></div>
137137
</div>
138138
<div class="detail-footer">

src/ui/style.css

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,46 @@ body {
157157
flex-shrink: 0;
158158
}
159159

160-
.sidebar-logo svg { width: 16px; height: 16px; }
160+
.harness-logo-icon {
161+
color: #fff;
162+
font-size: 1rem;
163+
line-height: 1;
164+
}
161165
.sidebar-title { font-size: 0.95rem; font-weight: 900; color: var(--sidebar-text-bright); letter-spacing: -0.3px; }
162166

167+
.harness-selector-wrap {
168+
margin: 10px 12px 0;
169+
display: flex;
170+
flex-direction: column;
171+
gap: 5px;
172+
}
173+
174+
.harness-selector-label {
175+
font-size: 0.58rem;
176+
font-weight: 900;
177+
color: var(--sidebar-text-dim);
178+
text-transform: uppercase;
179+
letter-spacing: 0.5px;
180+
}
181+
182+
.harness-selector {
183+
width: 100%;
184+
height: 32px;
185+
border-radius: 6px;
186+
border: 1px solid var(--sidebar-border);
187+
background: oklch(0.18 0.03 185);
188+
color: var(--sidebar-text-bright);
189+
font-family: inherit;
190+
font-size: 0.78rem;
191+
font-weight: 700;
192+
outline: none;
193+
padding: 0 9px;
194+
}
195+
196+
.harness-selector:focus { border-color: var(--accent); }
197+
.harness-selector:disabled { opacity: 0.7; }
198+
.dark .harness-selector { background: oklch(0.10 0.02 185); }
199+
163200
.sidebar-search {
164201
margin: 10px 12px;
165202
padding: 7px 12px;

0 commit comments

Comments
 (0)