Skip to content

cmux-next: a DEBUG-only control that shows the Chief group in captures - #23638

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
chief-sidebar-2/chief-capture
Oct 21, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
chief-sidebar-2/chief-capture

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a DEV-only control method, debug.chief_workspaces, so a capture slot can show the Chief's sidebar group from #23391 and #23546. In a slot the app starts the Chief owner, but nothing starts subagents there, so the group is empty and draws nothing.

  • Same path as a person's New Workspace. It opens named workspaces on the local Chief machine through services.windows.createWorkspace(_:on:into:), the call behind the sidebar machine's New Workspace. It waits up to 30 s for the Chief owner to connect.
  • Params: open: [name] opens the named workspaces; command sets what each one runs, so a still can avoid showing the mini's shell prompt; collapse: Bool folds or opens the Chief group through the sidebar's own .toggleCollapse intent; card: Int shows the hover card of one opened workspace.
  • Compiled out of release builds, not just hidden at runtime. Server/ChiefCaptureControl.swift is wrapped in #if DEBUG as a whole, and its one registration sits inside AppControl's existing #if DEBUG block. tests/test_cmux_next_debug_only_controls.py pins both.
  • No new socket permissions. It is one more debug.* method on the existing router.
  • New tour: scripts/cmux-next/media/tours/chief-group.json.

The Chief group, expanded, from a capture slot through this method (open, command: cat, cwd: /tmp):

Capture steps-1d7dabed80 at 1c393a7ed552 (fleet build, capture mini, text checked for private data)

Light Dark
light dark

The folded group and both themes were captured too (local only); folding moves the list about 52 pt down, which is a separate fix. The right-click menu's "Started by Chief" item cannot be captured: debug.window_snapshot takes only the main window, and an NSMenu is a separate window. I have not worked around that.

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

Adds debug.chief_workspaces, a DEBUG-only control that lets a capture slot show the Chief's sidebar group, which is otherwise empty because nothing starts subagents there.

The control opens named workspaces through the same createWorkspace path as the sidebar's New Workspace, waits on an observation for the Chief owner (up to a 60 s deadline), and can fold the group or show a row's hover card. A command and cwd param keep the mini's shell prompt and home path out of stills. The control and its registration sit inside #if DEBUG, so release builds compile them out; tests/test_cmux_next_debug_only_controls.py pins both and now runs in CI. Adds a tour at scripts/cmux-next/media/tours/chief-group.json.

Written for commit e2f1d90. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 3 commits October 21, 2026 11:34
debug.chief_workspaces opens named workspaces on the local Chief machine
through the same createWorkspace path as the sidebar's New Workspace,
folds or opens the Chief group, and shows a row's hover card, so a
capture slot can show the Chief group. The file and its registration are
compiled out of release builds; a guard test pins both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-9c97-76c3-88d7-6d0422d2fadc&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review e2f1d90: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23638 -f ref=chief-sidebar-2/chief-capture -f platform=macos -f backend_mode=local

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

CI passes on e2f1d9060d (run 39661397982 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.

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on e07aaec to compare; do not merge until green; see lane-rules

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by chief-sidebar-2 on cosmic-gray · session

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 9 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp4b1pqo16/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmppduzzhbj/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_a_file_a_test_reads_selects_that_test (main.PullRequestTiers.test_a_file_a_tes
t_reads_selects_that_test)/
test_a_file_a_test_reads_selects_that_test (main.PullRequestTiers.test_a_file_a_tes
t_reads_selects_that_test)
View Logs
test_a_shared_module_selects_its_dependents (main.PullRequestTiers.test_a_shared_mo
dule_selects_its_dependents)/
test_a_shared_module_selects_its_dependents (main.PullRequestTiers.test_a_shared_mo
dule_selects_its_dependents)
View Logs

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

Registers tests/test_cmux_next_debug_only_controls.py (linux-guard) and
runs it in cmux-next guards; a registration in an #else branch no longer
counts as DEBUG-only. The Chief wait stops on cancellation, and the tour
gives the Chief owner 10 s to connect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-9c97-76c3-88d7-6d0422d2fadc&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-bdgvo created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at e2f1d90. Remaining reds are base reds: cmux-next checks fails only on Tier routing (and the ChiefWorkspaceName namespace lint, fixed by #23678), and crash-class rules flags HomeSidebarSplitView+Drop.swift:11, a base file. Fast gates pass; the app compiles on the fleet.

@teamleaderleo
teamleaderleo merged commit 7453db1 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the chief-sidebar-2/chief-capture branch October 21, 2026 19:46
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…23684)

* test(next): folding the Chief group keeps every sidebar section once

Red: with the sidebar document active, the Chief group's chevron
(.toggleCollapse(.section)) makes SidebarModel arrange its already
arranged sections again. The document's sections above the machine
lists come twice, and the second copy takes their rows, so the list
drops by their height (~52 pt in #23638's folded captures).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-3a52-79c2-936b-9d51b5b12a8c&host=cosmic-gray

* fix(next): folding a sidebar section folds it, not the whole list again

A section fold (the Chief group's chevron, a selection opening a folded
section) applied the window's collapsed sections by passing the shown,
already arranged sections back into setSections. With the sidebar
document active, setSections arranges its input, and arranging an
arranged list inserts the document's sections above the machine lists a
second time. The second copy took their rows (the layout keeps the last
row per key), so the list dropped by their height and the top showed an
empty band (#23638's folded captures: Home at y 96, not 44). A fold now
toggles isCollapsed on the shown list as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-3a52-79c2-936b-9d51b5b12a8c&host=cosmic-gray

* refactor(next): the section fold helper lives in SidebarModel+Folding.swift

SidebarModel.swift is over the god-file ceiling on the base (566 lines);
the fold fix grew it to 573. The helper moves to its own file; the model
is 562 lines now. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba2-3a52-79c2-936b-9d51b5b12a8c&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
The base merge brought +1103 more App lines from 26 commits since fee17be;
the cap is the count at the merged head, and the baseline names the largest
(#23651 +305, #23155 +285, #23527 +132, #23324 +92, #23638 +82, #23492 +57,
#23588 +53, #23109 +48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…h (app size base red) (#23540)

* cmux-next: raise the CmuxNextApp size cap to 134745, naming the growth (app size base red)

check-app-size.sh is red on every feat-cmux-next push: "CmuxNextApp is capped
at 128667 lines (now 134745, +6078)". The cap was set at 7817f10; since
then 203 first-parent commits changed the target, net +6078. None of it is
generated or dead (types checked for references across Packages/macOS); it is
feature code, +4040 of it direct pushes (Files and Find +1795) and +2038 from
PRs. The baseline comment names the largest.

Follow-ups that would pay it back (SW14): FileExplorer/ (22 files, 1647 lines)
into its own target with CmuxNextFiles.FolderWatcher instead of its own FSEvents
stream, and BrowserDownloadsPopup.swift (468) out of the App target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray

* cmux-next: the App size cap is the count at ae0d9b7 (135848)

The base merge brought +1103 more App lines from 26 commits since fee17be;
the cap is the count at the merged head, and the baseline names the largest
(#23651 +305, #23155 +285, #23527 +132, #23324 +92, #23638 +82, #23492 +57,
#23588 +53, #23109 +48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e2f1d906 Deployed Oct 21, 2026 by teamleaderleo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant