Repository navigation
cmux-next: split the sidebar footer out of SidebarView.swift (god-file red) - #18384
Conversation
SidebarView.swift reached 404 lines after the footer Back change, over the 400-line limit, so check-no-godfiles failed on feat-cmux-next. setAccessory(_:for:) joins the Back code in SidebarView+Footer.swift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Found 1 test failure on Blacksmith runners: Failure
|
Summary
Fixes the
check-no-godfilesred on feat-cmux-next. After #18326,SidebarView.swiftis 404 lines, over the 400-line limit.setAccessory(_:for:)(the footer's accessory slots) moves out ofSidebarView.swiftinto the extension that already holds the footer's Back button.SidebarView+Back.swifttoSidebarView+Footer.swift.accessoriesdropsprivateso the extension can reach it. It's still internal to the module, likefooternext to it.SidebarView.swiftis now 393 lines.No behavior change.
Testing
check-no-godfiles: red on the tip (SidebarView.swift has 404 lines (limit 400)), green on this head.check-concurrency,check-crash-safetyandcheck-l10npass.swift buildand--build-tests: the fleet Swift suites step and the hosted PR CI on this head.Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Mechanical code move and visibility tweak with no logic changes; risk is limited to compile/link boundaries between extension files.
Overview
Shrinks
SidebarView.swiftbelow the 400-line god-file cap by moving footer-related API into a dedicated extension file.setAccessory(_:for:)is relocated from the mainSidebarViewtype intoSidebarView+Footer.swift(renamed fromSidebarView+Back.swift), alongside the existing Back button layout helpers. Theaccessoriesdictionary losesprivateso that extension can mutate it; visibility stays module-internal.public import AppKitis added on the footer file to match the moved public method. Comments now point atSidebarView+Footerinstead of+Back.No intended behavior or public API change—only file organization and line count (~404 → ~393).
Reviewed by Cursor Bugbot for commit 1b40355. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes the
check-no-godfilesred onfeat-cmux-nextby moving the footer'ssetAccessory(_:for:)method out ofSidebarView.swift, which had grown to 404 lines over the 400-line limit. The method joins the Back button code inSidebarView+Footer.swift(renamed fromSidebarView+Back.swift), andaccessoriesdropsprivatebut remains internal to the module. The moved file now usespublic import AppKitso the exposedsetAccessorysignature keeps itsNSViewtype visible to consumers. No behavior change.Written for commit 1b40355. Summary will update on new commits.