extract orchestration edit state into a frontend-neutral module#13707
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
a117f6e to
22bc7be
Compare
Co-Authored-By: Oz <oz-agent@warp.dev>
Compose RunAgentsEditState from config state + card fields, rename transitions module to edit_state, drop the constant should_show_harness_picker seam, and trim doc comments. Co-Authored-By: Oz <oz-agent@warp.dev>
22bc7be to
97993fd
Compare
Drop constructor-mapping, setter, and selectability tests whose behavior is covered by the accept-gate and snapshot-level tests; keep transition, gating, and catalog-revalidation policy tests. Co-Authored-By: Oz <oz-agent@warp.dev>
|
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 Powered by Oz |
There was a problem hiding this comment.
Overview
This PR extracts orchestration run-config edit state and validation into a frontend-neutral module and updates the GUI confirmation card, plan-card config block, executor helpers, exports, and tests to use the new shared types.
Concerns
- For this user-facing change, please include screenshots or a screen recording demonstrating the orchestration confirmation card and plan-card config block still working end to end. The diff changes the rendered picker/editor paths for those UI surfaces, but the PR description only mentions manual
./script/runtesting and does not include visual evidence.
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
moirahuang
left a comment
There was a problem hiding this comment.
phew this was more just moving around code than logic change but i got scared by the LOC changed
23b2eb1 to
932a2bf
Compare
…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).

Description
Extracts the orchestration run-config editing domain out of the GUI-only
orchestration_controls.rsinto a frontend-neutralapp/src/ai/orchestration/module, so the TUI orchestration card (upstack in this stack) can share the exact same state, transitions, and validation as the GUI confirmation card and plan-card config block. No behavior change intended.The module is split into:
config_state.rs—OrchestrationConfigState(the run-wide model/harness/execution-mode/auth fields; renamed from the oldOrchestrationEditState) andAuthSecretSelection.edit_state.rs— the newOrchestrationEditState(config state + per-harness model memory) and theapply_execution_mode_change/apply_harness_change/revalidate_after_catalog_changetransitions, consolidated from loose GUI helper functions into state methods. Each has a_corevariant with injected catalog callbacks so transitions are unit-testable without app singletons.validation.rs— Accept gating and picker-visibility predicates, plusharness_is_selectable(extracted from inline picker filtering so both frontends filter identically).providers.rs—AppContext-backed catalog lookups, default host/environment/auth-secret resolution, and persistence helpers.Review guide
New code:
app/src/ai/orchestration/edit_state.rs— the only substantially new code: the consolidated transitions and the config-state/model-memory split. Previously this logic was interleaved with picker repopulation inapply_harness_change/apply_execution_mode_change/repopulate_all_pickersinorchestration_controls.rs; behavior should be identical.app/src/ai/blocklist/inline_action/run_agents_card_view.rs— the card'sRunAgentsEditStateis split into run-wide config vs card-only fields, and per-harness model memory moves off the view ontoOrchestrationEditState. Mostly mechanical, but this is where a behavior regression would hide.Skim (moved code, bodies unchanged):
app/src/ai/orchestration/config_state.rs,providers.rs, and most ofvalidation.rs— cut/paste fromorchestration_controls.rs(andcan_execute_with_auth_secret/populate_default_auth_secret_for_executionfrom therun_agents.rsexecutor), with GUI-typedViewContextparams relaxed toAppContext.app/src/ai/blocklist/inline_action/orchestration_controls.rs— almost entirely deletions plus re-exports of the moved items; what remains is GUI rendering/picker population only.Skim (mechanical caller churn):
orchestration_config_block.rs,run_agents.rs,queued_query_tests.rs,run_agents_card_view_tests.rs— renames to the new paths/field names.app/src/ai/mod.rs,orchestration/mod.rs,tui_export.rs— wiring/exports.specs/code-1822-edit-state/TECH.md— the tech spec for this slice.Testing
./script/runAgent Mode