Context
Part of #1819.
grafana/dashboards/maintainer-reviews.json (the "Gittensory — Reviews & PRs (maintainer)" dashboard) currently tracks pull requests only. All six top-row stat panels (PRs tracked, Merged, Closed, Manual review, Commented (advisory), Ignored) and the "Pull requests (latest 1000)" table query the local review_targets SQLite table via the frser-sqlite-datasource (uid: gittensory-db). There is no issue-activity visibility anywhere on this dashboard.
The review engine already has TWO usable building blocks for this, neither wired into this dashboard yet:
- A local
issues table (migrations/0001_initial.sql) — webhook-observed (upsertIssueFromGitHub in src/queue/processors.ts), with state, created_at, updated_at columns, same shape/philosophy as the local PR data this dashboard already uses.
- A sibling dashboard,
grafana/dashboards/github-prs.json, already has a proven "Open issues" panel using the grafana-github-datasource live-GitHub-API datasource (queryType: "Issues", GitHub search syntax, e.g. $scope is:issue is:open) — see its panel id 4 (lines ~87-111) for the exact template.
Requirements
- Add issue-count stat panel(s) to
maintainer-reviews.json mirroring the existing PR stat-panel row (e.g. "Issues opened", "Issues closed", "Issues open") for the same dashboard time window the PR panels already use (unixepoch(updated_at) >= ${__from} AND < ${__to} pattern, or the GitHub-datasource equivalent).
- Pick a data source and document the tradeoff — either is acceptable, this is a real judgment call:
- The local
issues table via frser-sqlite-datasource, matching the exact time-range-filtered pattern the PR panels already use. Consistent with this dashboard's existing "local, webhook-observed" philosophy, but inherits the same known completeness caveat the PR data already has (webhook-observed only, not a full upstream census — see the github-prs.json dashboard's own doc comment on why it exists as the "accuracy fix").
- The
grafana-github-datasource live-API pattern already proven in github-prs.json. Upstream-accurate regardless of local webhook gaps, but a different consistency model from the rest of this dashboard, and the datasource caps results at 1000 rows (fine for a stat/count query, matters more for a table).
- Before committing to option 1, confirm the local
issues table is actually populated for every repo this dashboard tracks (not just gittensory itself) — spot-check a row count per repo.
- Match the existing panel visual style (
type: stat, colorMode: background, a fixed distinct color, same grid row) so the addition looks native, not bolted on.
Deliverables
- Updated
grafana/dashboards/maintainer-reviews.json with new issue-stat panel(s).
- A short note (PR description or dashboard panel description) documenting which data source was chosen and why, including the caveat from whichever option wasn't picked.
Expected outcome
A maintainer glancing at the "Reviews & PRs" dashboard also sees issue activity (opened/closed, and ideally current open-issue backlog) for the same time window, without switching to a separate dashboard.
Non-goals
Rebuilding or duplicating github-prs.json's deeper issue-triage view (oldest-first table, org-wide $scope selector) — that already exists and serves a different purpose. This issue is just a lightweight issue-stats row on the PR-focused dashboard.
Context
Part of #1819.
grafana/dashboards/maintainer-reviews.json(the "Gittensory — Reviews & PRs (maintainer)" dashboard) currently tracks pull requests only. All six top-row stat panels (PRs tracked,Merged,Closed,Manual review,Commented (advisory),Ignored) and the "Pull requests (latest 1000)" table query the localreview_targetsSQLite table via thefrser-sqlite-datasource(uid: gittensory-db). There is no issue-activity visibility anywhere on this dashboard.The review engine already has TWO usable building blocks for this, neither wired into this dashboard yet:
issuestable (migrations/0001_initial.sql) — webhook-observed (upsertIssueFromGitHubinsrc/queue/processors.ts), withstate,created_at,updated_atcolumns, same shape/philosophy as the local PR data this dashboard already uses.grafana/dashboards/github-prs.json, already has a proven "Open issues" panel using thegrafana-github-datasourcelive-GitHub-API datasource (queryType: "Issues", GitHub search syntax, e.g.$scope is:issue is:open) — see its panel id 4 (lines ~87-111) for the exact template.Requirements
maintainer-reviews.jsonmirroring the existing PR stat-panel row (e.g. "Issues opened", "Issues closed", "Issues open") for the same dashboard time window the PR panels already use (unixepoch(updated_at) >= ${__from} AND < ${__to}pattern, or the GitHub-datasource equivalent).issuestable viafrser-sqlite-datasource, matching the exact time-range-filtered pattern the PR panels already use. Consistent with this dashboard's existing "local, webhook-observed" philosophy, but inherits the same known completeness caveat the PR data already has (webhook-observed only, not a full upstream census — see thegithub-prs.jsondashboard's own doc comment on why it exists as the "accuracy fix").grafana-github-datasourcelive-API pattern already proven ingithub-prs.json. Upstream-accurate regardless of local webhook gaps, but a different consistency model from the rest of this dashboard, and the datasource caps results at 1000 rows (fine for a stat/count query, matters more for a table).issuestable is actually populated for every repo this dashboard tracks (not just gittensory itself) — spot-check a row count per repo.type: stat,colorMode: background, a fixed distinct color, same grid row) so the addition looks native, not bolted on.Deliverables
grafana/dashboards/maintainer-reviews.jsonwith new issue-stat panel(s).Expected outcome
A maintainer glancing at the "Reviews & PRs" dashboard also sees issue activity (opened/closed, and ideally current open-issue backlog) for the same time window, without switching to a separate dashboard.
Non-goals
Rebuilding or duplicating
github-prs.json's deeper issue-triage view (oldest-first table, org-wide$scopeselector) — that already exists and serves a different purpose. This issue is just a lightweight issue-stats row on the PR-focused dashboard.