Skip to content

cmux NEXT: a tab an agent needs you in shows the blue dot, the ring and why (tab-attention-v1) - #24311

Closed
teamleaderleo wants to merge 31 commits into
feat-cmux-nextfrom
sp-attn-b
Closed

teamleaderleo wants to merge 31 commits into
feat-cmux-nextfrom
sp-attn-b

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Leo-ask: ask-12231fbe5e

Leo: "idk where things are man i dont see anything other than the current workspace which is you and you have a cmux next github brwoser tab open (we need to have cmux expose this harder if it isn't already/hve better instructions)"

Slice B of the "needs you here" surface: the app shows a tab an agent marked. The daemon half is #24286 (tab.update {attention}, cmux attention request|clear, tab-attention-v1), and this PR lands after it: the bundled-daemon capability check needs that daemon. The palette command and Needs you list item come in slice C, the agent instructions in #24299.

What changes

  • The tab record's extra.attention {reason, at_ms} becomes TabModel.attention (TabAttention, CmuxNextDaemon).
  • TabModel.showsUnread reads it, so the existing blue treatment shows it everywhere showsUnread is read. There is no new dot and no new drawing code:
    • the tab's dot (TabItemMapping);
    • the screen bar;
    • the sidebar tab list;
    • the pane's blue attention ring.
  • The workspace row gets its manual dot, and its text line shows the reason ("Confirm GitHub access") ahead of any notification text.
  • Going into the pane (a click or a key) or Dismiss Highlight hides the ring. The dot stays until the agent clears the mark, the page goes elsewhere or the tab closes. A new request (a newer at_ms) rings again.
  • Mark as Read on the tab also drops the mark (tab.update {attention: null}, when the daemon has tab-attention-v1).
  • notifications.attention.showOnSidebar = false hides it like any unread.

Tests

TabAttentionTests (CmuxNextAppTests):

  • parsing, including malformed values;
  • showsUnread follows the record;
  • the row's dot, the reason and the tab dot; showOnSidebar off hides it;
  • the ring rings, stays on focus, hides on a click and comes back for a new request; Dismiss Highlight hides it.

Fleet compile-check at 2ae8268: compile check app: passed.

Final-head UI capture (built at 5cbebfc; final 3847668 changes only test-fixture scheduling): the fleet build launched, created and focused an Attention workspace, and issued attention request --tab current --reason "Confirm GitHub access". The sidebar shows the blue attention dot on the workspace and tab in both themes.

Light Dark
light dark

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

A tab an agent marked "needs you here" shows the existing unread dot and ring, and its workspace row says why. The daemon half lands here too, with the tab-attention-v1 and guarded tab-attention-request-id-v1 capabilities.

  • The tab's extra.attention {reason, at_ms, request_id} becomes TabModel.attention; showsUnread reads it, so the tab dot, screen bar, sidebar list, and pane ring all show the mark with no new drawing. at_ms must be a whole nonnegative number and request_id a strict 32-character lowercase hex owner token; malformed values are no mark.
  • The workspace row gets the manual dot and shows the reason ahead of any notification text.
  • Going into the pane or Dismiss Highlight hides the ring; the dot stays until the agent clears it, the page navigates away, or the tab closes. Mark as Read also drops the mark, but only when the daemon advertises conditional clears and state resources — without them the clear is refused rather than sent unguarded. Ring dismissal compares a client-local generation, so a newer request rings again even if the daemon clock steps backwards or two requests share a millisecond. An agent mark on a remote app only ever shows the cmux round-tripped state.
  • Clicks, keys, and delayed strip clicks resolve the tab on the machine that owns the window's workspace — a remote marked tab hides only its own ring, and typing in a remote terminal clears no local workspace mark — and menu Mark as Read and Dismiss Highlight items are bound to their machine, including a pinned workspace tile's menu; an action is refused when that machine is gone. A strip press captures the exact tab and store under the pointer, so a workspace switch before mouse-up can't redirect the click.
  • Clears apply immediately, roll back only their own request, and clear only the captured owner request_id, which the daemon uses as a monotonic identity it persists across clears and tab close — it refuses a mismatched or malformed guard, a clock step backwards or two requests in the same millisecond still ring as new, and a delayed clear never matches a later request. The capability check runs on the sending connection after handoff, not an earlier store handshake.
  • notifications.attention.showOnSidebar = false hides it like any unread.

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

View guided diff Turn on auto-fix

@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Review fc1fb49: 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=pr24311 -f ref=sp-attn-b -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 5889445; does not block

@blacksmith-sh

This comment has been minimized.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 14 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged feat-cmux-next in at 98dda4c. A later pass queues it for the merge hub if it is reviewed, small and red only on base reds.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next crash-class rules / cmux-next crash-class rules is red on 13 of 13 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

Held for dogfooding: this PR changes the left sidebar. SidebarMapping now gives a workspace row the manual unread dot when any of its tabs carries an agent's attention mark (tab-attention-v1), and the row's notification line shows that mark's reason ahead of the newest notification's text. It stays open until the change has been dogfooded. The receipt and checks are not what is holding it.

#24336 (Needs you tab items and Go to What Needs Me) and #24345 (the Show banner) are stacked on this branch, so they carry this sidebar change too and are held with it.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 13 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

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › Checks job structure is red on 8 of 8 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

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › No new SwiftUI (macOS UI is AppKit) is red on 8 of 8 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

rust workspaces / plan (changed Cargo workspaces) is red on 16 of 17 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

rust workspaces / rust workspaces is red on 15 of 15 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.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at 675e761

  • Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/TabAttentionTests.swift:116 — should-fix — The remote test still calls the workspace helper directly, bypassing noteTyping, noteMouseDown, and window resolution. It marks the local tab, whereas the previous blocker cleared a workspace mark. The original keystroke regression would still pass this test.

  • Packages/macOS/CmuxNext/Sources/CmuxNextApp/Notifications/NotificationCenterService.swift:195 — should-fix, pre-existing — Remote typing still updates lastKeystroke by bare tab id. Local notification arrivals consume that timestamp; with suppressWhileTypingSeconds > 0, a colliding local tab’s next notification can be automatically acknowledged. This predates the PR and does not warrant BLOCK.

The workspace-owner guard fixes the previous clearing bug. The observation assertion fixes the previous observer-coverage finding. No new correctness blocker found in the attention handling or Chromium/top-page routing. No builds or tests run.

Independent review by a different model (Codex gpt-6.1-sol at xhigh on cmux16, diff-only, read-only sandbox). It confirmed that the earlier BLOCK at 9e85b9e is fixed (typing in a remote terminal no longer clears a workspace mark here; the ring redraw is observed).

The should-fix items stay open. The remote test calls the workspace helper rather than noteTyping or noteMouseDown, because those need a real key window. The lastKeystroke-by-tab-id item predates this PR.

Fleet: the TabAttention, AgentTurnRing and four UnreadRing suites pass at a head that contains this one (cmux-ci step sp-attn-e-suite-2bd9a64), and the app compiles.

This PR stays held for dogfooding (it changes the left sidebar); see the HOLD line in the body.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next fast gates / fast gates is red on 15 of 17 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

teamleaderleo commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 54 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in Packages/macOS/CmuxNext/Sources/CmuxNextApp/Notifications/NotificationCenterService.swift, Packages/macOS/CmuxNext/Sources/CmuxNextDaemon/Connection/DaemonEndpoint.swift. Listed for a lane to resolve.

@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 8 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp65rg_fun/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpihzg9j8d/summary-missing.json (live):/summary-missing.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
test_live_raw_v12_layout_and_history_contracts_are_exact (test_ir.IrTests.test_live_raw
_v12_layout_and_history_contracts_are_exact) (command='new-pane-right')/
test_live_raw_v12_layout_and_history_contracts_are_exact (test_ir.IrTests.test_live_raw
_v12_layout_and_history_contracts_are_exact) (command='new-pane-right')
View Logs
test_live_raw_v12_layout_and_history_contracts_are_exact (test_ir.IrTests.test_live_raw
_v12_layout_and_history_contracts_are_exact) (command='new-pane-right')/
test_live_raw_v12_layout_and_history_contracts_are_exact (test_ir.IrTests.test_live_raw
_v12_layout_and_history_contracts_are_exact) (command='new-pane-right')
View Logs

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

Integrate the shared native request-ID contract from 9171431 and cecd056 while retaining machine-scoped dismissal state and client-local attention generation. Clear only the captured owner token and require the capability on the actual sending connection after handoff.

Regressions cover coalesced same-clock replacements, stale native mouse release, and legacy transport refusal. Fleet runtime validation is pending the backend-containing integration tree from #27497; no runtime result is claimed. Static verification: nine checks pass; unchanged localization inputs exceed existing debt. Swift #26809 and structural dogfood holds remain.
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, next-review): BLOCK at c27c81c

  • NotificationCenterService.swift:420-423 and NotificationCenterService+Lookup.swift:251: attention records without request_id are accepted by TabAttention, but click/key dismissal and “Dismiss Highlight” ignore them. The daemon protocol’s tab-attention-v1 records only {reason, at_ms}, so these marks remain permanently ringed until the agent clears them, violating the PR’s stated behavior.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded by #27962. It carries this PR's commits with their authorship, merges in the current base, and fixes the Astra BLOCK at c27c81c, where marks from older daemons stayed ringed. This branch is outside lane/, and its owner has been silent since 2026-10-27.

This branch was previously deployed

3 inactive (2 outdated) deployments
ci-routing-agent — c27c81c8 Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #78852
artifacts — fc1fb495 Deployed Oct 29, 2026 by teamleaderleo via add the Windows daemon to the tree #77216
sentry-dsyms — fc1fb495 Deployed Oct 29, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #77216
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