tasks.md 1.6 KB

1. Renderer

  • 1.1 In internal/render/render.go, remove the third entry (the "month" row) from the rows slice inside RenderAccount
  • 1.2 Remove the monthly bool field on the row struct and the if r.monthly { ... } branch; both become dead after the row is gone
  • 1.3 Immediately after the existing Tokens consumed (estimated USD value): ... line, emit Monthly cap: <fmtFlow(MaxFlows)> flows · $<fmtUSD raw value> using d.QuotaMonthly.MaxFlows and d.QuotaMonthly.MaxValueUSD
  • 1.4 Verify the two-row layout still right-aligns cleanly by running the in-module smoke path (no code change expected; width calc already handles variable row count)

2. Tests

  • 2.1 Update TestRenderAccount_Snapshot in internal/render/render_test.go: drop the three expected substrings referencing the old monthly row (" n/a", "— / 34560 flows", "— / $1134.33")
  • 2.2 Add an expected substring "Monthly cap: 34560 flows · $1134.33" to TestRenderAccount_Snapshot
  • 2.3 Add a negative assertion: the rendered output MUST NOT contain the substring "month" inside the bar region (i.e. before the "Tokens consumed" line)
  • 2.4 Run go test ./... and confirm all packages pass

3. Documentation

  • 3.1 Update the ASCII sample in README.md under "Example output" to show only the 5 hour and 7 day rows plus the new Monthly cap: line between "Tokens consumed" and "Next reset"

4. Manual verification

  • 4.1 Build locally (make build) and run zenmux-usage against a real account; confirm the new layout renders and the monthly cap values match the API response