Skip to content

πŸ› dashboard: Overview open-issue/PR totals explain their gap to the forge counts - #10638

Merged
clubanderson merged 2 commits into
v5from
fix/total-open-counts-10629
Oct 5, 2026
Merged

clubanderson merged 2 commits into
v5from
fix/total-open-counts-10629

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

  • Made the Overview Total open issues and Total open PRs KPIs use forge-open totals already captured on the scanner tick, with muted sub-lines showing how much of that population is visible in Overview bands versus filtered outside them.
  • Added server-side overviewTotals to /api/status, scanner detail for hard-suppress/exempt issue filters, UI tooltips/sub-lines, docs, changelog, and regression coverage.

Closes #10629

Trace / root cause

Before this PR the Overview cards were not forge totals. The browser built the card values from Overview band slices: overviewIssueBandSlices() walks repos[].actionableIssues plus repos[].heldIssues, while overviewPRBandSlices() walks repos[].openPrs plus repos[].heldPrs; renderOverviewKPIs() then summed those slices for the visible card values (src/pkg/dashboard/static/index.html:12482, src/pkg/dashboard/static/index.html:12521, src/pkg/dashboard/static/index.html:13162). Those arrays come from /api/status.repos[]; FrontendRepo.ActionableIssues/OpenPrs are explicitly the automated-consumer/actionable sets, and HeldIssues/HeldPrs are display-only hold sets (src/pkg/dashboard/server.go:832). buildRepos() fills them from the scanner result and separately attaches WorkBreakdown/raw counts (src/pkg/dashboard/status_builder.go:1927).

The scanner starts from GitHub open data on the existing scan tick: issues use GET /repos/{owner}/{repo}/issues?state=open and then skip pull requests (src/pkg/github/issue_dependencies.go:59, src/pkg/github/client.go:1131); PRs use PullRequests.List(state=open) (src/pkg/github/client.go:1337). The filters before an issue reaches actionableIssues are, in order: standing meta issues (hive/advisory and dependency dashboards), hold labels (moved to heldIssues), governor exempt labels, hard-suppress labels (needs-human, needs-direction, needs-decision, needs-spec), reporter-trust triage for untrusted human reporters, then project.issue_filter.require_labels (src/pkg/github/client.go:1137, src/pkg/github/client.go:1156, src/pkg/github/client.go:1172, src/pkg/github/client.go:1200, src/pkg/github/client.go:1209). Bot-authored issues are not dropped merely for being bots; they are annotated with author_is_human/human acknowledgment for banding after admission (src/pkg/github/client.go:1216). PRs are counted from all open PRs, then hold labels move non-draft held PRs to heldPrs, exempt labels filter, drafts are counted as drafts but excluded from openPrs, and the rest enter openPrs (src/pkg/github/client.go:1358, src/pkg/github/client.go:1365, src/pkg/github/client.go:1420, src/pkg/github/client.go:1425, src/pkg/github/client.go:1457). No age window or dedupe is applied in these count paths; multi-repo union is by the configured repo list. That explains the symptom: issues can be lower than GitHub because hard-suppressed/exempt/reporter-triage/meta issues were outside the Overview bands; PRs can be higher than the single GitHub repo header when the selected/configured repo set spans multiple repos, while drafts/filtered PRs explain gaps between forge totals and Overview bands.

Fix choice

The configured repo set is the dashboard scope operators select, so the cards now show forge-open totals for that selected configured repo set. The server publishes all-repo overviewTotals from the scanner's cached WorkBreakdown without adding a new poll, and the client recomputes the same totals from per-repo breakdowns when the Overview repo filter is narrowed (src/pkg/dashboard/overview_status.go:105, src/pkg/dashboard/static/index.html:13103, src/pkg/dashboard/static/index.html:13138, src/pkg/dashboard/static/index.html:13168). The sub-line explains the gap (tracked in Overview bands, held, and outside reasons such as needs-direction, exempt, draft) and each card tooltip defines the count (src/pkg/dashboard/static/index.html:13148, src/pkg/dashboard/static/index.html:13179).

Tests / validation

  • Added TestOverviewTotalsUseForgeCountsAndExplainScannerGap10629 for held, hard-suppressed, bot-authored, draft, and multi-repo fixture coverage.
  • Added/updated static UI string-scan coverage to ensure the KPI binds to overviewTotals, uses forge fields, and has tooltips/sub-line wiring.
  • Local validation limited to gofmt -l and git diff --check per AGENTS.md; no local go test, go build, go vet, or citation guard was run.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 5, 2026
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from da8c540 to 90435db Compare October 5, 2026 16:46
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#10658 πŸ› dashboard: Overview median-age KPI names its population and basis same files src/pkg/dashboard/overview_kpi_sparklines_test.go
src/pkg/dashboard/overview_kpi_values_10139_test.go
src/pkg/dashboard/static/index.html
#10655 ✨ Spek recheck cadence for continuous convergence same files src/docs/api-reference.md
src/pkg/dashboard/static/index.html
#10602 ✨ feat: label-driven repos skip un-park notice and keep needs-human same files src/docs/api-reference.md
#10614 ✨ dashboard: Audit Log collapsed row shows entry rate, last entry, today's count and sensitive-action chip same files src/pkg/dashboard/static/index.html

clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from 014edbb to dd621ee Compare October 5, 2026 16:49
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from 6c22542 to f408eb3 Compare October 5, 2026 16:59
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from aa47922 to 7430c52 Compare October 5, 2026 17:12
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 5, 2026
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from 5c01268 to 76a23a2 Compare October 5, 2026 17:30
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 5, 2026
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from d33e7f8 to 59cded7 Compare October 5, 2026 17:59
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2026
clubanderson and others added 2 commits October 5, 2026 14:05
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the fix/total-open-counts-10629 branch from 59cded7 to ce40fde Compare October 5, 2026 18:06
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2026
@clubanderson
clubanderson merged commit ae18b4b into v5 Oct 5, 2026
62 of 64 checks passed
@clubanderson
clubanderson deleted the fix/total-open-counts-10629 branch October 5, 2026 18:16
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› dashboard: 'Total open issues/PRs' (21/24) do not match GitHub (38/21) β€” define or rename

1 participant