Repository navigation
feat(banking): rank largest charges instead of repeating the team split - #6263
Merged
Merged
Conversation
The report's third column was budget-usage bars: the same three team totals the donut beside it already showed, redrawn with limits added. Two charts, one fact. It now ranks the largest individual charges, which changes the unit of analysis from team to transaction. A team aggregate cannot distinguish one $15,000 charge from thirty $500 ones, so this is information the donut genuinely cannot carry. Bars stay coloured by owning team, so a row still ties back to its slice without the two charts duplicating each other. Budget-vs-limit is not lost: it remains the "Over policy limit" KPI above and the "Needs a decision" rows below. Invoice-derived line items now carry the policy id of the team they belong to, so they colour like any other charge. Without it they fell back to a generic swatch and a Marketing charge did not match Marketing's slice. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
davidmckayv
requested review from
jpr5,
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
July 30, 2026 20:12
mxmzb
approved these changes
Jul 30, 2026
mxmzb
added a commit
that referenced
this pull request
Jul 31, 2026
Ports the ranked largest-charges chart from the banking showcase (#6263) into the reskinnable demo's banking skin. The report-card wiring that consumes it lands separately.
mxmzb
added a commit
that referenced
this pull request
Jul 31, 2026
… trio Replays the report chart curation from the banking showcase (#6259, #6263) into the reskinnable demo's banking skin. The three columns become spend breakdown, spend over time and largest charges — the last of which answers "which line items drive the total", a question a three-team aggregate cannot. Additions carry a policyId so their bars colour by owning team.
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.
Follow-up to #6259 (merged), from review feedback: in the Q2 report, the pie chart and the bar chart were showing the same data.
The problem
The third column was budget-usage bars. Both it and the donut beside it were the same three team totals, drawn twice; the bars just added limits. Two charts, one fact, and the column carried almost no new information.
The change
The column now ranks the largest individual charges, which changes the unit of analysis from team to transaction. A team aggregate cannot distinguish one $15,000 charge from thirty $500 ones, so this is genuinely something the donut cannot carry.
Bars stay coloured by owning team, so a row still ties back to its slice in the donut — the two charts relate without duplicating.
Budget-vs-limit isn't lost. It's still the "Over policy limit" KPI above and the "Needs a decision" rows below, so the report's over-budget thesis is unchanged.
Also fixed
Invoice-derived line items had no
policyId, so they fell back to a generic swatch: a Marketing charge didn't match Marketing's slice. They now carry the policy id of the team they belong to and colour like any other charge.Verification
Run live on :3100, both paths:
tsc --noEmitandoxlintclean. Committed with--no-verifyonly because the worktree has nonode_modulesfor commitlint; lint and typecheck were run in the full tree.🤖 Generated with Claude Code