Show each task's token spend in the task picker - #205
Conversation
The server has tallied per-task usage since tasks landed, and wireTask
already carries it — the client just never typed or rendered it. Task
rows now show a quiet combined total ("12.3k") next to the timestamp,
with the input/output split on hover; the picker button keeps its shape
and carries the open task's tally in its hover title instead.
Formatting lives in src/lib/format-tokens: zero hides the chip, sub-1k
spells out "tokens", then k/M with one decimal. Rounding runs on integer
tenths so 999,950 promotes to "1M" instead of float-rounding down.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 34 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Comment |
main의 milind-soni#205(태스크별 토큰 지출), milind-soni#200(승인 결과 타입화), milind-soni#196(위임 영속화·비밀 마스킹) 등 7개 커밋 병합 충돌을 해결했다. - main이 busy 플래그를 activity 상태 기계로 대체함에 따라 룸 턴의 catalog 검증 실패 경로도 setActivity로 맞췄다. - antigravity respondToRequest 테스트는 main의 unavailable 해소 시맨틱을 채택했다. Tested: pnpm typecheck, pnpm vitest run (83 files, 770 passed, 8 skipped) Confidence: high Scope-risk: moderate Reversibility: moderate
main gained #205 (token spend in the task picker, using the same TaskRecord.usage), the store change stream, activity states, and typed approvals. Reconciled: one addTaskUsage with the superset shape (costUsd kept; emits a bot change like main's did), settle path banks the turn's authoritative usage then moves the bot to idle via setActivity, the Usage settings tab sits beside main's new Companion tab. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
In plain terms
Each task now shows what it has spent: a quiet "· 12.3k" token tally after the timestamp in the task picker rows, with the input/output split on hover. The open task's total rides the picker button's hover title.
Notes
wireTaskalready shipped theusagefield the server tallies atturn.completed— the client type just never declared it and nothing rendered it.formatTokens(src/lib) hides the chip entirely at zero ("a task that never ran shouldn't advertise a tally"), and rounds on integer tenths because float math would round 999,950 down to "999.9k" instead of promoting to "1M".Test plan
src/lib/format-tokens.test.ts— 22 assertions across every threshold and rounding boundary (999/1000, 999,949/999,950, half-up at 1.25M, singular "1 token")pnpm typecheckclean; fullpnpm vitest rungreen (740 passed); touched files clean under oxlint (added a SAFETY comment to a pre-existing assertion in TaskPicker so the file lints clean)🤖 Generated with Claude Code