Add usage analytics filter panel component - #30120
Conversation
|
This change is part of the following stack:
Change managed by git-spice. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
98ba4e3 to
569c5d9
Compare
c4e8e78 to
085a959
Compare
27af54d to
9803e7c
Compare
085a959 to
4fc055b
Compare
9803e7c to
fc24f8b
Compare
fc24f8b to
17731bc
Compare
There was a problem hiding this comment.
This file will obviously be discarded later on
| import { | ||
| USAGE_FILTER_MOCK_ENTITIES, | ||
| USAGE_FILTER_MOCK_GROUPS, | ||
| } from "@app/components/workspace/analytics/usageFilterMockData"; |
There was a problem hiding this comment.
removed higher in the stack
Introduces a filtering React component for usage analytics with mock data and a preview page/route to iterate on the UI in isolation.
Wires UsageFilterPanel into AnalyticsConsumptionPage above the consumption chart instead of its temporary mock preview page, and removes the now-dangling preview route. Restyles the trigger to match the panel's own Cancel/Apply button formatting and right-aligns the popover with the chart.
Addresses GEN6 review comment: branching on the UsageFilterCategory union with if/else doesn't get compile-time exhaustiveness checking.
Addresses react-doctor's no-giant-component warning. Extracts the category nav, per-category controls (member groups, model complexity, agent scopes), entity checkbox list, selection summary, footer, and entity icon renderer into usageFilterPanel/, keeping the JSX split pure presentational and leaving all state/handlers in the parent.
6260659 to
3bae94d
Compare
17731bc to
a72fed4
Compare
Member group selection, model complexity dropdown state, and selection-summary collapse state only matter to their own sub-component, so own them there instead of threading props down from the parent.
aubin-tchoi
left a comment
There was a problem hiding this comment.
LGTM
as per IRL could have been split in a PR that describes the layout with maybe only 1 kind of filter and separate PRs to add each filter. these ones could have directly contained the data wiring (IMHO the mocks make it a big longer to review as we know that part of the code will change)
| private: "Private", | ||
| }; | ||
|
|
||
| export const USAGE_MODEL_TIERS = ["fast", "standard", "complex"] as const; |
There was a problem hiding this comment.
this probably already exists somewhere else (for the input bar)
There was a problem hiding this comment.
Will be harmonized in the pr wiring real data to the model panel
Description
Introduces a filtering React component for usage analytics chart with mock
data and a preview page/route to iterate on the UI in isolation.
Risk
Low - Purely additive not logic tight to it yet, safe to rollback
Deploy Plan