Repository navigation
feat: say a session was served by a subscription instead of calling it unpriced - #65
Merged
Merged
Conversation
…t unpriced A session whose turns all went to a subscription upstream (Codex on a ChatGPT account) showed "cannot be priced" in the sessions list, and every turn in its detail said the same, while the overview reported the same requests as subscription usage. Core now reports subscription_turns per session and billing per turn, so the page no longer has to guess from a missing amount. - The cost cell reads 订阅额度 N 轮, the overview's wording with the page's unit. After an amount it is set off with a middle dot rather than a plus: "+N 轮无法计价" means money missing from the total, and subscription turns have none. - Each subscription turn in the detail reads 订阅额度 instead of 无法计价. - Measured, estimated, unpriced and no-usage turns render as before; the fallbacks for cores that did not send priced_turns and the other optional session fields are gone. Pins core v0.9.1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fylorn
added a commit
that referenced
this pull request
Sep 20, 2026
The last file on the pending list. It waited for the subscription-session change (#65), which added the turns served by a subscription and the wording that goes with them; translating before that landed would have meant translating text that was about to be rewritten. The cost cell says the same things as the overview — estimated, unpriced, no usage, subscription — so it uses the same wording, differing only in the unit: the overview counts requests, this page counts turns. The pending list is now empty. It stays as a guard: a new file with Chinese in it fails the test. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A session whose turns all went to a subscription upstream — Codex on a ChatGPT account, say — showed 无法计价 in the sessions list, with the tooltip "此会话中没有可计价的轮次". Every turn in its detail said the same. The overview, meanwhile, reported those very requests as 订阅额度 N 次. The page read as a pricing failure where there was nothing to price.
The protocol was the reason: session aggregation counted subscription turns as neither priced, unpriced nor no-usage, and
SessionViewhad no fourth number, so "all subscription" and "nothing priceable" arrived in the same shape.TurnViewhad the same gap — a subscription turn'scost_microsis null, and nothing else said why. ThinkWatch-Core#49 addedsubscription_turnsandTurnView.billing; this pins core v0.9.1 and renders them.What the page says now
$0.412 · 订阅额度 12 轮.The fallbacks for cores that did not send
priced_turns,no_usage_turns,cost_micros_estimated,cancelledorcost_estimatedare gone; the pinned core sends all of them.Checked
pnpm typecheck,pnpm test(118),pnpm build,scripts/version.sh,cargo fmt --check,cargo clippy --all-targets -D warningsandcargo testall pass against core v0.9.1.Verified visually in an isolated preview with mocked sessions: all-subscription, subscription mixed with priced turns, a session with all four states plus subscription, unpriced-only, unpriced with subscription, and all-failed — in light and dark, with the tooltip and the detail dialog driven by real clicks.
🤖 Generated with Claude Code