Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(ui): restore the usage pill — the shell is SHARED, not the resource pill's
enes61e3201f217a
diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 5a87b2a4e..e33924b0a 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -5499,23 +5499,17 @@ body,}/* The two pills share one shell so they read as a single control rather than as two widgets thathappen to be adjacent. Grouped rather than duplicated, so tuning one can never drift the other. */+/* SHARED SHELL — both pills. Do not fold pill-specific sizing in here: the system-resource pill's+ icon-only collapse lives in its OWN rule below, because putting it here silently shrank the usage+ pill to a 26px circle too. */.usage-pill,-/* Icon-only at rest: the pill is ambient chrome, and a permanent "RAM 15.6 / 62.5 GB" is a row of- numbers nobody asked for on every canvas. The detail is revealed on hover (and while the panel is- open, so the control does not shrink out from under the cursor that opened it). */.sysres-pill {display: inline-flex;align-items: center;- gap: 0;+ gap: 6px;height: 26px;- width: 26px;- padding: 0;- justify-content: center;+ padding: 0 9px;border-radius: 13px;- transition:- width 140ms ease,- padding 140ms ease,- gap 140ms ease;background: rgba(var(--card-rgb), 0.92);border: 1px solid rgba(var(--tint-rgb), 0.08);color: var(--text-strong);@@ -5523,6 +5517,20 @@ body,font-variant-numeric: tabular-nums;cursor: pointer;}+/* Icon-only at rest — this pill ONLY. It is ambient chrome on every canvas, so a permanent+ "RAM 15.6 GB / 62.5 GB" is a row of numbers nobody asked for. Overrides the shared shell's+ padding/gap; the detail is revealed on hover (and while the panel is open, so the control does+ not shrink out from under the cursor that opened it). */+.sysres-pill {+ width: 26px;+ padding: 0;+ gap: 0;+ justify-content: center;+ transition:+ width 140ms ease,+ padding 140ms ease,+ gap 140ms ease;+}.usage-pill:hover { background: rgba(44, 44, 46, 0.95); }.usage-pill__icon { color: #d97757; font-size: 13px; }.usage-pill__minibar {diff --git a/src/renderer/styles.pills.test.ts b/src/renderer/styles.pills.test.tsnew file mode 100644index 000000000..669cb0a55--- /dev/null+++ b/src/renderer/styles.pills.test.ts@@ -0,0 +1,66 @@+import { describe, it, expect } from 'vitest'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'++/**+ * Guard on the bottom-left pill cluster's SHARED shell.+ *+ * Written after a real regression: the system-resource pill was collapsed to an icon by editing+ * what looked like a `.sysres-pill` rule — but the selector was `.usage-pill, .sysres-pill`, so the+ * `width: 26px; padding: 0` landed on the Claude usage pill too and squashed it into a circle. The+ * two pills sit side by side and share a shell deliberately; the failure mode is that a change+ * aimed at one silently reshapes the other, and nothing rendered in CI would have caught it.+ *+ * The rule this pins: the shared block carries only what BOTH pills want. Per-pill sizing lives in+ * a rule whose selector names exactly one pill.+ */++const CSS = readFileSync(join(__dirname, 'styles.css'), 'utf8')++/**+ * The declaration body of the rule whose selector list is EXACTLY `selectors`.+ *+ * Parses rules rather than regexing the selector, because a regex anchored on `\n.sysres-pill {`+ * also matches the CONTINUATION line of `.usage-pill,\n.sysres-pill {` — which is the very+ * confusion this file exists to catch, and it caught the first draft of this helper.+ */+function ruleBody(selectors: string[]): string {+ const want = selectors.join(',')+ for (const chunk of CSS.split('}')) {+ const brace = chunk.indexOf('{')+ if (brace < 0) continue+ const head = chunk+ .slice(0, brace)+ .replace(/\/\*[\s\S]*?\*\//g, '') // comments may sit between selectors+ .split(',')+ .map((sel) => sel.trim())+ .filter(Boolean)+ .join(',')+ if (head === want) return chunk.slice(brace + 1)+ }+ throw new Error(`no rule whose selector list is exactly: ${want}`)+}++describe('bottom-left pill cluster', () => {+ it('shares one shell between the usage pill and the resource pill', () => {+ const shared = ruleBody(['.usage-pill', '.sysres-pill'])+ expect(shared).toContain('height: 26px')+ expect(shared).toContain('border-radius: 13px')+ })++ it('keeps per-pill SIZING out of the shared shell', () => {+ // `width` and `justify-content` are the two that squashed the usage pill. A shared `padding` is+ // fine (both want the same one) — what is not fine is a width, because only one pill collapses.+ const shared = ruleBody(['.usage-pill', '.sysres-pill'])+ expect(shared).not.toMatch(/(^|\s)width:/)+ expect(shared).not.toMatch(/justify-content:/)+ })++ it('collapses ONLY the resource pill to an icon', () => {+ const own = ruleBody(['.sysres-pill'])+ expect(own).toContain('width: 26px')+ // The proof it is the resource pill's alone: the shared block above must not have grown it.+ const shared = ruleBody(['.usage-pill', '.sysres-pill'])+ expect(shared).not.toContain('width: 26px')+ })+})