Skip to content

Gate sidebar extension system behind Beta Features toggle - #5084

Closed
austinywang wants to merge 6 commits into
mainfrom
feat-sidebar-extension-beta
Closed

austinywang wants to merge 6 commits into
mainfrom
feat-sidebar-extension-beta

Conversation

@austinywang

@austinywang austinywang commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a new Sidebar Extensions toggle to Settings → Beta Features, OFF by default, exactly mirroring the existing Dock beta toggle. The toggle gates the custom left-sidebar extension provider system (built on CmuxExtensionKit) that can replace the default workspace-list sidebar.

Behavior

  • Toggle OFF (default): the sidebar always renders the default workspace list, the Sidebar: %@ command-palette entries are absent, and the provider picker menu (right-click the sidebar toggle) is unavailable — regardless of any persisted cmuxExtensionSidebar.providerId.
  • Toggle ON: all existing extension-sidebar behavior returns.
  • Runtime: toggling updates the UI live without a restart (the gate observes the @AppStorage flag), mirroring how the Dock toggle auto-switches away when disabled.

Design

The flag's UserDefaults key sidebar.beta.extensions.enabled is the single source of truth, declared once as a catalog DefaultsKey plus a thin SidebarExtensionBetaFeatureSettings mirror enum — exactly the shape Dock uses (betaFeatures.rightSidebarDock + RightSidebarBetaFeatureSettings).

The key invariant is a single computed effectiveExtensionSidebarProviderId that collapses (persisted providerId, flag) into one value all render branches read. While the flag is off it is forced to defaultWorkspaces, making "extension sidebar visible while flag off" unrepresentable rather than guarded at each call site.

Changes (mirrors Dock end to end)

  • BetaFeaturesCatalogSection — new sidebarExtensions catalog key.
  • SidebarExtensionBetaFeatureSettings enum — key/default/isEnabled(defaults:).
  • BetaFeaturesSettingsView (legacy) + cmuxApp @Setting binding & reset.
  • BetaFeaturesSection (CmuxSettingsUI package) — second row.
  • CommandPaletteSettingsToggle — descriptor for the toggle itself.
  • SettingsNavigation + SettingsSearchAliases + CuratedSettingEntry+Default — searchable/deep-linkable entries.
  • Consumption gates in ContentView (palette entries + registration + effective provider) and the picker menu showMenu.
  • Localized strings (en + ja) in Localizable.xcstrings.
  • Updated SettingsRowAnchorResolutionTests so the new curated entry stays reachable.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.


Note

Medium Risk
Touches core left-sidebar provider selection and reset behavior; wrong gating could hide UI or leave users on an invalid provider, but changes mirror existing Dock beta patterns with explicit guards.

Overview
Adds a Beta Features → Extensions toggle (default off) backed by extensions.beta.enabled and ExtensionsBetaFeatureSettings, wired through settings search, command palette, and broad localization updates.

Reset All Settings now calls new SettingsHostActions.resetHostOnlySettings() so the host clears persisted extension sidebar provider keys; ResetSection takes hostActions and HostSettingsActions implements the clear.

ContentView observes the extensions (and custom sidebars) beta flags for command-palette context, adds canSelectProvider so palette handlers and the AppKit sidebar menu ignore stale switches when betas are off, and keeps effective provider resolution when extensions are disabled.

Reviewed by Cursor Bugbot for commit 421032e. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Gated the extension-based left sidebar behind a new Sidebar Extensions beta toggle (OFF by default). The toggle updates the UI live, hides related commands/menus when off, and mirrors the Dock beta flow.

  • New Features

    • Added a Sidebar Extensions toggle under Settings → Beta Features and a matching command palette toggle; entries are searchable/deep-linkable in CmuxSettings/CmuxSettingsUI and localized across many locales.
    • Backed by ExtensionsBetaFeatureSettings with extensions.beta.enabled (default false).
    • When OFF: forces the default workspace sidebar, doesn’t register "Sidebar: %@" commands for hosted/custom providers, makes the provider picker no-op, and uses a central canSelectProvider to block stale handlers; command-palette context exposes betaFeatures.extensions.enabled and betaFeatures.customSidebars.enabled for gating.
    • Reset All Settings now clears host-only persisted sidebar selections via SettingsHostActions.resetHostOnlySettings() from ResetSection; added a curated entry, search aliases/anchors, and test coverage.
  • Bug Fixes

    • Fixed command palette beta setting observation so commands track the Extensions/custom-sidebars flags in real time.

Written for commit 421032e. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added a new "Sidebar Extensions" beta toggle in the Beta Features settings section, allowing users to enable/disable the sidebar extension provider system (disabled by default).
    • Integrated with command palette and settings search functionality for convenient access.
    • Added localized support for multiple languages.

Add a "Sidebar Extensions" beta toggle (OFF by default) mirroring the
existing Dock beta toggle end to end: catalog key, both Settings UIs
(legacy + CmuxSettingsUI package), command palette setting toggle,
settings navigation/search entries + aliases, and localized strings.

When off, the sidebar always renders the default workspace list via a
single effectiveExtensionSidebarProviderId that collapses the persisted
provider selection and the beta flag into one value, so a stale persisted
extension id can never surface. The "Sidebar: %@" palette entries are not
registered and the provider picker menu no-ops while the flag is off.
The gate observes the @AppStorage flag so toggling updates the UI live.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Canceled Canceled Jun 6, 2026 10:53am
cmux-staging Building Building Preview, Comment Jun 6, 2026 10:53am

@coderabbitai

coderabbitai Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR introduces a new beta feature toggle for sidebar extensions. It adds the sidebarExtensions key to the settings catalog, exposes it through the Settings UI, makes it discoverable via search and command palette, and gates the extension sidebar provider behavior behind this flag so disabled users always see the default workspace list.

Changes

Sidebar Extensions Beta Toggle

Layer / File(s) Summary
Settings Infrastructure
Packages/CmuxSettings/Sources/CmuxSettings/Keys/BetaFeaturesCatalogSection.swift, Sources/App/WorkspaceRuntimeSettings.swift, Resources/Localizable.xcstrings
New sidebarExtensions toggle added to BetaFeaturesCatalogSection as a DefaultsKey<Bool> with id sidebar.beta.extensions.enabled and default false. SidebarExtensionBetaFeatureSettings enum provides the flag key, default value, and isEnabled() helper. Localization entries for title and on/off subtitles added in English and Japanese.
Settings UI Layer
Sources/BetaFeaturesSettingsView.swift, Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift, Sources/cmuxApp.swift
BetaFeaturesSettingsView gains a new @Binding for sidebarExtensionsEnabled and a computed subtitle that switches between localized on/off strings. BetaFeaturesSection loads state from catalog and renders a new sidebarExtensionsRow with a toggle. SettingsView wires the binding through cmuxApp.
Settings Discovery
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift, Sources/SettingsNavigation.swift, Sources/SettingsSearchAliases.swift, Sources/CommandPalette/CommandPaletteSettingsToggle.swift, Packages/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift
New curated setting entry sidebar-extensions added to Beta section. Settings search index extended with keywords, anchor ID mapping, and search alias. Command palette toggle descriptor created. Test anchor coverage updated.
Feature Behavior Gating
Sources/ContentView.swift
Extension-sidebar commands and handlers only register when SidebarExtensionBetaFeatureSettings.isEnabled() is true. New effectiveExtensionSidebarProviderId computed property ensures the provider always resolves to default workspaces when beta is off, preventing stale persisted IDs. Provider selection menu, descriptor resolution, and mutations all use the effective provider. Settings reset includes the new toggle.

Sequence Diagram

sequenceDiagram
    participant User
    participant SettingsUI
    participant Catalog as Settings Catalog
    participant ContentView
    User->>SettingsUI: Toggle Sidebar Extensions
    SettingsUI->>Catalog: Update betaFeatures.sidebarExtensions
    Catalog->>ContentView: Flag change observable
    alt Beta Enabled
        ContentView->>ContentView: Register extension-sidebar commands
        ContentView->>ContentView: Use selected provider ID
    else Beta Disabled
        ContentView->>ContentView: Skip extension commands
        ContentView->>ContentView: Force default provider only
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • manaflow-ai/cmux#5044: Modifies extension-sidebar selection flow in ContentView that interacts with the beta gating logic introduced here.
  • manaflow-ai/cmux#5038: Adds extension-browser pane-tab implementation that is integrated with the gated sidebar extension behavior.
  • manaflow-ai/cmux#4994: Introduces hosted extensions provider and host view rendering that this PR gates behind the new beta flag.

Poem

🐰 A toggle to tame the wild extension sidebar,
Now users choose whether extensions reach far or near,
Search and settings agree: the sidebar's now beta,
When off, default workspaces reign—no provider feta!
ExtensionKit awaits those brave enough to enable.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (2 errors, 1 warning)

Check name Status Explanation Resolution
Cmux Full Internationalization ❌ Error Three new localization keys lack translations for 18 supported locales (ar,bs,da,de,es,fr,it,km,ko,nb,pl,pt-BR,ru,th,tr,uk,zh-Hans,zh-Hant), violating full-internationalization rule. Add translations for all 18 missing locales to the three sidebarExtensions keys in Resources/Localizable.xcstrings.
Cmux Architecture Rethink ❌ Error Split lifecycle ownership: command palette uses static flag read at startup, sidebar uses @AppStorage reactive. Sidebar updates live but command palette doesn't appear until restart. Make commandPaletteCommandContributions read @AppStorage property to rebuild when flag changes, synchronizing command palette and sidebar lifecycle.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (15 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed New declarations respect Swift 6 actor isolation: nonisolated static func, Sendable struct, @MainActor View, and @AppStorage properties. No violations detected.
Cmux Swift Blocking Runtime ✅ Passed PR introduces sidebar extensions beta toggle with no blocking synchronization; uses only @AppStorage, computed properties, and UserDefaults reads.
Cmux No Hacky Sleeps ✅ Passed This PR only modifies Swift source files and localization strings. The custom check targets TypeScript, JavaScript, shell, and non-Swift build/runtime scripts. No such files were changed.
Cmux Algorithmic Complexity ✅ Passed Iterations use fixed-size collections: CmuxExtensionSidebarSelection.descriptors always has 2 items, yielding O(1) operations. No nested scans or repeated filtering.
Cmux Swift Concurrency ✅ Passed PR introduces no legacy async patterns: uses only @AppStorage (SwiftUI boundary), @Binding (SwiftUI pattern), and @Setting (existing pattern), all allowed by the concurrency modernization rules.
Cmux Swift @Concurrent ✅ Passed PR introduces only synchronous code. SidebarExtensionBetaFeatureSettings.isEnabled() is a lightweight nonisolated UserDefaults reader matching allowed patterns in the rule.
Cmux Swift File And Package Boundaries ✅ Passed PR adds <250 lines to oversized files, no new files >400 lines, no mixed responsibilities. SidebarExtensionBetaFeatureSettings mirrors existing enum patterns. Meets allowed-cases guidelines.
Cmux Swift Logging ✅ Passed All new sidebar extensions code additions have no logging violations; pre-existing NSLog statements are unrelated to this PR.
Cmux User-Facing Error Privacy ✅ Passed All user-facing text uses generic product terminology without exposing vendor names, provider identifiers, credentials, or sensitive implementation details. Complies with privacy rules.
Cmux Swiftui State Layout ✅ Passed PR uses modern SwiftUI state patterns: DefaultsValueModel is @Observable (not ObservableObject), no render-time mutations, no store refs in lazy containers, proper @Binding usage.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR adds only settings keys, UI bindings, and localization for a beta feature toggle. No new NSWindow, NSPanel, NSWindowController, SwiftUI Window, or WindowGroup are introduced or materially changed.
Title check ✅ Passed The title clearly and accurately summarizes the main objective of the pull request: adding a beta toggle to gate the sidebar extension system.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering all required sections: a clear summary of changes, detailed behavior explanation, design rationale, and a complete checklist of modifications.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-sidebar-extension-beta

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f593920. Configure here.

Comment thread Sources/ContentView.swift Outdated
coderabbitai[bot]
coderabbitai Bot previously requested changes Jun 1, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift (2)

4-6: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the doc comment to reflect both beta features.

The comment still describes this section as having "a single Dock toggle," but it now includes both Dock and Sidebar Extensions toggles.

📝 Proposed fix
 /// **Beta Features** section — mirrors the legacy
-/// `BetaFeaturesSettingsView`: warning note followed by a single
-/// `Dock` toggle.
+/// `BetaFeaturesSettingsView`: warning note followed by
+/// beta feature toggles (Dock, Sidebar Extensions).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift`
around lines 4 - 6, The doc comment for BetaFeaturesSection is outdated—update
the header comment that mentions "a single `Dock` toggle" so it accurately
documents both toggles now present (Dock and Sidebar Extensions); edit the
comment above BetaFeaturesSection (which references BetaFeaturesSettingsView) to
describe the warning note followed by both the Dock and Sidebar Extensions
toggles.

21-23: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the warning message to cover all beta features.

The warning text only mentions "Dock" but now applies to both Dock and Sidebar Extensions. Users enabling Sidebar Extensions should also understand that it's unstable.

⚠️ Proposed fix
                 BetaFeaturesWarningNote(
-                    String(localized: "settings.betaFeatures.warning", defaultValue: "Dock is unstable and may change or break. Enable it only when you are testing it.")
+                    String(localized: "settings.betaFeatures.warning", defaultValue: "Beta features are unstable and may change or break. Enable them only when you are testing.")
                 )

Note: This will require updating the corresponding localization key in Resources/*.xcstrings for all supported locales.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift`
around lines 21 - 23, Update the warning text used in BetaFeaturesWarningNote so
it references "beta features" (or explicitly "Dock and Sidebar Extensions")
instead of only "Dock": change the localized string for key
"settings.betaFeatures.warning" (used in BetaFeaturesWarningNote) to a generic
message like "Beta features are unstable and may change or break. Enable them
only when you are testing." and update the corresponding localization entries in
Resources/*.xcstrings for all locales to reflect the new wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift`:
- Around line 54-57: The three new localization keys used in
BetaFeaturesSection.swift (settings.betaFeatures.sidebarExtensions,
settings.betaFeatures.sidebarExtensions.subtitleOn,
settings.betaFeatures.sidebarExtensions.subtitleOff) are only translated for en
and ja; update Resources/Localizable.xcstrings to add translations for the
missing locales (ar, bs, da, de, es, fr, it, km, ko, nb, pl, pt-BR, ru, th, tr,
uk, zh-Hans, zh-Hant) so every supported locale has entries for each key,
keeping the same key names and providing appropriate localized strings for each
language.

In `@Sources/cmuxApp.swift`:
- Around line 8452-8453: resetAllSettings() currently restores beta flags like
sidebarExtensionsEnabled but doesn't clear the persisted sidebar extension
selection, so update resetAllSettings() to remove or reset the keys
cmuxExtensionSidebar.providerId and cmuxExtensionSidebar.selectedExtensionName
(or explicitly set providerId to defaultWorkspacesID) when clearing settings;
ensure this runs alongside restoring
SidebarExtensionBetaFeatureSettings.defaultEnabled so re-enabling the toggle
uses the defaultWorkspacesID rather than a previously stored provider.

In `@Sources/ContentView.swift`:
- Around line 6723-6736: The command palette currently gates contributions with
the non‑reactive SidebarExtensionBetaFeatureSettings.isEnabled() so entries
won't update at runtime; update commandPaletteCommandContributions() (and the
handler registration that uses commandPaletteExtensionSidebarCommandID(_:)) to
read a reactive `@AppStorage` boolean for the same settings key (or otherwise
observe changes and rebuild contributions/handlers) so the list is recomputed
when effectiveExtensionSidebarProviderId/@AppStorage toggles; as a defensive
alternative, add a runtime guard inside the command handler to no‑op when
SidebarExtensionBetaFeatureSettings.isEnabled() is false so commands added
earlier won’t run when the feature is off.

---

Outside diff comments:
In
`@Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift`:
- Around line 4-6: The doc comment for BetaFeaturesSection is outdated—update
the header comment that mentions "a single `Dock` toggle" so it accurately
documents both toggles now present (Dock and Sidebar Extensions); edit the
comment above BetaFeaturesSection (which references BetaFeaturesSettingsView) to
describe the warning note followed by both the Dock and Sidebar Extensions
toggles.
- Around line 21-23: Update the warning text used in BetaFeaturesWarningNote so
it references "beta features" (or explicitly "Dock and Sidebar Extensions")
instead of only "Dock": change the localized string for key
"settings.betaFeatures.warning" (used in BetaFeaturesWarningNote) to a generic
message like "Beta features are unstable and may change or break. Enable them
only when you are testing." and update the corresponding localization entries in
Resources/*.xcstrings for all locales to reflect the new wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5b924de0-fc71-4278-ae5e-e536b3b1dc0c

📥 Commits

Reviewing files that changed from the base of the PR and between 33e5294 and f593920.

📒 Files selected for processing (12)
  • Packages/CmuxSettings/Sources/CmuxSettings/Keys/BetaFeaturesCatalogSection.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift
  • Packages/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift
  • Resources/Localizable.xcstrings
  • Sources/App/WorkspaceRuntimeSettings.swift
  • Sources/BetaFeaturesSettingsView.swift
  • Sources/CommandPalette/CommandPaletteSettingsToggle.swift
  • Sources/ContentView.swift
  • Sources/SettingsNavigation.swift
  • Sources/SettingsSearchAliases.swift
  • Sources/cmuxApp.swift

Comment thread Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift Outdated
Comment thread Sources/cmuxApp.swift Outdated
Comment thread Sources/ContentView.swift Outdated
@greptile-apps

greptile-apps Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR gates the existing CmuxExtensionKit sidebar extension system behind a new Sidebar Extensions beta toggle (off by default) in Settings → Beta Features, exactly mirroring the established Dock beta pattern.

  • New ExtensionsBetaFeatureSettings enum defines the "extensions.beta.enabled" UserDefaults key (confirmed to match BetaFeaturesCatalogSection.extensions.userDefaultsKey), and a new CmuxExtensionSidebarSelection.canSelectProvider() guard stops stale command-palette and AppKit menu callbacks from switching providers when the respective beta flag is off.
  • effectiveExtensionSidebarProviderId centralises the flag-gating logic: hosted-extensions selection falls back to the default workspace list via effectiveProviderId, and custom-sidebar selection falls back via an inline customSidebarsEnabled check; both paths touch their @LiveSetting to stay reactive.
  • ResetSection now receives hostActions and calls resetHostOnlySettings() after the catalog reset, clearing cmuxExtensionSidebar.providerId and cmuxExtensionSidebar.selectedExtensionName (host-only keys not in the catalog). Localisation is complete across all supported locales.

Confidence Score: 5/5

Safe to merge — the change adds a well-scoped opt-in beta toggle that is off by default and cannot affect existing users who have never touched extension sidebar settings.

The implementation faithfully mirrors the established Dock beta pattern end to end: the catalog key is consistent across BetaFeaturesCatalogSection, ExtensionsBetaFeatureSettings, the command-palette descriptor, the settings anchor map, and the isEnabled synchronous read. The effectiveExtensionSidebarProviderId property handles both the hosted-extensions and custom-sidebar fallback paths, and the canSelectProvider guard on stale AppKit/palette handlers closes the race between handler registration and flag state. The reset path correctly separates catalog-owned keys from host-owned keys. No correctness gaps were found.

No files require special attention.

Important Files Changed

Filename Overview
Sources/ContentView.swift Adds canSelectProvider guard on stale menu/palette handlers, effectiveExtensionSidebarProviderId for flag-gated sidebar rendering, and two @LiveSetting properties for reactive context snapshots — all correctly mirroring the dock pattern.
Sources/App/WorkspaceRuntimeSettings.swift New ExtensionsBetaFeatureSettings enum with key extensions.beta.enabled, confirmed to match BetaFeaturesCatalogSection.extensions.userDefaultsKey.
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/ResetSection.swift Adds hostActions dependency and calls resetHostOnlySettings() after the catalog reset to clear host-owned sidebar selection keys that live outside the catalog.
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Environment/SettingsHostActions.swift Adds resetHostOnlySettings() to the protocol, provides a no-op default in the protocol extension, and explicitly implements it in NoopSettingsHostActions.
Sources/HostSettingsActions.swift Implements resetHostOnlySettings() to remove the two host-only UserDefaults keys not covered by the catalog reset.
Sources/CommandPalette/CommandPaletteSettingsToggle.swift Adds a command palette toggle descriptor for the Extensions beta flag, using the same defaultsKey as the catalog key, keeping the toggle in sync with settings.
Resources/Localizable.xcstrings Comprehensive locale coverage for new extensions beta strings and the search alias key across all supported locales.
Sources/SettingsNavigation.swift Adds extensions to the beta-features section search keywords and maps the extensions.beta.enabled defaults key to the correct anchor ID for deep-linking.
Packages/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift Updates anchor resolution test to include the new setting:betaFeatures:extensions curated entry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User action: sidebar switch"] --> B{Source}
    B -->|"Command Palette handler"| C["canSelectProvider check"]
    B -->|"AppKit menu callback"| C
    B -->|"Settings toggle"| D["Writes extensions.beta.enabled"]

    C -->|"hostedExtensionsProviderId"| E{isEnabled?}
    C -->|"customSidebarProviderPrefix"| F{customSidebarsEnabled?}
    C -->|"built-in provider"| G["setProviderId — allowed"]

    E -->|"No"| H["guard return — no-op"]
    E -->|"Yes"| G
    F -->|"No"| H
    F -->|"Yes"| G

    D --> I["@LiveSetting reactive update"]
    I --> J["effectiveExtensionSidebarProviderId re-evaluates"]

    J --> K{persisted provider type}
    K -->|"customSidebarProviderPrefix"| L{customSidebarsEnabled?}
    K -->|"hostedExtensions or built-in"| M["effectiveProviderId()"]

    L -->|"No"| N["render defaultProviderId"]
    L -->|"Yes"| O["render custom sidebar"]
    M -->|"extensions off and hosted"| N
    M -->|"otherwise"| P["render persisted provider"]

    Q["Reset All Settings"] --> R["defaultsStore.resetAll catalog keys"]
    Q --> S["key.resetInJSON for each catalog key"]
    Q --> T["hostActions.resetHostOnlySettings"]
    T --> U["remove cmuxExtensionSidebar.providerId"]
    T --> V["remove cmuxExtensionSidebar.selectedExtensionName"]
Loading

Reviews (6): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Comment thread Resources/Localizable.xcstrings Outdated
Comment thread Sources/SettingsSearchAliases.swift

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 12 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Sources/ContentView.swift Outdated
Comment thread Sources/cmuxApp.swift Outdated
@austinywang
austinywang dismissed coderabbitai[bot]’s stale review June 6, 2026 09:26

Dismissed after d6f6ecd/5b1d225b3 addressed the review findings; CodeRabbit confirmed the actionable threads as addressed and the current CodeRabbit check is passing.

@austinywang

Copy link
Copy Markdown
Contributor Author

Closing — not pursuing this gating approach for now.

This branch was successfully deployed

1 active deployment
Preview – cmux — 421032e1 Deployed Jun 6, 2026 by vercel[bot]
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