fix(web): clarify token usage labels in message details#1062
Open
techotaku39 wants to merge 1 commit into
Open
fix(web): clarify token usage labels in message details#1062techotaku39 wants to merge 1 commit into
techotaku39 wants to merge 1 commit into
Conversation
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.
Problem
The message-details popover labels
input_tokens + output_tokensas "billable tokens":That wording makes a billing claim the UI cannot reliably support across providers. The available message metadata only describes token counts; provider-specific pricing can treat cache I/O and other token categories differently. The existing
Usage/Totallabel also changes between single-turn and aggregated response groups even though both rows present the same token metric.Solution
Use one neutral, explicit token label for both single-turn and aggregated message details:
The total remains exactly
input_tokens + output_tokens; only the presentation changes. The existing input/output breakdown, number formatting, model/tier metadata, and multi-turn count remain unchanged.Touch-device access needs no additional change here: current
mainalready keeps the message info action reachable on touch devices via #1046.Testing
bun typecheckbun run test:clibun run test:hubbun run test:web— 155 files, 1,259 tests passedbun run test:sharedgit diff --checkManual verification
Built the production web bundle and embedded hub assets, then served the result on a local HAPI hub. Verified that the emitted bundle contains the new
Tokens: … total (… in / … out)format and no longer containsbillable tokens.