Skip to content

feat(tui): surface plugin failures - #41940

Open
kitlangton wants to merge 3 commits into
v2from
plugin-failure-ui
Open

feat(tui): surface plugin failures#41940
kitlangton wants to merge 3 commits into
v2from
plugin-failure-ui

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

Surface failed MCP servers and TUI plugins directly from the new-session screen, with /mcps and /plugins as direct paths to full diagnostics.

Failed rows open one shared error-details view with scrolling and copy support. A failed hot reload that keeps the previous plugin version running remains toggleable, so diagnostics do not remove the user's ability to stop it.

Before / After

Before: plugin failures appeared only as transient toasts. MCP failures showed only a generic indicator, and narrow terminals could clip multiple failure hints. A failed hot reload could also leave the previous plugin running without a control to deactivate it.

After: persistent failure counts appear in the home footer, Enter opens the complete error, C copies it, and command hints collapse before labels at narrow widths. Failed-but-active plugins preserve both error inspection and the normal toggle action.

How

  • dialog-error-details.tsx provides the shared scroll, copy, and back interaction used by MCP and plugin failures.
  • plugin/context.tsx carries the registration ID on failed states when a last-good plugin survives.
  • system/plugins.tsx combines runtime state with registrations, omits unsupported targets from actionable rows, and separates Enter-to-inspect from toggle.
  • home/footer.tsx reports exact failure counts and progressively hides secondary hints at 64 and 80 columns.

Scope

This changes TUI diagnostics only. It does not change plugin loading, retry, or MCP connection behavior.

Testing

  • bun typecheck in packages/tui
  • bun run test test/plugin-reload.test.ts test/plugin-hot-reload.test.tsx test/feature-plugins/home-footer.test.ts in packages/tui
  • repository pre-push typecheck across 32 packages
  • OpenCode Drive against commit d480f5c449: started with a failed MCP, broke a live plugin during hot reload, verified failure counts, retained toggle, plugin and MCP details, copy feedback, back navigation, and the 50-column footer

Demo

OpenCode Drive with deterministic local failure fixtures. The previous plugin version remains active after the failed hot reload.

recording-489a5692-0fb6-48f8-8c86-ed6420f0778c.mp4

Flow

flowchart LR
  Failure[Plugin or MCP fails] --> Footer[Persistent failure count]
  Footer --> Command[/plugins or /mcps]
  Command --> Row[Failed row]
  Row -->|Enter| Details[Scrollable error details]
  Details -->|C| Copy[Copy full error]
  Row -->|Toggle shortcut| Stop[Deactivate last-good plugin]
Loading

@kitlangton
kitlangton enabled auto-merge (squash) August 12, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant