Skip to content

Add usage analytics filter panel component - #30120

Open
avervaet wants to merge 11 commits into
avervaet/consumption-scope-query-auth-fixfrom
avervaet/usage-analytics-filtering-react-component
Open

Add usage analytics filter panel component#30120
avervaet wants to merge 11 commits into
avervaet/consumption-scope-query-auth-fixfrom
avervaet/usage-analytics-filtering-react-component

Conversation

@avervaet

@avervaet avervaet commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

Capture d’écran 2026-08-06 à 12 22 38 Capture d’écran 2026-08-06 à 12 22 48 Capture d’écran 2026-08-06 à 12 22 52 Capture d’écran 2026-08-06 à 12 22 56 Capture d’écran 2026-08-06 à 12 23 01 Capture d’écran 2026-08-06 à 12 23 06

Risk

Low - Purely additive not logic tight to it yet, safe to rollback

Deploy Plan

  • Deploy front

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
playground Ignored Ignored Preview Aug 7, 2026 3:01pm
storybook Ignored Ignored Preview Aug 7, 2026 3:01pm

Request Review

@dust-agent dust-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for coding rule compliance.

Comment thread front/components/workspace/analytics/UsageFilterPanel.tsx Outdated
@avervaet
avervaet changed the base branch from avervaet/usage-analytics-member-group-filter-api to sf/analytics-consumption-attribution-scope-ts August 6, 2026 14:39
@avervaet
avervaet force-pushed the avervaet/usage-analytics-filtering-react-component branch from 98ba4e3 to 569c5d9 Compare August 6, 2026 14:39
@sfriquet
sfriquet force-pushed the sf/analytics-consumption-attribution-scope-ts branch from c4e8e78 to 085a959 Compare August 6, 2026 17:12
@avervaet
avervaet force-pushed the avervaet/usage-analytics-filtering-react-component branch from 27af54d to 9803e7c Compare August 7, 2026 07:45
@sfriquet
sfriquet force-pushed the sf/analytics-consumption-attribution-scope-ts branch from 085a959 to 4fc055b Compare August 7, 2026 07:55
@avervaet
avervaet force-pushed the avervaet/usage-analytics-filtering-react-component branch from 9803e7c to fc24f8b Compare August 7, 2026 07:56
@avervaet
avervaet changed the base branch from sf/analytics-consumption-attribution-scope-ts to avervaet/consumption-scope-query-auth-fix August 7, 2026 08:35
@avervaet
avervaet force-pushed the avervaet/usage-analytics-filtering-react-component branch from fc24f8b to 17731bc Compare August 7, 2026 08:35

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file will obviously be discarded later on

Comment thread front/components/pages/workspace/AnalyticsConsumptionPage.tsx
import {
USAGE_FILTER_MOCK_ENTITIES,
USAGE_FILTER_MOCK_GROUPS,
} from "@app/components/workspace/analytics/usageFilterMockData";

@avervaet avervaet Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.
@avervaet
avervaet force-pushed the avervaet/consumption-scope-query-auth-fix branch from 6260659 to 3bae94d Compare August 7, 2026 10:10
@avervaet
avervaet force-pushed the avervaet/usage-analytics-filtering-react-component branch from 17731bc to a72fed4 Compare August 7, 2026 10:10
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 aubin-tchoi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

Comment thread front/components/workspace/analytics/usageFilter.ts Outdated
Comment thread front/components/workspace/analytics/usageFilter.ts Outdated
private: "Private",
};

export const USAGE_MODEL_TIERS = ["fast", "standard", "complex"] as const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this probably already exists somewhere else (for the input bar)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will be harmonized in the pr wiring real data to the model panel

@avervaet avervaet changed the title Add usage analytics filter panel component with preview route Add usage analytics filter panel component Aug 7, 2026
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