Skip to content

Add selected-workspace provider actions to cmux TUI - #8943

Merged
lawrencecchen merged 17 commits into
mainfrom
feat-workspace-ports-contract
Jul 26, 2026
Merged

lawrencecchen merged 17 commits into
mainfrom
feat-workspace-ports-contract

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds typed scope, machine, and workspace targets to provider actions.

Binds selected machine/workspace IDs before destructive confirmation, forwards them through the shared provider client, localizes known port actions, and covers keyboard/mouse prompt submission plus legacy protocol decoding.

Tests:

  • cargo +1.97.1 test -p cmux-tui-machine-protocol
  • cargo +1.97.1 test -p cmux-tui --no-fail-fast
  • cargo +1.97.1 clippy -p cmux-tui -p cmux-tui-machine-protocol --all-targets -- -D warnings
  • exact debug binary built with Zig 0.15.2 on macOS 15.7.4

Summary by CodeRabbit

  • New Features
    • Provider actions can be targeted to scope, selected machine, or selected workspace.
    • Added client capability negotiation to control support for non-scope action targets.
    • Action invocation now supports optional machine/workspace context.
    • Added machine-agent localized help/errors and localized workspace port action labels (English/Japanese).
  • Bug Fixes
    • Destructive provider actions are now staged and require explicit confirmation before execution.
    • Provider snapshot/action data now hides non-supported action targets when negotiation isn’t enabled.
    • Durable notice delivery improved to reduce duplicate legacy notices across refreshes/reconnects.
    • External machine connect routing recovers more reliably.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR extends provider action protocol models with capability negotiation and target context, binds machine/workspace identifiers through invocation, stages destructive actions for confirmation, localizes provider presentation, and adds durable-notice and external-connect coordination.

Changes

Provider action and runtime integration

Layer / File(s) Summary
Action contracts and capability negotiation
cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs, cmux-tui/crates/cmux-tui/src/machine_provider_client.rs, cmux-tui/spec/machine-provider.md
Adds client capability negotiation, targeted provider actions, compatibility filtering, and optional invocation identifiers.
Scoped invocation and confirmation
cmux-tui/crates/cmux-tui/src/machine.rs, cmux-tui/crates/cmux-tui/src/app.rs
Provider actions bind selected machine/workspace context, while destructive requests remain pending until explicit confirmation.
Localized provider presentation
cmux-tui/crates/cmux-tui/src/localization.rs, cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
Adds localized machine-agent and workspace-port messages and applies localized provider action labels and fields.
Durable notices and external-connect orchestration
cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
Adds stable durable-notice subscriptions, replay-aware snapshot updates, external-connect routing, overlay merging, and related tests.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant ProviderMachineRuntime
  participant ProviderClient
  participant Provider
  App->>ProviderMachineRuntime: submit scoped provider action
  ProviderMachineRuntime->>ProviderClient: invoke with machine/workspace identifiers
  ProviderClient->>Provider: send InvokeAction request
  Provider->>ProviderClient: deliver durable notice or UI update
  ProviderClient->>ProviderMachineRuntime: forward notice or snapshot refresh
  ProviderMachineRuntime->>App: publish MachineUpdate
Loading

Possibly related PRs

  • manaflow-ai/cmux#8622: Introduced the protocol wire model extended by this PR with capability negotiation, targeted actions, and scoped invocation fields.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing, but it omits required Demo Video, Review Trigger, and Checklist sections from the template. Add the missing Demo Video, Review Trigger, and Checklist sections, and ensure the summary explicitly answers what changed and why.
Docstring Coverage ⚠️ Warning Docstring coverage is 34.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Cmux Browser Automation Off-Main ❓ Inconclusive placeholder2 need evidence
✅ Passed checks (22 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches a real part of the change, though it only covers workspace-target actions and not the broader protocol and confirmation updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed No Swift files were changed; the PR only touches Rust crates and docs, so Swift actor-isolation rules are not implicated.
Cmux Swift Blocking Runtime ✅ Passed No Swift files are changed; the diff is Rust/docs only, so the Swift blocking-runtime rule is not applicable.
Cmux Expensive Synchronous Load ✅ Passed Diff only changes Rust/spec files; no Swift main-actor or interactive load paths are touched.
Cmux Cache Substitution Correctness ✅ Passed The commit only changes Rust and markdown files; no Swift, TypeScript, or JavaScript cache-substitution path is affected.
Cmux No Hacky Sleeps ✅ Passed This PR only changes Rust source/markdown, outside the rule’s TS/JS/shell scope; the only sleeps found are deterministic test scaffolding.
Cmux Algorithmic Complexity ✅ Passed The diff only adds linear snapshot/action filtering and fixed-size ID/capability matches; I found no nested rescans, repeated sorts, or other scalable-collection complexity violations.
Cmux Swift Concurrency ✅ Passed PR touches only Rust and docs; no Swift files are changed, so no legacy Swift concurrency patterns were introduced.
Cmux Swift @Concurrent ✅ Passed No Swift files are changed in this PR; the diff is Rust/Markdown only, so the Swift-concurrent rule is not applicable.
Cmux Swift Package Boundaries ✅ Passed PR changes only Rust and docs files; no Swift sources or Package.swift edits, so the Swift package-boundary rule is not applicable.
Cmux Swiftpm Lockfiles ✅ Passed No SwiftPM/Xcode/.gitignore/workflow/dependency files changed, so the Package.resolved policy is not implicated.
Cmux Swift Logging ✅ Passed No Swift sources were changed; the diff only touches Rust and docs, so the Swift logging rule is not applicable.
Cmux User-Facing Error Privacy ✅ Passed New user-facing strings are generic prompts/labels; no added vendor names, secrets, raw upstream messages, or payload dumps appear in visible copy.
Cmux Full Internationalization ✅ Passed New user-facing copy was added to both ENGLISH and JAPANESE Rust catalogs, and runtime code routes provider actions/errors through localization helpers.
Cmux Swiftui State Layout ✅ Passed PASS: the diff only touches Rust protocol/runtime/docs files; no SwiftUI/AppKit state, GeometryReader, lazy-row store refs, or render-time mutation patterns were introduced.
Cmux Architecture Rethink ✅ Passed No Swift files were changed; the referenced Swift architectural-rethink rule is inapplicable to this Rust-only PR.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed No Swift files were changed in this PR, so the auxiliary-window close-shortcut rule is not applicable.
Cmux Source Artifacts ✅ Passed All changed paths are hand-written source/docs under crates/src and spec; no logs, caches, build output, temp dirs, or other source artifacts appear in the diff.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The PR diff only touches Rust files and docs; no production Swift files under Sources/ were changed, so the seam rule is not applicable.
Cmux No Ambient Global State ✅ Passed The PR adds only typed data and pure lookup/filter helpers; no new mutable globals, shared singletons, or app-delegate-style ambient state were introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-workspace-ports-contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds typed provider-action targets and binds selected machine/workspace context before invocation.

  • Negotiates targeted-action support while preserving compatibility with strict legacy protocol decoders.
  • Stages destructive actions with their bound context before confirmation.
  • Localizes known workspace-port actions and documents the updated provider protocol.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
cmux-tui/crates/cmux-tui/src/app.rs Binds provider action context before destructive confirmation and keeps the active session tree aligned with the selected provider machine.
cmux-tui/crates/cmux-tui/src/machine.rs Adds typed action targets, validates required selected context, and carries machine/workspace IDs in action requests.
cmux-tui/crates/cmux-tui/src/machine_provider_client.rs Negotiates targeted-action support and filters snapshot actions according to accepted client capabilities.
cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs Converts protocol targets into TUI descriptors, forwards bound identifiers, and localizes known provider actions.
cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs Extends the provider protocol with capability negotiation, typed targets, and optional invocation context while retaining legacy decoding behavior.
cmux-tui/crates/cmux-tui/src/localization.rs Adds English and Japanese messages for target validation and known workspace-port actions.
cmux-tui/spec/machine-provider.md Documents client capability negotiation and compatibility requirements for targeted provider actions.

Sequence Diagram

sequenceDiagram
  participant User
  participant TUI
  participant Client as Provider Client
  participant Provider
  TUI->>Provider: hello
  Provider-->>TUI: capabilities
  TUI->>Provider: negotiate_client_capabilities
  Provider-->>TUI: accepted targeted-action capability
  TUI->>Provider: snapshot
  Provider-->>TUI: actions with typed targets
  User->>TUI: select provider action
  TUI->>TUI: bind active machine/workspace context
  alt destructive action
    TUI->>User: request confirmation
    User->>TUI: CONFIRM
  end
  TUI->>Client: invoke action with bound IDs
  Client->>Provider: invoke_action
Loading

Reviews (12): Last reviewed commit: "Mark workspace action test session activ..." | Re-trigger Greptile

Comment thread cmux-tui/crates/cmux-tui/src/app.rs Outdated
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Exact union head is f2d08d2. It composes selected workspace/provider action targets with durable usage notices, external pairing, and bounded concurrent local opens. Local validation passed 589 unit tests, 58 integration and protocol tests, and clippy with warnings denied. @codex review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2d08d2ae1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmux-tui/crates/cmux-tui/src/app.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/machine_provider_client.rs Outdated

@coderabbitai coderabbitai 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.

Actionable comments posted: 14

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs`:
- Around line 162-170: Add a localized sidebar catalog entry for invalid
external-machine specifiers, then update connect_external_after_refresh at the
runtime boundary to detect InvalidExternalMachineSpecifier and map it to that
catalog message before rendering. Preserve existing handling for other
external-connect failures and ensure rejected host or pairing inputs use the
selected UI language.
- Around line 622-641: Update ProviderActionTarget to include an Unsupported
catch-all deserialization variant for unknown target values, preserving existing
defaults and serialization behavior. In provider presentation construction, skip
actions whose target is Unsupported so an unknown individual action cannot
invalidate the surrounding SnapshotResult.

In `@cmux-tui/crates/cmux-tui/src/app.rs`:
- Around line 4737-4752: Remove the direct assignment to
machine_provider_reconnect_retry_at in the durable-notice acknowledgement error
branch. Route the retry through schedule_machine_provider_reconnect(),
preserving the existing failure counter and reconnect request behavior so that
provider reconnect backoff remains owned by that method.
- Around line 7710-7725: Update provider_action_context to derive workspace_id
from the active machine snapshot identified while resolving machine_id,
selecting only that machine’s active workspace and preserving the non-empty
filter. Do not use tree.active_workspace() independently, so
ProviderActionContext cannot combine a machine ID with a workspace owned by
another machine.

In `@cmux-tui/crates/cmux-tui/src/localization.rs`:
- Around line 533-556: Centralize the provider action IDs in the provider
protocol crate, then import and use those shared constants in localization.rs.
Update provider_action_label and provider_action_field_label to replace every
hard-coded workspace port action string while preserving the existing match
behavior and fallback handling.

In `@cmux-tui/crates/cmux-tui/src/machine_agent/mod.rs`:
- Around line 55-64: Update run so it preserves run_agent’s actionable error
categories instead of mapping every failure to messages.runtime_failed. Classify
errors into localized outcomes for already-running agents, non-private state
directories, invalid connection options, and transport failures, with messages
stating the product impact and one or two next actions; retain raw error details
only for CMUX_MACHINE_AGENT_DEBUG diagnostics.

In `@cmux-tui/crates/cmux-tui/src/machine_agent/runtime.rs`:
- Around line 669-676: The worker runtime currently discards the error returned
by `state.run` and only sends a `Closed` event. Capture the run result in this
generation flow, and when it fails, convert it with `generation_failure_kind`
and report it through `reporter.diagnostic`, matching the existing
`start_generation` failure handling while preserving the existing shutdown and
`Closed` notification behavior.
- Around line 453-476: The synchronous wait in commit_migration_replacement
blocks the coordinator for the full HANDSHAKE_TIMEOUT and prevents event
processing. Replace the direct result.recv_timeout wait with a short,
coordinator-safe commit deadline or an event-draining wait loop, while
preserving successful acknowledgment behavior and the existing failure
cleanup/reporting paths.

In `@cmux-tui/crates/cmux-tui/src/machine_agent/transport.rs`:
- Around line 220-245: Extract the accumulate-until-newline logic from
read_bounded_json_line into a shared read_bounded_line(reader, limit) helper,
preserving its size-limit and EOF error semantics. Update read_bounded_json_line
and read_frame to call the shared helper, with each retaining only its
format-specific decoding or framing behavior.

In `@cmux-tui/crates/cmux-tui/src/machine.rs`:
- Around line 1049-1073: Extend provider_action_binds_selected_workspace_context
to also cover the SelectedMachine target and a context with machine_id set to
None. Assert that the request returns
Err(ProviderActionInputError::MissingSelectedMachine), preserving the
fail-closed behavior before any unbound provider action is submitted.

In `@cmux-tui/crates/cmux-tui/src/main.rs`:
- Around line 329-343: Update usage_for_platform so disabling machine-agent
support removes the entire corresponding usage line, not merely replacing its
placeholder with an empty string. Preserve the existing machine-agent entry when
supports_machine_agent is true and keep the resulting non-Unix help output free
of whitespace-only lines.
- Around line 1670-1679: Update
startup_help_localizes_the_machine_agent_entrypoint and its usage_for invocation
so the test explicitly renders the machine-agent usage as supported, independent
of the host compile target; preserve the English and Japanese localization
assertions while avoiding the cfg!(unix) unsupported-platform path.

In `@cmux-tui/docs/machines.md`:
- Around line 89-109: Update cmux-tui/docs/machines.md at lines 89-109 to show
the interactive SSH prerequisite using the resolved cloud host, user, port, and
identity, and include --cloud-host in the documented overrides. Update
cmux-tui/spec/machine-agent.md at lines 21-23 to require that this interactive
trust/authentication step uses the same resolved destination and identity as the
agent.

In `@cmux-tui/README.md`:
- Line 34: Add an explicit Unix-only caveat to both machine-agent examples in
the README, covering the direct cargo command and the npx command. Keep the
command examples unchanged while clearly stating that non-Unix platforms do not
expose machine-agent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4eb0d0df-e2e3-41c8-8348-1c485182cd5f

📥 Commits

Reviewing files that changed from the base of the PR and between 8eceeab and f2d08d2.

⛔ Files ignored due to path filters (1)
  • cmux-tui/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • cmux-tui/Cargo.toml
  • cmux-tui/README.md
  • cmux-tui/crates/cmux-tui-machine-agent-protocol/Cargo.toml
  • cmux-tui/crates/cmux-tui-machine-agent-protocol/src/lib.rs
  • cmux-tui/crates/cmux-tui-machine-protocol/Cargo.toml
  • cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
  • cmux-tui/crates/cmux-tui/Cargo.toml
  • cmux-tui/crates/cmux-tui/src/app.rs
  • cmux-tui/crates/cmux-tui/src/localization.rs
  • cmux-tui/crates/cmux-tui/src/machine.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/identity.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/mod.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/protocol_io.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/runtime.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/transport.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_client.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_transport.rs
  • cmux-tui/crates/cmux-tui/src/main.rs
  • cmux-tui/crates/cmux-tui/src/ui/mod.rs
  • cmux-tui/crates/cmux-tui/src/ui/rail.rs
  • cmux-tui/crates/cmux-tui/tests/cli.rs
  • cmux-tui/docs/README.md
  • cmux-tui/docs/configuration.md
  • cmux-tui/docs/getting-started.md
  • cmux-tui/docs/machines.md
  • cmux-tui/docs/mouse.md
  • cmux-tui/spec/README.md
  • cmux-tui/spec/cli.md
  • cmux-tui/spec/machine-agent.md
  • cmux-tui/spec/machine-provider.md

Comment thread cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
Comment thread cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
Comment thread cmux-tui/crates/cmux-tui/src/app.rs
Comment thread cmux-tui/crates/cmux-tui/src/app.rs
Comment thread cmux-tui/crates/cmux-tui/src/localization.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/machine.rs
Comment thread cmux-tui/crates/cmux-tui/src/main.rs
Comment thread cmux-tui/crates/cmux-tui/src/main.rs
Comment thread cmux-tui/docs/machines.md Outdated
Comment thread cmux-tui/README.md
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Exact union head is 7179859. It contains selected workspace/provider action targets, durable notices, external pairing, bounded concurrent local opens, and all exact-review fixes. Local validation passed 591 unit tests, 58 integration/protocol tests, and clippy with warnings denied. @codex review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui/src/machine_agent/mod.rs`:
- Around line 68-69: Update the StderrReporter::new error mapping in the
machine-agent initialization path to use a new pairing_terminal_unavailable
user-facing message instead of runtime_failed; add this message to
MachineAgentMessages for both English and Japanese, instructing users to start
the agent from an interactive terminal while preserving the existing diagnostic
emission.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 331de10d-667d-45f0-b560-52b32211ed02

📥 Commits

Reviewing files that changed from the base of the PR and between f2d08d2 and 7179859.

📒 Files selected for processing (5)
  • cmux-tui/crates/cmux-tui/src/localization.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/identity.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/mod.rs
  • cmux-tui/crates/cmux-tui/src/machine_agent/runtime.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs

Comment thread cmux-tui/crates/cmux-tui/src/machine_agent/mod.rs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7179859e52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmux-tui/crates/cmux-tui/src/app.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs Outdated
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7752a5090f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs (1)

1248-1261: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a wire-encoding test for non-default action targets.

The tests cover legacy/default omission and unknown-target handling, but do not verify that SelectedMachine and SelectedWorkspace serialize to their protocol values. Add at least one non-default target to the snapshot fixture and assert its encoded "target" value, since a regression here could silently drop invocation scoping.

Also applies to: 1397-1490

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs` around lines 1248 -
1261, Extend the ProviderAction serialization tests around the existing action
fixtures to include a non-default target, preferably SelectedMachine or
SelectedWorkspace, and assert that serde_json::to_value encodes its target as
the corresponding protocol string. Preserve the existing legacy/default omission
and unknown-target assertions while covering the wire encoding for at least one
non-default scope.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs`:
- Around line 1248-1261: Extend the ProviderAction serialization tests around
the existing action fixtures to include a non-default target, preferably
SelectedMachine or SelectedWorkspace, and assert that serde_json::to_value
encodes its target as the corresponding protocol string. Preserve the existing
legacy/default omission and unknown-target assertions while covering the wire
encoding for at least one non-default scope.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 24b02bbd-11e7-49a6-ae5e-43c0665780e5

📥 Commits

Reviewing files that changed from the base of the PR and between ef78ff1 and 7752a50.

📒 Files selected for processing (3)
  • cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
  • cmux-tui/crates/cmux-tui/src/localization.rs
  • cmux-tui/crates/cmux-tui/src/machine.rs

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 0b091f2f5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs`:
- Around line 580-591: Update
SnapshotResult::retain_actions_for_client_capabilities to fail closed by
retaining only actions whose target is ProviderActionTarget::Scope when the
client lacks PROVIDER_ACTION_TARGETS_CLIENT_CAPABILITY; explicitly exclude
ProviderActionTarget::Unsupported so it cannot reach the provider-presentation
path.

In `@cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs`:
- Around line 3244-3304: Update the capability-negotiation response in
targeted_actions_are_negotiated_before_the_initial_snapshot to use
protocol::ResponseEnvelope::success(...) instead of hand-built json!, preserving
the negotiated capabilities payload. Read the subsequent frame through the typed
protocol envelope path, using the existing read_frame helpers and keeping the
test’s negotiation assertions unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e72232b5-2a17-4dba-9a64-67aa096726ba

📥 Commits

Reviewing files that changed from the base of the PR and between 7752a50 and 0b091f2.

📒 Files selected for processing (4)
  • cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_client.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
  • cmux-tui/spec/machine-provider.md

Comment thread cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
Comment thread cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs`:
- Around line 3245-3304: Extend
targeted_actions_are_negotiated_before_the_initial_snapshot to advertise
client-capability-negotiation-v1 together with durable-notices-v1 and
machine-lifecycle-v1, and assert the negotiation request remains the first
post-Hello message before any subscription or snapshot request. Return the
combined negotiated capabilities and preserve the existing targeted-action
snapshot assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 04c2722d-01d8-4b73-a504-2e7193c7d272

📥 Commits

Reviewing files that changed from the base of the PR and between 7752a50 and 0b091f2.

📒 Files selected for processing (4)
  • cmux-tui/crates/cmux-tui-machine-protocol/src/lib.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_client.rs
  • cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs
  • cmux-tui/spec/machine-provider.md

Comment thread cmux-tui/crates/cmux-tui/src/machine_provider_runtime.rs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1f4ee8e5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmux-tui/crates/cmux-tui/src/app.rs Outdated
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 904408a1ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lawrencecchen
lawrencecchen merged commit 9d99b55 into main Jul 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant