dsh-plugin-mini-dashboard
A session & token mini dashboard for DSH web. It renders just above the sidebar's "Settings" row and summarizes, in one small draggable float window, what your sessions are doing right now and what they have cost you today.
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 28, 2026
- Updated
- Aug 28, 2026
Introduction
dsh-plugin-mini-dashboard
A session & token mini dashboard for DSH web. It renders just above the sidebar's "Settings" row and summarizes, in one small draggable float window, what your sessions are doing right now and what they have cost you today.
English | 中文

What it shows
| Metric | Meaning |
|---|---|
| Active sessions | Sessions running right now — including ones busy through a running subagent. Counted exactly like the sidebar status lights, so the number always matches the sidebar. |
| Today | Sessions with activity today; blank sessions never count. |
| In/s · Out/s | Current token throughput (tokens/s), decaying naturally to zero when idle. Scope is configurable: all sessions, or just the one you are working in. While a reply is still streaming and the provider has not reported usage yet, output speed is estimated live from the streamed text (≈ 4 characters per token); the larger of the two figures is shown. |
| In · Out | Tokens sent and generated today. |
| Cache read · Cache write | Today's cached-token usage, shown as two independently toggleable metrics. |
Speed trendlines — both speed metrics can show a small sparkline next to the value: a filled curve along the card's right edge in Cards layout, a thin curve under the row in List layout, none in Compact. Pick Off / 1m / 3m / 5m per metric (default: 5 minutes for both). History is kept in memory for about 6 minutes and starts fresh after a page refresh; its detail follows the refresh interval.
The float window
- Drag it by the header; resize from the bottom, right or corner edges. The height hugs the content until you fix one yourself — a fixed height is then shared evenly by the metrics, scrolling if it gets too short.
- First launch places it at the bottom-right; position and size are remembered across restarts.
- It snaps to screen edges when dropped nearby (threshold adjustable).
- Content and backdrop transparency sliders let it blend into your theme; light and dark are handled automatically.
- It stays above host dialogs and dropdowns, and hides itself while the sidebar is collapsed to the narrow rail.
- With every metric turned off, only the title and the ⚙ button remain.
- Running several DSH web windows at once? They share one saved position, and each window keeps the panel fully inside its own viewport — a spot dragged out in a big window stays visible in a small one. The last window you move it in wins.
Install
dsh plugin --profile web add dsh-plugin-mini-dashboard
Restart dsh web to take effect.
Configuration
Two places edit the same settings, and every change applies instantly:
- the mini dashboard section in DSH's built-in Settings dialog;
- the ⚙ popover on the panel itself — same options, always one click away.
Settings persist to ~/.dsh/settings.yaml (namespace mini-dashboard) and survive restarts.
| Setting | Default | Effect |
|---|---|---|
| Enable panel | on | Master switch |
| Layout | Cards | Compact single row / Cards grid / List rows |
| Refresh interval | 2s | Update cadence (1/2/5/10/30s); also caps trendline detail |
| Speed scope | Current session | Count speeds across all sessions or the current one only |
| Output speed includes reasoning | on | On: 10s window, thinking text counts toward the live estimate. Off: smoother 30s window that ignores it |
| Today usage includes subagents | on | Whether subagent sessions add to today's token figures |
| Columns per row | 2 | Card layout density (1–4) |
| Snap to screen edge | on | Magnet when dragging near an edge; a threshold slider (8–80px) appears alongside |
| Fg / Bg transparency | 0% / 15% | Fade the metric text / the backdrop |
| Visible metrics | all shown | Per-metric show/hide; drag to reorder |
| Trendline | 5m (both speeds) | Off / 1m / 3m / 5m, set per speed metric |
How the numbers are counted
- Session counts (Active, Today) mirror the sidebar: blank, archived and subagent-origin rows are never counted. A session counts as active when it is running itself, or when a subagent behind it is running.
- Today's token figures are true per-day totals: provider usage is bucketed into 30-minute slots and summed over your local day. Archived sessions still count — tokens already spent do not disappear when a session is archived.
- If your DSH build lacks the session-projection service, the panel falls back to summing the full cumulative usage of sessions that were active today, which can over-count long-lived cross-day sessions.
- Speeds come from a rolling window over provider-reported cumulative tokens and naturally decay to zero when idle.
Language
The panel follows DSH's language setting (Settings → Language) with Chinese and English text, switching instantly — no refresh needed.