From 2d723d91510dd1008776c2ab35ac0b3b8835b120 Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Tue, 6 Oct 2026 21:01:44 -0500 Subject: [PATCH] Fix release build colors and avoid unnecessary install elevation --- .../execution_profiles/editor/ui_helpers.rs | 4 +-- .../new_scrollable/dual_axis_config.rs | 1 + .../new_scrollable/single_axis_config.rs | 4 ++- .../src/index.tsx | 28 +++++++++++++------ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/app/src/ai/execution_profiles/editor/ui_helpers.rs b/app/src/ai/execution_profiles/editor/ui_helpers.rs index f92c2f76..9401496f 100644 --- a/app/src/ai/execution_profiles/editor/ui_helpers.rs +++ b/app/src/ai/execution_profiles/editor/ui_helpers.rs @@ -647,7 +647,7 @@ fn render_orchestration_providers( let checkbox = appearance.ui_builder() .checkbox(view.all_providers_checkbox.clone(), Some(14.)) .with_label(Span::new("All providers", Default::default())) - .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color()), ..Default::default() }) + .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color().into()), ..Default::default() }) .check(all) .build() .on_click(move |ctx, _, _| { @@ -671,7 +671,7 @@ fn render_orchestration_providers( let checkbox = appearance.ui_builder() .checkbox(state.clone(), Some(14.)) .with_label(Span::new(name.clone(), Default::default())) - .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color()), ..Default::default() }) + .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color().into()), ..Default::default() }) .check(included) .build() .on_click(move |ctx, _, _| { diff --git a/crates/galaxyui_core/src/elements/new_scrollable/dual_axis_config.rs b/crates/galaxyui_core/src/elements/new_scrollable/dual_axis_config.rs index 8b1acc0c..a7af020c 100644 --- a/crates/galaxyui_core/src/elements/new_scrollable/dual_axis_config.rs +++ b/crates/galaxyui_core/src/elements/new_scrollable/dual_axis_config.rs @@ -4,6 +4,7 @@ use pathfinder_geometry::vector::{vec2f, Vector2F}; use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis}; use super::{NewScrollableElement, SingleAxisConfig}; use crate::elements::new_scrollable::util::child_constraint_for_axis; +#[cfg(debug_assertions)] use crate::elements::new_scrollable::ScrollableAxis; use crate::elements::{ Axis, ClippedScrollStateHandle, ScrollData, ScrollStateHandle, ScrollTarget, SelectableElement, diff --git a/crates/galaxyui_core/src/elements/new_scrollable/single_axis_config.rs b/crates/galaxyui_core/src/elements/new_scrollable/single_axis_config.rs index 8b315d8b..bc3ff25f 100644 --- a/crates/galaxyui_core/src/elements/new_scrollable/single_axis_config.rs +++ b/crates/galaxyui_core/src/elements/new_scrollable/single_axis_config.rs @@ -2,7 +2,9 @@ use pathfinder_geometry::rect::RectF; use pathfinder_geometry::vector::Vector2F; use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis}; -use super::{NewScrollableElement, ScrollableAxis}; +use super::NewScrollableElement; +#[cfg(debug_assertions)] +use super::ScrollableAxis; use crate::elements::new_scrollable::util::child_constraint_for_axis; use crate::elements::{ Axis, ClippedScrollStateHandle, F32Ext, ScrollData, ScrollStateHandle, ScrollTarget, diff --git a/script/build-and-install-to-applications/src/index.tsx b/script/build-and-install-to-applications/src/index.tsx index 0f30de30..f13f14f9 100644 --- a/script/build-and-install-to-applications/src/index.tsx +++ b/script/build-and-install-to-applications/src/index.tsx @@ -237,18 +237,28 @@ function App() { await stopApp("Galaxy", (line) => appendLog(3, line)); - appendLog(3, "Administrator password required to install in /Applications"); - await runCommandStreaming( - "sudo -k && sudo -v", - WORKSPACE_ROOT, - (line) => appendLog(3, line), - true - ); + let needsAdministrator = false; + try { + fs.accessSync(path.dirname(destPath), fs.constants.W_OK); + if (fs.existsSync(destPath)) fs.accessSync(destPath, fs.constants.W_OK); + } catch { + needsAdministrator = true; + } + const installPrefix = needsAdministrator ? "sudo -n " : ""; + if (needsAdministrator) { + appendLog(3, "Administrator password required to install in /Applications"); + await runCommandStreaming( + "sudo -v", + WORKSPACE_ROOT, + (line) => appendLog(3, line), + true + ); + } if (fs.existsSync(destPath)) { appendLog(3, `Removing existing ${destPath}`); await runCommandStreaming( - `sudo -n rm -rf "${destPath}"`, + `${installPrefix}rm -rf "${destPath}"`, WORKSPACE_ROOT, (line) => appendLog(3, line) ); @@ -256,7 +266,7 @@ function App() { appendLog(3, `Copying ${appPath} → ${destPath}`); await runCommandStreaming( - `sudo -n ditto "${appPath}" "${destPath}"`, + `${installPrefix}ditto "${appPath}" "${destPath}"`, WORKSPACE_ROOT, (line) => appendLog(3, line) );