Add sidebar status and edge fade settings - #6763
austinywang wants to merge 27 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds two sidebar settings for workspace status presentation and scroll-edge fade strength, and wires them through settings storage, UI, search metadata, JSON handling, and sidebar rendering. ChangesSidebar appearance settings
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 errors, 2 warnings)
✅ Passed checks (21 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (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. Comment |
Greptile SummaryThis PR adds two sidebar appearance settings and wires them through the app and config surfaces.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (23): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
There was a problem hiding this comment.
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/ExtensionSidebarWorkspaceRowView.swift`:
- Around line 137-155: The status dot color logic in agentStatusColor(for:) is
parsing localized subtitle text, so it fails for non-English locales. Update
ExtensionSidebarWorkspaceRowView to stop inferring state from the rendered
subtitle and instead use a structured status value from CmuxSidebarProviderRow;
add an optional status field (mirroring ChatAgentState) to that model and
populate it from the provider side. Then have agentStatusColor(for:) switch on
that typed status rather than matching English keywords in subtitle text.
🪄 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: 2dd49a62-cc47-49ec-8b21-cca2fb2466a8
📒 Files selected for processing (21)
Packages/macOS/CmuxSettings/Sources/CmuxSettings/Keys/SidebarCatalogSection.swiftPackages/macOS/CmuxSettings/Sources/CmuxSettings/Values/SidebarScrollEdgeFadeStyle.swiftPackages/macOS/CmuxSettings/Sources/CmuxSettings/Values/SidebarWorkspaceStatusStyle.swiftPackages/macOS/CmuxSettings/Tests/CmuxSettingsTests/UserDefaultsSettingsClientTests.swiftPackages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swiftPackages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/SidebarSection.swiftPackages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Values/SidebarScrollEdgeFadeStyle+Display.swiftPackages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Values/SidebarWorkspaceStatusStyle+Display.swiftResources/Localizable.xcstringsSources/CmuxSettingsJSONPathSupport.swiftSources/ContentView.swiftSources/ExtensionSidebarWorkspaceRowView.swiftSources/KeyboardShortcutSettingsFileStore+Template.swiftSources/KeyboardShortcutSettingsFileStore.swiftSources/SettingsNavigation.swiftSources/SettingsSearchAliases.swiftSources/SidebarScrim.swiftcmuxTests/SidebarWidthPolicyTests.swiftweb/data/cmux.schema.jsonweb/messages/en.jsonweb/messages/ja.json
There was a problem hiding this comment.
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/ContentView.swift`:
- Around line 11705-11712: The
`extensionSidebarWorkspaceAgentLifecycleStatesById(for:)` implementation is
doing a full `tabManager.tabs.first(where:)` scan inside the loop over `rows`,
causing repeated O(rows × tabs) work on a render path. Precompute a `[UUID:
Workspace]` lookup from `tabManager.tabs` once at the start of the method, then
use that index for constant-time workspace retrieval before calling
`extensionSidebarAgentLifecycleState(for:)`, keeping the existing deduplication
by `statesById`.
🪄 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: 7549af80-5563-483a-8a5a-64d12a24f5cf
📒 Files selected for processing (3)
Sources/ContentView.swiftSources/ExtensionSidebarWorkspaceRowView.swiftSources/Workspace.swift
There was a problem hiding this comment.
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/ContentView.swift`:
- Around line 11705-11710: Avoid rebuilding the workspace index inside
extensionSidebarWorkspaceAgentLifecycleStatesById, since it rescans all tabs on
every extensionSidebarSection render. Reuse the existing workspace lookup from
renderContext.workspaceById (or build it once at the call site) and pass that
map into this helper so the lookup work is not repeated for each section.
🪄 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: 0dbe70d9-0519-4c51-97fe-752d3d71a1f9
⛔ Files ignored due to path filters (1)
.github/swift-file-length-budget.tsvis excluded by!**/*.tsv
📒 Files selected for processing (1)
Sources/ContentView.swift
…b-status-shadow # Conflicts: # .github/swift-file-length-budget.tsv
This comment has been minimized.
This comment has been minimized.
…b-status-shadow # Conflicts: # .github/swift-file-length-budget.tsv # tests/test_claude_wrapper_user_binary_resolution.py
Closes #6760
Summary
Before / After
Validation
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds two opt‑in sidebar appearance settings and a compact status‑dot display driven by live agent lifecycle. Dot mode prioritizes “needs input,” preserves provider subtitles via
subtitleRole, and edge fades can be tuned or turned off.New Features
sidebar.workspaceStatusStyle(Sentence/Dot) andsidebar.scrollEdgeFade(Full/Subtle/Off), wired through Settings UI, search anchors/aliases, defaults,cmux.jsontemplate, JSON import/export, and schema enums/localizations.subtitleRole: .agentStatus; rows collapse to one line when there’s no provider subtitle. Edge fades scale by style and fully disable when Off.CmuxSidebarProviderRow.subtitleRolewith.agentStatus; workspace snapshots exposeagentStatusandagentStatusTextfor the dot’s accessible label.Bug Fixes
process.env.CMUX_PUSH_RATE_LIMIT_ID, falls back toenv, applies to rate‑limit checks, and logs when missing/not found.Written for commit 0f7ebfd. Summary will update on new commits.
Summary by CodeRabbit