🤖 feat: add extension registry + migrate right sidebar panes#2073
🤖 feat: add extension registry + migrate right sidebar panes#2073ibetitsmike wants to merge 5 commits intomainfrom
Conversation
Add a minimal in-process ExtensionRegistry in the renderer, plus a provider and builtin loader. This is the foundation for moving UI panes (like RightSidebar tabs) out of the core components and into registrable extensions.
Refactor RightSidebar's base panes (costs/review/explorer/stats) to render via a registry lookup (ExtensionRegistry) instead of hardcoded if/else blocks. Terminal and File tabs remain dynamic instances and keep their existing behavior. Missing/unregistered tab IDs render a safe placeholder instead of crashing.
- Register Explorer tab via mux.explorer builtin extension\n- Move ExplorerTab + fileExplorer helpers into src/extensions/explorer\n- Remove builtin:rightSidebarTabs (now redundant)\n\n---\n\n_Generated with `mux` • Model: openai:gpt-5.2 • Thinking: xhigh • Cost: \n\n<!-- mux-attribution: model=openai:gpt-5.2 thinking=xhigh costs=unknown -->
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d7f0faaef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| import React from "react"; | ||
| import { AlertTriangle } from "lucide-react"; | ||
| import { TokenMeter } from "./TokenMeter"; | ||
| import { HorizontalThresholdSlider, type AutoCompactionConfig } from "./ThresholdSlider"; | ||
| import { TokenMeter } from "@/browser/components/RightSidebar/TokenMeter"; | ||
| import { |
There was a problem hiding this comment.
Update tests that still import ContextUsageBar from old path
Since ContextUsageBar was moved into the extensions tree, any imports still pointing at @/browser/components/RightSidebar/ContextUsageBar will now fail module resolution. The UI test tests/ui/contextUsageBarWarning.test.tsx still uses the old path, so make test/typecheck will break unless that import is updated (or a compatibility re-export is added).
Useful? React with 👍 / 👎.
Summary
Adds a minimal, in-process renderer extension system (registry + loader) and migrates the right-sidebar Review, Explorer, and Costs/Stats panes into first-party extensions.
Background
Mux’s right sidebar tabs were previously wired via hardcoded registries and large conditional blocks, which made it difficult to extract features cleanly or add new panes without touching core layout code.
Implementation
ExtensionRegistrycontribution model for right-sidebar tabs.ExtensionRegistryProviderand builtin loader with try/catch so a broken builtin extension can’t brick startup.RightSidebarto render labels/panels via registry contributions, preserving existing tab IDs and terminal/file tab behavior.mux.review: Review pane (src/extensions/review/...)mux.metrics: Costs + Stats (src/extensions/metrics/...)mux.explorer: File explorer + fileExplorer utilities (src/extensions/explorer/...)Validation
make static-checkRisks
ext:*) and unknown/unregistered tabs render a safe placeholder panel.fileExplorer) are now extension-owned and imported by a couple of existing consumers; this is intended but does slightly broaden the “extension folder as shared home” pattern.Generated with
mux• Model:openai:gpt-5.2• Thinking:xhigh• Cost:$2.03