Skip to content

Fix warp_tui compile error: thread RequestTeamScope through TUI voice transcription - #15570

Merged
MaggieShan merged 1 commit into
masterfrom
factory/fix-tui-transcribe-team-scope
Aug 26, 2026
Merged

Fix warp_tui compile error: thread RequestTeamScope through TUI voice transcription#15570
MaggieShan merged 1 commit into
masterfrom
factory/fix-tui-transcribe-team-scope

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a compile error breaking every TUI release build (dev/preview/stable, all archs) in the scheduled Cut New Releases workflow.

PR #15554 ("Scope /ai/transcribe to the window's team") added a third team_scope: RequestTeamScope parameter to Transcriber::transcribe and updated the GUI call site (EditorView::handle_voice_session_result), but missed the TUI call site in TuiVoiceInputModel::handle_session_result (crates/warp_tui/src/voice_input.rs). That module is compiled only when the voice_input feature is enabled — which only the TUI release build does — so the mismatch escaped both warp's and warp_tui's normal CI.

This PR threads a RequestTeamScope into the TUI call site the same way the GUI does: UserWorkspaces::team_context_resolver is captured from the owning TuiInputView's ViewContext at construction time (when a window is still reachable) and stored on TuiVoiceInputModel, which only has a ModelContext by the time it needs to resolve the scope and spawn the transcription future off the main thread.

Linked Issue

No tracked issue — this is a release-blocking build break reported directly from a failing GitHub Actions run in warp-internal.

Testing

  • cargo check -p warp_tui --bin warp-tui-oss --features release_bundle,standalone,voice_input — passes. This mirrors the exact feature set script/macos/bundle (and the Linux/Windows equivalents) use to build the TUI release artifact.
  • cargo clippy -p warp_tui --bin warp-tui-oss --features release_bundle,standalone,voice_input -- -D warnings — passes.
  • ./script/format — no changes needed.
  • Existing unit tests in crates/warp_tui/src/voice_input_tests.rs were updated for the new TuiVoiceInputModel::new parameter (using UserWorkspaces::teamless_context_resolver_for_test(), matching the existing pattern in test_fixtures.rs). I could not run cargo test -p warp_tui --features voice_input,test-util in this sandbox: that path enables warpui_core/test-util (via warp/test-utilwarp_terminal/test-util) without warpui's own, separately-declared test-util feature, which is what actually gates the Delegate impl blocks that provide get_cursor_shape() in crates/warpui. That feature-wiring mismatch between warpui_core and warpui (not a missing implementation, and not platform-specific — the macOS impl is gated the same way) makes the build fail with E0046 (not all trait items implemented: get_cursor_shape). I confirmed this reproduces identically on unmodified master with the same feature flags, so it isn't caused by this change — flagging it since it also blocks running these tests in CI's test-util paths. (Filed a fuller writeup of this in Cover warp_tui's opt-in features (voice_input, etc.) in presubmit and CI clippy #15575, a presubmit/CI-coverage follow-up.)

Presubmit coverage gap: script/presubmit runs cargo clippy --workspace --exclude warp_completer --all-targets --tests and cargo clippy -p warp --all-targets --tests, neither with --all-features (explicitly disabled via a TODO comment) nor --features voice_input. Since voice_input is an opt-in, non-default feature on warp_tui, presubmit never compiles voice_input.rs. That's exactly how a green PR broke every TUI release build. Not fixed here per scope; filed as #15575.

  • I have manually tested my changes locally with ./script/run (not applicable — headless TUI compile fix, no warp-server/device available to exercise a live transcription request in this environment)

Agent Mode

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

PR #15554 added a team_scope: RequestTeamScope parameter to
Transcriber::transcribe, updating the GUI call site
(EditorView::handle_voice_session_result) but missing the TUI call
site in TuiVoiceInputModel::handle_session_result. This broke every
TUI release build (voice_input is only compiled by the release
workflow's --features voice_input, which presubmit does not exercise).

Derive the scope the same way the GUI does, via
UserWorkspaces::team_context_resolver, captured from the owning
TuiInputView's ViewContext at construction time (before the
transcription future is spawned off the main thread) and threaded
into TuiVoiceInputModel, which only has a ModelContext at the point it
needs the scope.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View on Slack

@MaggieShan
MaggieShan marked this pull request as ready for review August 26, 2026 15:37
@alokedesai alokedesai closed this Aug 26, 2026
@alokedesai alokedesai reopened this Aug 26, 2026
@MaggieShan
MaggieShan enabled auto-merge (squash) August 26, 2026 15:40
@MaggieShan MaggieShan closed this Aug 26, 2026
auto-merge was automatically disabled August 26, 2026 17:18

Pull request was closed

@MaggieShan MaggieShan reopened this Aug 26, 2026
@MaggieShan
MaggieShan merged commit 43de7e4 into master Aug 26, 2026
39 of 44 checks passed
@MaggieShan
MaggieShan deleted the factory/fix-tui-transcribe-team-scope branch August 26, 2026 17:46
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.

3 participants