Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

feat: monitor tab gets a real context-window row - the budget meter was being misread

Gulum3530b6901e5f
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index 22ce9ae1..68c27f2f 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -475,15 +475,47 @@ function FloorTab({ seed }: { seed: { text: string; seq: number } }) {
background: 'var(--cth-paper-200)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', color: 'var(--cth-ink-700)'
}}>{lastTool[a.id]}</span>
)}
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 10, color: 'var(--cth-ink-300)', flexShrink: 0 }}>budget</span>
<span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-900)', width: 56, textAlign: 'right' }}>{fmtTokens(tokens)}</span>
<div
- title={`${tokens.toLocaleString()} of ${denom.toLocaleString()} tokens${agentCap ? ' (agent limit)' : ' (floor budget)'}`}
+ title={`CUMULATIVE session usage: ${tokens.toLocaleString()} of ${denom.toLocaleString()} tokens${agentCap ? ' (agent limit)' : ' (floor budget)'} — not the context window`}
style={{ width: 96, height: 8, background: 'var(--cth-cream-200)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', flexShrink: 0 }}
>
<div style={{ width: `${pct}%`, height: '100%', background: meterColor }} />
</div>
<span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-500)', width: 30, textAlign: 'right' }}>{pct}%</span>
</div>
+ {/* Context window — the SAME exact statusLine-fed numbers as the
+ avatar-card gauge (tokens currently in the window vs the real
+ 200k/1M size). Distinct from the cumulative budget meter above,
+ which keeps growing forever and pins at 100% — that one is
+ spend, this one is headroom before compaction. */}
+ <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
+ <span style={{ flex: 1 }} />
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 10, color: 'var(--cth-ink-300)', flexShrink: 0 }}>ctx</span>
+ {a.contextTokens !== undefined && a.contextLimit ? (() => {
+ const cpct = Math.min(100, Math.round((a.contextTokens! / a.contextLimit!) * 100));
+ const ccolor = cpct >= 88 ? 'var(--cth-coral)' : cpct >= 75 ? 'var(--cth-lemon)' : `var(--cth-${a.accent})`;
+ return (
+ <>
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-900)', width: 56, textAlign: 'right' }}>
+ {fmtTokens(a.contextTokens!)}
+ </span>
+ <div
+ title={`Context window: ${a.contextTokens!.toLocaleString()} of ${a.contextLimit!.toLocaleString()} tokens (${cpct}%)`}
+ style={{ width: 96, height: 8, background: 'var(--cth-cream-200)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', flexShrink: 0 }}
+ >
+ <div style={{ width: `${cpct}%`, height: '100%', background: ccolor }} />
+ </div>
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-500)', width: 30, textAlign: 'right' }}>{cpct}%</span>
+ </>
+ );
+ })() : (
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-300)' }}>
+ no status tick yet
+ </span>
+ )}
+ </div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<Select
value={a.model ?? ''}