Warp to Galaxy internal rebrand

This commit is contained in:
2026-08-27 00:29:21 -05:00
parent d72874534d
commit a69b927cc3
108 changed files with 395 additions and 2098 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
//!
//! Usage:
//! ```
//! cargo run --bin generate_settings_schema -- [--channel dev|preview|stable] [output_path]
//! cargo run --bin generate_settings_schema -- [output_path]
//! ```
use std::io::Write;
@@ -19,7 +19,7 @@ fn main() {
ensure_settings_linked();
let args: Vec<String> = std::env::args().collect();
let mut channel = "dev";
let mut channel = "oss";
let mut output_path: Option<&str> = None;
let mut index = 1;
+2 -2
View File
@@ -12,7 +12,7 @@ fn main() -> Result<()> {
let mut state = ChannelState::new(
Channel::Oss,
ChannelConfig {
app_id: AppId::new("com", "galaxy", "Galaxy"),
app_id: AppId::new("com", "galaxy", "GalaxyOss"),
logfile_name: "galaxy.log".into(),
server_config: WarpServerConfig::disabled(),
oz_config: OzConfig::production(),
@@ -68,7 +68,7 @@ embed_plist::embed_info_plist_bytes!(r#"
<key>UIDesignRequiresCompatibility</key>
<true/>
<key>CFBundleURLTypes</key>
<array><dict><key>CFBundleURLName</key><string>Galaxy</string><key>CFBundleURLSchemes</key><array><string>galaxy</string></array></dict></array>
<array><dict><key>CFBundleURLName</key><string>Galaxy</string><key>CFBundleURLSchemes</key><array><string>galaxyoss</string></array></dict></array>
<key>NSHumanReadableCopyright</key>
<string>© 2026, Galaxy Project</string>
<key>NSDockTilePlugIn</key>
+4 -7
View File
@@ -64,11 +64,9 @@ fn active_flags_for_channel(channel: &str) -> HashSet<FeatureFlag> {
let mut flags = HashSet::new();
let flag_lists: &[&[FeatureFlag]] = match channel {
"stable" => &[RELEASE_FLAGS],
"preview" => &[RELEASE_FLAGS, PREVIEW_FLAGS],
"dev" => &[RELEASE_FLAGS, PREVIEW_FLAGS, DOGFOOD_FLAGS, DEBUG_FLAGS],
"oss" | "integration" => &[RELEASE_FLAGS, PREVIEW_FLAGS, DOGFOOD_FLAGS, DEBUG_FLAGS],
other => {
log::warn!("Unknown settings schema channel '{other}', defaulting to dev");
log::warn!("Unknown settings schema channel '{other}', defaulting to oss");
&[RELEASE_FLAGS, PREVIEW_FLAGS, DOGFOOD_FLAGS, DEBUG_FLAGS]
}
};
@@ -190,9 +188,8 @@ pub fn generate_settings_schema(channel: &str) -> (String, usize) {
fn runtime_schema_channel() -> &'static str {
match ChannelState::channel() {
Channel::Stable => "stable",
Channel::Preview => "preview",
Channel::Dev | Channel::Local | Channel::Oss | Channel::Integration => "dev",
Channel::Stable | Channel::Preview | Channel::Dev | Channel::Local | Channel::Oss => "oss",
Channel::Integration => "integration",
}
}
+3 -6
View File
@@ -3,7 +3,6 @@ use std::path::Path;
use command::r#async::Command;
use galaxy_core::channel::ChannelState;
use galaxy_core::AppId;
use galaxyui::ApplicationBundleInfo;
use instant::Instant;
use objc2::rc::{autoreleasepool, Retained};
@@ -347,7 +346,7 @@ pub fn open_file_path_with_line_and_col(
if let Some(bundle_id) = bundle_id.as_deref() {
let current = ChannelState::app_id().to_string();
if bundle_id != current
&& is_warp_bundle(bundle_id)
&& is_galaxy_bundle(bundle_id)
&& open_with_bundle(&current, full_path)
{
return;
@@ -357,10 +356,8 @@ pub fn open_file_path_with_line_and_col(
ctx.open_file_path(full_path);
}
fn is_warp_bundle(bundle_id: &str) -> bool {
AppId::parse(bundle_id)
.map(|id| id.qualifier() == "dev" && id.organization() == "warp")
.unwrap_or(false)
fn is_galaxy_bundle(bundle_id: &str) -> bool {
bundle_id == "com.galaxy.GalaxyOss"
}
fn open_with_bundle(bundle_id: &str, path: &Path) -> bool {
+9 -12
View File
@@ -1,18 +1,15 @@
use super::is_warp_bundle;
use super::is_galaxy_bundle;
#[test]
fn is_warp_bundle_recognises_warp_channels() {
assert!(is_warp_bundle("dev.warp.Warp"));
assert!(is_warp_bundle("dev.warp.WarpDev"));
assert!(is_warp_bundle("dev.warp.WarpPreview"));
assert!(is_warp_bundle("dev.warp.WarpOss"));
fn is_galaxy_bundle_recognises_oss() {
assert!(is_galaxy_bundle("com.galaxy.GalaxyOss"));
}
#[test]
fn is_warp_bundle_rejects_other_apps() {
assert!(!is_warp_bundle("com.microsoft.VSCode"));
assert!(!is_warp_bundle("com.apple.TextEdit"));
assert!(!is_warp_bundle("dev.zed.Zed"));
assert!(!is_warp_bundle("invalid"));
assert!(!is_warp_bundle(""));
fn is_galaxy_bundle_rejects_other_apps() {
assert!(!is_galaxy_bundle("com.microsoft.VSCode"));
assert!(!is_galaxy_bundle("com.apple.TextEdit"));
assert!(!is_galaxy_bundle("dev.warp.WarpOss"));
assert!(!is_galaxy_bundle("invalid"));
assert!(!is_galaxy_bundle(""));
}