Skip to content

feat(observability): add issue-activity stat panels to the maintainer PR dashboard - #4168

Merged
JSONbored merged 1 commit into
mainfrom
feat/issues-stats-maintainer-dashboard-3716
Jul 8, 2026
Merged

feat(observability): add issue-activity stat panels to the maintainer PR dashboard#4168
JSONbored merged 1 commit into
mainfrom
feat/issues-stats-maintainer-dashboard-3716

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Adds three new stat panels to grafana/dashboards/maintainer-reviews.json's "Reviews & PRs" dashboard: Issues opened, Issues closed, Issues open — the dashboard currently tracks pull requests only.
  • Data source chosen: grafana-github-datasource (live GitHub API), mirroring the exact pattern already proven in grafana/dashboards/github-prs.json's "Open issues" panel (id 4) and "PRs opened" flow panels (id 7-9), rather than the local webhook-observed issues table via frser-sqlite-datasource. Documented in each new panel's own description field (per the issue's request), and here:
    • Chosen (live API): upstream-accurate regardless of local webhook sync gaps or backfill-timing holes — matters because this is a maintainer-facing accuracy dashboard, and 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 the review_targets-backed PR panels on the same dashboard (live-API vs. local-snapshot), and the datasource caps results at 1000 rows (irrelevant for a count stat query).
    • Not chosen (local issues table): 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.
  • Opened/closed use timeField (the dashboard's selected time range) mirroring github-prs.json's flow panels exactly: timeField: 1 for opened (created, matching PRs' own "opened" panel), timeField: 0 for closed (matching PRs' own "closed" panel's index). Open is a current-state snapshot with no timeField at all, mirroring github-prs.json's own "Open issues" panel precisely.
  • Query scope hardcodes org:JSONbored, matching the existing precedent already baked into github-prs.json's own $scope template variable ("All repos" → org:JSONbored) — maintainer-reviews.json has no $scope variable of its own (per the issue's own note), so this mirrors the sibling dashboard's existing convention rather than inventing a new one.
  • Laid out as a second stat row ("Issue activity", new row id 11) below the existing 6 PR panels rather than cramming 9 panels into one 24-unit-wide row — 3 panels at w:8 fills the row cleanly and stays visually distinct from the PR row it sits under. The table/timeseries/piechart panels below are shifted down accordingly (y values only, no other changes).

Scope

Validation

  • git diff --check
  • npx 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, and timeField presence/absence.
  • npm run selfhost:validate-observability — dashboards and alert rules valid.
  • npm run docs:drift-check — unaffected (no gate-mode/flag/command surface touched).
  • Dashboard JSON validated with 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 (no src/**/worker/MCP/OpenAPI/UI-component code touched — pure grafana/** + test/**); CI runs them authoritatively.

Safety

  • No secrets, wallet/hotkey/trust-score/reward data anywhere.
  • No runtime app behavior change — Grafana dashboard config only, self-host maintainer-facing observability, no gate/scoring impact.
  • No UI changes (this is a self-hosted Grafana dashboard, not apps/gittensory-ui/**) — no UI Evidence section needed.
  • No docs/changelog changes needed.

Notes

  • Grid layout: the existing 6 PR stat panels already fill the 24-unit-wide row (w:4 each); the new row uses w:8 × 3 panels rather than shrinking the existing PR panels, so this PR touches zero existing panel definitions besides the y-position shift on the 3 panels below the new row.
  • Per the issue's non-goal: this does not duplicate github-prs.json's deeper issue-triage view (oldest-first table, org-wide $scope selector) — it's a lightweight stats row on the PR-focused dashboard, matching what the issue asks for.

… 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-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.73%. Comparing base (8fe552b) to head (f104493).
✅ All tests successful. No failed tests found.

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:
  • 📦 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 8, 2026
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-08 09:12:14 UTC

2 files · 1 AI reviewer · 2 blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Review summary
Adds three new GitHub-API-backed stat panels (Issues opened/closed/open) to the maintainer dashboard, deliberately choosing the live grafana-github-datasource over the local review_targets-style SQLite table to avoid webhook-sync gaps, consistent with the same tradeoff already made for github-prs.json's PR panels. The gridPos repositioning of the existing table/timeseries/piechart panels is arithmetically consistent (row at y=5→6, three stat panels y=6→10, table y=10→26, bottom row y=26→34) with no overlaps, and the new test asserts datasource type, queryType, query string, and the timeField opened/closed/absent-for-open distinction against the actual panel IDs. This is a narrow, well-documented, test-covered dashboard change tied to issue #3716 with no schema/migration involved.

Nits — 5 non-blocking
  • grafana/dashboards/maintainer-reviews.json:12-14 — the three new targets pass `owner: "", repository: ""` and rely entirely on the `org:JSONbored` string embedded in each query; confirm the grafana-github-datasource plugin doesn't require owner/repository to be non-empty for an org-scoped search (worth a one-line note if this is intentional, mirroring github-prs.json).
  • grafana/dashboards/maintainer-reviews.json — the `org:JSONbored` search-query prefix is duplicated verbatim across all three new panels; low risk given panel JSON isn't typically abstracted, but flag if github-prs.json used a shared variable/templating approach instead.
  • test/unit/selfhost-grafana-dashboard.test.ts:277-303 — solid assertions, but consider also asserting `panel?.gridPos` non-overlap between the new row/stat panels and the repositioned table, since a future edit could silently reintroduce a gridPos collision that only a visual check would catch.
  • Consider a follow-up note in the dashboard's top-level description (next to the existing Manual/Commented/Ignored window-semantics callout) pointing at the new Issue activity row, so a reader scanning the dashboard-level description doesn't have to open each panel individually to learn about the live-vs-local consistency tradeoff.
  • If grafana-github-datasource enforces per-org rate limits distinct from per-repo, it may be worth confirming the three new panels' combined polling on `refresh: "1m"` won't compete with github-prs.json's existing GitHub-API panels for the same rate-limit budget — not blocking, but worth a quick check given this repo already tracks GitHub REST rate-limit dashboards elsewhere (grafana/dashboards/gittensory.json).

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 52 registered-repo PR(s), 43 merged, 486 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 52 PR(s), 486 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 52 PR(s), 486 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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.

🟩 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

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 8, 2026
@JSONbored
JSONbored merged commit 11fc55b into main Jul 8, 2026
11 checks passed
@JSONbored
JSONbored deleted the feat/issues-stats-maintainer-dashboard-3716 branch July 8, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant