Skip to content

abctl TUI: money cells claim dollars for a non-USD deployment #1182

Description

@huang195

Deferred from the round-2 strict review of #1153 (classified OUT-OF-SCOPE there).

abctl cost now labels a figure in the unit it is denominated in and refuses a cross-unit total. The TUI does not: cmd/abctl/tui has zero references to Snapshot.Currencies, and five of its money sites hard-code $:

  • cmd/abctl/tui/prune_saving.go:95
  • cmd/abctl/tui/sessions_pane.go:806, :818
  • cmd/abctl/tui/usage_render.go:763, :767

So a credits-only deployment reads dollars in the spend strip, the sessions COST cell and the Usage pane. That is a mislabel, not an understatement — the PR body originally claimed the latter and was corrected.

Labelling them needs Currencies threaded through the pane state, which is why this is a separate change: none of those files is in #1153's file set, and the plumbing is the bulk of the work.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Activity

  1. huang195 commented on Sep 29, 2026

    @huang195
    MemberAuthor

    Two more sites, adjacent but a different defect — recording them here rather than in a new issue, since the fix is the same plumbing.

    The five sites above hard-code a $ glyph. These two instead state a false reason for a row being unpriced:

    • cmd/abctl/tui/agents_pane.go:205
    • cmd/abctl/tui/agents_pane_test.go:374

    Both say Bob is unpriced because "it bills in credits, which the cost model cannot represent". That was true before #1153 and is false after it: a credits endpoint with rates configured prices normally and renders 0.08 credits. What leaves a row unpriced is an absent rate, which is orthogonal to the unit.

    #1153 swept this claim repo-wide and found 5 instances; it fixed the 3 in its own file set (docs/pricing.md, cmd_cost.go, cmd_cost_test.go) and left these 2, which are outside it. Fixing the comments needs no plumbing and could land on its own; the $ glyphs above still need Currencies threaded through the pane state.

    Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions