Skip to content

feat(ui): maintainer dashboard panel for @loopover chat Q&A#6783

Merged
JSONbored merged 11 commits into
JSONbored:mainfrom
RealDiligent:feat/maintainer-chat-qa-panel-6489-v3
Jul 17, 2026
Merged

feat(ui): maintainer dashboard panel for @loopover chat Q&A#6783
JSONbored merged 11 commits into
JSONbored:mainfrom
RealDiligent:feat/maintainer-chat-qa-panel-6489-v3

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Closes #6489

Test plan

  • Unit helpers + route + panel tests
  • CI green on tip (validate shards, codecov/patch 100%)

claytonlin1110 and others added 11 commits July 17, 2026 13:08
…Q&A surface

Adds a Chat Q&A section to maintainer-panel.tsx exposing the existing
generateChatQaAnswer service (JSONbored#4595) for a maintainer's own PRs, per
JSONbored#6230's scope decision: read-only, no new LLM-routing path, no
write/action capability.

The new POST /v1/repos/:owner/:repo/pulls/:number/chat-qa route is a
thin wrapper -- it builds the same AgentRunBundle grounding the
PR-comment command builds (planNextWork) and hands it unchanged to
generateChatQaAnswer. Per-command rate limiting reuses the exact same
COMMAND_RATE_LIMIT_EVENT_TYPE counter the PR-comment `@loopover chat`
command uses, keyed by (actor, targetKey), rather than a second
budget.

The panel renders nothing at all for a repo that hasn't opted into
advisoryAiRouting.chatQa (config-as-code only, resolved from the
repo's .loopover.yml), and surfaces every ChatQaResult status with
its own UI state rather than a generic error.
Prettier formatting was missed on this file since it was written
after the workspace-wide format pass, tripping ui:lint on CI.
…a test

The LoopOver review gate flags any "-----BEGIN PRIVATE KEY-----" block
in a diff as a possible leaked secret, including a throwaway key
generated at test runtime. Mocking planNextWork in the pass-through
test (matching the existing "falls back to actor" test) removes the
need for a real GitHub App installation-token exchange entirely, so
no key material -- generated or otherwise -- needs to appear at all.
commandRateLimit* is config-as-code only (JSONbored#6445); upsertRepositorySettings no longer persists hold ceilings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ignore defensive nullish branches and avoid === true partials on the dashboard chatQaEnabled flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a session-backed dashboard unit test that opts into chatQa via .loopover.yml, and mark the known codecov cross-shard partials like other routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ts in

Co-authored-by: Cursor <cursoragent@cursor.com>
Move optional-chain / defaulting branches into a tiny pure module with exhaustive unit tests so codecov patch stops flapping on routes.ts shard partials.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the unhit .catch partial and assert malformed JSON hits the schema 400 path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the json().catch null path return directly so the remaining patch miss is exercised.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 17, 2026 06:03
@RealDiligent

Copy link
Copy Markdown
Contributor Author

Reopened as a single ready PR after #6731. Sorry about the CI churn on the previous attempt — tip was already at codecov/patch 100% / validate green before opening this one; no further force-push planned unless review asks for a change.

@superagent-security

Copy link
Copy Markdown
Contributor

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

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

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 06:12:13 UTC

11 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
  • src/api/routes.ts:1433-1440 — adding a second `Promise.all(previewRepositories.map(... resolveRepositorySettings ...))` alongside the existing `getRepositorySettings` call means every maintainer-dashboard load now does up to 12 additional manifest-resolving calls per request just to read one boolean; bounded to 12 so not a blocker, but worth confirming `resolveRepositorySettings` results aren't already available/cached from the settingsPreview build elsewhere on this same request path.
  • apps/loopover-ui/.../chat-qa-panel.tsx:30-149 — `ChatQaPanel`'s `ask()`/render logic is one large ~120-line component body; consider extracting the fetch call or the status-note branches (already partly done via `ChatQaResultView`) for readability, though this is purely stylistic.
  • apps/loopover-ui/.../chat-qa-panel.tsx — the eligible-PR `<select>` and question `<textarea>` are wrapped in `<label>` with a `<span>` for the visible text, which is the same pattern used elsewhere in this codebase (e.g. `activation-preview.tsx`), so the flagged label/control association is consistent with existing convention, not a new regression.
  • src/api/maintainer-chat-qa.ts:17-18 — the default rate-limit values (`5` invocations, `24`h window) are unexplained magic numbers; a short comment or named constant would make the defaults self-documenting for future readers.
  • Consider whether `resolveRepositorySettings` per repo in the maintainer-dashboard preview path (src/api/routes.ts:1439) can reuse a value already computed for `settingsPreview` elsewhere in the same handler to avoid the extra manifest fetch fan-out.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6731, #6489
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 385 registered-repo PR(s), 190 merged, 35 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 385 PR(s), 35 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds a maintainer-dashboard Chat Q&A panel gated on advisoryAiRouting.chatQa, a thin POST /v1/repos/:owner/:repo/pulls/:number/chat-qa wrapper around the existing generateChatQaAnswer service, and shares the COMMAND_RATE_LIMIT_EVENT_TYPE rate-limit counter with @​loopover chat, matching all stated acceptance criteria. It also includes the described unit tests (route, helpers, panel) and upda

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 385 PR(s), 35 issue(s).
  • Related work: Titles/paths share 3 meaningful terms. (issue #6504, issue #642)
  • Related work: Titles/paths share 3 meaningful terms. (issue #642, issue #5229)
  • Related work: Titles/paths share 6 meaningful terms. (issue #6489, issue #6739)
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
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.
🧪 Chat with LoopOver

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

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

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 17, 2026
@JSONbored
JSONbored merged commit cf8bad4 into JSONbored:main Jul 17, 2026
29 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): maintainer dashboard panel for the existing @loopover chat Q&A surface

3 participants