Repository navigation
Unify Files and Find in the right sidebar - #8016
austinywang wants to merge 50 commits into
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
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:
📝 WalkthroughWalkthroughFiles and Find are combined into one right-sidebar pane. Find remains an activation alias of Files, with scoped queries, filename filtering, unified focus routing, grouped results, localization, and integration coverage. ChangesUnified file explorer
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant MainWindowFocusController
participant RightSidebarPanelView
participant FileExplorerContainerView
participant FileSearchController
MainWindowFocusController->>RightSidebarPanelView: activate Files or Find
RightSidebarPanelView->>FileExplorerContainerView: present unified explorer
FileExplorerContainerView->>FileSearchController: submit content search request
FileSearchController-->>FileExplorerContainerView: publish grouped search snapshot
MainWindowFocusController->>FileExplorerContainerView: focus outline or search field
Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (5 errors, 1 warning)
✅ Passed checks (19 passed)
✨ Finishing Touches🧪 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 combines Files and Find in one right-sidebar explorer. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (33): Last reviewed commit: "Reuse in-flight filename filter work" | Re-trigger Greptile |
| guard row >= 0, row < searchSnapshot.results.count else { return nil } | ||
| let result = searchSnapshot.results[row] |
There was a problem hiding this comment.
Grouping Depends On Result Order
The adjacency check groups matches correctly only when every result for a file is contiguous. If the search producer interleaves paths while streaming or ranking results, the same file starts multiple groups, repeats its header, and receives inconsistent row heights; either enforce path-contiguous ordering before this point or carry explicit group boundaries in the snapshot.
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/FileExplorerView.swift`:
- Around line 868-870: Update the search bar height condition in the
font-magnification layout path to require that searchBarView is not hidden,
alongside the existing visibility checks. Ensure searchBarVisibleHeight is
applied only when the search field is actually active, preventing expansion
while content is empty or loading.
🪄 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: 7037ebcc-a65c-45da-bbbe-498936c9bd2e
📒 Files selected for processing (13)
Resources/Localizable.xcstringsSources/ContentView+RightSidebarCommandPalette.swiftSources/FileExplorerPanelPlacement.swiftSources/FileExplorerPanelPresentation.swiftSources/FileExplorerSearchResultCellView.swiftSources/FileExplorerState.swiftSources/FileExplorerView.swiftSources/MainWindowFocusController.swiftSources/RightSidebarMode+Availability.swiftSources/RightSidebarPanelView.swiftcmux.xcodeproj/project.pbxprojcmuxTests/RightSidebarRemoteCommandTests.swiftcmuxTests/UnifiedFileExplorerTests.swift
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
Sources/FileExplorerView.swift (1)
868-870: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix layout bug during font magnification in collapsed search state.
Using
presentation.keepsSearchFieldVisibleto forcefully apply the non-zerosearchBarVisibleHeightbypasses the content-loading checks inupdateSearchLayout(). If the font size changes when the workspace is empty or loading (i.e., whenshowSearchFieldevaluated tofalse), this logic erroneously expands the search bar height constraint without unhiding it, leaving a blank vertical gap at the top of the sidebar.Checking
!searchBarView.isHiddenensures the non-zero height is only applied when the search field is actually active.🐛 Proposed fix
- if presentation.keepsSearchFieldVisible || isSearchVisible { + if !searchBarView.isHidden { searchBarHeightConstraint?.constant = searchBarVisibleHeight }🤖 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/FileExplorerView.swift` around lines 868 - 870, Update the search bar height adjustment in the font-magnification layout path to require that searchBarView is not hidden, rather than relying on presentation.keepsSearchFieldVisible. Preserve the existing isSearchVisible condition and keep the visible height applied only when the search field is actually active.
🤖 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/FileExplorerView.swift`:
- Line 958: Update the visibility transition handling around isSearchVisible to
cancel the active search when visibility changes from true to false, including
unified-to-files mode transitions. Preserve refreshSearchIfNeeded() for
false-to-true transitions and use the existing search cancellation mechanism.
---
Duplicate comments:
In `@Sources/FileExplorerView.swift`:
- Around line 868-870: Update the search bar height adjustment in the
font-magnification layout path to require that searchBarView is not hidden,
rather than relying on presentation.keepsSearchFieldVisible. Preserve the
existing isSearchVisible condition and keep the visible height applied only when
the search field is actually active.
🪄 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: d3355bdb-9a07-4bc8-b202-fda4ac0fd208
📒 Files selected for processing (3)
Sources/FileExplorerView.swiftSources/MainWindowFocusController.swiftcmuxTests/UnifiedFileExplorerTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
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 `@cmuxTests/UnifiedFileExplorerTests.swift`:
- Around line 54-56: Mark the UnifiedFileExplorerTests suite declaration with
the .serialized trait so tests accessing the shared UserDefaults.standard key
rightSidebar.mode run sequentially. Keep the existing suite name and test
behavior unchanged.
🪄 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: 0720798c-eece-437d-ac40-5bf3b89c6836
📒 Files selected for processing (4)
Resources/Localizable.xcstringsSources/FileExplorerSearchResultCellView.swiftSources/FileExplorerView.swiftcmuxTests/UnifiedFileExplorerTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Summary
/quick filtering of already-loaded file/folder names⌘⇧Eto the Files outline and⌘⇧Fto the Finder field; preservecmux right-sidebar files|findand command-palette behavior through the shared focus pathValidation
./scripts/reload.sh --tag issue-8011-unified-files-find-pane --launch(committed tagged Debug build succeeded and launched)/filename filtering, grouped content results,⌘⇧E,⌘⇧F,right-sidebar files, andright-sidebar findxcodebuild -quiet -project cmux.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -derivedDataPath /Users/austinwang/Library/Developer/Xcode/DerivedData/cmux-issue-8011-unit build(compile-only; passed)xcrun swiftc -frontend -parsefor all changed Swift files./scripts/check-pbxproj.sh./scripts/lint-pbxproj-test-wiring.shpython3 scripts/check-workspace-package-groups.py --checkpython3 scripts/check-package-resolved-policy.pypython3 scripts/lint-feature-flags.pypython3 scripts/swift_file_length_budget.py(all touched files are within budget; currentmainhas one unrelated +2-line baseline overrun inSources/App/WorkspaceRuntimeSettings.swift)Closes #8011