anomalyco / anomalyco/opencode

[FEATURE]: Plugin dataflow panel — reserved UI space for per-session metrics and data logs

Open
#46,156 5 comments 1 reaction 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Aug 29, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

  • I have searched for existing issues before filing this

Reserve a dedicated plugin dataflow / metrics panel in the session screen where plugins can surface live data logs, structured metrics, and contextual dashboards — without polluting the chat stream.


Problem

OpenCode's current GUI is clean and minimal, which is great for focus. But plugins that produce structured data — logs, metrics, performance stats, cost tracking, time-vs-expected comparisons — have no standard place to display it.

Today:

  • Plugin output goes into the main chat stream — polluting conversation context
  • Or it goes nowhere visible — silent background execution
  • Or it requires a separate standalone app/dashboard — fragmented UX

What Users Want

A plugin metrics panel — a frame, side div, or collapsible section — where plugins render:

Metric Example
Execution time "Ran in 2.3s (expected 5s — 54% faster)"
Cost tracking "This session: $0.023 (12k tokens)"
Rate limits "429 hit 3×, backed off 2s each"
File changes "+127 / -34 lines across 8 files"
Custom dashboards Plugin-defined charts, tables, status

This Extends #5971

#5971 ("Plugin API for custom sidebar panels") asked for sidebar panels. This is more specific:

  1. Per-session, not global — each session gets its own plugin data stream
  2. Structured metrics, not arbitrary HTML — a typed plugin.metrics.push({...}) API
  3. Time-comparison framing — "actual vs expected" makes OpenCode feel smarter
  4. Low footprint by default — collapsed unless a plugin has data to show

Proposed Implementation

interface MetricsPanel {
  push(data: MetricEntry): void;
  setTitle(title: string): void;
  collapse(): void;
  expand(): void;
}

interface MetricEntry {
  label: string;
  value: string;
  comparison?: { expected: string; unit: string; delta: number };
  icon?: string;
  color?: "green" | "yellow" | "red";
}

// Example
agent.metrics.push({
  label: "Build",
  value: "2.3s",
  comparison: { expected: "5s", unit: "%", delta: -54 },
  icon: "⏱",
  color: "green"
});

Panel UI:

  • Collapsible right-side drawer or bottom panel
  • Per-session (not global)
  • Auto-collapses when empty
  • Plugin-defined color coding and icons

Plugin Potential

This unlocks a whole class of observability plugins: cost-tracking, performance benchmarking, security audit plugins — that today have nowhere attractive to render their output.


OS

Cross-platform (Desktop + TUI + Web).


Related Issues

  • #5971 (open) — "Plugin API for custom sidebar panels" — the original sidebar panel request this extends

🦙 Creative Monkey at FrenzyPenguin Media — open-source security hardening & privacy tools

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.