Skip to content

cmux NEXT Home: a Chief's avatar shows thinking, tool running, waiting on you and done - #34416

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
lane/chief-avatar-dot-states
Nov 4, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
lane/chief-avatar-dot-states

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-03, relayed by Chief: "Chief avatar dot states. Replace the Chief avatar's bounce with per-state animations like the Codex status dot: thinking, tool running, waiting on you, done."

Who built the bounce

git log -S on the avatar loop: the bounce (Float, a bob of the whole avatar, faster while working) came in with #30534 (2026-11-01, one of our own lanes, from Leo's "i also want them animated like how chatgpt animates their dots"). #33395 (2026-11-03, our lane) already removed it after Leo's "don't bounce the circle", replacing it with Ring/Glow/Tilt looks for four states: idle, working, waiting (an unread reply) and failed. #33534 then stopped every idle loop. So no bounce is left on base. What was still missing is the four states Leo named: thinking and tool running were one "working" state, and "waiting" meant an unread reply rather than the Chief waiting on you.

What changes

A Chief's avatar in the Home list and the pinned grid now shows six states. The avatar itself never moves off its place.

State When Ring (default)
idle nothing to show at rest, nothing runs
thinking its turn runs in the model (run.activity is Thinking or Writing the reply) a quarter arc in the accent runs round the edge, 1.6 s a turn (unchanged from #33395's working)
tool running its turn runs a tool (any other activity line, e.g. "Running swift test") a ring of 12 accent dots turns slowly round the edge, 3.2 s a turn
waiting on you its newest message asks a question still pending, or an approval not yet decided a still orange ring
done its turn ended and the reply is unread a small green check badge on the lower trailing edge (40% of the avatar), still
failed a send failed a still red ring (unchanged)

Only thinking and tool running loop. Waiting, done, failed and idle run nothing once their cue has played, so there is no CPU or wakeup at idle.

Cues (each at most 240 ms): a turn ending (thinking or tool → anything) pops the avatar 4%; a failure shakes it; waiting with no turn seen fades its ring in; done with no turn seen grows its badge in. Thinking ↔ tool is the same turn, so it plays no cue.

The references come from cmux-design-references: cmux/live/chief-pill-proportions and cmux/live/status-icon-edge (the Chief card's done mark, a small green check disc at the leading edge), cmux/live/status-attention-ring (the attention ring for waiting), codex-mobile/live/agents-sheet-active-completed (a running spinner for active work, plain "Done" for completed) and superset/web/agent-status-transition (running → green completion dot).

Data

  • HomeLiveActivity.isTool (CmuxHomeCore): a line not among modelLines (Thinking, Writing the reply, Working, the lines optchat-chief's run.rs sets for the model) names a tool call. HomeTurnProgress.notSteps now reads the same set instead of its own copy.
  • HomeStore.toolRuns: the conversations whose running run is in a tool. publishLive updates it and rebuilds the rows only when a run moves between the model and a tool, never per token (O(1) per token: one Set lookup).
  • InboxRow.isRunningTool and InboxRow.waitsOnPerson(me:) (a pending question part or an undecided approval part on the newest message from someone else) feed HomeSidebarItem.chiefIsInTool / chiefWaitsOnYou, and HomeSidebarView.avatarState maps them in this order: failed, tool, thinking, waiting, done, idle.

Versions (gallery)

ChiefAvatarMotionGalleryTests draws every style in all six states, plus two cues (tool → done, idle → failed), eight frames each, to Packages/Shared/CmuxMessagesLab/.build/chief-avatar-motion-gallery.png:

  • Ring (default): the table above.
  • Glow: a glow behind the shape. Thinking adds a sweeping glint, tool adds Ring's dots, waiting glows orange, done shows Ring's badge, failed glows red.
  • Tilt: thinking rocks the head ±4°. Everything else is Ring's.
  • Still: nothing.

I picked Ring. Each of the four named states reads differently at row size: an arc vs dots for the two running states (shape, not just speed), a coloured ring for waiting, and a mark rather than a ring for done. That way done never reads as "still running". Debug Settings > Home > Chief avatar motion still switches styles.

What it does not touch

  • The agent working-state Spinner and the sidebar/tab working dot are unchanged. This is the Chief's own avatar in Home's list only.
  • The Chief pet (CmuxNextChiefPetWiring, Floating/ChiefPet) is unchanged.
  • None of the changed files is on the rulebook's Chief code list (CmuxNextApp/Chief/, CmuxNextHomeEngine/HomeChiefSettings*, optchat-chief, ...). They live in MessagesLab's sidebar, CmuxHomeCore's store and CmuxNextHome's sidebar model and view. cc @lawrencecchen, the most frequent recent author of these paths, for awareness.

Stop conditions and cleanup

These are unchanged from #33395, and the new looks follow them. Every loop and cue is removed under Reduce Motion, calm mode, speed off and Home's motion switch (avatarLoopGate), when the window is not key or is hidden or minimized, when a row goes back to the pool (SidebarAvatarMotion.stop also removes the badge layer), and with style Still. Under Reduce Motion the tool dots and the thinking arc stand still, so the state still reads. No timer or display link is added: each look is Core Animation on the avatar layer and at most three named sublayers (ring, glint, badge).

Performance

  • Per token: one Set.contains in publishLive. Rows rebuild only on a model ↔ tool change of a run.
  • Per configure: unchanged (one look comparison and a frame fit, O(1) per visible row).
  • No same-harness before/after frame numbers: the new loop is render-server only, like the arc it sits beside.

Tests

  • ChiefAvatarMotionTests (MessagesLab), extended: tool shows dots that turn slower than the arc, with no cue between thinking and tool; waiting is a still orange ring; done is a small green badge with no ring and no loop; done with no turn seen grows its badge in; only thinking and tool loop in any style; no style moves the avatar.
  • ChiefAvatarStateTests (CmuxHomeCore, new): a run's activity moves toolRuns in and out; the model lines are not tools; a pending question or an undecided approval waits on the person, while an answered or decided one, a plain reply, or my own message does not.

Observed / Not run

  • Observed: python3 scripts/cmux-next/prepush-gate.py: no new violations. Fleet compile and the MessagesLab / CmuxHomeCore suites: results in a comment below.
  • Not run: a DEV build watching the list live. Leo tries the build.

Spec: design/motion-and-polish.md (240 ms cue cap, every loop stops). Prior art: #30534 (the bounce), #33395 and #33534 (the looks this extends), #32861 (lucasr1b, open, Still by default; untouched here).

No capture: the looks are in the gallery sheet; Leo tries the build.

Changelog

Changed: A Chief's avatar in Home shows whether the Chief is thinking, running a tool, waiting on you or done, each with its own look.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Home’s Chief avatar now distinguishes model thinking, tool use, questions awaiting a response, and unread completed replies.

  • Thinking shows a rotating arc; tool activity shows slower-moving dots.
  • Open questions and pending approvals show an orange ring; unread replies show a green check.
  • Only thinking and tool activity animate continuously; other states stay still.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits November 4, 2026 00:27
…g on you and done

Relayed by Chief (Leo, 2026-11-03): "Replace the Chief avatar's bounce with per-state animations
like the Codex status dot: thinking, tool running, waiting on you, done." #30534 added the bounce;
#33395 replaced it with Ring/Glow/Tilt looks for idle, working, waiting (unread) and failed. This
splits working into thinking (the arc) and tool running (a slowly turning ring of dots, from the
run's activity line), makes waiting mean an open question or approval (a still orange ring), and
turns an unread reply into done (a green check badge on the lower trailing edge, the Chief card's
done mark). Only a running turn loops; done and waiting are still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-7285061ffdc2a24af93a
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review af35af1: 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=pr34416 -f ref=lane/chief-avatar-dot-states -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpkp8mqb48/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpp25p4eg5/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
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at af35af1

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at af35af1

Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] Packages/macOS/CmuxNext/Sources/CmuxNextHome/Conversations/HomeSidebarModel.swift:144 derives thinking solely from row.isTyping. Connection changes clear typing while live runs persist, so a reconnect during a model-thinking phase makes the avatar fall back to idle/done. Derive model-running state from live activity as well.

  2. [P2] [follow-up] Packages/Shared/CmuxHomeCore/Sources/CmuxHomeCore/Store/HomeLive.swift:64-69 classifies activity by display-line strings. run.rs emits "Thinking" for a tool with kind think, so that tool is treated as model work and its completed step is filtered as a model line. Preserve an explicit tool/model distinction.

Follow-ups:

  • [P2] [follow-up] Add a live-derived thinking state across reconnects.
  • [P2] [follow-up] Avoid classifying tool activity from ambiguous display strings.

cmux-bot[bot]
cmux-bot Bot previously approved these changes Nov 4, 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 af35af1: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cursor

cursor Bot commented Nov 4, 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.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 01:24 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 01:24 Inactive
@cmux-bot
cmux-bot Bot dismissed their stale review November 4, 2026 01:29

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

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 01:31 Inactive

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review (codex gpt-6.1-sol xhigh): SHIP at d3fda74

Review (codex gpt-6.1-sol xhigh, router-review job c967bb451eb0cd7c167519b9b75a70bf): SHIP at d3fda74
Visual verdict: no images; Leo tries the build

Follow-ups:

  1. [P2] [follow-up] HomeStore.swift:387: thinking still depends only on typing frames; after a reconnect clears them, a live tool → model change can show idle/done while the turn continues. Filed: #34467.
  2. [P2] [follow-up] ChiefAvatarMotionGalleryTests.swift:106: attach the generated gallery for this head.

(The router's own post hit the spent GitHub quota; this carries its verdict at the same head.)

@teamleaderleo
teamleaderleo merged commit e0943f0 into feat-cmux-next Nov 4, 2026
168 of 179 checks passed
@teamleaderleo
teamleaderleo deleted the lane/chief-avatar-dot-states branch November 4, 2026 02:31
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fresh-home launch after merge: tip vs base before #34416

Commit What Result Job
5aa07877 feat-cmux-next tip, includes this PR's merge e0943f05 fail: fresh-home: fail: Home did not render in a visible window; no crash, signal or abort 09737556cc4ae7192abcae29
a5397aeb feat-cmux-next before this merge fail: same line, nothing else 44449510d2a9c1dabac02209
ea45ebfb an earlier base fail: same line, nothing else c79873260f9b573a918af731

The tip fails the same way as base: the known false failure from the "Bring your history" sheet covering Home, which #34475 fixes. This PR adds no new failure and no crash, so it stays in (no revert). The Chief area's fresh-home check now has its record here. The PR landed before it ran, because this lane's VM can't reach the fleet.

Also on the merged head's PR swift test (run 41753793398): the run was cut short. MaskedScreenshotTests hung for 600 s, and the sample shows the main thread idle in the test runner's own loop, with no app or avatar frames. The other failing suites are ones this diff doesn't touch: window corners, the unread dot colour, browser icons, window cleanup, tooltips and tab-switch budgets. This PR's own suites (ChiefAvatarMotionTests, ChiefAvatarMotionGalleryTests, ChiefAvatarStateTests) passed on the fleet at d3fda74f.

Agent session: agent session

@lawrencecchen

Copy link
Copy Markdown
Contributor

Swift logic follow-up (tip watcher swift-logic row, STATUS 13027 "SWIFT LOGIC CULPRITS"; lead order).

This PR raised swift_logic_lines by +42 at its merge commit e0943f0: scripts/cmux-next/swift-logic-lines.py before and after the merge, with the same table (the tip's, c6be943). The largest declarations of the rise:

  • struct InboxRow in Packages/Shared/CmuxHomeCore/Sources/CmuxHomeCore/Store/InboxRow.swift: +15 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)
  • struct HomeLiveActivity in Packages/Shared/CmuxHomeCore/Sources/CmuxHomeCore/Store/HomeLive.swift: +7 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)
  • struct CmuxSidebarEntry in Packages/Shared/CmuxMessagesLab/Sources/MessagesLabSidebar/Cmux/CmuxSidebarView.swift: +6 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)
  • extension HomeStore in Packages/Shared/CmuxHomeCore/Sources/CmuxHomeCore/Store/HomeStore+Live.swift: +6 lines counted as Swift logic (no row in plans/cmux-next/swift-logic-classes.tsv)

plans/cmux-next/layer-ownership.md says Rust owns every state, list and rule and Swift is the platform shell. Please move the new logic of this PR in a follow-up: to Rust (the crate that owns the area; the owner lists in STATUS 12147-12165 name the target per area), or at least out of the app into its package. If a declaration above is platform code (AppKit, Core Animation, OS calls, strings, tokens, DEBUG tooling), reply here and the table gets a PLATFORM row with your reason instead.

The swift-logic row is a report, not a gate: nothing blocks on this comment.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — d3fda74f Deployed Nov 4, 2026 by cmux-bot[bot] via wait for same-key tree publisher #108542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants