Skip to content

Add beta feature toggles for Feed and Dock - #3537

Merged
lawrencecchen merged 7 commits into
mainfrom
task-beta-features-feed-dock-defaults
May 5, 2026
Merged

lawrencecchen merged 7 commits into
mainfrom
task-beta-features-feed-dock-defaults

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a Beta Features settings section with a localized instability warning.
  • Default Feed and Dock beta toggles off, and hide disabled modes from the right sidebar, shortcuts, and command palette.
  • Hide the Feed Activity filter for now while keeping Actionable visible.

Testing

Issues

  • Task: make Feed and Dock default disabled in settings, add Beta Features warning, and hide Feed Activity.

Summary by CodeRabbit

  • New Features

    • Added a Beta Features settings section with toggles for Feed and Dock, localized English/Japanese strings, and an “unstable features” warning.
  • Improvements

    • Command palette shows only currently available right‑sidebar modes and signals unavailable modes.
    • Right sidebar now validates availability, falls back to Files when needed, and persists mode availability.
    • Feed secondary filter “Activity” removed from the control bar.
  • Tests

    • Updated and added tests to reflect beta feed/dock behavior and mode persistence.

@vercel

vercel Bot commented May 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment May 5, 2026 8:35am
cmux-staging Building Building Preview, Comment May 5, 2026 8:35am

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented May 5, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6efca1ca-f190-4f1f-bee1-0e3210cb3308

📥 Commits

Reviewing files that changed from the base of the PR and between 2681d00 and 03f878b.

📒 Files selected for processing (5)
  • GhosttyTabs.xcodeproj/project.pbxproj
  • Sources/ContentView+RightSidebarCommandPalette.swift
  • Sources/ContentView.swift
  • Sources/Feed/FeedPanelView.swift
  • Sources/cmuxApp.swift

📝 Walkthrough

Walkthrough

Adds opt-in beta-feature gating for right-sidebar Feed and Dock: new UserDefaults keys and defaults, Settings UI and localization, availability checks for modes/shortcuts/command-palette, FileExplorerState enforcing/clamping stored modes, focus guards, UI adjustments, tests, and project wiring.

Changes

Beta Feature Gating for Right Sidebar Feed & Dock

Layer / File(s) Summary
Localization
Resources/Localizable.xcstrings
Adds settings.betaFeatures.* keys (feed, dock, subtitles, warning) and settings.section.betaFeatures with English/Japanese translations.
Settings & Defaults
Sources/App/WorkspaceRuntimeSettings.swift, Sources/cmuxApp.swift, Sources/BetaFeaturesSettingsView.swift
Adds RightSidebarBetaFeatureSettings keys/defaults; @AppStorage toggles in SettingsView; injects BetaFeaturesSettingsView; resetAllSettings() restores defaults.
Settings UI Helpers
Sources/SettingsCardNote.swift, Sources/cmuxApp.swift
Adds SettingsCardNote view and makes several Settings helper types module-visible (removed private).
Navigation & Search
Sources/SettingsNavigation.swift, Sources/SettingsSearchAliases.swift
Adds SettingsNavigationTarget.betaFeatures, localized title/icon/search text; adds settings search entries/aliases for feed and dock; maps UserDefaults keys to settings anchor IDs.
Mode Availability Logic
Sources/RightSidebarMode+Availability.swift
Introduces availableModes(...) and isAvailable(...) overloads to filter RightSidebarMode by feed/dock feature flags.
Core State & Persistence
Sources/FileExplorerState.swift, Sources/FileExplorerStore.swift
Adds FileExplorerState ObservableObject persisting UI state and stored mode; initialization now reads raw stored mode and clamps via isAvailable(...); FileExplorerStore removed legacy migration and validates/persists mode.
UI Rendering & Shortcuts
Sources/RightSidebarPanelView.swift, Sources/ContentView+RightSidebarCommandPalette.swift, Sources/ContentView.swift
Mode bar and command-palette contributions/shortcut lookups use availableModes(); modeShortcut(for:) and command handlers gate .feed/.dock; command-palette handling centralized into handleCommandPaletteRightSidebarMode(...).
Focus & Enforcement
Sources/MainWindowFocusController.swift, Sources/ContentView.swift
Focus entrypoints now check mode.isAvailable() and return/fallback when unavailable; private focus path also guards availability.
Feed UI Adjustment
Sources/Feed/FeedPanelView.swift
Secondary filter bar now only renders .actionable pill (removes .activity pill).
Tests & Project Wiring
cmuxTests/*, cmuxUITests/*, GhosttyTabs.xcodeproj
Adds FileExplorerStateModePersistenceTests; updates command-palette tests to validate availability and adds UI test launch args for beta flags; registers new sources/tests in Xcode project.
sequenceDiagram
  participant User
  participant SettingsView
  participant UD as UserDefaults
  participant Mode as RightSidebarMode
  participant Panel as RightSidebarPanel
  participant State as FileExplorerState
  participant Focus as MainWindowFocusController

  User->>SettingsView: toggle Feed/Dock
  SettingsView->>UD: write rightSidebar.beta.*.enabled
  Panel->>Mode: request availableModes()
  Mode->>UD: read feed/dock flags
  Mode-->>Panel: filtered modes
  Panel->>State: refreshModeAvailability()
  State->>Mode: storedMode.isAvailable()
  Mode-->>State: availability result
  State-->>Panel: mode clamped/persisted if needed
  User->>Panel: request focus/select mode
  Panel->>Focus: focusRightSidebar(mode)
  Focus->>Mode: mode.isAvailable()
  Mode-->>Focus: allowed? (true/false)
  alt allowed
    Focus-->>Panel: perform focus
  else not allowed
    Focus-->>Panel: return false / fallback to .files
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • manaflow-ai/cmux#3408: Modifies command-palette handling for right-sidebar mode commands; related to gating contributions on mode availability.
  • manaflow-ai/cmux#3217: Overlaps on right‑sidebar Feed/Dock behavior and availability logic.
  • manaflow-ai/cmux#3102: Touches WorkspaceRuntimeSettings/UserDefaults helpers similar to RightSidebarBetaFeatureSettings.

Poem

🐰
I nudged the toggles, soft and light,
Feed and Dock peek in and out at night.
If flags say no, they tuck away—
Settings hum, and modes obey.
A tiny hop for safer play.


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (3 errors, 1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Cmux Swift Concurrency ❌ Error New ObservableObject with @Published properties introduced in FileExplorerState.swift, violating the rule against new Combine usage when Observation is available on macOS 14.0+. Use @Observable instead of ObservableObject + @Published, consistent with existing Observation patterns in RightSidebarPanelView.swift and FeedPanelViewModel.swift.
Cmux Swiftui State Layout ❌ Error PR introduces FileExplorerState as new ObservableObject with @Published properties. Rule requires @Observable for new cmux-owned SwiftUI state on macOS 14.0+. Replace ObservableObject with @Observable macro, updating @Published properties to match modern SwiftUI state pattern.
Cmux Architecture Rethink ❌ Error Introduces multiple independent @AppStorage owners for feedEnabled/dockEnabled states with onChange side-channel workaround for coordination, violating distributed state ownership rule. Pass feedEnabled/dockEnabled as @Binding from cmuxApp to RightSidebarPanelView, eliminating duplicate @AppStorage properties and the onChange/focus-dispatch coordination pattern.
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.
Cmux Swift Actor Isolation ❓ Inconclusive No result was produced after verification. Marking as INCONCLUSIVE. Re-run the check or adjust instructions to produce a final result.
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding beta feature toggles for Feed and Dock, which is the primary focus of this changeset.
Description check ✅ Passed The PR description covers the required Summary and Testing sections with concrete details and links. However, Demo Video and Review Trigger sections are missing, and the Checklist is incomplete.
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 Blocking Runtime ✅ Passed No new blocking/timing synchronization primitives introduced in production code. All new files and production modifications contain no semaphores, locks, sleeps, or asyncAfter timing calls.
Cmux Swift @Concurrent ✅ Passed No async functions or @concurrent violations found. All new code is synchronous (pure functions, SwiftUI views, data types).
Cmux Swift File And Package Boundaries ✅ Passed New files under 400 lines with single responsibilities. No mixing of incompatible concerns. Oversized files: minimal additions (<16 lines). Tests included. No SwiftPM extraction required.
Cmux Swift Logging ✅ Passed PR adds no new logging violations. No print(), debugPrint(), dump(), or NSLog() calls added to production code. No Logger violations or sensitive data logging detected.
✨ 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 task-beta-features-feed-dock-defaults

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@greptile-apps

greptile-apps Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a Beta Features settings section with Feed and Dock toggles, defaulting both to disabled. Availability is enforced at the model setter level (FileExplorerState.setMode), eliminating the split source-of-truth that existed in the previous PR iteration; the command palette, keyboard shortcuts, mode bar, and MainWindowFocusController all consistently filter or guard by the same isAvailable predicate.

  • FileExplorerState is extracted from FileExplorerStore.swift into its own file and gains a @Published private var storedMode / computed mode pattern so the model always clamps to an available mode without requiring any view-local override.
  • RightSidebarMode+Availability.swift is a new extension file with two overloads each for isAvailable and availableModes, one reading from UserDefaults and one accepting injected values for testability.
  • The Feed "Activity" secondary filter is removed from FeedPanelView, leaving only "Actionable" visible.

Confidence Score: 5/5

Safe to merge. The availability invariant is now enforced at the model layer, with consistent guards in the command palette, keyboard shortcuts, and focus controller.

All changed paths enforce availability through a single chokepoint in FileExplorerState.setMode. The command palette, shortcuts, and MainWindowFocusController all independently guard against activating a disabled mode. Tests cover the clamping logic at init and at the setter. The only finding is a style preference about adopting @observable, which does not affect runtime correctness.

No files require special attention. FileExplorerState.swift is the most structurally significant change and is well-tested by the new FileExplorerStateModePersistenceTests.

Important Files Changed

Filename Overview
Sources/FileExplorerState.swift New file extracting FileExplorerState from FileExplorerStore. Adds @published private var storedMode backing property with computed mode accessor that enforces availability at the setter level. Correct single-source-of-truth for unavailable-mode clamping.
Sources/RightSidebarMode+Availability.swift New extension file. Clean availability query helpers with nonisolated-friendly static helpers. Correctly defers to RightSidebarBetaFeatureSettings for flag reads.
Sources/App/WorkspaceRuntimeSettings.swift Added RightSidebarBetaFeatureSettings enum with nonisolated static helpers. Correctly marks isFeedEnabled/isDockEnabled as nonisolated so they can be called from non-main-actor contexts.
Sources/BetaFeaturesSettingsView.swift New settings UI for Feed/Dock beta toggles. Binding-driven, localized, with dynamic subtitle based on toggle state. Clean layout structure.
Sources/RightSidebarPanelView.swift Added @AppStorage for beta feature flags; availableModes computed from those flags for the mode bar. onChange handlers correctly call refreshModeAvailabilityAndFocusIfNeeded on toggle change.
Sources/MainWindowFocusController.swift Added availability guards to focusRightSidebar overloads. Falls back to .files when a remembered or stored mode is no longer available. Types moved to MainWindowFocusTypes.swift.
Sources/ContentView+RightSidebarCommandPalette.swift Command palette contributions and shortcut-action lookup now filter to availableModes(). New handleCommandPaletteRightSidebarMode helper guards unavailable modes with NSSound.beep().
cmuxTests/FileExplorerStateModePersistenceTests.swift New test file covering availability clamping at init and at the mode setter. Tests save/restore UserDefaults correctly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    S[Settings toggle Feed/Dock] -->|writes UserDefaults| UD[(UserDefaults)]
    UD --> RPV[RightSidebarPanelView AppStorage feedEnabled/dockEnabled]
    RPV -->|onChange| RAM[FileExplorerState refreshModeAvailability]
    RAM -->|setMode clamps to available| FES[FileExplorerState storedMode]
    FES -->|objectWillChange| MBAR[modeBar ForEach availableModes only]
    CP[Command Palette open] -->|availableModes filter| CONTRIB[Contributions - available modes only]
    CONTRIB -->|user activates| HCPR[handleCommandPaletteRightSidebarMode guard isAvailable]
    KS[Keyboard Shortcut] -->|isAvailable guard| FES
    MWF[MainWindowFocusController focusRightSidebar] -->|isAvailable guard fallback to files| FES
Loading

Reviews (4): Last reviewed commit: "Trigger CI rerun" | Re-trigger Greptile

Comment thread Sources/RightSidebarPanelView.swift Outdated
Comment on lines +206 to +252
@@ -192,23 +237,29 @@ struct RightSidebarPanelView: View {
.onAppear {
modeShortcutHintMonitor.start()
focusShortcutHintMonitor.start()
ensureSelectedModeIsAvailable()
}
.onDisappear {
modeShortcutHintMonitor.stop()
focusShortcutHintMonitor.stop()
}
.onChange(of: fileExplorerState.mode) { _, mode in if mode != .dock { dockStore.deactivate() } }
.onChange(of: fileExplorerState.mode) { _, mode in
ensureSelectedModeIsAvailable()
if mode != .dock { dockStore.deactivate() }
}
.onChange(of: fileExplorerState.isVisible) { _, visible in if !visible { dockStore.deactivate() } }
.onChange(of: feedEnabled) { _, _ in ensureSelectedModeIsAvailable() }
.onChange(of: dockEnabled) { _, _ in ensureSelectedModeIsAvailable() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Split source of truth for the active sidebar mode

The PR adds effectiveMode as a silent view-local override whenever fileExplorerState.mode holds a disabled mode, and ensureSelectedModeIsAvailable() attempts to repair the model from three onChange sites. But FileExplorerState.mode's didSet has no availability guard, so the model can hold an invalid mode from the moment a feature is disabled until the view's next change-handler fires. During that window, fileExplorerState.mode and effectiveMode disagree — and any non-view code path that reads fileExplorerState.mode directly (e.g. MainWindowFocusController, command-palette registration, deep links) sees the stale unavailable value rather than the corrected one.

The invariant "mode must be available" is now enforced in three separate places: FileExplorerState.init, the @Published var mode setter (not at all), and the view layer. The cleanest single enforcement point would be the mode setter on FileExplorerState itself — validate against the current beta-feature defaults before writing to UserDefaults. That would let effectiveMode and ensureSelectedModeIsAvailable() be removed entirely.

Rule Used: Flag Swift fixes that patch symptoms while leaving... (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by centralizing unavailable-mode clamping in FileExplorerState and removing the view-local effectiveMode override.

— Claude Code

Comment thread Sources/RightSidebarPanelView.swift Outdated
Comment on lines +246 to +252
.onChange(of: fileExplorerState.mode) { _, mode in
ensureSelectedModeIsAvailable()
if mode != .dock { dockStore.deactivate() }
}
.onChange(of: fileExplorerState.isVisible) { _, visible in if !visible { dockStore.deactivate() } }
.onChange(of: feedEnabled) { _, _ in ensureSelectedModeIsAvailable() }
.onChange(of: dockEnabled) { _, _ in ensureSelectedModeIsAvailable() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 dockStore.deactivate() fires twice on an unavailable-mode transition

When fileExplorerState.mode is set to an unavailable mode (e.g. .feed while Feed is disabled), the onChange(of: fileExplorerState.mode) handler fires, calls ensureSelectedModeIsAvailable(), which immediately sets fileExplorerState.mode = .files. That write triggers onChange a second time with mode = .files, and dockStore.deactivate() executes again (files != dock). deactivate() is called once for the unavailable mode and once more for the .files correction. This double-fire is harmless only if deactivate() is idempotent; if it ever grows side effects the second invocation could cause observable misbehaviour.

Comment on lines +112 to +128
enum RightSidebarBetaFeatureSettings {
static let feedEnabledKey = "rightSidebar.beta.feed.enabled"
static let dockEnabledKey = "rightSidebar.beta.dock.enabled"

static let defaultFeedEnabled = false
static let defaultDockEnabled = false

static func isFeedEnabled(defaults: UserDefaults = .standard) -> Bool {
guard defaults.object(forKey: feedEnabledKey) != nil else { return defaultFeedEnabled }
return defaults.bool(forKey: feedEnabledKey)
}

static func isDockEnabled(defaults: UserDefaults = .standard) -> Bool {
guard defaults.object(forKey: dockEnabledKey) != nil else { return defaultDockEnabled }
return defaults.bool(forKey: dockEnabledKey)
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 RightSidebarBetaFeatureSettings static helpers should be nonisolated

The new static methods isFeedEnabled(defaults:) and isDockEnabled(defaults:) read from UserDefaults — a pure, thread-safe value operation with no UI coupling. Without an explicit nonisolated annotation, they inherit the module's default actor isolation (likely @MainActor in a Swift 6 target), unnecessarily coupling them to the main actor and preventing calls from non-isolated async contexts. Per the actor-isolation rule, static utility helpers that do not interact with UI state should be marked nonisolated.

Rule Used: Flag new or materially worsened Swift 6 actor isol... (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by marking the pure RightSidebarBetaFeatureSettings lookup helpers nonisolated.

— Claude Code

@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)
Sources/SettingsNavigation.swift (1)

372-432: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add settings-path anchor mappings for new beta toggles.

settingsPathAnchorIDs was not extended for the new Beta Features settings, so path-based navigation/highlight likely won’t resolve for those keys even though search entries exist.

Suggested patch
     private static let settingsPathAnchorIDs: [String: String] = [
+        "rightSidebar.beta.feed.enabled": settingID(for: .betaFeatures, idSuffix: "feed"),
+        "rightSidebar.beta.dock.enabled": settingID(for: .betaFeatures, idSuffix: "dock"),
         "app.language": settingID(for: .app, idSuffix: "language"),
         "app.appearance": settingID(for: .app, idSuffix: "appearance"),

Based on learnings, when adding a new Settings section, matching SettingsSearchIndex wiring should be kept consistent so navigation and jump-to behavior remain intact.

🤖 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 `@Sources/SettingsNavigation.swift` around lines 372 - 432, The
settingsPathAnchorIDs map is missing entries for the new Beta Features settings,
so path-based navigation/highlight won't resolve for those keys; update the
settingsPathAnchorIDs dictionary to include mappings for each new beta toggle
using settingID(for: .<section>, idSuffix: "<suffix>") (reference the existing
pattern in settingsPathAnchorIDs and the settingID(...) helper) — add keys
matching the SettingsSearchIndex/new beta setting keys and point them to the
appropriate anchor IDs so jump-to and highlight behavior works consistently with
other sections.
Sources/MainWindowFocusController.swift (1)

412-429: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

File-length CI budget exceeded — extract before merging.

The new availability guards are correct (recursion to .files is well-bounded, and the private overload's defensive return is consistent with the public entry). However CI now fails:

File length exceeds budget: actual=784, budget=778.

You're 6 lines over. Move some self-contained logic to a sibling file under Sources/ (e.g., MainWindowFocusController+ResponderQueries.swift) — good extraction candidates are terminalFocusRequest(for:), selectedFocusedPanelRequest(owning:), selectedFocusedBrowserPanelRequest(), and the private FocusedPanelRequest/TerminalFocusRequest structs. They have no SwiftUI/AppKit-state coupling beyond tabManager/window and are pure responder/workspace lookups, so they extract cleanly.

As per coding guidelines (file-length budget enforced for tracked Swift files; prefer a dedicated Sources/ file rather than bloating existing files; do not extract app-internal helpers into a SwiftPM package without a dedicated package).

🤖 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 `@Sources/MainWindowFocusController.swift` around lines 412 - 429, Move the
pure responder/workspace lookup logic out of MainWindowFocusController into a
new sibling file (e.g., MainWindowFocusController+ResponderQueries.swift):
extract the functions terminalFocusRequest(for:),
selectedFocusedPanelRequest(owning:), selectedFocusedBrowserPanelRequest(), and
the private structs FocusedPanelRequest and TerminalFocusRequest into that file
as an extension on MainWindowFocusController so they can still reference
tabManager and window; preserve their current access control (private/internal)
and signatures so callers need no changes; add any necessary imports at the top
of the new file and run the build to ensure visibility is correct and no
references remain in the original file.
🤖 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 `@Sources/cmuxApp.swift`:
- Around line 6486-6530: The file is over the length budget because the
beta-features UI (the SettingsSectionHeader + SettingsCard block and the
SettingsWarningNote component) is in cmuxApp.swift; extract that UI into a new
SwiftUI view file (e.g., BetaFeaturesSettingsView.swift) that defines a struct
BetaFeaturesSettingsView: View which contains the SettingsSectionHeader,
SettingsCard, the SettingsWarningNote implementation (move its definition if
it's newly introduced here), and the SettingsCardRow/Toggles; expose any
bindings used here (e.g., rightSidebarFeedEnabled, rightSidebarDockEnabled,
rightSidebarFeedSubtitle/rightSidebarDockSubtitle) as `@Binding` or init
parameters so the parent can pass them in, keep the same
accessibilityIdentifiers/labels and SettingsSearchIndex calls, import SwiftUI,
and then replace the moved block in cmuxApp.swift with a single
BetaFeaturesSettingsView(...) instantiation. Ensure no logic changes and update
any references to SettingsWarningNote to the moved implementation.
- Around line 5273-5276: resetAllSettings() currently doesn't clear the new
AppStorage keys rightSidebarFeedEnabled and rightSidebarDockEnabled, so "Reset
All Settings" leaves stale Feed/Dock beta states; update resetAllSettings() to
set rightSidebarFeedEnabled = RightSidebarBetaFeatureSettings.defaultFeedEnabled
and rightSidebarDockEnabled = RightSidebarBetaFeatureSettings.defaultDockEnabled
(or call whatever existing helper exists to reset
RightSidebarBetaFeatureSettings) so those persisted toggles are returned to
their defaults.

In `@Sources/RightSidebarPanelView.swift`:
- Around line 49-77: The RightSidebarMode availability helpers (the extension
methods availableModes(...) and isAvailable(...), which reference
RightSidebarBetaFeatureSettings) should be extracted out of
RightSidebarPanelView into a new standalone Swift source file as a plain
extension on RightSidebarMode; create a file containing the same extension,
include import Foundation, keep the existing static func
availableModes(defaults:), static func availableModes(feedEnabled:dockEnabled:),
func isAvailable(defaults:), and func isAvailable(feedEnabled:dockEnabled:)
signatures and logic unchanged so existing call sites in FileExplorerStore and
MainWindowFocusController continue to compile without changes.

---

Outside diff comments:
In `@Sources/MainWindowFocusController.swift`:
- Around line 412-429: Move the pure responder/workspace lookup logic out of
MainWindowFocusController into a new sibling file (e.g.,
MainWindowFocusController+ResponderQueries.swift): extract the functions
terminalFocusRequest(for:), selectedFocusedPanelRequest(owning:),
selectedFocusedBrowserPanelRequest(), and the private structs
FocusedPanelRequest and TerminalFocusRequest into that file as an extension on
MainWindowFocusController so they can still reference tabManager and window;
preserve their current access control (private/internal) and signatures so
callers need no changes; add any necessary imports at the top of the new file
and run the build to ensure visibility is correct and no references remain in
the original file.

In `@Sources/SettingsNavigation.swift`:
- Around line 372-432: The settingsPathAnchorIDs map is missing entries for the
new Beta Features settings, so path-based navigation/highlight won't resolve for
those keys; update the settingsPathAnchorIDs dictionary to include mappings for
each new beta toggle using settingID(for: .<section>, idSuffix: "<suffix>")
(reference the existing pattern in settingsPathAnchorIDs and the settingID(...)
helper) — add keys matching the SettingsSearchIndex/new beta setting keys and
point them to the appropriate anchor IDs so jump-to and highlight behavior works
consistently with other sections.
🪄 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: f4c8e61e-b5fa-41c9-af2c-7b1dd4ab31ac

📥 Commits

Reviewing files that changed from the base of the PR and between 51fec04 and 3c7d9bd.

📒 Files selected for processing (13)
  • Resources/Localizable.xcstrings
  • Sources/App/WorkspaceRuntimeSettings.swift
  • Sources/ContentView+RightSidebarCommandPalette.swift
  • Sources/ContentView.swift
  • Sources/Feed/FeedPanelView.swift
  • Sources/FileExplorerStore.swift
  • Sources/MainWindowFocusController.swift
  • Sources/RightSidebarPanelView.swift
  • Sources/SettingsNavigation.swift
  • Sources/SettingsSearchAliases.swift
  • Sources/cmuxApp.swift
  • cmuxUITests/FeedSidebarUITests.swift
  • cmuxUITests/RightSidebarChromeHeightUITests.swift

Comment thread Sources/cmuxApp.swift
Comment thread Sources/cmuxApp.swift Outdated
Comment thread Sources/RightSidebarPanelView.swift Outdated

@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: 1

🤖 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 `@Sources/RightSidebarPanelView.swift`:
- Around line 215-216: Replace the simple calls to
fileExplorerState.refreshModeAvailability() in the .onChange handlers for
feedEnabled and dockEnabled with a helper that refreshes availability and
retargets keyboard focus when the active right-sidebar mode changed; implement
refreshModeAvailabilityAndFocusIfNeeded() to capture previousMode =
fileExplorerState.mode, call fileExplorerState.refreshModeAvailability(), and if
previousMode != fileExplorerState.mode and fileExplorerState.isVisible and there
is an NSApp keyWindow/mainWindow, call
AppDelegate.shared?.focusRightSidebarInActiveMainWindow(mode:
fileExplorerState.mode, focusFirstItem: false, preferredWindow: window) so
MainWindowFocusController’s intent is updated immediately.
🪄 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: 261bd78e-b283-46e1-b361-a30fe0abb114

📥 Commits

Reviewing files that changed from the base of the PR and between 3c7d9bd and 0df7904.

📒 Files selected for processing (15)
  • GhosttyTabs.xcodeproj/project.pbxproj
  • Sources/App/WorkspaceRuntimeSettings.swift
  • Sources/BetaFeaturesSettingsView.swift
  • Sources/FileExplorerState.swift
  • Sources/FileExplorerStore.swift
  • Sources/MainWindowFocusController.swift
  • Sources/MainWindowFocusTypes.swift
  • Sources/RightSidebarMode+Availability.swift
  • Sources/RightSidebarPanelView.swift
  • Sources/SettingsCardNote.swift
  • Sources/SettingsNavigation.swift
  • Sources/cmuxApp.swift
  • cmuxTests/FileExplorerStateModePersistenceTests.swift
  • cmuxTests/RightSidebarCommandPaletteTests.swift
  • cmuxTests/ShortcutAndCommandPaletteTests.swift
💤 Files with no reviewable changes (2)
  • cmuxTests/ShortcutAndCommandPaletteTests.swift
  • Sources/FileExplorerStore.swift

Comment thread Sources/RightSidebarPanelView.swift Outdated
ShubhamPatilsd pushed a commit to emergent-inc/mosaic that referenced this pull request Jul 9, 2026
Adds default-disabled beta feature toggles for Feed and Dock, hides Feed Activity, and enforces unavailable right-sidebar modes across settings, command palette, shortcuts, and focus routing.

PR: manaflow-ai/cmux#3537
@coderabbitai coderabbitai Bot mentioned this pull request Jul 22, 2026
7 tasks done

This branch was successfully deployed

1 active deployment
Preview – cmux — 03f878b5 Deployed May 5, 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