Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

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

  • Introduced an ExtensionRegistry contribution model for right-sidebar tabs.
  • Added a renderer ExtensionRegistryProvider and builtin loader with try/catch so a broken builtin extension can’t brick startup.
  • Refactored RightSidebar to render labels/panels via registry contributions, preserving existing tab IDs and terminal/file tab behavior.
  • Migrated panes into extensions:
    • 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-check

Risks

  • Layout persistence: extension tab IDs are forward-compatible (ext:*) and unknown/unregistered tabs render a safe placeholder panel.
  • Some utilities (notably 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

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 -->
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 1 to +4
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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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