Skip to content

add option snapshots and adapt GUI orchestration pickers onto them#13714

Merged
harryalbert merged 4 commits into
masterfrom
harry/code-1822-option-snapshots
Jul 16, 2026
Merged

add option snapshots and adapt GUI orchestration pickers onto them#13714
harryalbert merged 4 commits into
masterfrom
harry/code-1822-option-snapshots

Conversation

@harryalbert

@harryalbert harryalbert commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds app/src/ai/orchestration/snapshots.rs: one plain-data OptionSnapshot builder per orchestration configuration field (location, harness, model, API key, host, environment). A snapshot carries rows, ordering, badges, disabled reasons, load status, footer affordances, and the current selection — with no GUI types — so the GUI pickers and the TUI configuration pages (upstack) render the exact same option lists and cannot drift.

The GUI's picker-population helpers in orchestration_controls.rs are rewritten to consume the snapshots instead of querying catalogs inline: populate_harness_picker, populate_model_picker_for_harness, populate_environment_picker, populate_host_picker, populate_auth_secret_picker_for_harness, and sync_picker_selections now map snapshot rows to menu items and only keep genuinely GUI concerns (icons, brand colors, rich Oz model rows via available_model_menu_items, dropdown trigger labels). No behavior change intended.

Review guide

New Code

  • app/src/ai/orchestration/snapshots.rs — the snapshot types and the per-field builders. Each *_snapshot(state, ctx) reads the live catalogs and delegates to a pure build_*_snapshot core (inputs injected for testability). The row inclusion/ordering/disabled-reason policy here was lifted from the old picker-population code as is, so no need to read too carefully.
  • app/src/ai/blocklist/inline_action/orchestration_controls.rs — the picker rewrites. Again, pretty much pure moves, so no need to read super carefully.

Testing

  • I have manually tested my changes locally with ./script/run
    Again, no behavior change

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 Jul 14, 2026

harryalbert commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@oz-for-oss

oz-for-oss Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@harryalbert

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

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

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.

Overview

This PR extracts orchestration configuration option-list construction into frontend-neutral snapshots and rewires the GUI picker population paths to render from those snapshots. I reviewed the attached diff, PR description, and spec context; no approved spec context was available, and I found no security findings.

Concerns

  • The PR changes user-facing GUI picker rendering and selection behavior, but the description does not include screenshots or a screen recording demonstrating the pickers working end to end. For this user-facing change, please include screenshots or a short recording covering the affected orchestration pickers so reviewers can verify the intended parity.

Verdict

Found: 0 critical, 0 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

@harryalbert
harryalbert force-pushed the harry/code-1822-option-snapshots branch 2 times, most recently from 6a11bfe to bf39ff7 Compare July 15, 2026 13:35
@harryalbert
harryalbert force-pushed the harry/code-1822-edit-state branch from 23b2eb1 to 932a2bf Compare July 15, 2026 13:35
Base automatically changed from harry/code-1822-edit-state to master July 15, 2026 16:34
harryalbert and others added 2 commits July 15, 2026 12:34
Option-taking from_run_agents_fields (churn all callers), extract
oz_model_menu_items helper, clearer module/fn docs, drop export comments.

Co-Authored-By: Oz <oz-agent@warp.dev>
@harryalbert
harryalbert force-pushed the harry/code-1822-option-snapshots branch from bf39ff7 to 9f1f151 Compare July 15, 2026 16:34
Drop selection-lookup and enum-mapping tests; keep ordering, filtering,
dedupe, stale-cache, and don't-clobber-selection policy tests.

Co-Authored-By: Oz <oz-agent@warp.dev>

@moirahuang moirahuang left a comment

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.

i know not all of the comments are bc of your newly added code! but they came up when i used /readout so i figured i'd flag. going to approve to unblock though

Comment thread app/src/ai/orchestration/snapshots.rs Outdated
Comment thread app/src/ai/orchestration/snapshots.rs
Comment thread app/src/ai/orchestration/snapshots.rs Outdated
known_slugs.push(slug);
}
if let Some(slug) = recent_host.filter(|s| !s.trim().is_empty()) {
if !known_slugs

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.

i don't fully understand this logic here. it seems like we're saying if the slug isn't known we label it as recent?

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.

recent_host is already sourced from the persisted last_selected_host; this condition isn’t inferring recency from an unknown slug. It only checks whether that recent slug was already added as the default, warp, or a connected host. If so, the earlier classification wins; otherwise we add the separate recent row.

Agreed though that known_slugs makes this unclear — I'll rename to added_slugs and add a short comment before this block.

@harryalbert harryalbert mentioned this pull request Jul 16, 2026
4 tasks
@harryalbert
harryalbert merged commit 73b2955 into master Jul 16, 2026
26 checks passed
@harryalbert
harryalbert deleted the harry/code-1822-option-snapshots branch July 16, 2026 12:01
ErshovDmitry added a commit to ErshovDmitry/warp-i18n that referenced this pull request Jul 16, 2026
…arpdotdev#13707/warpdotdev#13714)

Upstream sync (merge f71f181) extracted orchestration UI config into
app/src/ai/orchestration/ with raw English literals — our menu_label wraps
regressed in 4 files. Restore ~14 sites. Keys exist in en.yml.

- snapshots.rs: 4 const->fn (DEFAULT_MODEL_LABEL, AUTH_SECRET_INHERIT_LABEL,
  CUSTOM_HOST_LABEL, AUTH_SECRETS_LOAD_FAILED_MESSAGE) + 5 inline wraps
- providers.rs: ORCHESTRATION_ENV_NONE_LABEL const->pub fn (snake_case, lint-clean)
- validation.rs: 3 inline fn-return wraps (.to_string() preserved)
- config_state.rs: 1 inline method-return wrap (Option<&'static str>, no .to_string())
- mod.rs + tui_export.rs: re-exports updated (const->fn rename)
- orchestration_controls.rs + snapshots_tests.rs: consumer call-sites updated
- en/ru.yml: 3 new keys (custom_host, no_harnesses_available, no_models_available)

Russian: custom_host=Свой хост… (custom_inference precedent ru.yml:1513),
no_harnesses_available=Среды исполнения недоступны (no_tools_available precedent),
no_models_available=Модели недоступны.

Plans: 28ae0e1e + 215807cc (2 plan-review cycles — P 🔴=0;
2 code-review cycles — 🔴=0 🟡=0 🔵=2 cosmetic dismissed).
Gate: cargo check 0 NEW warnings (5 baseline mcp/), cargo test -p i18n 12/12,
orchestration tests 34/34, rustfmt clean, en/ru parity 23/23.

Deferred: host_picker.rs:54 separate CUSTOM_HOST_LABEL (different module, micro-plan TBD).
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