Skip to content

Retain model cost evidence in completed Thinking cards - #349

Merged
witbrock merged 1 commit into
mainfrom
fix/jvnautosci-2624-thinking-cost-retention
Aug 5, 2026
Merged

witbrock merged 1 commit into
mainfrom
fix/jvnautosci-2624-thinking-cost-retention

Conversation

@witbrock

@witbrock witbrock commented Aug 5, 2026

Copy link
Copy Markdown
Member

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, but createThinkingCardHistorySnapshot() 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 passed
  • npm run lint:frontend:static -- src/frontend/web/von_interface/static/js/chatTab.js src/frontend/web/von_interface/static/js/test/chatTab.test.js — passed
  • git diff --check — passed

Jira: JVNAUTOSCI-2624

Copilot AI lite review requested due to automatic review settings August 5, 2026 13:09
@witbrock
witbrock marked this pull request as ready for review August 5, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 llmUsageCostSummary when 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.

@witbrock
witbrock merged commit f0c66c2 into main Aug 5, 2026
5 checks passed
@witbrock
witbrock deleted the fix/jvnautosci-2624-thinking-cost-retention branch August 5, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants