cmux-next sidebar: Priority view, every agent chat ranked by what needs you
Summary
Leo wants a Priority list at the top of the cmux NEXT sidebar like the Codex app's, but one that actually sorts by what needs him (Codex doesn't). This adds it as an optional item, sidebar.priorityView.enabled, off by default. The App Store lane (app-store-features) owns the store entry that turns it on.
With it on:
- Bell: a bell in the sidebar's titlebar row, next to New Workspace, shows or hides the view. It runs the Toggle Priority View action (palette, default ā„āK), which writes
sidebar.priorityView.shown. The tooltip shows the shortcut. While the rows are out of sight (view hidden or folded), the bell gets a blue dot if any chat needs you. With the bell off, the sidebar looks exactly as it does today. - What's listed: every acpmux chat: this Mac's own, the acpmux peers' it mirrors, and the Chief home's subagents. These come from
AgentLaneStore.sharedplus a Chief lane store the Chief watch now keeps (ChatsFeed.chiefLanes). - Ranking: Needs you (permission prompt or question), then Done (a result nobody has seen, from acpmux
unread), then Failed or Lost, then Working (with elapsed time), then Idle. Within a tier, pinned chats come first, then the most recent change. Idle chats drop off after 24 hours unless pinned. acpmux still decides each lane;AgentPriorityRankingonly orders them. - Row: title, then a project tag (session folder) and a machine tag in a stable per-machine color. Below that, two lines of preview: acpmux's masked
step, or the error for a failed turn. Raw prompts and messages are never shown. A state chip and indicator (spinner, waiting, error) sit at the right, plus an unread dot. - Click: opens or focuses the chat through the same
cmux://session/<id>path the Lanes view uses. - Hover actions: mark read, pin or unpin, snooze for 1 hour, archive. Read and snooze marks only last while the lane stays in the same state. A new question or a new result shows the chat again, and a snooze also ends when the hour runs out (a one-shot
DemandTimer). Archive hides the chat at once and sends_acpmux/archiveto the acpmux that owns it. Marks are stored in UserDefaults and pruned to sessions acpmux still lists. - Layout: the view sticks under the titlebar row, above the top band and the list. It takes at most two fifths of the sidebar and scrolls inside past that. The header folds it, and a folded header shows the count of chats that need you. When a chat's rank changes, its row moves to the new spot with the sidebar's move spring (
Motion.sidebar, so the animation switches are respected). New rows fade in.
#21585 (orphaned, conflicting) was an earlier workspace-based attempt. This builds on the lanes feed from #22662 instead, so it covers chats that aren't tied to a workspace and chats on other machines.
Not in this PR: a "red CI on its PR" tier. Lanes carry no PR or CI data yet, so failed and lost turns hold that slot for now.
Testing
AgentPriorityRankingTests(new, CmuxNextAppTests) cover: tier order and recency, a pinned chat leading its tier and staying past the idle horizon, read and snooze lasting until the state changes or the hour passes, archive plus marks surviving a reload and prune, and when the bell dot shows. These run in the CIcmux-next swift testlane. They were not run locally: builds and tests aren't allowed on this Mac.python3 scripts/cmux-next/prepush-gate.py: no new violations.swiftc -parsepasses on every changed Swift file.- Localization: all 23 new keys have entries in all 21 languages their four catalogs carry.
scripts/localization_catalog.py checkon those catalogs reports nothing for the new keys. - Not checked live in a tagged build yet. The generated settings schema and shortcut docs (
settings-schema.json,cmux-shortcuts.generated.json, defaults snapshot) are left to the autofix. They were not hand-edited.
Changelog
Added: An optional Priority view at the top of the sidebar lists every agent chat on every machine, the ones waiting on you first; a bell (ā„āK) shows or hides it.
Proof
Native AppKit sidebar UI, so there's no gallery entry. A tagged-build screenshot will follow once CI builds the head.
Checklist
- Behavior changes have added or updated tests, or Testing says why not
- UI, settings, menu, schema, help-text or user-facing docs change: localization audited, and the result is stated above
Agent session: cosmic-gray
š¤ Generated with Claude Code
Summary by cubic
Adds an optional Priority view to the cmux-next sidebar that lists every agent chat ranked by what needs you, off by default (sidebar.priorityView.enabled, an App Store item).
- A bell in the titlebar (Toggle Priority View, ā„āK) shows or hides the view and gains a blue dot when a hidden chat needs you.
- Ranks chats as needs you (prompt or question) > unseen done result > failed or lost > working > idle; pinned chats lead their tier, then most recent change; idle chats drop off after 24 hours unless pinned.
- Rows show title, project and machine tags, and a masked step or error preview ā never raw prompts or messages; hover offers mark read, pin, snooze 1 hour, and archive; clicking opens the chat via
cmux://session/<id>. - Covers chats on this Mac, acpmux peers, and Chief home subagents (fed through
AgentLaneStore.chief), including non-workspace chats, via the lanes feed from #22662. - Local marks (read, snooze, archive) persist until the chat's state changes or the snooze hour passes; pruning to sessions pauses while any watch is down, and a refused archive shows the chat again.
- A failed or lost turn stands in for a red-CI tier, since lanes carry no PR or CI data yet.
- The feed lives in
CmuxNextAgentLanesbehind settings and hooks so the App stays under its size cap.