Skip to content

Add harness availability model to the client.#10135

Merged
liliwilson merged 3 commits intomasterfrom
lili/remote-1546-native-client-server-driven-harness-list
May 5, 2026
Merged

Add harness availability model to the client.#10135
liliwilson merged 3 commits intomasterfrom
lili/remote-1546-native-client-server-driven-harness-list

Conversation

@liliwilson
Copy link
Copy Markdown
Contributor

@liliwilson liliwilson commented May 5, 2026

Description

This PR introduces a new HarnessAvailabilityModel, following server-side changes to expose the list of available harnesses for use with Oz in the availableHarnesses section of the User GraphQL query.

We model this new model (ha) after the existing models (ha) model, which stores the list of available LLMs (LLMPreferences) that we get from the server.

We also update the cloud mode UI, management view filter, and CLI so that we check this model to determine the list of harnesses to display (rather than hardcoding them), as well as to show enabled/disabled state when triggering something from cloud mode.

Screenshots / Videos

Example of disabled state for harnesses in cloud mode:
image

No harnesses available state:
https://www.loom.com/share/65d9ed8f52be4a5ba4b1e320fdddff0b

Testing

Tested locally, ensuring that:

  • Disabled harnesses show up correctly
  • Non-feature-flag-enabled harnesses don't show up
  • Different UI surfaces all reflect the list from the server

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 5, 2026
@liliwilson liliwilson requested a review from oz-agent May 5, 2026 07:02
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 5, 2026

@liliwilson

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a server-driven harness availability model and wires it into GraphQL, cached app state, cloud-mode UI, and submission handling.

Concerns

  • Disabled harnesses can be hidden before the selector gets a chance to render them as disabled because visibility counts only enabled harnesses.
  • Persisted disabled harness selections are only corrected on future availability events, so stale selections can survive model construction.
  • Harness availability changes refresh the selector menu but not the button label that also depends on availability display names.

Verdict

Found: 0 critical, 2 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/harness_availability.rs Outdated
Comment thread app/src/terminal/view/ambient_agent/model.rs
Comment thread app/src/terminal/view/ambient_agent/harness_selector.rs
@liliwilson liliwilson requested a review from alokedesai May 5, 2026 08:00
@liliwilson liliwilson marked this pull request as ready for review May 5, 2026 08:00
@liliwilson liliwilson requested review from abhishekp106 and removed request for alokedesai May 5, 2026 08:00
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 5, 2026

@liliwilson

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a server-backed harness availability model and wires it into cloud-mode UI, management filters, details metadata, and the GraphQL client.

Concerns

  • A new cloud-mode ambient view only validates the selected harness after future availability change events, so cached availability can leave the default Oz selection active even when it is disabled.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

me.handle_cloud_model_event(event, ctx);
});

ctx.subscribe_to_model(&HarnessAvailabilityModel::handle(ctx), |me, _event, ctx| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This only validates on future availability events. If HarnessAvailabilityModel already loaded cached data where Oz is disabled before this view is constructed and the refresh returns the same list, the model keeps the default Harness::Oz; the submit guard only checks that some harness is enabled, so the run can still be spawned with a disabled harness. Initialize from or validate against the current availability once during construction.

@abhishekp106
Copy link
Copy Markdown
Contributor

We model this new model (ha) after the existing models (ha) model, which stores the list of available LLMs (LLMPreferences) that we get from the server.

lmfao

Copy link
Copy Markdown
Contributor

@abhishekp106 abhishekp106 left a comment

Choose a reason for hiding this comment

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

very excited to build on this!


pub fn available_harnesses(&self) -> &[HarnessAvailability] {
&self.harnesses
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we guaranteed a consistent ordering from this by the server? I imagine Oz should always come first

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup! We use enums.AllAgentHarnesses on the server to enforce ordering here

@liliwilson liliwilson force-pushed the lili/remote-1546-native-client-server-driven-harness-list branch 2 times, most recently from 25445dc to c6be84f Compare May 5, 2026 19:28
@liliwilson liliwilson force-pushed the lili/remote-1546-native-client-server-driven-harness-list branch from c6be84f to 1e8c97e Compare May 5, 2026 20:44
@liliwilson liliwilson merged commit f95364a into master May 5, 2026
24 checks passed
@liliwilson liliwilson deleted the lili/remote-1546-native-client-server-driven-harness-list branch May 5, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants