Skip to content

Commit 56c74cd

Browse files
committed
tui,dashboard: simplify Stats to single Total tokens row
v0.21.8 was about to ship with a three-row Stats section (New work, Reprocessed, Total input). User feedback before release: the three-way split needs more user-facing explanation than the value it delivers and would generate support questions. Hide New work and Reprocessed rows for now. Rename Total input -> Total tokens. Keep the underlying snapshot fields (newWorkTokens, totalInputTokens) and session_meta columns populated by the runtime so a later release can re-introduce the categorization once we have a cleaner UX for it. UI-only change. No runtime, schema, or RPC contract changes. - packages/plugin/src/tui/slots/sidebar-content.tsx: collapse three StatRows into one Total tokens row; guard switched from newWorkTokens != null to totalInputTokens != null - packages/dashboard/src/components/SessionViewer/SessionViewer.tsx: collapse three Meta-tab rows into one Total tokens row
1 parent fc96631 commit 56c74cd

2 files changed

Lines changed: 15 additions & 26 deletions

File tree

packages/dashboard/src/components/SessionViewer/SessionViewer.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,16 +1642,14 @@ export default function SessionViewer() {
16421642
<td>Input tokens</td>
16431643
<td>{metaData().last_input_tokens.toLocaleString()}</td>
16441644
</tr>
1645+
{/* v0.21.8 ships a single "Total tokens" row while we
1646+
figure out how to present new-work / reprocessed
1647+
without confusing users. The underlying columns
1648+
(new_work_tokens, total_input_tokens) are still
1649+
populated by the runtime; only the UI is simplified
1650+
for now. */}
16451651
<tr>
1646-
<td>New work</td>
1647-
<td>{metaData().new_work_tokens.toLocaleString()}</td>
1648-
</tr>
1649-
<tr>
1650-
<td>Reprocessed</td>
1651-
<td>{Math.max(0, metaData().total_input_tokens - metaData().new_work_tokens).toLocaleString()}</td>
1652-
</tr>
1653-
<tr>
1654-
<td>Total input</td>
1652+
<td>Total tokens</td>
16551653
<td>{metaData().total_input_tokens.toLocaleString()}</td>
16561654
</tr>
16571655
<tr>

packages/plugin/src/tui/slots/sidebar-content.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -442,27 +442,18 @@ const SidebarContent = (props: {
442442
</>
443443
)}
444444

445-
{/* Stats */}
446-
{s()?.newWorkTokens != null && (
445+
{/* Stats — v0.21.8 ships a single "Total tokens" number while we
446+
figure out how to present the new-work / reprocessed
447+
categorization without confusing users. The underlying
448+
snapshot fields (newWorkTokens, totalInputTokens) and the
449+
session_meta columns are still populated; only the UI is
450+
simplified for now. */}
451+
{s()?.totalInputTokens != null && (
447452
<>
448453
<SectionHeader theme={props.theme} title="Stats" />
449454
<StatRow
450455
theme={props.theme}
451-
label="New work"
452-
value={compactTokens(s()!.newWorkTokens!)}
453-
dim
454-
/>
455-
<StatRow
456-
theme={props.theme}
457-
label="Reprocessed"
458-
value={compactTokens(
459-
Math.max(0, (s()!.totalInputTokens ?? 0) - (s()!.newWorkTokens ?? 0)),
460-
)}
461-
dim
462-
/>
463-
<StatRow
464-
theme={props.theme}
465-
label="Total input"
456+
label="Total tokens"
466457
value={compactTokens(s()!.totalInputTokens ?? 0)}
467458
dim
468459
/>

0 commit comments

Comments
 (0)