Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Oct 8, 2025

Reverts #8415


Important

Reverts feature adding usage statistics to Cloud tab, removing related code, UI elements, and localization strings.

  • Behavior:
    • Reverts feature that added usage statistics to the Cloud tab, removing getUsagePreview() from CloudAPI.ts and related UI elements from webviewMessageHandler.ts.
    • Removes usage statistics UI components from CloudView.tsx and UsagePreview.tsx.
  • Imports and Logging:
    • Cleans up imports in CloudAPI.ts and ContextWindowProgress.spec.tsx.
    • Removes logging related to usage statistics in CloudAPI.ts and ChatRow.tsx.
  • Localization:
    • Removes usage statistics related localization strings from various language files.
  • Misc:
    • Removes formatCost function from format.ts and related mock in TaskHeader.spec.tsx.

This description was created by Ellipsis for 7a3fffe. You can customize this summary. It will automatically update as commits are pushed.

@mrubens mrubens requested review from cte and jr as code owners October 8, 2025 01:37
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 8, 2025
@mrubens mrubens merged commit eeaafef into main Oct 8, 2025
12 checks passed
@mrubens mrubens deleted the revert-8415-bb/experiment-stats branch October 8, 2025 01:37
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 8, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 8, 2025
}}
/>
</StandardTooltip>
<span>${totalCost?.toFixed(2)}</span>
Copy link

Choose a reason for hiding this comment

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

Typo/lexical note: The <span> now contains ${totalCost?.toFixed(2)}, which in JSX will be treated as a string rather than an evaluated expression. If the intention is to display the cost with a preceding currency symbol, consider using curly braces to embed the JS expression, for example:

{$${totalCost?.toFixed(2)}}

This change would ensure that the value is properly computed and displayed.

Suggested change
<span>${totalCost?.toFixed(2)}</span>
<span>{`$${totalCost?.toFixed(2)}`}</span>

Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

I found an issue that needs attention in this revert.

}
} catch (_error) {
responseBody = "Failed to read error response"
responseBody = await response.json()
Copy link

Choose a reason for hiding this comment

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

P1: Fallback from response.json() to response.text() can fail because the body stream is single-use. After json() throws due to invalid JSON, the stream is consumed and text() may throw ("body used already"). To robustly capture error bodies, read text once and JSON-parse it, or clone() before consuming. The previous implementation used response.text() then JSON.parse fallback which avoids this pitfall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.