Skip to content

Extract launch profile config for both app and tui#13015

Merged
kevinyang372 merged 2 commits into
masterfrom
kevin/launch-profile-setup
Jun 25, 2026
Merged

Extract launch profile config for both app and tui#13015
kevinyang372 merged 2 commits into
masterfrom
kevin/launch-profile-setup

Conversation

@kevinyang372

@kevinyang372 kevinyang372 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Description

Refactors the per-channel "launch profile" setup so channel config loading is shared between the GUI app and the new warp_tui crate, and gives warp_tui its own per-channel binaries that mirror app/src/bin/*.

What changed:

  • New crates/warp_channel_config crate holding the load_config! macro and the channel-config loaders (runtime warp-channel-config generator + release_bundle embedded JSON). This is the single source of truth that was previously duplicated into each GUI bin via #[path] mod channel_config;.
  • Migrated the GUI app bins (local/dev/preview/stable) to warp_channel_config::load_config! and deleted app/src/bin/channel_config.rs. oss.rs and app/build.rs are unchanged — no behavior change for the app.
  • warp_tui now ships one binary per channel — warp-tui-oss (default-run, self-contained / OSS-safe), warp-tui (local), warp-tui-dev, warp-tui-preview, warp-tui-stable — each layering the same feature flags as the corresponding GUI bin and calling warp::run_tui().
  • Added crates/warp_tui/build.rs to embed channel config JSON under release_bundle (mirrors app/build.rs); the release_bundle feature forwards to warp/release_bundle.
  • Added ./script/run-tui, which selects the local channel when the warp-channel-config generator is on PATH (else oss), mirroring ./script/run.

Deferred until warp_tui has bundling/CI (does not exist yet): per-channel build profiles and the actual bundle/release steps.

Stacked on kevin/initial-tui-ui.

Linked Issue

No linked issue — internal refactor / dev tooling.

Testing

Validated locally:

  • cargo fmt --check clean for the touched crates.
  • cargo clippy -p warp_channel_config -p warp_tui --all-targets -- -D warnings (shared crate + all five TUI bins).
  • cargo check -p warp --bins (migrated GUI bins, non-bundle).
  • cargo check -p warp_tui --features release_bundle and cargo check -p warp --bin warp --features release_bundle — exercises the release_bundle embedded-config path end-to-end for both crates (the warp-channel-config generator was on PATH).

Run manually with cargo run -p warp_tui (OSS channel) or ./script/run-tui (local channel when the generator is installed). The internal-channel bins were not run end-to-end since they require interactive browser login.

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

Agent Mode

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

CHANGELOG-NONE

cc @vorporeal

@cla-bot cla-bot Bot added the cla-signed label Jun 24, 2026
@oz-for-oss

oz-for-oss Bot commented Jun 24, 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

kevinyang372 commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

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

@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 extracts channel config loading into a shared warp_channel_config crate and adds per-channel warp_tui binaries plus script/run-tui. The code/security pass did not find a concrete issue tied to the annotated diff lines, and there is no approved spec context to compare against.

Concerns

  • The PR changes user-perceivable TUI launch behavior, but the PR description leaves manual testing unchecked and includes no screenshot or screen recording demonstrating the new TUI launch paths working end to end. For this user-facing change, please include screenshots or a short recording demonstrating ./script/run-tui and the relevant channel/fallback behavior.

Verdict

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

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

nice

Comment thread crates/warp_tui/build.rs
use std::{env, fs};

fn main() {
println!("cargo:rerun-if-changed=build.rs");

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.

is println versus logging the convention in build scripts?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not for logging -- these are cargo flags

Comment thread crates/warp_tui/build.rs Outdated
println!("cargo:rerun-if-env-changed=WS_SERVER_URL");

let out_dir = env::var("OUT_DIR").expect("OUT_DIR must be set");
let family_arg = if target_family == "wasm" {

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.

does/should the TUI have the notion of wasm compilation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair -- we don't need WASM for TUI

Base automatically changed from kevin/initial-tui-ui to master June 24, 2026 22:08
@kevinyang372 kevinyang372 force-pushed the kevin/launch-profile-setup branch from 9edd275 to 97d7334 Compare June 24, 2026 22:09
@kevinyang372 kevinyang372 force-pushed the kevin/launch-profile-setup branch from 97d7334 to 03577f7 Compare June 25, 2026 17:28
@kevinyang372 kevinyang372 enabled auto-merge (squash) June 25, 2026 17:29
@kevinyang372 kevinyang372 merged commit eaacdf5 into master Jun 25, 2026
28 checks passed
@kevinyang372 kevinyang372 deleted the kevin/launch-profile-setup branch June 25, 2026 17:53
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