Skip to content

add tech spec#12932

Draft
harryalbert wants to merge 9 commits into
kevin/prototype-tuifrom
harry/share-terminal-model
Draft

add tech spec#12932
harryalbert wants to merge 9 commits into
kevin/prototype-tuifrom
harry/share-terminal-model

Conversation

@harryalbert

Copy link
Copy Markdown
Contributor

Description

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Agent Mode

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

harryalbert and others added 8 commits June 22, 2026 21:16
Remove the TUI short-circuit in run_internal so the headless app bootstraps the same singletons as other modes. Guard the terminal-server pty_spawner singleton (None for Tui) so it is only registered when present, skip the GUI-only ActiveSession singleton for Tui, and branch to tui::init after initialize_app instead of entering launch. The GUI path and registration order are otherwise unchanged.

Co-Authored-By: Oz <oz-agent@warp.dev>
Pull the view-free, PTY-spawn-free session core out of TerminalManager::create_model into a new build_session_core function returning a SessionCore (channels, Sessions, ModelEventDispatcher, TerminalModel via create_terminal_model, and PtyController). create_model now calls build_session_core for those steps, then continues to build the view, agent cluster, and wiring exactly as before, so GUI behavior and registration order are unchanged. The PTY itself is still spawned later in on_shell_determined (deferred, unchanged); a later phase extracts that spawn into a shared helper the TUI reuses. build_session_core is pub(crate) so the TUI session can call it directly.

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

Copy link
Copy Markdown
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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

1 participant