[front] feat: wire Agents tab of the usage filter panel to real, period-scoped data - #30166
Merged
avervaet merged 8 commits intoAug 11, 2026
Merged
Conversation
Contributor
Author
|
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. |
This was referenced Aug 7, 2026
Merged
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 7, 2026 10:10
6a375c0 to
2f387e8
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 10:10
3cf9361 to
cefe50f
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 7, 2026 11:03
2f387e8 to
8ce32e5
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 11:03
cefe50f to
d07144c
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 7, 2026 13:56
8ce32e5 to
d57fe4a
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 13:56
d07144c to
8eafb82
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 7, 2026 15:22
d57fe4a to
3418019
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 15:22
8eafb82 to
fa3b961
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 7, 2026 15:39
3418019 to
684c627
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 15:39
fa3b961 to
943d84b
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 7, 2026 16:02
943d84b to
c53d9f0
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 07:21
e3b3e3a to
b78e388
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 07:21
3c48aec to
e35ebf6
Compare
avervaet
commented
Aug 10, 2026
| export function toConsumptionScopeFilter( | ||
| filter: UsageFilter | ||
| ): ConsumptionScopeFilter { | ||
| const scopeFilter: ConsumptionScopeFilter = {}; |
Contributor
Author
There was a problem hiding this comment.
This code is uniformized in the last wiring pr when every categories are properly linked to real data
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 08:35
b78e388 to
3df4875
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 08:35
e35ebf6 to
63d51c8
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 09:04
3df4875 to
29acbab
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 09:04
63d51c8 to
c8b286d
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 09:53
bdb9d6f to
0fcaaf2
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 10:00
5ac24fc to
516e948
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 10:00
0fcaaf2 to
6d9b509
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 12:09
516e948 to
7ee187b
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 12:09
6d9b509 to
71f4f78
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 12:22
7ee187b to
878cd0e
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 12:22
71f4f78 to
0c4c9c3
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-members-tab
branch
from
August 10, 2026 13:14
1834153 to
2003783
Compare
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
4 times, most recently
from
August 10, 2026 15:34
4a03be3 to
43d56a1
Compare
avervaet
commented
Aug 10, 2026
Comment on lines
+180
to
+182
| const { agentConfigurations } = useAgentConfigurations({ | ||
| workspaceId: owner.sId, | ||
| agentsGetView: "all", |
Contributor
Author
There was a problem hiding this comment.
With the current implementation admins won't be able to see users private agents as only super users can. Is this intended or should we allow admins to see users private agents ? @flvndvd
Base automatically changed from
avervaet/wiring-usage-filter-component-members-tab
to
main
August 10, 2026 15:55
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 15:59
63c7275 to
c989aa8
Compare
flvndvd
approved these changes
Aug 10, 2026
| disabled: !isMemberCategoryActive, | ||
| }); | ||
|
|
||
| const { agentConfigurations } = useAgentConfigurations({ |
Contributor
There was a problem hiding this comment.
Ok to move forward, but let's make sure that we create a dedicated endpoint to get all facets in one call.
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 10, 2026 17:16
657b7ec to
3b9ec16
Compare
…od-scoped data Agents now come from the same period-ranked consumption data the Attribution table uses (useConsumptionTop), instead of the mock, period-unaware list. The Scope quick-filter (Company/Shared/Private) is also real now, derived from the agent's actual scope (global/visible/ hidden) via resolveAnalyticsAgentLabels, and no longer a random mock value. Also wires the page's UsageFilter state into the actual consumption queries for the "agent" dimension, which it never did before.
…lter agent scope Drop the intermediate AgentVisibilityScope vocabulary in favor of matching the usage filter's scope buttons directly against the real AgentConfigurationScope values, and make ConsumptionTopRow a discriminated union so `scope` is only assignable/readable on agent rows.
… period's top 100 The Agents tab was built on the same period-ranked top-N data as the Attribution table, so an agent outside the top 100 by credits for the selected period couldn't be searched or filtered on at all. Switch it to useAgentConfigurations (view=all), the same workspace-wide agent listing used elsewhere in the app, so every agent is listable and searchable regardless of the period.
avervaet
force-pushed
the
avervaet/wiring-usage-filter-component-agents-tab
branch
from
August 11, 2026 07:06
3b9ec16 to
aa09612
Compare
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.
Description
This PR wires the Agents tab of the usage filter panel to real workspace data, replacing the previous static mock list with a live fetch via
useAgentConfigurations.Until now, the Agents tab was populated from a hardcoded list in
usageFilterMockData.ts(SupportBot,SalesAssistant, etc.) that was period-unaware and bore no relation to actual workspace agents. Agent selection was also a no-op in the consumption scope filter sent to the analytics backend.This PR makes three connected changes:
Live agent list.
UsageFilterPanelnow callsuseAgentConfigurations({ agentsGetView: "all" })lazily (only when the Agents tab is open) and maps the results toUsageFilterAgentOption[], including the agent'spictureUrlas the newimagefield. Theagentkey is removed from thecategoryOptionsprop, mirroring the pattern already used for members and groups.Correct scope enum. The local
USAGE_FILTER_SCOPES = ["company", "shared", "private"]constant is replaced withAGENT_CONFIGURATION_SCOPESfrom@app/types/assistant/agent. The scope labels are updated accordingly (global→ "Company",visible→ "Shared",hidden→ "Private").UsageFilterScopebecomes an alias forAgentConfigurationScopedirectly.Agent filter forwarded to backend.
toConsumptionScopeFilteris extended to include selected agentsIds under theagentskey in theConsumptionScopeFilter, alongside the existinguserskey. Previously only members were forwarded.As a visual side-effect, agent entries in the filter list now render an
Avatar(name-initials or picture) consistent with member entries, replacing the previousnullicon.Models, tools, skills, and sources remain on mock data. The mock agent names and
buildAgentOptionshelper are removed.Tests
Risk
Low. The change is purely additive on the consumption filter side (an extra optional field). The agent list is fetched from the same
useAgentConfigurationsendpoint already used across the app. Reverting to mock data would require re-adding theagentkey tocategoryOptionscallers and restoring the mock entries, but no data is mutated. The scope label remapping (company/shared/private→global/visible/hidden) is a display-layer alignment with the canonical enum and has no backend effect.Deploy Plan