Skip to content

feat(ui): plugin manager modal for adding/removing OpenCode plugins#589

Closed
ashutoshsinghpr7 wants to merge 2 commits into
NeuralNomadsAI:devfrom
ashutoshsinghpr7:feat/plugin-manager-ui
Closed

feat(ui): plugin manager modal for adding/removing OpenCode plugins#589
ashutoshsinghpr7 wants to merge 2 commits into
NeuralNomadsAI:devfrom
ashutoshsinghpr7:feat/plugin-manager-ui

Conversation

@ashutoshsinghpr7

Copy link
Copy Markdown

Summary

Adds a Plugin Manager modal that lets users add and remove OpenCode plugins directly from the CodeNomad UI — no more manual opencode.json editing.

Before this PR, plugins were only shown as a read-only list in the Status tab. Users had to open config files or use the CLI to install plugins. This PR adds a "Manage" button next to the Plugins heading that opens a full management modal.

Changes

New file

  • packages/ui/src/components/provider-auth/plugin-manager-modal.tsx — PluginManagerModal component

Modified files

  • packages/ui/src/components/instance-service-status.tsx — Adds "Manage" button to plugins section heading, embeds the modal
  • packages/ui/src/lib/i18n/messages/*/settings.ts — i18n keys (English + stubs in 8 locales)

How it works

  • List: Reads config.plugin from client.config.get(), handles both string and [spec, opts] tuple formats
  • Add: Text input for plugin spec (npm:pkg, file:///path, etc.) + Enter support, calls client.config.update() to persist
  • Remove: Delete button per plugin with the same config update flow
  • Restart notice: Warning that plugin changes need a workspace restart
  • Error handling: Load/add/remove failures shown as inline errors

UI

  • Follows the exact same pattern as ProviderManagerModal (Kobalte Dialog, same CSS classes)
  • Modal header with Package icon, title, close button
  • Input bar with Add button + Refresh
  • Plugin cards in the existing providers-card style with remove action
  • Manage button integrated into the existing right-panel plugins section

i18n

All 16 new keys added to English settings; English-language stubs in es, fr, de, ru, ja, he, ne, zh-Hans.

Related

Testing

  • npm run typecheck --workspace @codenomad/ui passes with no errors
  • tsc --noEmit clean on the UI package

Add a PluginManagerModal component that allows users to manage their
OpenCode plugins directly from the CodeNomad UI. Previously, plugins
were only displayed as a read-only list in the Status tab - users had
to edit opencode.json manually to add or remove plugins.

The modal provides:
- List of currently configured plugins with their enabled state
- Text input to add new plugins (npm packages, file:// paths, or URLs)
- Remove button for each plugin with confirmation
- Error handling for load, add, and remove operations
- Loading and empty states matching existing patterns
- Restart notice since plugin changes require workspace restart

Implementation follows the existing ProviderManagerModal pattern:
- Uses @kobalte/core Dialog for accessible modal
- Calls (client as any).config.update() to persist changes
- Reads plugin config via client.config.get()
- Handles both string and [spec, opts] tuple plugin formats
- Reuses existing CSS classes (providers-manager-modal, providers-card, etc.)

A "Manage" button is added to the Plugins section heading in the
Status tab (InstanceServiceStatus), opening the modal with the
current instance ID.

i18n keys added for English with English-language stubs in all 8
other supported locales (es, fr, de, ru, ja, he, ne, zh-Hans).

Addresses the plugin management gap identified in issue NeuralNomadsAI#193
(Plugin System Architecture).
@ashutoshsinghpr7 ashutoshsinghpr7 requested a review from a team July 14, 2026 07:17
@ashutoshsinghpr7 ashutoshsinghpr7 changed the base branch from main to dev July 14, 2026 07:41
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29314070823

Artifacts expire in 7 days.
Artifacts: (none found on this run)

The Manage button was conditionally rendered inside showHeadings() which
is false when InstanceServiceStatus is used inside the Status tab
accordion. This commit adds a fallback render path that always shows
the Manage button in the plugins content area.

TypeScript typecheck passes clean.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29315577709

Artifacts expire in 7 days.
Artifacts:

  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-tauri-macos
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-tauri-windows
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-electron-macos
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-tauri-macos-arm64
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-tauri-linux
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-electron-linux
  • pr-589-457d6618cf0fbf77def53838d3523d153593b484-electron-windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant