Skip to content

Widget totals strip renders segments glued — '⣾ 1 running/bin/bash.011727K tok' (separators dropped in dd9a segment refactor) #116

Description

@rz1989s

Summary

The widget's totals strip renders its segments glued together without separators: ⣾ 1 running$0.101732K tok — the · separators from the spec mockup (§Appendix: ⣾ 2 running · $0.94 · 598K tok) are gone.

Repro

  1. Run pi with the fleet extension, fire a foreground run (any model)
  2. Look at the widget strip (pi footer area): ⣾ 1 running$0.011727K tok — cost and tok segments are concatenated with no separator, and $0.01 runs into 1727K producing an ambiguous 0.011727K

Root cause

renderWidgetLines (src/panel/widget-rows.ts:224) joins segments with .join("") — and widgetSegments (line 200-204) pushes segments without separator entries:

const segs: Segment[] = [{ text: `${spin} `, status: "running" }];
if (running > 0) segs.push({ text: `${running} running`, token: "text" });
if (cost > 0) segs.push({ text: `$${cost.toFixed(2)}`, token: "text" });
if (tok > 0) segs.push({ text: `${fmtTokens(tok)} tok`, token: "text" });

Introduced in the P1 review refactor dd9a ("renderWidgetLines delegates to widgetSegments") — the pre-refactor version carried separators; the refactor to the segment model dropped them.

Expected

Per the normative mockup, segments join with · (the widget is a totals strip; note P3's footerSep applies to the PANEL hint bar, not the widget). Minimal fix: interleave { text: " · ", token: "muted" } between segments in widgetSegments, or join with a separator in renderWidgetLines.

Found while

P3 real-pi smoke (feat/104-fleet-presentation-p3 @ 6c66299), unicode pane. Pre-existing since P1's #104 review refactor — not a P3 regression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions