Skip to content

Enable native budget simulation#146

Merged
asizikov merged 2 commits into
mainfrom
asizikov/native-budget-simulation
Jun 7, 2026
Merged

Enable native budget simulation#146
asizikov merged 2 commits into
mainfrom
asizikov/native-budget-simulation

Conversation

@asizikov
Copy link
Copy Markdown
Member

@asizikov asizikov commented Jun 7, 2026

Summary

Native usage-based billing reports already contain AI Credits quantities and costs, but cost management still disabled budget simulation for those reports. This PR enables the simulator end to end for native reports while preserving transition-period PRU comparison behavior.

Changes

Commit Change
feat: support native budget simulation parsing Passes report metadata into budget simulation so native reports use native parsing, date normalization, and included-credit policy context, and removes the Apply-time native report blocker.
feat: enable native budget simulation UI Shows budget controls/results for native reports, switches native result labels to usage-based billing / AI Credits semantics, and keeps transition reports on PRU blocked-usage copy.

Testing

  • npm test
  • npm run lint
  • npm run build

Checklist

  • Specs lint passes (npm run lint)
  • Tests updated if applicable
  • Documentation updated if applicable

asizikov and others added 2 commits June 7, 2026 18:02
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 7, 2026 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables budget simulation end-to-end for native usage-based billing (AI Credits) reports by wiring report format metadata into the simulator/parsing path and updating the Cost Management UI to display budget controls/results for native reports while preserving transition-period PRU labeling behavior.

Changes:

  • Removed the native-report UI blocker and updated Cost Management copy/labels to use AI Credits semantics for native reports.
  • Extended runBudgetSimulation to accept report format metadata and switch parsing/date normalization accordingly.
  • Added view and simulation tests covering native vs transition report behavior.
Show a summary per file
File Description
src/views/CostManagementView.tsx Enables budget simulation UI for native reports and updates labels/copy to AI Credits semantics.
src/views/CostManagementView.test.ts Adds coverage to ensure native reports show budget controls and AI Credits labels while transition reports keep PRU labeling.
src/utils/budgetSimulation.ts Threads report metadata through included-credits context and switches parsing for native reports.
src/utils/budgetSimulation.test.ts Adds a native-report simulation test to validate native parsing + policy context usage.
src/App.tsx Removes the native simulation apply-time blocker and passes report metadata into budget simulation.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 0

@asizikov asizikov merged commit f93227c into main Jun 7, 2026
10 checks passed
@asizikov asizikov deleted the asizikov/native-budget-simulation branch June 7, 2026 16:08
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