From 356f01b2f0593729297fb733fdf0777f955ca124 Mon Sep 17 00:00:00 2001 From: skylar taylor-barrick Date: Thu, 26 Nov 2026 00:47:29 -0600 Subject: [PATCH 1/2] Nightly: stop blocking a refused launch on macOS (#853) Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2). --- apps/texturecraft/src/main.rs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/apps/texturecraft/src/main.rs b/apps/texturecraft/src/main.rs index 664b791a..4d48c210 100644 --- a/apps/texturecraft/src/main.rs +++ b/apps/texturecraft/src/main.rs @@ -259,13 +259,22 @@ fn initialize_nightly_process_identity() -> Result<(), process_identity::Identit process_identity::initialize(build_flavor::COMPILED == build_flavor::BuildFlavor::NightlyV1, os_window::id_for(LaunchIdentity::NightlyV1)) } -/// A refused Nightly start explains itself in a dialog where there is a desktop to show one. +/// Whether a refusal may also open a native message box. Standard error always carries the reason; +/// this only adds a box where one renders without the app's event loop. Never on macOS: rfd's alert +/// there needs the AppKit run loop this start has not reached, so a refused nightly launch hung in +/// an invisible modal instead of exiting (GridCraft Mac smoke, 2026-11-26). +fn refusal_dialog(flavor: build_flavor::BuildFlavor, desktop_session: bool, macos: bool) -> bool { + build_flavor::needs_native_error(flavor, desktop_session) && !macos +} + +/// A refused Nightly start explains itself in a dialog where the desktop shows one without the +/// app's run loop (Windows, X11/Wayland); macOS gets the standard-error line only. fn report_launch_profile_error(error: &str) { eprintln!("texturecraft: {error}"); let desktop_session = cfg!(windows) || cfg!(target_os = "macos") || (cfg!(target_os = "linux") && ["DISPLAY", "WAYLAND_DISPLAY"].into_iter().any(|key| std::env::var_os(key).is_some_and(|v| !v.is_empty()))); - if build_flavor::needs_native_error(build_flavor::COMPILED, desktop_session) { + if refusal_dialog(build_flavor::COMPILED, desktop_session, cfg!(target_os = "macos")) { if let Err(error) = initialize_nightly_process_identity() { eprintln!("texturecraft: {error}"); return; @@ -667,3 +676,17 @@ mod tests { assert!(seen.is_some_and(|seen| seen.distance(pad + DRAG_STEP) <= PUT_BACK_REACH), "the app reads the whole move: {seen:?}"); } } + +#[cfg(test)] +mod refusal_dialog_tests { + use super::refusal_dialog; + use crate::build_flavor::BuildFlavor; + + #[test] + fn a_refusal_never_blocks_on_a_modal_before_the_event_loop_on_macos() { + assert!(refusal_dialog(BuildFlavor::NightlyV1, true, false), "a desktop refusal still shows the box where one renders"); + assert!(!refusal_dialog(BuildFlavor::NightlyV1, true, true), "macOS has no run loop yet: the modal would hang"); + assert!(!refusal_dialog(BuildFlavor::NightlyV1, false, false), "a headless session has no box"); + assert!(!refusal_dialog(BuildFlavor::Stable, true, false), "only a nightly refusal explains itself in a box"); + } +} From 3695db1d44205e74be60ea6ad9b8cbc050324271 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:50:40 +0700 Subject: [PATCH 2/2] Warp toolbar test: install the headless runtime on its harness Main's CI has failed since #837 merged: place_on_surface_keeps_a_warp_on_its_own_texture_set builds its harness without framework::install_headless, which the framework runtime needs since #800, and panics with "the runtime plugin's hooks did not run". Every other harness already installs it. --- crates/ui-egui/src/frame_gizmo/warp_toolbar/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/frame_gizmo/warp_toolbar/mod.rs b/crates/ui-egui/src/frame_gizmo/warp_toolbar/mod.rs index 042f4f39..6bb7d226 100644 --- a/crates/ui-egui/src/frame_gizmo/warp_toolbar/mod.rs +++ b/crates/ui-egui/src/frame_gizmo/warp_toolbar/mod.rs @@ -253,7 +253,10 @@ mod tests { let _language = crate::i18n::TEST_LANGUAGE.lock().unwrap_or_else(std::sync::PoisonError::into_inner); let mesh = texturecraft_engine::geom::primitives::material_ball(); let session = texturecraft_engine::Session::new_project("Warp placement", mesh, "builtin:material_ball", None, 128).unwrap(); - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).build_eframe(|context| TextureCraftApp::new(context, session)); + let mut harness = Harness::builder() + .with_size(vec2(1600.0, 960.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|context| TextureCraftApp::new(context, session)); let layer = harness.state_mut().run("layer.add.fill", json!({})).unwrap()["layer"].as_u64().unwrap(); harness.state_mut().run("layer.fill.projection", json!({"layer": layer, "projection": "warp"})).unwrap(); harness.run_steps(2);