Skip to content

cmux NEXT sidebar: drag the Chief out to remove it; a Chief just added draws before its echo (2/2 of #23933) - #25420

Merged
teamleaderleo merged 19 commits into
feat-cmux-nextfrom
chief-sidebar-3/drag-out
Oct 30, 2026
Merged

teamleaderleo merged 19 commits into
feat-cmux-nextfrom
chief-sidebar-3/drag-out

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-21 (his exact words):

  • "WHERE IS CHIEF IN THE SIDEBAR WHERE IS CHIEF AS OPTIONAL GUI CAN YOU TALK TO CHIEF"
  • "IT ALREADY IS AFCCESSIBLE IN FUCKING HOME"
  • "IAM SAYHING TOFUCKIGN OPTIONALLY MOVE IT BACK AND FORTH ON THE FUCKING SIDEBAR"
  • "IT KINDA IS A FUCKING SIDEBAR ROW... BUT IT'S NOT ON BY DEFAULT YOU CAN JUST DRAG IN A CHIEF AND HAVE IT FUCKING BE DISPLAYED MOVED AROUND THE QUICK ACCESS THING OF IT LIKE A SPECIAL WORKSPACE"

Leo-ask: ask-02828fbad5
Leo-ask: ask-c2df0efe0c
Leo-ask: ask-97431a8bca
Leo-ask: ask-05fd281019

Part 2 of 2 carried over from #23933 (which conflicted with 3,309 base commits and failed base's new pre-push gates). Part 1 (drag in from Home, the look anywhere, the unread dot) is #25418, stacked on this PR: this one lands first. The Chief item stays off by default.

Sidebar owner: the sidebar-owner agent (a590). plans/cmux-next/sidebar-owner.md gets a log line in the fix commit (Sidebar-Look: trailers on both commits).

What changes

  • Drag out to remove. Drag the Chief past the sidebar's side and its card dims; release it out there and it comes off, as Remove from Sidebar does (from a list row, a top-rows tile, or the older top band). Released back over the sidebar, it stays: the release point decides, not the last move, also when the release goes to another cmux window or the desktop.
  • Remove from Sidebar finds it anywhere. In a group or a machine list too (the document at any depth).
  • One placement for every window. Whether the Chief counts as placed is the sidebar document as it draws, pending changes included, never one window's rows.
  • A Chief just added draws at once (cmux NEXT sidebar: drag the Chief in from Home, move it anywhere, drag it out to remove it #23933 review round 3, whose fixes were never reviewed there): the Chief has one item id (itm_chief), so the mirror's row names it. It draws, moves and comes off before the daemon's echo; a refused remove puts it back; a second add adds nothing; its label edit waits for the echo; no other built-in draws early.

Codex review rounds on this PR (BLOCK at 63cdbc7, 6ddfaa0, 1491f61, 79a0b66, 5490871, abd78b9 and f98744d; SHIP at c401d69; receipts below). What the pending Chief now does:

  • The store keeps each unechoed Chief change by intent key (SidebarPendingChief, parsed from the intent's item.add/section.add ops, or an undo's item.put/section.put). The drawn records use the newest one's fields and its section over any confirmed record, so a Chief removed and added again draws the new add.
  • It settles the way the mirror settles intents: by the echo's sidebar_doc marker key, by a stale batch, by a refusal or drop, and by the keys the mirror itself drops: a batch or a load settles exactly the changes it answers, so a load older than a change keeps it pending. A refusal settles the later Chief adds the mirror drops with it, and a load at the revision a reply named settles that answered change (an undo's put the mirror replays without dropping).
  • An undo that puts back the Chief's emptied group draws the Chief in it before the echo.
  • The older band leaving its window mid-drag ends the drag (card gone, tile shown, nothing removed).
  • While one waits, the planner refuses a label edit and the item menu leaves it out (tested through the real menu, before and after the echo).

Size: 1,207 changed lines (1,162+, 45−), over the 800 guide. About 640 of them are tests: each review round added a regression test. I kept the tests rather than cut coverage.

Gate findings fixed: the older band's deferred release check hops with a main-actor Task, not DispatchQueue.main.async. No new CmuxNextApp file: the drag-out wiring is in SidebarBridge.swift, the pending-edit menu rule in SidebarBridge+Sections.swift (+15 App source lines; the gate warns, refuses nothing).

Overlap (pr-overlap): #24371 (pinned workspaces as rows) touches SidebarSectionHandlers and SidebarDocProjection for a different change; #22626 (austinywang) touches SidebarListView+Drag.swift's finishDrag; #24513 (group rail) is merged.

Screenshots

A real app capture (cmux-ci capture, Blacksmith macOS). The Chief is added to the top rows, then its row is dragged past the sidebar's side with debug.mouse and held there, not released.

Light Dark
Before (base 3e15285: the row stays put, no lifted card) light dark
After (this PR, built at 1491f61; the head only changes the store: the Chief's card lifts and dims, the refused look, so a release out there takes it off) light dark

Changelog

Added: drag the Chief out beside the sidebar to take it off.

Observed / Not run

  • Pre-push gate at the head: no new violations (app-size warnings only).
  • Fleet steps (cmux-ci, package-test-lane): each red commit fails on the base it fixes (per round, in the comments); green and app compile at the head. Details in the comments below.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 26, 2026 09:34
…n before its echo (red)

ChiefTileDragOutTests and ChiefListedDragOutTests: the Chief dragged past the
sidebar's side comes off only when released out there (a tile, the older band,
a listed row; a release sent to another window still decides; an autoscroll
frame does not take it back). ChiefPendingRemoveTests: a Chief just added draws
and comes off before the daemon answers; one Chief; a refused remove keeps it;
no label edit until its echo; no other built-in draws early (#23933 round 3).
ChiefSidebarPlacementTests: placement is the document as it draws, not one
window's rows. Red: removesOnDragOut, the release point and the pending Chief
do not exist yet.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
…t added draws and comes off before its echo

Leo 2026-10-21: "IAM SAYHING TOFUCKIGN OPTIONALLY MOVE IT BACK AND FORTH ON THE
FUCKING SIDEBAR"

- The Chief dragged past the sidebar's side dims its card and its release out
  there takes it off (removesOnDragOut / onDragOutRemove, wired by the bridge to
  sidebar.item.removeEverywhere), from a list row, a top-rows tile or the older
  band. The release point decides, also when the release went to another window
  (the list's pointerEventSeen, the band's own release monitor; its one hop is a
  main-actor Task, not DispatchQueue.main.async).
- Remove from Sidebar finds the Chief in a group or a machine list (the
  document at any depth).
- Placement is the sidebar document as it draws, pending changes included
  (placesItem), so every window agrees and a second add adds nothing.
- The Chief has one item id (chiefItemID). Drawn by the mirror before the
  daemon's echo, it moves and comes off at once; a refused remove puts it back;
  its label edit waits for the echo; no other built-in draws early (#23933
  review round 3, never reviewed there).

Carried over from #23933 (chief-sidebar-2), resolved on today's base.

Sidebar-Look: Leo 2026-10-21 "OPTIONALLY MOVE IT BACK AND FORTH ON THE FUCKING SIDEBAR"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

1 similar comment
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo teamleaderleo added the dev-build Build a fleet dogfood build of each push (newest head under load) label Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

high-signal review link / link is red on 16 of 18 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fleet evidence for #25420:

  • Red at the test commit 9063cb4 (step chief-drag-out-red-9063cb482338): the test build fails as expected. removesOnDragOut, onDragOutRemove, Drag.removesOnDrop and placesItem do not exist yet.
  • Green at 63cdbc7 (step 24ab77e3eda7484ace0c70e7, aws-m4pro-5). All 11 suites passed: ChiefTileDragOutTests, ChiefListedDragOutTests, ChiefPendingRemoveTests, ChiefSidebarPlacementTests, MouseDownSelectsTests, SidebarHeldDragTests, SidebarListTilePressTests, SidebarTilePressTests, SidebarDocAppSectionAddTests, ChiefSidebarItemTests, SidebarLookContractTests.
  • App compile at 63cdbc7 passed (cmux-ci compile-check --app, job c05b3cd96cd597185a56726a).
  • Captures: same fleet bun 1.4.2 build failure as cmux NEXT sidebar: drag the Chief in from Home; anywhere it keeps its look and unread dot (1/2 of #23933) #25418; I'll retry.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra xhigh): BLOCK at 63cdbc7

  1. [P2] Removing and re-adding Chief mistakes the replacement for a confirmed item. Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore+PendingChief.swift:17,40: start with confirmed itm_chief whose label is hidden, remove it, then add it again after its optimistic disappearance but before the removal echo. The mirror accepts the replacement, but records still contains the old item. Consequently, the projection uses its old showsLabel, isPending returns false, and the menu offers label editing before the replacement’s echo. SidebarDocStore+LayoutOps.swift:143 also permits that edit. Pending status must distinguish the replacement from the earlier confirmed item.

  2. [P2] Chief remains invisible when its pending add creates a section. Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocProjection.swift:248: with no eligible top items section, Add Chief emits a section-add containing Chief. addingPendingChief supplies the item record but no section record. The projection’s fallback at lines 103–105 interprets the unknown section as a machine section, so Chief is assigned to a nonexistent machine instead of drawing in the top section. Until the echo, placesItem reports true while the card is unavailable to move or drag out. Project the pending containing section as well.

  3. [P2] The pending-label test does not verify the menu fix. Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/ChiefPendingRemoveTests.swift:81: the assertion calls SidebarBridge.pendingEdits directly. Removing .union(Self.pendingEdits(id)) from SidebarBridge+Sections.swift:221 leaves this test green while the real menu offers the rejected label action. Exercise the actual menu before and after the add echo.

Checked:

  • Supplied diff matches the pinned base/head; git diff --check passes.
  • Prior autoscroll, legacy-band removal, tile release-position, and cross-window release findings: fixed in the reviewed paths.
  • Prior document-wide and optimistic placement findings: addressed for existing sections; finding 2 identifies the remaining rendering mismatch.
  • Prior immediate pending removal, rapid duplicate adds, Chief-only early rendering, and refused-removal restoration: addressed for ordinary first-add scenarios.
  • Prior stale pending fields and dropped-label-edit findings, including 71daf297: incomplete for replacement adds (finding 1); menu-test coverage remains insufficient (finding 3).
  • Prior legacy monitor retention finding: weak captures and drag-end/window-detachment cleanup address it.
  • Prior file-size blockers: not repeated here. Dimming uses Motion.feedback; no new blocking calls, NotificationCenter observers, or stateful singletons found. The existing DispatchQueue.main.async site remains.
  • Earlier listed-status refresh, Home unread binding, and unread App-binding-test findings concern code outside this split’s changes; no fix is credited here.
  • Static review only; no macOS build or tests executed.

teamleaderleo added a commit that referenced this pull request Oct 26, 2026
…d makes its section (red)

#25420 review (Codex, 63cdbc7): a confirmed Chief removed and added again
before either echo drew the removed Chief's fields and offered a label edit;
a Chief whose add makes its top section drew in no section; and the label
test called pendingEdits, not the item menu. These tests use the real item
menu before and after the echo, the re-added Chief's fields, and an add into
an empty document. Red: the store keeps no record of the add itself.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 2c9c186: 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=pr25420 -f ref=chief-sidebar-3/drag-out -f platform=macos -f backend_mode=local

web and size checks: green

Tour of 652aebb508 (run)

Path-selected interactions

Interaction Changed paths
core Packages/macOS/CmuxNext/Sources/CmuxNextAgentLanes/SidebarModel\+TopItems.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/SidebarBridge\+Sections.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/SidebarBridge.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/SidebarSections/SidebarSectionHandlers.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocListing.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocProjection.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore\+LayoutOps.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore\+PendingChief.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarMirror.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/Sections/SidebarItemRowView.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/Sections/SidebarRegionView\+Drag.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/Sections/SidebarRegionView\+PointerEnd.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/Sections/SidebarRegionView.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListDrag.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView\+Drag.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView\+DragOut.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView\+Mouse.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView\+PointerEnd.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView.swift
Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/ChiefListedDragOutTests.swift
Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/ChiefPendingRemoveTests.swift
Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/ChiefSidebarPlacementTests.swift
Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/ChiefTileDragOutTests.swift
Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/MouseDownSelectsTests.swift

Core UI (before): DEGRADED — 20 ok, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Show the Tour workspace (a new workspace takes no focus) ok cmux workspace name:Tour focus
4 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
5 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
6 Split right ok cmux action run splitRight
7 Split down ok cmux action run splitDown
8 New terminal tab ok cmux action run newSurface
9 Browser tab ok cmux tab new-browser --url https://example.com
10 Hide the sidebar ok cmux action run toggleSidebar
11 Show the sidebar ok cmux action run toggleSidebar
12 Notification ok cmux notify --title Tour --body "Hello from CI"
13 Notifications panel ok cmux action run showNotifications
14 Agent chat ok cmux agent new-chat
15 Agent workspace ok cmux workspace new --name Agent
16 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
17 An agent works: row working spinner ok cmux workspace new --name Notes
18 The agent finishes: done mark in the spinner's place ok
19 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
20 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
21 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu
Screenshots (15)

1. Launch
Launch

2. New workspace
New workspace

4. Type in the terminal
Type in the terminal

5. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

6. Split right
Split right

7. Split down
Split down

8. New terminal tab
New terminal tab

9. Browser tab
Browser tab

10. Hide the sidebar
Hide the sidebar

12. Notification
Notification

13. Notifications panel
Notifications panel

14. Agent chat
Agent chat

17. An agent works: row working spinner
An agent works: row working spinner

18. The agent finishes: done mark in the spinner's place
The agent finishes: done mark in the spinner's place

19. Session tree: keycaps on the first rows
Session tree: keycaps on the first rows

### Core UI \(after\): DEGRADED — 20 ok, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Show the Tour workspace (a new workspace takes no focus) ok cmux workspace name:Tour focus
4 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
5 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
6 Split right ok cmux action run splitRight
7 Split down ok cmux action run splitDown
8 New terminal tab ok cmux action run newSurface
9 Browser tab ok cmux tab new-browser --url https://example.com
10 Hide the sidebar ok cmux action run toggleSidebar
11 Show the sidebar ok cmux action run toggleSidebar
12 Notification ok cmux notify --title Tour --body "Hello from CI"
13 Notifications panel ok cmux action run showNotifications
14 Agent chat ok cmux agent new-chat
15 Agent workspace ok cmux workspace new --name Agent
16 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
17 An agent works: row working spinner ok cmux workspace new --name Notes
18 The agent finishes: done mark in the spinner's place ok
19 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
20 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
21 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu
Screenshots (15)

1. Launch
Launch

2. New workspace
New workspace

4. Type in the terminal
Type in the terminal

5. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

6. Split right
Split right

7. Split down
Split down

8. New terminal tab
New terminal tab

9. Browser tab
Browser tab

10. Hide the sidebar
Hide the sidebar

12. Notification
Notification

13. Notifications panel
Notifications panel

14. Agent chat
Agent chat

17. An agent works: row working spinner
An agent works: row working spinner

18. The agent finishes: done mark in the spinner's place
The agent finishes: done mark in the spinner's place

19. Session tree: keycaps on the first rows
Session tree: keycaps on the first rows

Tours are data in scripts/cmux-next/media/tours: add a step or a tour file to show your feature.

@teamleaderleo
teamleaderleo force-pushed the chief-sidebar-3/drag-out branch from 2a89d56 to 6b79821 Compare October 26, 2026 10:37
teamleaderleo added a commit that referenced this pull request Oct 26, 2026
…d makes its section (red)

#25420 review (Codex, 63cdbc7): a confirmed Chief removed and added again
before either echo drew the removed Chief's fields and offered a label edit;
a Chief whose add makes its top section drew in no section; and the label
test called pendingEdits, not the item menu. These tests use the real item
menu before and after the echo, the re-added Chief's fields, and an add into
an empty document. Red: the store keeps no record of the add itself.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
teamleaderleo and others added 2 commits October 26, 2026 10:43
…d makes its section (red)

#25420 review (Codex, 63cdbc7): a confirmed Chief removed and added again
before either echo drew the removed Chief's fields and offered a label edit;
a Chief whose add makes its top section drew in no section; and the label
test called pendingEdits, not the item menu. These tests use the real item
menu before and after the echo, the re-added Chief's fields, and an add into
an empty document. Red: the store keeps no record of the add itself.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
…ields and section

The store keeps each unechoed Chief add by intent key (SidebarPendingChief,
parsed from the intent's ops), settled by its echo, a refusal, a drop or a
load. The drawn records take the newest add's item over a confirmed record
(a Chief removed and added again), and the section the add makes when there
was no top section; the planner refuses a label edit while any Chief add
waits, and the item menu leaves it out (isPending).

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next fast gates / post cmux-next/fast-gates is red on 16 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

teamleaderleo and others added 2 commits October 26, 2026 11:06
…ho, a reload, and an undo's put (red)

#25420 review (Codex, 6ddfaa0): the echo test sent its key at the batch's
top level, where the daemon never puts it (the sidebar_doc marker holds it);
a reload that holds an answered add left the Chief pending; and an undo's
section.put and item.put drew the Chief in no section with a default label.
Red: the store reads the key only at the top level, keeps answered adds over
a load, and parses only adds.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
An echo settles it by the first sidebar_doc marker's key, else the batch's
own, as the mirror reads it; a stale batch settles it too (its change is
already confirmed) and redraws. A load settles every Chief change sent before
it was asked for: the mirror drops a replayed one the document already holds.
An undo's section.put and item.put are parsed like adds.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra xhigh): BLOCK at 6ddfaa0

  1. [P2] Normal daemon echoes never settle the pending Chief. Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore+PendingChief.swift:103 reads only a top-level idempotency_key. The daemon sends that key inside the sidebar_doc change’s value; the bridge preserves this shape, and the Rust mirror reads it correctly. After an ordinary add echoes, confirmed records update but pendingChief remains populated. Consequently, isPending stays true, settledRecords excludes the confirmed Chief, and Show/Hide Label never returns. Pending fields also override later confirmed updates. ChiefPendingRemoveTests.swift:90 supplies an artificial top-level key, masking this failure.

  2. [P2] A reload can leave an already-settled Chief permanently pending. Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore.swift:138 clears pending metadata only for unanswered keys. Suppose an add receives a successful reply, then a reconnect snapshot includes it before its echo arrives. mirror.load drops the pending add during replay because its ID already exists, but its key is absent from unanswered, so Swift retains it. A subsequent stale echo returns at line 159 before cleanup. Even after fixing finding 1, this sequence permanently suppresses label editing and overlays stale fields on the loaded record. Reconcile the mirror’s settled/dropped keys on load and stale-batch paths, with corresponding projection invalidation.

  3. [P2] Undo bypasses the pending-record parser. Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Store/SidebarDocStore+PendingChief.swift:26 recognizes only section.add and item.add. The daemon’s undo inverses use section.put and item.put, submitted unchanged through SidebarDocStore.swift:278. Remove a custom section containing Chief, wait for confirmation, then undo: the mirror restores both records immediately, but the parser retains neither. The projection treats the unknown section as a machine section, leaving Chief invisible until the echo although placesItem reports true. Undoing only a hidden-label Chief similarly synthesizes a default visible-label item. The parser must cover the actual restoration operations.

Checked:

  • Supplied pr.diff and round2.diff exactly match their pinned commits; git diff --check passes.
  • Previous three blockers: direct replacement adds now use replacement fields and pending status; ordinary section-creating adds supply their section; the label test now exercises the actual menu. Echo and undo gaps remain above.
  • Prior cmux NEXT sidebar: drag the Chief in from Home, move it anywhere, drag it out to remove it #23933 drag findings: autoscroll stopping, list/tile release coordinates, legacy-band removal, and same-app cross-window release handling are addressed. The legacy monitor now uses weak captures and removes its registration on drag end/window detachment.
  • Prior document-wide/optimistic placement, nested removal, immediate pending removal, rapid duplicate adds, Chief-only early rendering, and refused-removal restoration are addressed in ordinary paths.
  • Prior stale-field/dropped-label findings: pending label actions are withheld and rejected by the planner; confirmed-state recovery remains defective as described above. Projection caching and pending-list lifetime were traced.
  • Prior file-size blockers are not repeated. Dimming uses Motion.feedback; no new blocking calls, NotificationCenter observers, or stateful singletons found. The DispatchQueue.main.async site already existed.
  • Earlier listed-status refresh, Home unread binding, and unread App-binding-test findings concern changes outside this split; no fix is credited here.
  • Static review only; no macOS build, test execution, or native event-delivery verification performed.

teamleaderleo and others added 2 commits October 26, 2026 11:40
…s (red)

#25420 review (Codex, 1491f61): a load settled every Chief change sent
before it, but the mirror replays the ones the loaded document does not
hold yet. A Chief removed and added again, both answered, then a reload
older than both: the Chief must stay the new add's, pending until its echo.
Red: the load clears its pending record.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
…rops

The mirror's JSON load and batch replies name the pending intents they
settled or dropped (`dropped`); the typed replies do not. A load (rare) now
uses the JSON call, and a batch does while a Chief change waits, so the
store keeps exactly the Chief changes the mirror still replays: no parsing
of the batch's key, no guess about what a load holds.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Default changes

This pull request changes 3 defaults at 2c9c1868eb5c (what everyone gets without configuring anything):

  • tunable-source.CmuxNextApp/SidebarSections/SidebarSectionHandlers.swift:bind: "ac5a4ec8e6167c79aab08c32ee64b6a58503ec345b873914be4ed93f79ce1d5e" -> "650e8c675cfc3fe1122e645cdc53e2ef681f004c98f2dadb44938e6ff23f9fc2"
  • tunable-source.CmuxNextApp/SidebarSections/SidebarSectionHandlers.swift:item: "e7f8ec06f6f3438799adecfd62288c5130023a574b78a407d06c0af0db3730a5" -> "8362938460163d0e8ce375de8e109c087838ba2cc5710d1ebc86e31f2469371f"
  • tunable-source.CmuxNextSidebar/Store/SidebarDocStore+PendingChief.swift:chiefItemID: (none) -> "d2eb0d09343ca8eb2c531eaa807dd06871890769505952197fd8a1c3a7f030ad"

Signed off on this commit by review (codex gpt-6-astra high, next-review).

Merge receipt: merged as 817e10c8b655 with these defaults changed, signed off by review (codex gpt-6-astra high, next-review).

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

teamleaderleo added a commit that referenced this pull request Oct 28, 2026
…) into chief-sidebar-3/drag-in

Four conflicts from base's changes, resolved by hand:
- SidebarSectionHandlers.swift: the Chief binds through this branch's
  `chiefHost`; base's removal of the other machines' chats binding
  (Lawrence 2026-10-26) is kept.
- SidebarBridge+Sections.swift: the item-info observation reads both
  base's preview-features flag (App Store visibility) and this branch's
  listed built-ins.
- SidebarView+Observation.swift: both base's needs-you refresh and this
  branch's listed-row info patch run.
- plans/cmux-next/sidebar-owner.md: every target and log row kept,
  base's first.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high): SHIP at 0414cff

  1. No merge-introduced defects found. Both hand resolutions preserve both sides’ intent.

Checked:

  • document: and pending Chief placement remain; remote: and remote top rows are removed.
  • Changed API callers in Sources and Tests match.
  • Bridge, handlers, document projection/planning, and drag paths remain compatible with base’s changes.
  • Both sidebar-owner log rows retained.
  • git diff --check passed. Source-only review; no build or tests run.

@blacksmith-sh

blacksmith-sh Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

Resolves the sidebar-owner.md log: base's rows first, then the Chief drag out row.

Sidebar-Look: no visual change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-ab89af9577307fdeceb7
@teamleaderleo teamleaderleo added the media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push label Oct 29, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, next-review): SHIP at 652aebb

No blocking findings.

Review was limited to the supplied diff and source files; tests were not run.

cmux-bot[bot]
cmux-bot Bot previously approved these changes Oct 29, 2026

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 652aebb: an independent review passed this exact head (next-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cmux-bot
cmux-bot Bot dismissed their stale review October 29, 2026 23:45

A newer verdict blocks 2c9c186 (no independent SHIP at the head).

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, next-review): SHIP at 2c9c186

No blocking findings.

@teamleaderleo
teamleaderleo merged commit 817e10c into feat-cmux-next Oct 30, 2026
146 of 152 checks passed
@teamleaderleo
teamleaderleo deleted the chief-sidebar-3/drag-out branch October 30, 2026 00:03
@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40977234399 at 817e10c failed: cmux-next checks (god files, concurrency, crash safety, l10n), cmux-next fleet Release compile.
Those jobs last passed at 94e3fa5. This pull request is one of 4 merged since: #26517, #26082, #25151, #25420.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40978245548 at e346d50 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at f101108. This pull request is one of 4 merged since: #25420, #25942, #24009, #24473.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

lawrencecchen added a commit that referenced this pull request Oct 30, 2026
…b9: 17 test errors)

- AccountsActionOutcomeTests: AccountsModel.saveKey answers through done: (awaited).
- AgentChatTargetAppTests: the nested Rig calls AgentChatTargetAppTests.chat.
- CloudMachineRepoTests+Completion: the flow task is Task<Void, any Error>; result.
- ComputerUseSetupTests: make(..., rig:) and Self.run(rig), as the file's other tests.
- MaskedScreenshotTests: @testable CmuxNextBrowser for WebKitEngine's test init.
- MultiWindowRestoreTests: mirrored(profile:on:) with the app's mainWork.
- PageBrowserTabDiscardTests: FollowingSource has trunk's frame(_:size:session:).
- PointerFrameDragSitesTests: onDragEnded takes the window point (trunk #25420).
Assertions unchanged.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 2c9c1868 Deployed Oct 29, 2026 by teamleaderleo via wait for same-key tree publisher #78959
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-build Build a fleet dogfood build of each push (newest head under load) media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant