Files
multica/packages/views/locales/en/usage.json
Jiayuan Zhang 10b33b14f5 fix(dashboard): reconcile deleted-agent spend in usage leaderboard (MUL-3776) (#4661)
PR #4637 (MUL-3771) dropped hard-deleted agents from the per-agent
leaderboard so they'd stop rendering as a bare UUID, but the top-line
Cost/Tokens KPIs still count their spend (those totals aggregate
task_usage_hourly without joining `agent`). The breakdown therefore no
longer reconciled with the totals (#4640).

Instead of dropping unknown-agent rows, fold them into a single
aggregated "Deleted agents" row: sum(visible rows) == KPI total again,
with no UUID exposed. Archived agents still appear as themselves (the
agent list is fetched with include_archived). The bucket carries
tokens + cost only; Time/Tasks render as "—" since the run-time rollups
inner-join `agent` and never attribute time to deleted agents.

- bucketUnknownAgentRows replaces filterKnownAgentRows in dashboard/utils
- Leaderboard renders the sentinel bucket row with a neutral placeholder
  and a "{{count}} agents · {{deleted}} deleted" caption
- i18n: deleted_agents + caption_with_deleted (en/zh-Hans/ja/ko)
- tests cover bucket reconciliation, archived-stays, null-loading passthrough

Co-authored-by: multica-agent <github@multica.ai>
2026-06-29 17:21:35 +08:00

61 lines
1.7 KiB
JSON

{
"title": "Usage",
"subtitle": "Token spend and agent activity across this workspace.",
"filter": {
"project_label": "Project",
"all_projects": "All projects",
"period_label": "Period"
},
"kpi": {
"cost_label": "Cost · {{days}}D",
"tokens_label": "Tokens · {{days}}D",
"tokens_hint": "Input {{input}} · Output {{output}}",
"run_time_label": "Run time · {{days}}D",
"run_time_hint": "Across {{tasks}} tasks",
"tasks_label": "Tasks · {{days}}D",
"tasks_hint": "{{failed}} failed"
},
"dim": {
"label": "Dimension",
"daily": "Daily",
"weekly": "Weekly"
},
"daily": {
"title_cost": "Daily cost",
"title_tokens": "Daily tokens",
"title_time": "Daily run time",
"title_tasks": "Daily tasks",
"metric_cost": "Cost",
"metric_tokens": "Tokens",
"metric_time": "Time",
"metric_tasks": "Tasks",
"no_data": "No usage in this window."
},
"weekly": {
"title_cost": "Weekly cost",
"title_tokens": "Weekly tokens",
"title_time": "Weekly run time",
"title_tasks": "Weekly tasks",
"partial_label": "{{range}} (partial · {{covered}} / 7 days)"
},
"leaderboard": {
"title": "Leaderboard",
"caption": "{{count}} agents",
"caption_with_deleted": "{{count}} agents · {{deleted}} deleted",
"deleted_agents": "Deleted agents",
"header_agent": "Agent",
"header_tokens": "Tokens",
"header_cost": "Cost",
"header_time": "Time",
"header_tasks": "Tasks",
"no_data": "No agent activity in this window."
},
"empty": {
"title": "No usage yet",
"body": "Once agents start running tasks here, their token spend and run time will appear in this view."
},
"duration": {
"less_than_minute": "<1m"
}
}