Skip to content

cmux NEXT sidebar: the Priority view lists chats on remote and cloud machines - #23588

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
leo/priority-remote-chats
Oct 21, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
leo/priority-remote-chats

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Priority view ranked only this Mac's acpmux chats, the peers that acpmux mirrors, and the Chief home's subagents (AgentPriorityChats.stores = [.shared, .chief]). A chat on a Cloud VM, an SSH machine or a paired server that is not an acpmux peer never showed up.

It now also lists every agent chat tab on the other machines' daemon trees, the ones MachineRegistry already mirrors, and ranks them with this Mac's chats. The state of a remote chat comes from the notice that machine's own daemon posts on its tab (agent_chat_notices.rs, cx-sg1qz):

Unread notice on the tab Row
warning ("needs input") Needs you
error ("failed", "stopped responding") Failed, with the notice text as the error
info ("finished") Done (unseen result)
none Idle

That daemon clears its notices once the chat is seen or answered anywhere, so a remote row drops back to idle the same way. The row preview is the notice text (DaemonStore.notificationText(for:)). One limit: remote rows never show Working. A daemon tree carries no turn-in-progress state, and getting one would need new remote access, which this PR does not add.

Machine names.

Merged with base. origin/feat-cmux-next at 6100943dbaa6 came in with a normal merge (4eaf999b9eec) after #23531 (Red CI) and #23577 (reorder motion) landed. Every entries call now passes both #23531's failingChecks and this PR's machine tag. Red CI is computed only over this Mac's and the Chief home's lanes. The session tree reads pull requests from a lane's folder and the URLs it opened, and a remote chat tab carries neither, so a remote row is never .ciFailing. A test asserts this.

Remote state: what the rows read and what they can do

Read. For each machine MachineRegistry already mirrors (Cloud VMs, SSH machines, paired servers) and whose feature is not turned off (MachineRegistry.daemon(machine:)), the rows read that daemon's DaemonStore tree, which the app already holds for the sidebar:

  • each agent chat tab's title (displayTitle) and agentSession ref (session id, harness);
  • the tab's unread notification marker (level and id);
  • the notice text the store already keeps for the hover card (notificationText(for:));
  • the notice time when the store has one;
  • the connection state and first snapshot, which gate mark pruning.

The machine name comes from MachineRegistry.machineName.

No new remote access. There is no new request, socket method, relay method, allowlist entry or subscription, and nothing is sent to the other machine. The notices come from that machine's own daemon (agent_chat_notices.rs), which already posts them on these tabs, and they already show in the sidebar rows, hover cards and banners.

What a remote row can do:

  • Open: reveals the tab that shows the chat on its machine, the same tab the sidebar row opens.
  • Mark read: only for a Done or Failed row (canMarkRead). It is a local mark: the row drops to Idle here until that machine posts a new notice, and the other machine's notice is left alone. A notice with no time counts from when the app first saw it, so each new notice is a new state and a mark on the old one no longer holds.
  • Pin and snooze: local marks, as for any row.

What a remote row can't do:

  • Archive is a no-op: there is no acpmux socket for that chat here, which matches peer chats today.
  • Working and Red CI never show: the tree carries no running-turn state and no pull request.
  • Marks are pruned only while every tree is connected and loaded, so a dropped SSH link does not drop a remote chat's pins.

Testing

New suite SidebarPriorityRemoteChatsTests:

  • aChatOnACloudOrSSHMachineIsRankedWithThisMacsChats: chats on two remote trees rank with this Mac's lanes in the right tiers, and each is tagged with its machine's display name.
  • aPeerChatNamesItsMachineAndThisMacIsTaggedOnlyWhenAsked: a peer resolves to its machine name, an unmatched peer keeps its own name, local rows have no tag until a local name is passed, and a peer chat that its machine's tree also lists shows once.

Red on the tests-only commit, run on the fleet:
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref 901267536151fbffe38ab7b6180716ec3c5720bd --key pv-prio-remote-9012675361-2 --arg=suite --arg=Packages/macOS/CmuxNext --arg=SidebarPriorityRemoteChatsTests --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.app
Step 40898e0eee32dbfc1a7bb95a failed: the test target does not compile on base because AgentPriorityChats.Machines and SidebarPriorityMachine do not exist. The base has no source for remote chats at all.

Green on the merged head 4eaf999b9eecdef4600e24464f114b3c58fd5adc:

  • Step 18ff9bbc652b81ba6203b414 (key pv-prio-remote-4eaf999b9e-5) passed all 4 suites: SidebarPriorityRemoteChatsTests (3/3, including the new aRemoteRowIsNeverRedCIAndMarksReadAsItsNoticeAllows), SidebarPriorityRedCITests, AgentPriorityRankingTests and SidebarPriorityRowActionsTests.
  • Step e7a61e161156be77c0659c8f (key pv-prio-remote-4eaf999b9e-6, --target-worker aws-m4pro-9) passed SidebarPriorityMotionTests (4/4).
  • cmux-ci compile-check --ref 4eaf999b9eecdef4600e24464f114b3c58fd5adc --app passed (job f7775be7c988a223577c2df4).

Before the merge: step 39a6ee7ea450ac9e21e1d4fe passed and compile-check job 2646f709dc6b2480f85e24b2 passed at 635ce4396601.

python3 scripts/cmux-next/prepush-gate.py reported no new violations on every push.

Observed / Not run

  • Observed: the fleet red and green steps and the app compile-checks above.
  • Not run: a live tagged build with a real Cloud VM or SSH chat. The media-tour label requests the native capture.
  • Read only, not run: the remote daemon's notice levels (cmux-tui/crates/cmux-tui-core/src/mux/agent_chat_notices.rs), which this mapping relies on.

Localization: no new user-facing strings.

Changelog

Added: The sidebar's Priority view lists agent chats on Cloud VMs, SSH machines and servers, tagged with each machine's name.

Proof

Native sidebar row. media-tour label added for the capture.

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

The Priority view now ranks agent chats on Cloud VMs, SSH machines, and paired servers, not just this Mac's acpmux chats and the Chief home's subagents. It reads only state the app already holds—each connected machine's daemon tree and the notices its daemon posts on tabs—so no new remote call is added.

Row state comes from the notice on the chat's tab: a warning ("needs input") becomes "Needs you", an error ("failed", "stopped responding") becomes "Failed" with the notice text, an info notice becomes "Done (unseen result)", and no notice is idle. Remote rows are tagged with the machine's sidebar name; an acpmux peer resolves to its machine when one matches, otherwise it keeps the peer name. This Mac's rows stay untagged until sidebar.showLocalMachine lands (#22763).

Opening a remote row reveals the tab that shows the chat on its machine. Mark read, pin, and snooze work as they do locally, and marks are pruned only while every tree is connected and loaded so a dropped SSH link doesn't wipe remote pins. Archive does nothing for a remote row—there's no acpmux socket for it here. One limit: remote rows never show Working, since a daemon tree carries no turn-in-progress state.

New test suite SidebarPriorityRemoteChatsTests covers ranking with local lanes, machine tagging, peer resolution, and local rows staying untagged by default.

Written for commit 635ce43. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 5 commits October 21, 2026 09:51
…and cloud machines

A chat on a Cloud VM, SSH machine or server shows from that machine's daemon tree,
ranked with this Mac's chats; each row names its machine by the sidebar's name for
it, and this Mac's rows carry a tag only when asked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
…ugh AgentPriorityChats

#23527 moved the ranked chats and their row actions into AgentPriorityChats; the
test now builds the view the same way and checks the row actions see the same rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
…machines

The Priority view read only this Mac's acpmux (and the peers it mirrors) and the
Chief home. It now also ranks every agent chat tab on the other machines' daemon
trees the app already mirrors (Cloud VMs, SSH machines, servers), with what each
needs from the notice that machine's daemon posts on the tab: a question or
permission prompt, a finished result nobody has seen, a failed turn. No new
remote call: the trees and notices already reach the app.

Each row names its machine as the sidebar does (MachineRegistry.machineName); an
acpmux peer's chat names the machine that peer is, else the peer. This Mac's rows
stay untagged until sidebar.showLocalMachine (#22763) passes this Mac's name.
Opening a remote row reveals the tab that shows it on its machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
@teamleaderleo teamleaderleo added media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:normal Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by priority-view on cosmic-gray · session

#23531 (Red CI) and #23577 (reorder motion) landed. Every entries call keeps both
the failing-checks answer and the remote rows' machine tags. Red CI reads only
this Mac's and the Chief home's lanes: a remote chat tab has no folder or pull
request, so a remote row is never Red CI. A notice the app has no time for
counts from when the app first saw it, so a read or snooze mark on one remote
notice does not hold over the next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
@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 4eaf999: 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=pr23588 -f ref=leo/priority-remote-chats -f platform=macos -f backend_mode=local

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

CI passes on 4eaf999b9e (run 39642072501 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.

Tour of 4eaf999b9e (run): no media. The tour job failed before the tour ran (build or setup); the run log has the output.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Merge receipt: head 4eaf999 (priority-view lane, session 6807b41c)

Review: SHIP. An independent review subagent read this head from git and recommends keeping the risk tier at normal.

Fleet results at this head:

  • Step 18ff9bbc passed: SidebarPriorityRemoteChatsTests 3/3, SidebarPriorityRedCITests, AgentPriorityRankingTests and SidebarPriorityRowActionsTests.
  • Step e7a61e16 on aws-m4pro-9 passed: SidebarPriorityMotionTests 4/4.
  • compile-check --app passed.

CI: 56 pass and 0 fail; the rest are pending or skipped. It merges cleanly with base 6100943+ (git merge-tree).

Follow-ups (non-blocking, next PR from this lane):

  • Remote Idle rows never age out, because since is nil (SidebarPriorityMachine.swift:67).
  • The first-seen stamp for untimed notices lives only in memory. After a relaunch, or once 4096 entries are cleared, a read mark on such a row is lost. It should persist, or the mark stamp shouldn't depend on it.
  • chats() and the machine list are built three times per emission, per window. Compute them once.
  • Missing tests: closed tabs, disconnect and prune, open() routing, archive being a no-op on remote rows.

@teamleaderleo
teamleaderleo merged commit 19ee4e3 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the leo/priority-remote-chats branch October 21, 2026 17:31
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 4eaf999b 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

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