Skip to content

Fix AppKit sidebar settings fidelity - #8432

Merged
austinywang merged 4 commits into
mainfrom
issue-8430-sidebar-settings-fidelity
Jul 18, 2026
Merged

austinywang merged 4 commits into
mainfrom
issue-8430-sidebar-settings-fidelity

Conversation

@austinywang

@austinywang austinywang commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • resolve every sidebar-row preference once in an immutable settings snapshot shared by the SwiftUI and AppKit row models
  • restore the shipped legacy default so a fresh AppKit sidebar renders branch and directory on separate lines
  • preserve saved legacy values without migration or reinterpretation, while retaining the newer branch/directory placement preference
  • derive workspace-detail keys/defaults, title wrapping, path presentation, colors, and indicator settings from the same catalog-backed path to prevent renderer drift

Closes #8430

Issue: #8430

Two-setting compatibility contract

These settings are deliberately distinct:

  • sidebarBranchVerticalLayout / sidebar.branchVerticalLayout is the shipped Bool-backed legacy topology preference (default true). true uses vertical branch records and preserves its historical stacked branch/directory subrows. false uses the compact branch topology. The key remains Bool-backed, and this PR performs no migration or stored-value rewrite.
  • sidebarBranchDirectoryStacked / sidebar.stackBranchDirectory is the newer placement preference (default false). When the legacy topology is inline, it independently chooses whether branch and directory share one line or use separate subrows. Vertical legacy layout already implies stacked placement, so Settings displays the effective toggle as on and disables it until Inline layout is selected.

The resulting truth table is:

Legacy vertical Newer stack Branch topology Branch/directory placement
true false or true vertical stacked
false false inline inline
false true inline stacked

Structural fix and audit

SidebarTabItemSettingsSnapshot is now the single resolved input for both renderers. It owns catalog-backed SidebarWorkspaceBranchDirectorySettings and SidebarWorkspaceDetailSettings, so AppKit no longer maintains a parallel raw-defaults interpretation.

The audit covers all workspace detail defaults (showBranchDirectory, showPullRequests, watchGitStatus, showSSH, showPorts, showLog, showProgress, showAgentActivity, and showCustomMetadata), title wrapping, path presentation, shortcut hints, colors, indicator positions, browser-link behavior, notification details, and the remaining settings consumed by AppKit rows. Behavior tests pass the same resolved snapshot into both row models and verify defaults plus stored overrides.

Coordination

Verification

  • red/green regression commit pairs:
    • 15d58b93b2 then b49710feea
    • 3b81ee6d5c then 5bdac63059 (fresh-default stacked rendering caught during dogfood)
  • arch -arm64 swift test in Packages/macOS/CmuxSettings — 260 tests passed
  • arch -arm64 swift test in Packages/macOS/CmuxSettingsUI — 115 tests passed
  • tagged cloud Debug build: https://github.com/manaflow-ai/cmux/actions/runs/29662299715
  • zero cmux-owned Swift warnings in the tagged build
  • scripts/check-pbxproj.sh
  • scripts/lint-pbxproj-test-wiring.sh — 528 test files checked
  • git diff --check
  • file-length audit: new files are below 500 lines; SidebarSection.swift remains at 499; neither budget TSV changed (the requested file-length script is absent on this base)

Build command:

CMUX_SKIP_ZIG_BUILD=1 /Users/austinwang/manaflow/cmuxterm-hq/scripts/reload-cloud.sh --tag issue-8430-sidebar-settings-fidelity --launch

Visual verification

The tagged defaults domain was verified with the AppKit flag enabled and both layout keys absent before launch. Before/after and both saved-preference screenshots will be attached here from the tag-bound dev instance during PR verification.

Localization

No new user-facing strings were added. The Settings change reuses the existing localized English/Japanese keys for Vertical/Inline layout and Stack Branch and Directory; no localization catalog changes are required.


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


Summary by cubic

Fixes drift between AppKit and SwiftUI sidebar rows by resolving sidebar settings once and sharing them across both renderers. Restores the legacy default (vertical branch layout with branch and directory stacked) and preserves existing saved values. Closes #8430

  • Bug Fixes
    • Use a single source of truth via SidebarTabItemSettingsSnapshot for both SwiftUI and AppKit rows.
    • Add SidebarWorkspaceBranchDirectorySettings to encode the compatibility rule: legacy sidebar.branchVerticalLayout (Bool, default true) sets topology; sidebar.stackBranchDirectory only affects inline layout; vertical is always stacked.
    • Settings UI now computes the effective stacked state with SidebarCatalogSection.stacksBranchAndDirectory(...) and disables the toggle when vertical.
    • Derive workspace-detail flags, title wrapping, path mode, colors, and indicator positions from catalog-backed keys to prevent renderer drift.
    • No migrations; existing on-disk values are honored.
    • Tests verify both rows resolve identical layouts and respect stored preferences.

Written for commit 5bdac63. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added consistent sidebar settings for branch and directory display, including inline, vertical, and stacked layouts.
    • Sidebar workspace rows now share unified settings for branch information, paths, titles, and detail visibility.
    • Added support for displaying workspace details such as pull requests, Git status, logs, progress, ports, SSH, metadata, and agent activity according to preferences.
  • Bug Fixes

    • Improved handling of legacy sidebar preferences and ensured settings are applied consistently across sidebar views.
    • Disabled incompatible stacking controls when vertical branch layout is enabled.

@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cmux Building Building Preview, Comment Jul 18, 2026 9:58pm
cmux-staging Building Building Preview, Comment Jul 18, 2026 9:58pm

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The sidebar now resolves branch-directory and workspace-detail preferences through shared settings snapshots. SwiftUI and AppKit rendering consume the same structured layout, placement, visibility, and agent-activity values, with tests covering defaults and stored preferences.

Sidebar settings parity

Layer / File(s) Summary
Shared settings contracts
Packages/macOS/CmuxSettings/..., Sources/SidebarWorkspace..., Sources/SidebarTabItemSettingsSnapshot.swift, Sources/CmuxSettingsJSONPathSupport.swift, cmux.xcodeproj/project.pbxproj
Adds structured branch-directory and detail settings, centralizes catalog-derived defaults, and extracts the tab-item settings snapshot.
Sidebar rendering integration
Packages/macOS/CmuxSettingsUI/..., Sources/SidebarWorkspaceSnapshotFactory.swift, Sources/ContentView.swift, Sources/Sidebar/AppKitList/...
Uses shared layout and placement enums for snapshot generation and row rendering, and derives agent activity from the settings snapshot with feature-flag gating.
Cross-renderer parity validation
cmuxTests/SidebarAppKitRowCellTests.swift
Verifies matching SwiftUI/AppKit defaults, stored layout preferences, placement behavior, title/path settings, and workspace-detail visibility.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UserDefaults
  participant SettingsSnapshot
  participant SnapshotFactory
  participant SwiftUI Sidebar
  participant AppKit Row
  UserDefaults->>SettingsSnapshot: resolve sidebar preferences
  SettingsSnapshot->>SnapshotFactory: provide branch and detail settings
  SnapshotFactory->>SwiftUI Sidebar: build sidebar snapshot
  SnapshotFactory->>AppKit Row: provide row settings and branch data
  SwiftUI Sidebar->>AppKit Row: render matching layout values
Loading

Possibly related issues

  • Issue 8409: The changes update AppKit workspace-row rendering and shared settings consumption in the same area as the reported SwiftUI/AppKit parity gaps.

Possibly related PRs

Suggested reviewers: lawrencecchen, azooz2003-bit


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Cmux Swift Package Boundaries ❌ Error FAIL: The PR adds pure, shared settings/value types in app-target Sources/ (SidebarTabItemSettingsSnapshot, branch/detail settings) instead of a package target. Extract the pure sidebar settings structs to Packages/macOS/CmuxSidebar starting with public struct SidebarWorkspaceBranchDirectorySettings (and sibling detail settings), leaving only UI composition in app Sources/.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly captures the main change: fixing AppKit sidebar settings fidelity.
Description check ✅ Passed The description is detailed and covers summary, compatibility rules, verification, and related scope; only the demo video/checklist are partially filled.
Linked Issues check ✅ Passed The PR matches #8430 by restoring stacked default layout, preserving saved legacy values, and auditing related sidebar settings.
Out of Scope Changes check ✅ Passed The added snapshot types, UI wiring, tests, and project updates all support the sidebar settings fidelity fix and appear in scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Cmux Swift Actor Isolation ✅ Passed New settings structs are plain value types, and the only factory/store using them is explicitly @MainActor; no new mutable Sendable refs or off-main UI access.
Cmux Swift Blocking Runtime ✅ Passed Diff only adds pure boolean helpers and UI binding changes; no semaphores, waits, sleeps, sync calls, or locks were introduced.
Cmux Browser Automation Off-Main ✅ Passed PR only changes sidebar settings files; no browser automation commands, WebKit waits, or routing changes are touched.
Cmux Expensive Synchronous Load ✅ Passed The patch only changes sidebar preference resolution; changed files contain no RestorableAgentSessionIndex.load(), transcript/JSONL, or other heavy agent-history loads.
Cmux Cache Substitution Correctness ✅ Passed PASS: the settings snapshot rebuilds from UserDefaults on didChangeNotification, and the row snapshot cache is transient with settings-fingerprint invalidation, so no stale cache substitution.
Cmux No Hacky Sleeps ✅ Passed PASS: Diff only changes Swift sources/tests and project wiring; no TS/JS/shell/build/runtime code or fixed waits were added, so the rule isn't implicated.
Cmux Algorithmic Complexity ✅ Passed PASS: changes are O(1) settings lookups plus one per-workspace pass; no new nested scans, repeated sorts/filters, or batch rescans on scalable collections.
Cmux Swift Concurrency ✅ Passed Diff only adds synchronous settings-resolution logic; exact patch introduces no DispatchQueue, Task, completion-handler, or Combine async patterns.
Cmux Swift @Concurrent ✅ Passed No new @concurrent/nonisolated async misuse appears in the touched Swift code; the PR changes are synchronous settings/view wiring.
Cmux Swiftpm Lockfiles ✅ Passed Diff only changes Swift sources; no Package.swift, Package.resolved, .gitignore, or pbxproj dependency files were modified.
Cmux Swift Logging ✅ Passed The PR diff adds no print/debugPrint/dump/NSLog, no new Logger usage, and no sensitive-data logging in production Swift code.
Cmux User-Facing Error Privacy ✅ Passed PASS: The PR’s changed lines are settings/layout plumbing only; the full range adds no user-facing error/alert copy or raw upstream data exposure.
Cmux Full Internationalization ✅ Passed Touched code only reshapes settings logic; no new user-facing copy, catalog, Info.plist, or web locale changes were introduced.
Cmux Swiftui State Layout ✅ Passed The only SwiftUI diff is SidebarSection’s toggle/subtitle wiring; it reuses existing @State models and adds no new ObservableObject, GeometryReader, lazy-row store refs, or render-time mutation.
Cmux Architecture Rethink ✅ Passed Shared immutable sidebar settings snapshots centralize ownership; I found no new timing hacks or split lifecycle wiring in the changed code.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed Diff only changes sidebar settings helpers; no NSWindow/NSPanel/WindowGroup code or cmuxAuxiliaryWindowIdentifiers ownership was added or altered.
Cmux Source Artifacts ✅ Passed All changed paths are hand-written Swift source, tests, or project config; no logs, screenshots, build output, caches, temp dirs, or dependency checkouts appear in the diff.
Cmux No Test Or Debug Seam In Production Source ✅ Passed Diff vs merge-base adds only settings/layout refactors; no new DEBUG/test-only seam names appear in changed production lines, and existing probe code is unchanged.
Cmux No Ambient Global State ✅ Passed Adds only a static helper on existing SidebarCatalogSection and a constructable settings struct; no new top-level funcs, globals, or singletons.
✨ 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 issue-8430-sidebar-settings-fidelity

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.

@austinywang
austinywang merged commit 6849b93 into main Jul 18, 2026
7 of 10 checks passed

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

🤖 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 `@cmuxTests/SidebarAppKitRowCellTests.swift`:
- Line 69: Update the test fixture helpers supplying showsAgentActivity to
require both resolvedSettings.details.showAgentActivity and
isSidebarWorkspaceAgentSpinnerEnabled, matching the production feature gate.
Apply the same change to both referenced fixture locations and preserve the
existing preference-based behavior otherwise.
- Around line 243-355: Update the tests around makeSwiftUIRow and makeModel to
inspect generated presentation/row content rather than only comparing propagated
settings. Add representative assertions for vertical, inline-stacked, and
inline-combined branch layouts, plus path and workspace-detail rendering, so
each renderer’s behavior is validated when settings vary.
🪄 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: b2323363-3413-4005-9aad-639e2afa08b0

📥 Commits

Reviewing files that changed from the base of the PR and between 533e27d and 5bdac63.

📒 Files selected for processing (11)
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Keys/SidebarCatalogSection.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/SidebarSection.swift
  • Sources/CmuxSettingsJSONPathSupport.swift
  • Sources/ContentView.swift
  • Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCellView.swift
  • Sources/SidebarTabItemSettingsSnapshot.swift
  • Sources/SidebarWorkspaceBranchDirectorySettings.swift
  • Sources/SidebarWorkspaceDetailSettings.swift
  • Sources/SidebarWorkspaceSnapshotFactory.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/SidebarAppKitRowCellTests.swift

Comment thread cmuxTests/SidebarAppKitRowCellTests.swift
Comment thread cmuxTests/SidebarAppKitRowCellTests.swift
@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR consolidates sidebar settings resolution into a single immutable SidebarTabItemSettingsSnapshot shared by both SwiftUI and AppKit sidebar row renderers. It also restores the correct fresh-install default (vertical/stacked branch layout), replaces raw UserDefaults key strings and hardcoded defaults throughout the AppKit path with catalog-backed equivalents, and adds the two-setting compatibility contract for the legacy branchVerticalLayout and the newer stackBranchDirectory preferences.

  • Extracts SidebarWorkspaceBranchDirectorySettings and SidebarWorkspaceDetailSettings as catalog-backed value types shared by both renderers, preventing the drift that caused the fidelity bug.
  • Adds SidebarCatalogSection.stacksBranchAndDirectory(vertical:explicit:) to centralise the vertical || explicit resolution logic and wires it into the Settings UI toggle so the displayed state matches the effective layout.
  • Removes the standalone @LiveSetting(\.sidebar.showAgentActivity) from VerticalTabsSidebar; reactivity is preserved because SidebarTabItemSettingsStore already re-builds its @Published snapshot on every UserDefaults.didChangeNotification.

Confidence Score: 4/5

The change is well-tested and architecturally sound — SidebarTabItemSettingsStore observes all UserDefaults changes, so every setting that moved into the shared snapshot (including showAgentActivity) still drives SwiftUI re-renders correctly.

Three extension methods in CmuxSettingsJSONPathSupport.swift create a fresh SidebarCatalogSection() when the enum's private static let sidebar is accessible in the same file; this is a minor inconsistency rather than a correctness problem. No actor isolation issues, no blocking primitives, no raw key or default drift, and the two-setting compatibility contract is correctly encoded and tested.

The three utility methods in CmuxSettingsJSONPathSupport.swift (showPullRequestsValue, showBranchDirectoryValue, watchGitStatusValue) could reuse the existing private static instead of allocating fresh instances, but this has no correctness impact.

Important Files Changed

Filename Overview
Sources/SidebarTabItemSettingsSnapshot.swift New file: immutable projection of all sidebar settings consumed by both renderers; moves snapshot initialisation out of ContentView and onto catalog-backed paths
Sources/SidebarWorkspaceBranchDirectorySettings.swift New value type: resolves legacy branchVerticalLayout + explicit stackBranchDirectory into typed BranchLayout / BranchDirectoryPlacement enums, encapsulating the two-setting compatibility contract
Sources/SidebarWorkspaceDetailSettings.swift New value type: catalog-backed workspace detail preferences shared across both row models, replacing nine independent raw-key reads in the old AppKit path
Sources/CmuxSettingsJSONPathSupport.swift Replaces hardcoded default values and raw key strings in SidebarWorkspaceDetailDefaults with catalog-backed equivalents; three extension methods still allocate a fresh SidebarCatalogSection() when the private static sidebar is available in the same file
Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/SidebarSection.swift Updates the Stack Branch and Directory toggle to show the resolved effective value (vertical
cmuxTests/SidebarAppKitRowCellTests.swift Adds five new regression tests covering default stacked layout, legacy layout override, explicit placement, path/title-wrap sharing, and per-key detail defaults and stored overrides across both renderers
Sources/ContentView.swift Removes the old inline SidebarTabItemSettingsSnapshot definition and the redundant @LiveSetting for showAgentActivity; all three showsAgentActivity call sites now read from the shared snapshot
Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCellView.swift Replaces raw usesVerticalBranchLayout / stacksBranchAndDirectory Bool flags with typed enum comparisons from the shared branchDirectory settings object
Sources/SidebarWorkspaceSnapshotFactory.swift Three branch-layout guards updated from Bool comparisons to typed enum comparisons; no logic changes
cmux.xcodeproj/project.pbxproj Adds the three new source files to the project; no new package dependencies introduced

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    UD[UserDefaults]
    STORE[SidebarTabItemSettingsStore\nObservableObject]
    SNAP[SidebarTabItemSettingsSnapshot\nEquatable struct]
    BD[SidebarWorkspaceBranchDirectorySettings\nbranchLayout · branchDirectoryPlacement]
    DD[SidebarWorkspaceDetailSettings\nshowAgentActivity · showSSH · etc.]
    CAT[SidebarCatalogSection\nDefaultsKey definitions\nstacksBranchAndDirectory]

    UD -->|didChangeNotification| STORE
    STORE -->|refreshSnapshot| SNAP
    CAT --> BD
    CAT --> DD
    BD --> SNAP
    DD --> SNAP

    SNAP --> SWIFTUI[TabItemView\nSwiftUI renderer]
    SNAP --> APPKIT[SidebarWorkspaceRowTableCellView\nAppKit renderer]
    SNAP --> FACTORY[SidebarWorkspaceSnapshotFactory]

    style CAT fill:#e8f4e8
    style SNAP fill:#dbeafe
    style BD fill:#dbeafe
    style DD fill:#dbeafe
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    UD[UserDefaults]
    STORE[SidebarTabItemSettingsStore\nObservableObject]
    SNAP[SidebarTabItemSettingsSnapshot\nEquatable struct]
    BD[SidebarWorkspaceBranchDirectorySettings\nbranchLayout · branchDirectoryPlacement]
    DD[SidebarWorkspaceDetailSettings\nshowAgentActivity · showSSH · etc.]
    CAT[SidebarCatalogSection\nDefaultsKey definitions\nstacksBranchAndDirectory]

    UD -->|didChangeNotification| STORE
    STORE -->|refreshSnapshot| SNAP
    CAT --> BD
    CAT --> DD
    BD --> SNAP
    DD --> SNAP

    SNAP --> SWIFTUI[TabItemView\nSwiftUI renderer]
    SNAP --> APPKIT[SidebarWorkspaceRowTableCellView\nAppKit renderer]
    SNAP --> FACTORY[SidebarWorkspaceSnapshotFactory]

    style CAT fill:#e8f4e8
    style SNAP fill:#dbeafe
    style BD fill:#dbeafe
    style DD fill:#dbeafe
Loading

Reviews (1): Last reviewed commit: "fix: honor legacy stacked sidebar layout" | Re-trigger Greptile

Comment on lines 49 to 59
static func showPullRequestsValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: showPullRequestsKey, defaultValue: showPullRequests)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().showPullRequests)
}

static func showBranchDirectoryValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: showBranchDirectoryKey, defaultValue: showBranchDirectory)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().showBranchDirectory)
}

static func watchGitStatusValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: watchGitStatusKey, defaultValue: watchGitStatus)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().watchGitStatus)
}

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 These three extension methods each allocate a fresh SidebarCatalogSection() and a fresh UserDefaultsSettingsClient, while the private sidebar instance declared in the enum body is accessible from same-file extensions and already caches the catalog keys. Reusing the shared instance avoids the redundant allocation.

Suggested change
static func showPullRequestsValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: showPullRequestsKey, defaultValue: showPullRequests)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().showPullRequests)
}
static func showBranchDirectoryValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: showBranchDirectoryKey, defaultValue: showBranchDirectory)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().showBranchDirectory)
}
static func watchGitStatusValue(defaults: UserDefaults) -> Bool {
boolValue(defaults: defaults, key: watchGitStatusKey, defaultValue: watchGitStatus)
UserDefaultsSettingsClient(defaults: defaults).value(for: SidebarCatalogSection().watchGitStatus)
}
static func showPullRequestsValue(defaults: UserDefaults) -> Bool {
UserDefaultsSettingsClient(defaults: defaults).value(for: sidebar.showPullRequests)
}
static func showBranchDirectoryValue(defaults: UserDefaults) -> Bool {
UserDefaultsSettingsClient(defaults: defaults).value(for: sidebar.showBranchDirectory)
}
static func watchGitStatusValue(defaults: UserDefaults) -> Bool {
UserDefaultsSettingsClient(defaults: defaults).value(for: sidebar.watchGitStatus)
}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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 in 029b2fd. The three helpers now reuse SidebarWorkspaceDetailDefaults.sidebar rather than constructing another SidebarCatalogSection.

— Claude Code

This branch was successfully deployed

1 active deployment
Preview – cmux — 5bdac630 Deployed Jul 19, 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

1 participant