Conversation
The redesigned Sales dashboard needs two things the report contract did not provide: - Every stage tile shows its Amount beside its Expected Revenue, so a bucket's single primary total is not enough. `summary.groups[].buckets[]` now carries an `amounts[]` entry per numeric column, in the same shape and order as `summary.amounts`. `total` and `amountColumnId` are unchanged for WIN. - Clicking a stage must narrow the table while the breakdown it was clicked in stays on screen. `drilldownColumn`/`drilldownValue` match a column's displayed value exactly, ignoring case and surrounding whitespace, and are applied after aggregation: they narrow `rows`, `total` and `totalPages` but never `summary`. A drilldown therefore makes `summary.recordCount` larger than `total`. Half a drilldown pair, or a column the report does not define, returns 400. SALES.md documents both additions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/PM-6392
What's in this PR?
Two additions the redesigned Sales dashboard needs from the report contract. Both are backward compatible; the WIN endpoint's existing fields are unchanged.
summary.groups[].buckets[].amounts[]Each bucket now carries a total per numeric column, in the same shape and order as
summary.amounts, so a stage tile can show its Amount beside its Expected Revenue rather than only the one primary total.totalandamountColumnIdkeep their current meaning.drilldownColumn/drilldownValueMatches a column's displayed value exactly, ignoring case and surrounding whitespace, and is applied after aggregation: it narrows
rows,totalandtotalPagesbut neversummary.That is the difference from
filterColumn/filterValue, which narrow both. It lets the dashboard drill into onebuckets[]entry while every bucket stays on screen to be clicked next, so the stage breakdown does not collapse to the stage being examined. A drilldown therefore makessummary.recordCountlarger thantotal.Half a pair, or a column the report does not define, returns
400.SALES.mddocuments both.Testing
pnpm lint— clean.pnpm build— clean.npx jest src/reports/sales --runInBand— 41 passed, including new specs for per-bucket amounts across several currency columns, the drilldown narrowing rows while the summary stays complete, and the 400s.src/reports/sfdc/*are pre-existing ondevelopand untouched by this PR (its diff is confined tosrc/reports/salesandSALES.md).🤖 Generated with Claude Code