From 7dcfbed05c27d14e01753bc9963146f12e5a2147 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 9 Oct 2026 01:07:43 -0400 Subject: [PATCH] LR-EDIT-DETAIL-DENOISE: list settings tabs from TABS; fix the SAM 3 worker's wasm check The unknown-tab error now names every Settings tab (it missed AI Denoise after the faces merge). lightcraft-sam3-worker (#359) only builds its server off wasm32, so `cargo xtask wasm` passes again. Co-Authored-By: Claude Opus 5.5 --- crates/segment/src/bin/lightcraft-sam3-worker.rs | 5 +++++ crates/ui-egui/src/menus.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/segment/src/bin/lightcraft-sam3-worker.rs b/crates/segment/src/bin/lightcraft-sam3-worker.rs index 62c18334..f8e52541 100644 --- a/crates/segment/src/bin/lightcraft-sam3-worker.rs +++ b/crates/segment/src/bin/lightcraft-sam3-worker.rs @@ -3,6 +3,7 @@ #![forbid(unsafe_code)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] +#[cfg(not(target_arch = "wasm32"))] fn main() -> Result<(), Box> { let mut args = std::env::args().skip(1); let dir = args.next().ok_or("usage: lightcraft-sam3-worker MODEL_DIR [127.0.0.1:8793]")?; @@ -11,3 +12,7 @@ fn main() -> Result<(), Box> { lightcraft_segment::remote::serve(address, std::path::Path::new(&dir), device)?; Ok(()) } + +/// The worker serves a local GPU over a socket; there is nothing to serve in a browser. +#[cfg(target_arch = "wasm32")] +fn main() {} diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index ce40ebc5..5b79548b 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -465,7 +465,8 @@ pub fn run_ui_command(app: &mut LightcraftApp, id: &str, p: &Value) -> Option { let tab = p.get("tab").and_then(Value::as_str).unwrap_or("general"); if !crate::panels::settings::TABS.iter().any(|(id, _)| *id == tab) { - return Some(Err(format!("unknown settings tab `{tab}` (general|import|performance|interface|faces)"))); + let tabs: Vec<&str> = crate::panels::settings::TABS.iter().map(|(id, _)| *id).collect(); + return Some(Err(format!("unknown settings tab `{tab}` ({})", tabs.join("|")))); } app.ui.dialog = Some(Dialog::Settings { tab: tab.into() }); Ok(Value::Null)