Skip to content

Filter open Issues and PRs by open age from a clickable pie chart - #15

Merged
zhaozhaozz merged 1 commit into
mainfrom
feature/issue-pr-open-age-pie
Oct 15, 2026
Merged

zhaozhaozz merged 1 commit into
mainfrom
feature/issue-pr-open-age-pie

Conversation

@zhaozhaozz

Copy link
Copy Markdown
Contributor

What

Adds an interactive open-age donut chart directly above the open list on both the Issue and PR pages. On the Issue page it replaces the old non-interactive age-distribution bar chart; on the PR page it is new.

  • Sectors are computed from the page's own open items with the same bucket boundaries as the collector's aging summary: <7d [0,7), 7-30d [7,30), 30-90d [30,90), >90d [90,∞). Items without age_days are not counted; zero-count buckets are listed in the legend but are not clickable. Legend entries show both the count and the share, and the selected sector/entry gets a clear selected state.
  • Clicking a sector or legend entry filters only that page's open list — the table and the board view alike; clicking the selected one again clears the filter. The bucket combines (AND) with the existing search/label/assignee filters, and the Issue and PR selections stay independent. An active bucket shows up as a clearable chip in the filter bar and in the board toolbar.
  • The side cards (recently updated, longest idle) and the recently-merged table are not affected; an empty result shows an empty state while the pie stays visible.
  • Sectors are keyboard-operable controls (role=button, aria-pressed, Enter/Space) with accessible names; colors reuse the existing sequential palette, no new dependencies.

Implementation

  • static/app.js: AGE_BUCKETS/ageBucketOf/agePie/ageChip helpers, per-page STATE.ageFilter, click and keydown delegation, the filter applied in renderIssues/renderPRs; helpers shared with the board via window.GSB.
  • static/board.js: the board's filtered() applies the same per-scope age selection, the toolbar mirrors the active bucket as a chip, and “clear all” clears the age filter too.
  • static/style.css: pie and legend styles on the existing palette; static/index.html cache version bumped.
  • docs/dashboard-pages.md: feature description and browser-test coverage updated.

Tests

  • New journey open-age pie filters only the open list on its own page in test/journey-board.spec.cjs covers bucket boundaries and counts, sector/legend clicks, re-click to clear, chip clearing, keyboard activation, intersection with the text search, empty results, Issue/PR independence, board-view filtering, and that the side tables stay unfiltered. The two existing assertions on the replaced bar chart now expect the new card.
  • node .e2e/node_modules/playwright/cli.js test --config test/playwright.config.cjs → 24 passed, 1 failed; the failure (Real E2E cases show run marks…, .score-failed count) reproduces identically on the unmodified baseline tree, so it is pre-existing and unrelated to this change.

@zhaozhaozz
zhaozhaozz merged commit 8662f4c into main Oct 15, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant