Skip to content

cmux-next: split the sidebar footer out of SidebarView.swift (god-file red) - #18384

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
op-next-sidebar-godfile-split
Oct 7, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
op-next-sidebar-godfile-split

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the check-no-godfiles red on feat-cmux-next. After #18326, SidebarView.swift is 404 lines, over the 400-line limit.

  • setAccessory(_:for:) (the footer's accessory slots) moves out of SidebarView.swift into the extension that already holds the footer's Back button.
  • That file is renamed from SidebarView+Back.swift to SidebarView+Footer.swift.
  • accessories drops private so the extension can reach it. It's still internal to the module, like footer next to it.
  • No baseline entry. SidebarView.swift is 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-safety and check-l10n pass.
  • Merged-head swift build and --build-tests: the fleet Swift suites step and the hosted PR CI on this head.

Changelog

none

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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.swift below the 400-line god-file cap by moving footer-related API into a dedicated extension file.

setAccessory(_:for:) is relocated from the main SidebarView type into SidebarView+Footer.swift (renamed from SidebarView+Back.swift), alongside the existing Back button layout helpers. The accessories dictionary loses private so that extension can mutate it; visibility stays module-internal. public import AppKit is added on the footer file to match the moved public method. Comments now point at SidebarView+Footer instead 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-godfiles red on feat-cmux-next by moving the footer's setAccessory(_:for:) method out of SidebarView.swift, which had grown to 404 lines over the 400-line limit. The method joins the Back button code in SidebarView+Footer.swift (renamed from SidebarView+Back.swift), and accessories drops private but remains internal to the module. The moved file now uses public import AppKit so the exposed setAccessory signature keeps its NSView type visible to consumers. No behavior change.

Written for commit 1b40355. Summary will update on new commits.

View guided diff Turn on auto-fix

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>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0e42828f-378c-428b-863d-77226b7fc529

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Not verified: macOS jobs did not run: compile and app tests were skipped on 1b40355112; ci-status is green without them.

CI passes on 1b40355112 (run 37627895708 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@blacksmith-sh

This comment has been minimized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@blacksmith-sh

blacksmith-sh Bot commented Oct 7, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo
teamleaderleo merged commit 9751eea into feat-cmux-next Oct 7, 2026
59 of 63 checks passed
@teamleaderleo
teamleaderleo deleted the op-next-sidebar-godfile-split branch October 7, 2026 13:38
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