Skip to content

Fix capped dashboard historical percentages#67366

Open
bobu-putheeckal wants to merge 1 commit into
apache:mainfrom
bobu-putheeckal:codex-airflow-67336-dashboard-cap
Open

Fix capped dashboard historical percentages#67366
bobu-putheeckal wants to merge 1 commit into
apache:mainfrom
bobu-putheeckal:codex-airflow-67336-dashboard-cap

Conversation

@bobu-putheeckal
Copy link
Copy Markdown

When historical metric counts reach the API cap, the dashboard cannot compute a reliable total from the capped values. This hides percentages and proportional bars for the affected metric group while keeping capped counts such as 1000+ visible.

closes: #67336

Tests:

  • npx pnpm@10.24.0 test src/pages/Dashboard/HistoricalMetrics/DagRunMetrics.test.tsx
  • npx pnpm@10.24.0 lint
  • git diff --check

Was generative AI tooling used to co-author this PR?
  • Yes - Codex

Generated-by: Codex following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 23, 2026
Comment on lines -51 to +54
const statePercent = capped ? undefined : total === 0 ? 0 : ((runs / total) * 100).toFixed(2);
const statePercent =
showPercentages && !capped && total !== 0 ? ((runs / total) * 100).toFixed(2) : undefined;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With the previous behavior, each row displayed 0% when all counts were 0, but after this changes it seems nothing will be shown instead.

Not blocking, but personally I think showing 0% is clearer than rendering nothing (undefined). WDYT?

@choo121600
Copy link
Copy Markdown
Member

Also, for UI-related contributions, could you include before/after screenshots in the PR description?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard summary page shows wrong percentages when a state count exceeds the API cap (1000)

2 participants