Extract launch profile config for both app and tui#13015
Conversation
|
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 Powered by Oz |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
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-tuiand 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
| use std::{env, fs}; | ||
|
|
||
| fn main() { | ||
| println!("cargo:rerun-if-changed=build.rs"); |
There was a problem hiding this comment.
is println versus logging the convention in build scripts?
There was a problem hiding this comment.
This is not for logging -- these are cargo flags
| 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" { |
There was a problem hiding this comment.
does/should the TUI have the notion of wasm compilation?
There was a problem hiding this comment.
Fair -- we don't need WASM for TUI
9edd275 to
97d7334
Compare
97d7334 to
03577f7
Compare

Description
Refactors the per-channel "launch profile" setup so channel config loading is shared between the GUI app and the new
warp_tuicrate, and giveswarp_tuiits own per-channel binaries that mirrorapp/src/bin/*.What changed:
crates/warp_channel_configcrate holding theload_config!macro and the channel-config loaders (runtimewarp-channel-configgenerator +release_bundleembedded JSON). This is the single source of truth that was previously duplicated into each GUI bin via#[path] mod channel_config;.local/dev/preview/stable) towarp_channel_config::load_config!and deletedapp/src/bin/channel_config.rs.oss.rsandapp/build.rsare unchanged — no behavior change for the app.warp_tuinow 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 callingwarp::run_tui().crates/warp_tui/build.rsto embed channel config JSON underrelease_bundle(mirrorsapp/build.rs); therelease_bundlefeature forwards towarp/release_bundle../script/run-tui, which selects thelocalchannel when thewarp-channel-configgenerator is on PATH (elseoss), mirroring./script/run.Deferred until
warp_tuihas 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 --checkclean 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_bundleandcargo check -p warp --bin warp --features release_bundle— exercises therelease_bundleembedded-config path end-to-end for both crates (thewarp-channel-configgenerator 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../script/runAgent Mode
CHANGELOG-NONE
cc @vorporeal