Skip to content

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

Description

@JSONbored

Context

#6230 decided the scope (see its pinned decision comment): a maintainer-facing dashboard panel exposing the existing @loopover chat <question> Q&A surface (src/services/ai-chat-qa.ts, #4595) — not a new backend, not action-capable, not miner-facing. This issue is the dashboard-panel implementation.

⚠️ Read this before starting. This panel calls the existing ai-chat-qa.ts service as-is. It does NOT call MCP tools directly, does NOT add any new write/action path, and does NOT build a separate chat backend. A PR that adds a new API surface, a new LLM-routing path, or any tool-calling capability beyond what ai-chat-qa.ts already does does NOT resolve this issue.

Requirements

  • New panel/section in apps/loopover-ui/src/components/site/app-panels/maintainer-panel.tsx (extend, don't add a new route) — a simple question input + rendered answer, calling the existing ChatQaResult-returning service.
  • Only renders/enabled when advisoryAiRouting.chatQa is true for the repo — an instance that hasn't enabled it sees no new UI, not a disabled-looking version of it.
  • Surface every ChatQaResult status the service already defines (disabled, unavailable, declined, quota_exceeded, unsafe, error, ok) with a real UI state for each — do not collapse them into a generic error message; the service already distinguishes them for a reason (e.g. quota_exceeded should show the remaining budget, declined should surface CHAT_QA_FALLBACK_COMMAND).
  • Bearer-gated, maintainer-only — matches every other maintainer-panel surface's existing access model.
  • Rate-limit accounting is shared with the @loopover chat PR-comment command, not a separate budget — confirm this by reading how commandRateLimitPolicy/commandRateLimitAiMaxPerWindow are currently enforced and reuse that path, don't add a second counter.
  • No wallet/hotkey/reward/trust-score wording can leak into a rendered answer — ai-chat-qa.ts's own system prompt already forbids this at the model level; this issue's job is just to render whatever the service returns, not to add a second filtering layer that could mask a real service-level bug.

Deliverables

  • The dashboard panel/section, calling the existing service.
  • UI states for every ChatQaResult variant.
  • Tests confirming the panel is invisible when chatQa is off, and renders correctly for each result status (mock the service call).

Test Coverage Requirements

This is UI work under apps/loopover-ui/**, outside coverage.include per this repo's convention — Codecov's patch gate does not apply. If this issue needs any new src/** code (it shouldn't — the service already exists), that inherits the normal 99%+ patch requirement.

Expected Outcome

A maintainer can ask a grounded question about their repo's PR/gate state directly from their existing dashboard, using the exact same safe, cost-controlled, action-isolated backend the PR-comment command already uses.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions