Skip to content

bug(platform): project metrics show zero activity and "No data" when the metrics read fails #4588

Closed

Description

@yannickmonney

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:

The other metrics pages already have an error state: chat health (chatHealth.errors.loadFailed), feedback stats, usage, automations and external turns.

Source

  • origin/main 66162f288762bf4e4fe14b2d2d8400ae3ea0caa5.
  • 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', …). The error and refetch fields are never read.
  • Lines 150–151: const daily = data?.daily ?? [] and const previousDaily = data?.previousDaily ?? []. A settled failed read therefore folds to zero totals, through reduceTotals([]).
  • Lines 189–194: noFlow, noThroughput, noCompletions and noCost become true, so each chart renders metrics.noData with its description.
  • Lines 268–269: StatCard shows String(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)

  1. As an admin, open Settings > Metrics > Projects and pick a project with recent tasks.
  2. Make tasks/queries:getProjectTaskMetrics fail (go offline before changing the period, or have the backend answer with a server error).
  3. 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.noData chart 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.projects UX-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

  1. added
    agent-ready
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 30, 2026
    f8974ee
  3. added a commit that references this issue on Oct 30, 2026
    749e313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions