- ds
- Agent
- Status bar
Status bar
The dense bottom rail: path, branch, model, context and connection.
Code
<div class="statusbar" role="group" aria-label="Session status">
<span class="sb-item sb-path" title="~/work/axon"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg><b>~/work/axon</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/></svg><span class="sb-word">branch</span><b>main</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item accent"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/></svg><span class="sb-word">model</span><b>sonnet-4.5</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/></svg><span class="sb-word">perm</span><b>workspace-write</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item sb-ctx" title="86k of 200k tokens"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="10" x2="14" y1="2" y2="2"/><line x1="12" x2="15" y1="14" y2="11"/><circle cx="12" cy="14" r="8"/></svg><b>42%</b><span class="sb-meter" style="--v:.42"><i></i></span><span class="sb-count">86k/200k</span></span>
<span class="sb-conn" data-state="ok" role="status"><span class="status-dot"></span>Connected</span>
</div>The status bar is the quiet footer of an agent window. It answers the questions people ask while a turn runs: where am I, what branch, which model, what may it do, how much context is left and is the stream alive. Everything is mono at the label step and on one line.
The connection item is the only element that moves to the right. The rest keep a fixed order so the eye learns where to look. .sticky pins the bar to the bottom of a scrolling column.
Warning and offline
Show code
<div class="statusbar" role="group" aria-label="Session status">
<span class="sb-item sb-path" title="~/work/checkout"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg><b>~/work/checkout</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/></svg><span class="sb-word">branch</span><b>fix/retry-queue</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item accent"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/></svg><span class="sb-word">model</span><b>sonnet-4.5</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/></svg><span class="sb-word">perm</span><b>ask</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item sb-ctx" title="158k of 200k tokens"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="10" x2="14" y1="2" y2="2"/><line x1="12" x2="15" y1="14" y2="11"/><circle cx="12" cy="14" r="8"/></svg><b>79%</b><span class="sb-meter warn" style="--v:.79"><i></i></span><span class="sb-count">158k/200k</span></span>
<span class="sb-conn" data-state="warn" role="status"><span class="status-dot warn"></span>Degraded</span>
</div>
<div class="statusbar" data-state="error" role="group" aria-label="Session status">
<span class="sb-item sb-path" title="~/work/checkout"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg><b>~/work/checkout</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/></svg><span class="sb-word">branch</span><b>fix/retry-queue</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item accent"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/></svg><span class="sb-word">model</span><b>sonnet-4.5</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/></svg><span class="sb-word">perm</span><b>ask</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item sb-ctx" title="126k of 200k tokens"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="10" x2="14" y1="2" y2="2"/><line x1="12" x2="15" y1="14" y2="11"/><circle cx="12" cy="14" r="8"/></svg><b>63%</b><span class="sb-meter down" style="--v:.63"><i></i></span><span class="sb-count">126k/200k</span></span>
<span class="sb-conn" data-state="down" role="status"><span class="status-dot down"></span>Reconnecting</span>
</div>Context pressure and connection state are separate. A full context meter stays amber or red while the stream is still connected; a dropped stream turns red on its own. Words carry both states, so the bar is readable without colour.
Dense
Show code
<footer class="statusbar dense" aria-label="Status">
<span class="sb-item sb-path" title="~/work/checkout"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg><b>~/work/checkout</b></span>
<span class="sb-item"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/></svg><b>fix/retry-drain</b></span>
<span class="sb-sep" aria-hidden="true"></span>
<span class="sb-item sb-state" data-state="running">Running</span>
<span class="sb-item sb-ctx" title="158k of 200k tokens"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><line x1="10" x2="14" y1="2" y2="2"/><line x1="12" x2="15" y1="14" y2="11"/><circle cx="12" cy="14" r="8"/></svg><b>79%</b><span class="sb-meter warn" style="--v:.79"><i></i></span></span>
<span class="sb-item"><b>$0.42</b></span>
<button class="sb-item" type="button" aria-label="2 errors, open Problems"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg><b>2</b><span class="sb-word">errors</span></button>
<span class="sb-conn" data-state="ok" role="status"><span class="status-dot"></span>connected</span>
</footer>
<footer class="statusbar dense" data-state="error" aria-label="Status">
<span class="sb-item sb-state" data-state="waiting">Needs approval</span>
<span class="sb-item sb-state" data-state="error">Failed</span>
<button class="sb-item" type="button" aria-pressed="true"><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 19h8"/><path d="m4 17 6-6-6-6"/></svg><span class="sb-word">terminal</span></button>
<span class="sb-conn" data-state="down" role="status"><span class="status-dot down"></span>disconnected</span>
</footer>The dense bar is 24px with 11px type. .sb-state is the turn state as a dot and a word. Items that act, such as the problem count, are button.sb-item: they get a hover wash and an inset focus ring, and keep the bar's type. Keep each fact in one place: the model and permission live in the composer, so the bar does not repeat them.
API
| Class | On | What it does |
|---|---|---|
.statusbar | div | The rail. role="group" and a label. |
.sticky | .statusbar | Pins the bar to the bottom of a scroll container. |
data-state="error" | .statusbar | Red top rule for a session-level failure. |
.sb-item | span | One fact: icon, optional word and value. |
.sb-path | .sb-item | The working directory. Truncates; keep the full path in title. |
.sb-sep | span | A short vertical rule between facts. Decorative. |
.sb-word | span | The small label before a value. Hidden under 560px. |
.sb-ctx | .sb-item | Context percentage, meter and token count. |
.sb-meter | span | The mini meter. Set --v from 0 to 1. .warn and .down change the fill. |
.sb-count | span | The token fraction. Hidden under 560px; keep it in title. |
.sb-conn | span | Connection state, pushed right. data-state: ok, warn, down, idle. |
.dense | .statusbar | 24px, 11px. Also set by data-density="dense". |
.sb-state | span | The turn state: a dot and a word. data-state is running, waiting or error. |
button.sb-item | button | An item that acts: a hover wash, an inset focus ring, aria-pressed for a toggle. |
- One line, one order, every session.
- Put the full path and token count in title attributes.
- Use words for connection state, not just the dot.
- A second toolbar. This is a readout.
- Hiding the model or permission at 390px.
- Animating the context meter while it streams.
Accessibility
- Give the bar
role="group"and a label. Each connection item is arole="status", so a change is announced without stealing focus. - The dot is never the only signal. Connected, degraded and reconnecting are written out.
- At 390px the separators, the labels before values and the token fraction are hidden. The values, the meter percentage and the connection word stay.
- The bar wraps to two dense rows rather than clipping a fact. On touch, it does not compete with the composer above it.