Skip to content

add TUI orchestration permission and configuration card#13717

Open
harryalbert wants to merge 20 commits into
harry/code-1822-tui-option-selectorfrom
harry/code-1822-tui-orchestration-card
Open

add TUI orchestration permission and configuration card#13717
harryalbert wants to merge 20 commits into
harry/code-1822-tui-option-selectorfrom
harry/code-1822-tui-orchestration-card

Conversation

@harryalbert

@harryalbert harryalbert commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the TUI permission and configuration card for a blocked RunAgents request. When the request reaches the front of the confirmation queue, the card becomes the active interaction: it replaces the normal input/footer and warping row without mutating the input draft, cursor, selection, mode, or scroll state. Accept dispatches the edited request through the existing shared orchestration executor; Reject follows the existing action-cancellation path.

The acceptance card shows the proposed agents with deterministic theme-derived color/glyph identities and the resolved run-wide configuration. Ctrl+E opens a sequence of single-field configuration pages built on the reusable TuiOptionSelector from the PR below. Cloud runs expose Location, Harness, optional API key, Host, Environment, and Model; Local runs force the Warp harness and collapse the flow to Location and Model. Enter, Tab, arrows, Escape, Ctrl+C, numeric shortcuts, search, and mouse input all follow the TUI-specific interaction model while selections/defaults/validation come from the shared orchestration state and option snapshots.

The card re-resolves approved plan configuration and live harness/model/secret/worker catalogs, validates before launch, preserves the per-call computer-use setting, and falls back to the existing non-interactive tool-call presentation for streaming, spawning, restored, and terminal states.

This PR is intentionally mostly leaf-node TUI UI plus focus/layout event threading. It does not add a new orchestration executor or duplicate the orchestration domain model; it consumes the shared behavior and reusable editor/selector primitives established downstack.

Linked Issue

CODE-1822 — Orchestration

Visual verification

The end-to-end behavior and visual treatment are best reviewed in the walkthrough:

Watch the TUI orchestration card walkthrough on Loom

Because this change is mostly UI composition and event threading, please use the video as the primary verification artifact, then use the code paths below to review the state transitions behind it.

Review guide

Start here

  • crates/warp_tui/src/orchestration_block/render.rs — acceptance/configuration presentation, metadata, identities, validation copy, and terminal-state fallback.
  • crates/warp_tui/src/orchestration_block.rs — card modes, keybindings, dynamic page navigation, catalog subscriptions, focus ownership, accept/reject lifecycle, and request re-syncing.
  • crates/warp_tui/src/orchestration_block/configuration.rs — the small adapter from each page to shared option snapshots, edit-state transitions, validation, and dispatch.
  • crates/warp_tui/src/orchestration_block_tests.rs — focused coverage for page sequencing, plan inheritance, request reconstruction, navigation/focus, and exactly-once dispatch.

Integration threading

  • crates/warp_tui/src/agent_block.rs — materializes a card for streamed RunAgents actions, routes Reject, and derives the front-of-queue blocking child.
  • crates/warp_tui/src/terminal_session_view.rs and crates/warp_tui/src/transcript_view.rs — thread blocker changes upward, transfer focus, and derive input/footer visibility without storing a suppression flag or modifying input state.
  • crates/warp_tui/src/orchestrated_agent_identity_styling.rs and crates/warp_tui/src/tui_builder.rs — deterministic agent identities and theme-derived orchestration styles.

Skim / supporting plumbing

  • app/src/tui_export.rs, app/src/ai/blocklist/{mod.rs,action_model.rs}, and app/src/settings/init.rs expose existing shared models/executors or test seams to the TUI; they do not introduce new orchestration behavior.
  • crates/warp_tui/src/{lib.rs,keybindings.rs,test_fixtures.rs} wires modules, bindings, and test construction.
  • The one-line changes in existing test files are exhaustiveness/registration updates caused by the new view/event variants.
  • specs/CODE-1822/TECH.md records the detailed implementation mapping and is useful as reference, but the runtime behavior is concentrated in the files above.

Testing

  • Manually tested locally with ./script/run-tui
  • Visually verified the end-to-end acceptance and configuration flow; see the Loom walkthrough above
  • Added focused unit coverage for page sequencing, inherited configuration, request rebuilding, selector navigation, focus restoration, exactly-once decisions, keybinding registration, and deterministic agent identities

Screenshots / Videos

https://www.loom.com/share/552c213960c54c5c84fad85a726dd08e

Agent Mode

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

CHANGELOG-NONE

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

@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 7d2212b to 41d0b00 Compare July 14, 2026 22:30
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from 14042e6 to 406061d Compare July 14, 2026 22:30
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch 2 times, most recently from 4c05fe7 to a38b81e Compare July 15, 2026 13:22
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from ba49160 to d079c43 Compare July 15, 2026 13:22
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from a38b81e to ed04147 Compare July 15, 2026 13:35
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from d079c43 to 891ad83 Compare July 15, 2026 13:35
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from ed04147 to d581556 Compare July 15, 2026 16:33
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from 891ad83 to 8bb2a10 Compare July 15, 2026 16:33
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from d581556 to 53c9d22 Compare July 15, 2026 16:59
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from 8bb2a10 to 046ec66 Compare July 15, 2026 16:59
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 53c9d22 to db49817 Compare July 15, 2026 18:27
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from db49817 to 07f43ac Compare July 15, 2026 18:55
@harryalbert
harryalbert changed the base branch from harry/code-1822-tui-option-selector to graphite-base/13717 July 15, 2026 20:28
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 07f43ac to 0503bbd Compare July 15, 2026 22:12
@harryalbert
harryalbert changed the base branch from graphite-base/13717 to harry/code-1822-tui-option-selector July 15, 2026 22:12
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 0503bbd to 6cf263f Compare July 16, 2026 02:44
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from 199ce8a to 1e3458b Compare July 16, 2026 02:44
@harryalbert
harryalbert changed the base branch from harry/code-1822-tui-option-selector to graphite-base/13717 July 16, 2026 03:23
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 6cf263f to 70fcf39 Compare July 16, 2026 11:57
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from 194fd82 to a37739b Compare July 16, 2026 22:12
@harryalbert
harryalbert force-pushed the graphite-base/13717 branch from af6c184 to 36b0f8c Compare July 16, 2026 22:12
@harryalbert
harryalbert changed the base branch from graphite-base/13717 to harry/code-1822-tui-option-selector July 16, 2026 22:13
@harryalbert harryalbert mentioned this pull request Jul 16, 2026
4 tasks

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

  1. we can see how erica feels about this but if we only have 1 menu item i think we can auto select it

Screenshot 2026-07-16 at 3.02.15 PM.png

  1. i had previously selected haiku. when i cancelled and spun up the orchestration cards again, the subagents were still called haiku. can we double check how we're saving the subagent names? i know there's some autogeneration involved so i'm not entirely sure if this is just the agent's choice

Screenshot 2026-07-16 at 3.04.52 PM.png

  1. we should sort by value of the number, not just per character so 10 is after 6

Screenshot 2026-07-16 at 3.25.33 PM.png

  1. nit: can we scroll if the input is too long instead of jumping to the start? and can we do this in a more general way, not just for the custom input

Screen Recording 2026-07-16 at 3.37.41 PM.mov (uploaded via Graphite)

  1. can we keep the icon on the same row as the subagent name?

Screenshot 2026-07-16 at 3.39.44 PM.png

  1. maybe it's just me but i didn't realize i should just type to search. i wonder if there's a visual indicator we can add here somehow (also maybe an erica question)

Screenshot 2026-07-16 at 3.42.05 PM.png

pub execution_mode: RunAgentsExecutionMode,
/// Per-call value hidden from the orchestration editors. Kept outside
/// `execution_mode` so a temporary switch to Local does not discard it.
remote_computer_use_enabled: bool,

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.

why is remote_computer_use_enabled stored outside of execution_mode but other fields are not?

harryalbert and others added 20 commits July 16, 2026 19:09
Co-Authored-By: Oz <oz-agent@warp.dev>
Keep persistent tinted card chrome, add Tab/arrow page navigation, match
spacing/copy/footer styling, and normalize Tab events in the TUI runtime.

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

Map the selector's LayoutChanged to BlockingStateChanged so the transcript
remeasures the card when overflow markers appear, hide the warping/summary
row while a blocker is active, add a footer margin, and keep agent glyphs
and colors unique within a request until each set is exhausted.

Co-Authored-By: Oz <oz-agent@warp.dev>
Fixes clippy::should_implement_trait on the now-pub method.

Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-orchestration-card branch from a37739b to d2f380b Compare July 16, 2026 23:09
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-option-selector branch from 36b0f8c to 1660f1c Compare July 16, 2026 23:09
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