Repository navigation
Description
Summary
When a project's metrics read fails, Settings > Metrics > Projects (and the project's own Metrics view, which renders the same ProjectMetricsPage) shows the project as idle rather than reporting the failure:
- Completed: "0", with "0 by agents · 0 by humans";
- Cycle time: "—";
- Every chart: "No data", with its explanation, for example "No tasks were created or completed in this period." and "No agent runs started in this period."
Nothing says the read failed, and there is no Try again. An admin reviewing a busy project sees zero activity and may draw the wrong conclusion. The figures are stated as facts, not hidden behind an empty state.
The same class is open for sibling metrics sections, but not this one:
- bug(platform): Chat Health hides a failed guardrail metrics read as an empty section #3872 (Chat Health guardrail section; PR fix(platform): show guardrail metrics read errors #4401);
- bug(platform): Feedback analytics hides a failed recent-feedback list read as empty #3873 (Feedback recent list; PR fix(platform): surface recent feedback read failures #4372);
- bug(platform): Guardrails overview hides a failed recent-events read as “No events yet” #3874 (Guardrails overview);
- Bug: Failed automation history reads claim no runs or saved versions exist #3621 (automation history).
The other metrics pages already have an error state: chat health (chatHealth.errors.loadFailed), feedback stats, usage, automations and external turns.
Source
origin/main66162f288762bf4e4fe14b2d2d8400ae3ea0caa5.- This is a deterministic code path, read statically. No running stack was used: Review A has no stack reservation this occurrence.
In services/platform/app/features/tasks/components/project-metrics-page.tsx:
- Line 145:
const { data, isLoading } = useBackendQuery('tasks/queries:getProjectTaskMetrics', …). Theerrorandrefetchfields are never read. - Lines 150–151:
const daily = data?.daily ?? []andconst previousDaily = data?.previousDaily ?? []. A settled failed read therefore folds to zero totals, throughreduceTotals([]). - Lines 189–194:
noFlow,noThroughput,noCompletionsandnoCostbecome true, so each chart rendersmetrics.noDatawith its description. - Lines 268–269:
StatCardshowsString(totals.completed), which is "0". - Line 242:
<Skeletonize loading={isLoading}>covers only the pending phase.
The same wording ships in German ("Keine Daten") and French ("Aucune donnée"), with the same explanatory sentences.
Reproduction (expected from the code; not run live)
- As an admin, open Settings > Metrics > Projects and pick a project with recent tasks.
- Make
tasks/queries:getProjectTaskMetricsfail (go offline before changing the period, or have the backend answer with a server error). - Once the read settles, the page shows zero completions, "—" cycle time, and "No data" charts that say no tasks were created, completed or run.
Expected
On a failed read, show an error state in place of the figures, as the chat health page does: "Couldn't load project metrics", the cause through failureDetail(error), and Try again (refetch). Keep zeros and "No data" for a successful read that returned no activity.
Regression expectation
A jsdom test of ProjectMetricsPage with a failed getProjectTaskMetrics read:
- the error text and Try again are shown;
- no "0" completion figure and no
metrics.noDatachart state; - Try again refetches.
Triage
- Severity: low. It needs a failed read, but it states false figures, not just an empty list.
- Owner: the platform owner of project metrics and tasks.
- Review A cell:
metrics.projectsUX-CLARITY, found in the oldest-due UX-CLARITY slice of Review A (TALE-358) at the 2026-10-09 00:15 Europe/Zurich occurrence.
Activity
fix(platform): name a failed project metrics read, not an idle project
fix(platform): name a failed project metrics read, not an idle project