Skip to content

feat(agent-pane): bridge opt-in native tab-row icon tools - #27135

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/orch-native-tools-b
Oct 30, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/orch-native-tools-b

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

When the host offers tabRow.nativeRowTools: true with a positive row height, the chat's quick-action icons and Session Info/Summary toggle are described to the native tab-row host. A shared button list supplies both DOM and native labels, symbols, visibility, toggle state and callbacks. The opt-in remains off by default. This web half lands after the native implementation in #27133 and coordinator clearance.

Leo, 2026-10-29:

"speaking of that top right buttons section area thing, okay, what do you think about moving it into Swift? Like just going more native with it? Because I just feel like on my fing God, I've ran into so many fing different hacks and stuff just to get this nonsense working. ... we keep running into this nonsense, right? ... And then we could just RPC it or whatever the f*** into TypeScript sometimes. But I feel like, okay, more native buttons and stuff, maybe that might be nicer."

The page calls pane.tabRowTools.set through callNative with {tools: [{id, symbol, label, enabled, toggled}]}. tabRowToolInvoked {id, menuItemId?} arrives through cmux.agent.host.events and dispatches the shared callbacks. These buttons have no native menus; unknown ids, disabled tools and menu-item invocations do nothing. Labels are bounded to 64 characters and lists to 16 tools.

Values are deduplicated, so callback identity changes and token renders do not resend tools. Hiding/unmounting the header or disabling the opt-in clears the list and unregisters dispatch. A rejected host update restores the web buttons. No timers, polling, observers, animation loops or per-token RPCs are added.

Scope: quick actions plus Inspector/Summary only. Summary has no badge today; none is invented. Needs You retains its web button and correctly anchored rich popover (Allow/Deny/choices, Go to source, Ask about this); its native migration belongs to a later step. PR chip, worktree pill, presence, status, chat menu and clearance CSS are unchanged. Existing automation can still open Summary while its visible toggle is native.

The change is kept together because extracting the shared action list, its host bridge, and the native/off lifecycle tests establish one dispatch path; splitting the extraction from the consumer would leave the behavior invariant untested.

Risk: normal — opt-in web/native action routing. No default changes. The native renderer and tunable ship in #27133; this PR does not claim native appearance evidence.

Validation:

  • Local Node 24 web lint passes; 19 focused tests pass (228 assertions).
  • List/dispatch tests cover ids, shared SF Symbols, toggled/enabled state, absent Summary badge, all handlers, malformed events, value deduplication, current callbacks, off/hidden/unmount cleanup and failed-host recovery.
  • The real header switches through page-level tabRow events and invokes Terminal/Summary through tabRowToolInvoked; web clicks use the same callbacks. Removing either the flag parser or invocation routing makes this regression fail. Native mode hides migrated DOM buttons, restoring them when disabled.
  • Existing header behavior tests cover Browser/Preview routing, Changes, Files, Split Down, tooltips and customization.
  • Gallery native-row-off/native-row-tools, light and dark: the web icons disappear only with native opt-in; Needs You and the chat menu remain.
  • Combined exact-head lint and tests: run 40794610520, PASS: full web lint and all 19 tests / 228 assertions at 2af5d59e4175c09ce60921135c1edef38259bb00. This update strengthens the host-event regression without product changes.
  • Independent Astra review: SHIP at 2af5d59e4175c09ce60921135c1edef38259bb00, including the page-level host-event regression.

Gallery comparison: native opt-in off/on in the same header fixture. The after image shows the remaining web controls; native icons are rendered by the separate native PR.

Theme Before (off) After (native on)
Dark Web tools off dark Web tools native dark
Light Web tools off light Web tools native light

Agent session: agent session

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Review e749d7d: 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=pr27135 -f ref=lane/orch-native-tools-b -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on e749d7dc56 (run 41073290488 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (3) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs motion-scale.test.ts motion scale > no webview CSS, TS or TSX animates off the scale: failed (job)
  • seen on other PRs reasoning-chip-steps.test.ts New Tab at 300 px: the model button's effort reads "Med" whole: failed (job)
Matched log lines
web / react-apps-base-check (3): (fail) motion scale > no webview CSS, TS or TSX animates off the scale [746.72ms]

Not re-run automatically: web / react-apps-base-check (3), web / react-apps-check are not machine failures.

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.

red: web / Web status; base red: the same failure on the base f287294; does not block
red: web / react-apps-base-check (3); no finished base run on f287294 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base f287294; does not block

Gallery before/after for e749d7d: 16 states rendered, 0 images differ, 2481 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 41073290708 -R manaflow-ai/cmux -n gallery-advisory-27135-e749d7dc56b51bc2108bddb46153395dc9df1b57 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/shipped Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/two-thirds Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/half-tucked Apple System Colors unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors Light unchanged 0% own App.tsx
agent-pane.continuation-spacing/before Apple System Colors unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors Light unchanged 0% own App.tsx
agent-pane.copy-controls/output Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors unchanged 0% own App.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (Astra): SHIP at 8697d78

The seven-line test-only delta correctly initializes and clears shared quick-action and lit state. Earlier product review still applies; no new findings.

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

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (Astra): SHIP at 2af5d59

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 13 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in webviews/src/agent-session/acpmux/inspector/ChatInspector.tsx. Listed for a lane to resolve.

# Conflicts:
#	webviews/src/agent-session/acpmux/inspector/ChatInspector.tsx
@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 4 test failures on Blacksmith runners:

Failures

Test View Logs
test/motion-scale.test.ts/motion-scale.test View Logs
test/motion-scale.test.ts/motion-scale.test View Logs
test/reasoning-chip-steps.test.ts/reasoning-chip-steps.test View Logs
test/reasoning-chip-steps.test.ts/reasoning-chip-steps.test View Logs

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

# Conflicts:
#	plans/cmux-next/coordination/react-pages.md
#	webviews/src/agent-session/acpmux/header/ChatHeaderTools.gallery.tsx
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra): SHIP at e749d7d

No P1/P2/P3 findings. Full review of the PR against feat-cmux-next 570b452 (merge base f287294, which includes the native half #27133). The review box's target is pinned to head e749d7d. In the reviewer's words: "The native descriptor protocol, host-event dispatch, fallback behavior, stale callback handling, and existing header behavior align with the native Swift implementation and added tests." Scope: the message and field contract against the Swift host and policy.json; the opt-in off and zero-height paths; no duplicate or missing buttons; toggle sync; stale callbacks; cleanup on unmount; and the merge resolution in react-pages.md and the header gallery.

CI at this head (run 41075450537): bun test test/native-row-tools.test.tsx test/chat-header-lit.test.tsx: 7 pass, 0 fail.

Base reds, not from this PR, which changes no Swift, policy or latency files:

@teamleaderleo
teamleaderleo merged commit cbc97bf into feat-cmux-next Oct 30, 2026
158 of 165 checks passed
@teamleaderleo
teamleaderleo deleted the lane/orch-native-tools-b branch October 30, 2026 15:26
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e749d7dc Deployed Oct 30, 2026 by teamleaderleo via cmux-tui tree preflight #83619
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.

1 participant