Skip to content

feat(analytics): add aggregate queue-health to the maintainer quality dashboard (#2201) - #5141

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:feat/analytics-queue-health-v2
Jul 12, 2026
Merged

feat(analytics): add aggregate queue-health to the maintainer quality dashboard (#2201)#5141
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:feat/analytics-queue-health-v2

Conversation

@dhgoal

@dhgoal dhgoal commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

Adds an aggregate queue-health slice to the maintainer quality dashboard (Closes #2201): summed open / stale / draft / unlinked PR counts across the maintainer's shaped repos, an open-PR age-bucket distribution, collision-cluster count, and how many repos fall in each burden band.

Surfaces real data — buildMaintainerQualityDashboard already computes a per-repo QueueHealth in its shaping loop but only kept the band; this folds those existing signals into a dashboard-level queueHealth aggregate. Pure in-memory aggregation over data the loop already produces (no new IO). Counts + bands only, never raw scores.

Scope note: the maintainer-quality dashboard shapes PR queue-health (open/stale/draft/unlinked PRs by age + burden band); the operational job-queue DLQ / time-series trend live behind the separate per-repo /outcome-calibration + queue-trend endpoints. This card renders the PR-queue aggregate that this dashboard's data actually supports — happy to fold in a DLQ/trend series as a follow-up if you'd prefer it here.

Changes

Backend (src/services/maintainer-quality-dashboard.ts, +33)

  • Accumulate the per-repo QueueHealth.signals (already computed at buildQueueHealth) into a queueHealth aggregate on MaintainerQualityDashboard: openPullRequests / stalePullRequests / draftPullRequests / unlinkedPullRequests / collisionClusters, an ageBuckets distribution, and per-band bandCounts.
  • Covered by test/unit/maintainer-quality-dashboard.test.ts (open-PR count matches qualitySignals; bands + age buckets present; public-safe).

Frontend

  • queue-health-card.tsx (new) — QueueHealthCard: four count Stats + a severity-colored age-distribution bar + burden-band pills. Reuses AnalyticsCardShell; empty states for a clear queue and an absent field.
  • queue-health-card.test.tsx (new) — populated, queue-clear, and absent-field branches.
  • maintainer-panel.tsx — optional queueHealth? on the dashboard type + renders the card above the contributor-quality table.

Verification

test/unit/maintainer-quality-dashboard.test.ts green (11 tests); card tests green (3); tsc clean on the changed backend; pure-aggregation diff (+219/−1).

Screenshots

Maintainer quality dashboard, populated and empty, desktop + mobile, light + dark.

State Desktop (light) Desktop (dark) Mobile
Populated
light

dark

mobile
Empty
light

dark

mobile

Closes #2201

@dhgoal
dhgoal requested a review from JSONbored as a code owner July 12, 2026 07:14
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 12, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

… dashboard (JSONbored#2201)

Fold the per-repo QueueHealth signals the shaping already computes into a
dashboard-level queueHealth aggregate on MaintainerQualityDashboard: summed
open/stale/draft/unlinked PR counts, collision clusters, an open-PR age-bucket
distribution, and how many repos fall in each burden band. Pure in-memory
aggregation over data already produced in the shaping loop (no new IO). Adds
QueueHealthCard rendering the counts + age distribution + burden-band pills
(counts and bands only, never raw scores), wired into MaintainerPanel and
degrading to an empty state when the queue is clear or the field is absent.
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.33%. Comparing base (19fbd93) to head (b1c2943).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5141   +/-   ##
=======================================
  Coverage   94.32%   94.33%           
=======================================
  Files         472      472           
  Lines       39868    39878   +10     
  Branches    14544    14544           
=======================================
+ Hits        37607    37617   +10     
  Misses       1583     1583           
  Partials      678      678           
Flag Coverage Δ
shard-1 46.32% <0.00%> (-0.03%) ⬇️
shard-2 34.32% <100.00%> (-0.36%) ⬇️
shard-3 31.07% <0.00%> (-1.00%) ⬇️
shard-4 33.07% <0.00%> (+1.08%) ⬆️
shard-5 33.45% <0.00%> (-0.17%) ⬇️
shard-6 45.23% <100.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/services/maintainer-quality-dashboard.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-12 07:25:18 UTC

5 files · 2 AI reviewers · no blockers · readiness 82/100 · CI green · unstable

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): src/services/maintainer-quality-dashboard.ts (matched src/services/**).

Review summary
This adds a pure in-memory aggregation of already-computed per-repo QueueHealth signals into a new queueHealth field on MaintainerQualityDashboard, plus a QueueHealthCard component with populated/clear/absent states. The backend aggregation is straightforward summation with no new I/O, and the accompanying unit test cross-checks openPullRequests against the existing qualitySignals.openPrs for consistency. The frontend component correctly branches on undefined vs. zero-open-PR states and is covered by three tests exercising each branch.

Nits — 6 non-blocking
  • queue-health-card.tsx:45 — QueueHealthCard's render body is ~76 lines (flagged by the size-smell scan); consider splitting the age-bar and band-pills sections into small subcomponents for readability.
  • The empty-state check in queue-health-card.tsx (`!queueHealth || queueHealth.openPullRequests === 0`) assumes stale/draft/unlinked counts are always subsets of openPullRequests — worth a one-line comment or a defensive check if that invariant isn't guaranteed by buildQueueHealth.
  • The PR description notes the linked issue feat(ui): queue-health trend card on the maintainer quality dashboard #2201 title references a 'trend card' while this delivers point-in-time aggregate counts/bands rather than a time-series trend; this is explicitly called out as a scope note with a promised follow-up, so it's a documentation nuance rather than an issue-linkage problem.
  • Consider extracting the age-bucket bar and band-pills rendering in queue-health-card.tsx into small named subcomponents to keep QueueHealthCard under typical size thresholds.
  • If a future repo can have stale/draft/unlinked PRs without any 'open' PRs in the same window, revisit the zero-open-PRs-as-empty-state heuristic in queue-health-card.tsx.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers 2 reviewers, synthesized
Linked issue ✅ Linked #2201
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 115 registered-repo PR(s), 67 merged, 22 issue(s).
Contributor context ✅ Confirmed Gittensor contributor dhgoal; Gittensor profile; 115 PR(s), 22 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — The diff cleanly surfaces existing per-repo QueueHealth signals as a new dashboard-level aggregate with matching UI and tests, closing the linked issue without adding new I/O or risk.
Linked issue satisfaction

Not yet addressed
The issue asks for an operational queue-health card (pending/in-flight/stuck/DLQ counts) with a TrendChart over the queue-trend snapshot and a generatedAt/stale indicator, but the PR instead aggregates a completely different metric — PR queue counts (open/stale/draft/unlinked) and age buckets — with no TrendChart usage and no generatedAt/stale flag, as the PR description itself acknowledges by sco

Review context
  • Author: dhgoal
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 115 PR(s), 22 issue(s).
  • Related work: Titles/paths share 3 meaningful terms. (issue #642, issue #2013)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@JSONbored
JSONbored merged commit 1d4a6fd into JSONbored:main Jul 12, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

feat(ui): queue-health trend card on the maintainer quality dashboard

2 participants