feat(observability): add issue-activity stat panels to the maintainer PR dashboard - #4168
Conversation
… PR dashboard Adds Issues opened/closed/open stat panels to maintainer-reviews.json, using the grafana-github-datasource live-API pattern already proven in github-prs.json's "Open issues" panel rather than the local webhook-observed issues table -- upstream-accurate regardless of local sync gaps, at the cost of a different consistency model from the review_targets-backed PR panels on the same dashboard. Hardcodes org:JSONbored matching the existing precedent in github-prs.json's own $scope variable, since this dashboard has no per-repo selector.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4168 +/- ##
=======================================
Coverage 93.73% 93.73%
=======================================
Files 387 387
Lines 36304 36304
Branches 13298 13298
=======================================
Hits 34031 34031
Misses 1617 1617
Partials 656 656 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 09:12:14 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Summary
grafana/dashboards/maintainer-reviews.json's "Reviews & PRs" dashboard: Issues opened, Issues closed, Issues open — the dashboard currently tracks pull requests only.grafana-github-datasource(live GitHub API), mirroring the exact pattern already proven ingrafana/dashboards/github-prs.json's "Open issues" panel (id 4) and "PRs opened" flow panels (id 7-9), rather than the local webhook-observedissuestable viafrser-sqlite-datasource. Documented in each new panel's owndescriptionfield (per the issue's request), and here:github-prs.json's own existence is explicitly the "accuracy fix" over an earlier local-only approach for PRs. Tradeoff: a different consistency model from thereview_targets-backed PR panels on the same dashboard (live-API vs. local-snapshot), and the datasource caps results at 1000 rows (irrelevant for acountstat query).issuestable): would match this dashboard's existing "local, webhook-observed" philosophy for the PR panels, but I could not confirm the local table is actually populated for every repo this dashboard implicitly covers (webhook-observed data has real gaps for repos onboarded before webhook coverage existed, or during backfill outages) — the issue explicitly calls out confirming this as a pre-req for that option, and I don't have production DB access to spot-check per-repo row counts from this environment. The live-API option sidesteps that risk entirely.timeField(the dashboard's selected time range) mirroringgithub-prs.json's flow panels exactly:timeField: 1for opened (created, matching PRs' own "opened" panel),timeField: 0for closed (matching PRs' own "closed" panel's index). Open is a current-state snapshot with notimeFieldat all, mirroringgithub-prs.json's own "Open issues" panel precisely.org:JSONbored, matching the existing precedent already baked intogithub-prs.json's own$scopetemplate variable ("All repos" → org:JSONbored) —maintainer-reviews.jsonhas no$scopevariable of its own (per the issue's own note), so this mirrors the sibling dashboard's existing convention rather than inventing a new one.w:8fills the row cleanly and stays visually distinct from the PR row it sits under. The table/timeseries/piechart panels below are shifted down accordingly (yvalues only, no other changes).Scope
src/**changes.CONTRIBUTING.md.Validation
git diff --checknpx vitest run test/unit/selfhost-grafana-dashboard.test.ts— 13/13 passing, including a new test asserting all 3 panels'datasource.type,queryType,options.query, andtimeFieldpresence/absence.npm run selfhost:validate-observability— dashboards and alert rules valid.npm run docs:drift-check— unaffected (no gate-mode/flag/command surface touched).python3 -m json.tool(well-formed).npm run typecheck,test:workers,build:mcp,test:mcp-pack,ui:openapi:check,ui:lint,ui:typecheck,ui:build,npm audit— typecheck run clean locally; the rest not re-run (nosrc/**/worker/MCP/OpenAPI/UI-component code touched — puregrafana/**+test/**); CI runs them authoritatively.Safety
apps/gittensory-ui/**) — no UI Evidence section needed.Notes
w:4each); the new row usesw:8× 3 panels rather than shrinking the existing PR panels, so this PR touches zero existing panel definitions besides they-position shift on the 3 panels below the new row.github-prs.json's deeper issue-triage view (oldest-first table, org-wide$scopeselector) — it's a lightweight stats row on the PR-focused dashboard, matching what the issue asks for.