warpui_core: TUI presenter, runtime (crossterm), and end-to-end integration#12601
Draft
zachbai wants to merge 1 commit into
Draft
warpui_core: TUI presenter, runtime (crossterm), and end-to-end integration#12601zachbai wants to merge 1 commit into
zachbai wants to merge 1 commit into
Conversation
This was referenced Jun 13, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
97dfb64 to
a394966
Compare
3 tasks
0a1c519 to
a096d97
Compare
a394966 to
bfdb43e
Compare
a096d97 to
d2989fd
Compare
bfdb43e to
5ff450f
Compare
5ff450f to
e56a95a
Compare
d2989fd to
33719f7
Compare
33719f7 to
dbe7255
Compare
e56a95a to
c21f89c
Compare
7402b63 to
2b8f634
Compare
563dbc6 to
f9b1d70
Compare
2b8f634 to
6f914f0
Compare
f9b1d70 to
4554c48
Compare
4554c48 to
b3281f9
Compare
6f914f0 to
8f0d783
Compare
This was referenced Jun 17, 2026
8f0d783 to
14b05a4
Compare
1cbe74f to
f17adcd
Compare
14b05a4 to
0dbf678
Compare
f17adcd to
8521248
Compare
0dbf678 to
53736a1
Compare
zachbai
added a commit
that referenced
this pull request
Jun 18, 2026
…ain (#12413) ## Description First PR in a stack that adds an optional TUI backend to `warpui`. This PR is **only** the backend-neutral groundwork — no TUI code, no behavioral change. Today the view responder chain (focus/blur, action dispatch, ancestor walks) is derived from the **GUI presenter's** layout-time parent map. This PR moves that ownership into `AppContext` so any backend can drive it: - New `AppContext.view_parents` — a per-window child→parent view map. - Fed from two sources: creation-time structural parentage (`record_view_parent`) and the active backend's render pass (`report_view_embeddings`). - Walked by `view_ancestors` / `view_parent_map`; all responder-chain / focus / dispatch sites now read this map instead of `presenter.ancestors()`. - The GUI presenter is updated to feed `report_view_embeddings`, so GUI behavior is unchanged. This is a behavior-preserving, GUI-only refactor. The TUI presenter feeds the same map later in the stack (#12601). **Reviewing (3 files):** `app.rs` is the substance — the map, its accessors, and the call-site swaps. `presenter.rs` wires the GUI render pass to report embeddings. The test swaps `presenter.ancestors()` → `ctx.view_ancestors()`. ## Stack `master` → **#12413 (this)** → #12633 → #12634 → #12601 ## Testing - [x] `cargo check -p warpui_core -p warp -p warpui` clean; `cargo nextest -p warpui_core` 279 passed / 7 skipped. - No manual run: no behavioral change. ## Agent Mode - [x] Warp Agent Mode CHANGELOG-NONE --------- Co-authored-by: Oz <oz-agent@warp.dev>
8521248 to
d2ddc72
Compare
53736a1 to
eaa0508
Compare
d2ddc72 to
ab42c95
Compare
eaa0508 to
01cd3c6
Compare
This was referenced Jun 18, 2026
Draft
zachbai
added a commit
that referenced
this pull request
Jun 19, 2026
## Description * Add `tui` cargo feature flag * Add `TuiElement` interface which diverges from gui `Element` * Add TUI-specific mirrors of `View` traits and APIs; these depend on `TuiElement` * Abstract out `AnyView to wrapper "router" `StoredView` enum which delegates to `AnyView`/`AnyTuiView` wrapper * Implement initial `Tui` presenter types - event context, presentation context * Move all existing GUI elements to re-exported GUI submodule of elements ## Stack #12413 → **#12633 (this)** → #12634 → #12601 ## Testing - [x] `cargo check -p warpui_core -p warp -p warpui` clean in **both** default and `--features tui`. - [x] `cargo nextest -p warpui_core`: 286/7 (default), 311/7 (`--features tui`). ## Agent Mode - [x] Warp Agent Mode CHANGELOG-NONE --------- Co-authored-by: Oz <oz-agent@warp.dev>
…ration Adds the TUI presenter (presenter/tui.rs: lays out and paints a root element tree and reports view embeddings into the neutral view hierarchy) and the crossterm runtime (runtime/: the alternate-screen draw+event loop, renderer, and crossterm -> warp event conversion), dispatching typed actions through the shared responder chain. Drops the scoped #[allow(dead_code)] from the seam slice now that the runtime drains those event.rs methods/fields and constructs TuiPresentationContext. Includes the end-to-end tui_integration test. Co-Authored-By: Oz <oz-agent@warp.dev>
ab42c95 to
5818929
Compare
01cd3c6 to
a09fa6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Final PR in the stack: wires the TUI elements (#12634) into a working backend. Behind the
tuifeature; default builds are unaffected.presenter/tui.rs): an immediate-mode render pass that lays out theTuiElementtree and feeds the shared view hierarchy viareport_view_embeddings(the map introduced in warpui_core: backend-neutral view hierarchy for a shared responder chain #12413) — so focus and action dispatch work identically to GUI.runtime/*): acrosstermrenderer plus terminal-event →warpuievent conversion, driving redraws through the samewindow_invalidationsthe GUI uses.crosstermadded as an optional dependency, gated ontui.tests/tui_integration.rs) exercising the full stack.Design note: TUI rendering is intentionally immediate-mode and does not adopt the GUI's two-phase scene cache — the two render paths stay divergent by design.
Reviewing: start at
presenter/tui.rs(render pass + embedding wiring), thenruntime/(crossterm renderer + event conversion). Everything istui-gated.Stack
#12413 → #12633 → #12634 → #12601 (this)
Testing
cargo check -p warpui_core -p warp -p warpuiclean in both default and--features tui.cargo nextest -p warpui_core --features tui: 365/7; integration test passes.Agent Mode
CHANGELOG-NONE