Skip to content

[APP-4908] Scope TUI model selection to the session - #14737

Merged
kevinyang372 merged 2 commits into
masterfrom
kevin/app-4908-tui-session-model
Aug 5, 2026
Merged

[APP-4908] Scope TUI model selection to the session#14737
kevinyang372 merged 2 commits into
masterfrom
kevin/app-4908-tui-session-model

Conversation

@kevinyang372

@kevinyang372 kevinyang372 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Description

Fixes the Warp Agent CLI model picker so choosing a model creates a session-scoped override instead of changing the active execution profile for every session.

The picker now resolves selection state for its terminal surface, labels the profile model with (default), and refreshes the statusline and open picker when execution-profile settings change. Sessions without an override follow a newly configured profile default, while sessions with an override remain pinned.

Linked Issue

APP-4908

  • 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

  • cargo nextest run -p warp_tui — 952 passed; one existing test reported as leaky.

  • Focused session-isolation and default-label tests passed.

  • ./script/format --check passed.

  • Clippy passed for warp_tui and warp with warnings denied.

  • Manually verified with ./script/run-tui under tmux:

    • the profile model rendered with (default);
    • selecting another model updated the current session statusline;
    • reopening the picker preserved the profile's (default) marker.
  • Additional full presubmit run skipped per request.

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

Agent Mode

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

CHANGELOG-BUG-FIX: Fixed the Warp Agent CLI model picker changing the default model for every session.
CHANGELOG-TUI: Model selection now applies only to the current session and identifies the profile default.

Co-Authored-By: Warp Agent agent@warp.dev

Co-Authored-By: Warp Agent <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2026
@kevinyang372
kevinyang372 requested a review from moirahuang August 5, 2026 18:50
@kevinyang372
kevinyang372 marked this pull request as ready for review August 5, 2026 18:50
@oz-for-oss

oz-for-oss Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@kevinyang372

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 moves TUI model selection from updating the active execution profile to setting a session-scoped Agent Mode override, adds (default) labeling for the active profile model, refreshes TUI surfaces on execution-profile setting changes, and adds coverage for the new behavior.

Concerns

  • ⚠️ Selecting the displayed profile default can still create a stale per-session override for custom endpoints or custom routers, so the session may stop following future profile default changes.
  • ⚠️ This user-facing TUI change does not include accepted visual evidence in the PR description. Please attach a terminal transcript, render_to_lines / TuiBuffer::to_lines snapshot diff, or ./script/run-tui capture demonstrating the default label and session-scoped selection end to end.

Verdict

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

Comment thread crates/warp_tui/src/terminal_session_view.rs
Comment thread crates/warp_tui/src/terminal_session_view.rs
Co-Authored-By: Warp Agent <agent@warp.dev>
@kevinyang372
kevinyang372 enabled auto-merge (squash) August 5, 2026 19:38
@kevinyang372
kevinyang372 merged commit 9b65722 into master Aug 5, 2026
26 checks passed
@kevinyang372
kevinyang372 deleted the kevin/app-4908-tui-session-model branch August 5, 2026 19:54
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