This repository was archived by the owner on Nov 30, 2026. It is now read-only.
Repository navigation
fix: fall back to ingested cost for Total Cost delta when effective is zero - #492
Merged
Merged
Conversation
…s zero When the price-list backfill hasn't reached previous-period rows, cost_cents_effective sums to zero while messages/sessions are non-zero, causing the Total Cost card to show "—" while sibling cards show real deltas. Fall back to the ingested cost lens for the delta comparison so the card stays informative. Appends "(list price)" to the caption when the fallback is active. Closes #476 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
cost_cents_effectivesums to 0 whiletotal_messages/total_sessionsare non-zero — the Total Cost card shows a bare—while Messages and Sessions show real percentage deltas on the same row.totalCostCentsIngested(already returned by thedashboard_overview_statsRPC) for both current and previous period when the previous window's effective cost is zero but ingested cost is non-zero, so the delta still answers "is spend up or down?"(list price)to the delta caption when the ingested fallback is active, so the viewer knows the comparison uses list prices rather than effective/team pricing.—as designed.Closes #476
Test plan
/dashboard(default?days=7), verify Total Cost delta shows a real percentage when Messages/Sessions do/dashboard?days=30, same check—still renderstsc --noEmit)🤖 Generated with Claude Code