Skip to content

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.

Merge main into PR 880 preserving organization and usage error rows

review2fab5490f95c
diff --cc CLAUDE.md
index 6a3c3515c,113399c0e..4afb6a094
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@@ -2947,17 -3086,13 +3086,24 @@@ command-bearing opens; this does not ad
tooltip pointing at Settings → Accounts, where **Detected config dirs** lists it for one-click
linking. Mobile: N/A (additive mirror fields).
+- **Active Claude organization** (#552) — local Desktop and Server usage snapshots carry optional
+ `organization` metadata from the SAME account's `.claude.json` (system, managed or linked).
+ Read it even if Keychain/file credentials already have an email; unreadable/missing metadata
+ preserves the email and usage. A known email mismatch drops metadata. Managed usage cannot use
+ an unscoped Keychain token: a matching email alone does not prove it belongs to the same org.
+ The popover names the org beneath the email; internal type/tier/id remain tooltip details.
+ Refresh re-reads metadata together with usage; normal cache/poll intervals still apply.
+ SSH's existing shell reader does not supply organization metadata and keeps its email-only
+ fallback. Mobile's usage mirror currently omits it; displaying orgs there needs a follow-up
+ mirror/iOS protocol change. No organization picker, credential writes or switching are added.
+
+ - **Bottom chrome shares a measured width budget** (issue #853). `CanvasPills` observes the canvas
+ wrapper and actual dock, bounds the left row with an 8px gap, and uses a row above the dock when
+ fewer than 200 CSS pixels remain. Rects are converted back through UI scale. Usage summary text
+ ellipsizes; refresh never shrinks. Do not clip the whole row or give it a stacking context:
+ usage/RAM popovers must escape independently above the sidebar and board. Desktop and Server
+ share this renderer. The real-browser regression is `scripts/usage-layout.test.ts` (`CHROME_BIN`).
+
- **The usage indicator is scoped to the ACTIVE project** (`renderer/lib/usageScope.ts`, pure +
unit-tested) — it describes **the machine that project runs on**, and nothing else. A local
project shows this machine (system + managed local accounts + the billing providers, whose
diff --cc src/renderer/components/UsageIndicator.tsx
index 95abedac0,bbf9643e8..a1104075b
--- a/src/renderer/components/UsageIndicator.tsx
+++ b/src/renderer/components/UsageIndicator.tsx
@@@ -128,9 -185,9 +186,10 @@@ function AccountUsageBlock(
<div className="usage-account__label">
{label}
<DefaultAccountMark isDefault={isDefault} onUse={onUse} />
+ {move}
</div>
- {(email ?? u?.email) && <div className="usage-account__email">{email ?? u?.email}</div>}
+ {(u?.email ?? email) && <div className="usage-account__email">{u?.email ?? email}</div>}
+ <UsageOrganization organization={u?.organization} />
{u?.limits.map((l) => (
<LimitRow key={limitKey(l)} limit={l} mode={mode} />
))}
@@@ -533,8 -634,14 +636,14 @@@ export function UsageIndicator(
{limits.map((l) => (
<LimitRow key={limitKey(l)} limit={l} mode={percentMode} />
))}
- {!hasData && <div className="usage-popover__empty">No usage data.</div>}
+ {/* Another provider's data must not hide a failed Claude read. Keep any
+ last-known Claude bars instead of replacing them with the empty state. */}
+ {(!hasData || (isError && limits.length === 0)) && (
+ <div className="usage-popover__empty">
+ {isError ? 'Could not read usage.' : 'No usage data.'}
+ </div>
+ )}
- {claudeUsage?.email && (
+ {(claudeUsage?.email || claudeUsage?.organization) && (
<div className="usage-account">
<div className="usage-account__label">Claude Account</div>
<div className="usage-account__email">{claudeUsage.email}</div>