Retain model cost evidence in completed Thinking cards - #349
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a UI regression where completed (retained) Thinking cards lost the model usage/cost evidence that was already present on the live request, by carrying llmUsageCostSummary into the history snapshot used for the inline retained card.
Changes:
- Preserve
llmUsageCostSummarywhen converting an active Thinking card into its retained (completed) snapshot. - Strengthen the Thinking-card retention accessibility test to assert model usage details are still rendered after completion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/frontend/web/von_interface/static/js/chatTab.js | Adds llmUsageCostSummary to the retained Thinking card snapshot so immediate completion retains model usage/cost display. |
| src/frontend/web/von_interface/static/js/test/chatTab.test.js | Extends the retained Thinking card test to verify “Model usage” content (model identity, tokens, and estimated cost) is present after completion. |
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.
Outcome
Completed Thinking cards retain the model identity, token counts, and estimated cost already present on the live request.
Cause and scope
The live response correctly populated
llmUsageCostSummary, butcreateThinkingCardHistorySnapshot()omitted it while converting the active card into the inline completed card. Canonical history reload therefore worked while immediate completion lost the display. This PR adds only that omitted field and strengthens the existing active-to-retained-card test.Validation
npm test -- src/frontend/web/von_interface/static/js/test/chatTab.test.js --runInBand— 251 passednpm run lint:frontend:static -- src/frontend/web/von_interface/static/js/chatTab.js src/frontend/web/von_interface/static/js/test/chatTab.test.js— passedgit diff --check— passedJira: JVNAUTOSCI-2624