From dc4ba98e88adc95a82dcad0fca14cb642242c997 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 18 Nov 2026 15:12:44 +0100 Subject: [PATCH] Simplify shared input settings to direct sending --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/canvas-pilot/src/device_inputs.rs | 6 ------ crates/canvas-pilot/src/inputs_window.rs | 18 +++++------------- docs/canvas-pilot/changelog.md | 6 ++++++ docs/canvas-pilot/guide/formats-and-crop.md | 4 ++-- .../input-settings-refactor.task.md | 4 ++-- docs/interfaces/midra-device-send.md | 4 ++-- 8 files changed, 19 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96a6929..f70b444 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,7 +602,7 @@ dependencies = [ [[package]] name = "canvas-pilot" -version = "0.9.60" +version = "0.9.61" dependencies = [ "base64 0.22.1", "craft-dwg", diff --git a/Cargo.toml b/Cargo.toml index 1dd6c8a..13318c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"] resolver = "3" [workspace.package] -version = "0.9.60" +version = "0.9.61" edition = "2024" license = "MIT" repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot" diff --git a/crates/canvas-pilot/src/device_inputs.rs b/crates/canvas-pilot/src/device_inputs.rs index 28f1fa0..d9ccdff 100644 --- a/crates/canvas-pilot/src/device_inputs.rs +++ b/crates/canvas-pilot/src/device_inputs.rs @@ -174,12 +174,6 @@ impl InputDraft { ), ); } - add( - "control/pp/enableCropFinder", - "Finder (visible on device outputs)", - "Crop", - Kind::Toggle, - ); for (key, label) in [ ("brightness", "Brightness"), ("contrast", "Contrast"), diff --git a/crates/canvas-pilot/src/inputs_window.rs b/crates/canvas-pilot/src/inputs_window.rs index 4e5ff52..929cea3 100644 --- a/crates/canvas-pilot/src/inputs_window.rs +++ b/crates/canvas-pilot/src/inputs_window.rs @@ -57,7 +57,6 @@ pub(super) struct InputsWindow { sending_input: u32, reading: bool, sending_host: String, - review: bool, pub message: String, } impl Editor { @@ -69,7 +68,6 @@ impl Editor { self.inputs.capture = None; self.inputs.capture_key = None; self.inputs.host = self.device.host.clone(); - self.inputs.review = false; } if let Some(rx) = &self.inputs.pending { match rx.try_recv() { @@ -115,7 +113,7 @@ impl Editor { egui::Window::new("Input settings").id(egui::Id::new("device-input-settings")) .open(&mut open).default_size([1040.0,700.0]).vscroll(true).show(ctx,|ui|{ ui.label("Shared preprocessing · affects every layer using this device input, including Program."); - ui.small("Drafts stay in this session. Nothing is sent until Review and Send input settings."); + ui.small("Drafts stay in this session. Nothing is sent until you click Send changes."); let Some(snapshot)=&self.device.snapshot else { ui.label("Connect to a supported device to inspect its inputs."); if ui.button("Device connection…").clicked(){self.device.connection_open=true;} @@ -131,7 +129,7 @@ impl Editor { egui::ComboBox::from_id_salt("device-input-picker").selected_text(format!("Input {}",self.inputs.selected)).show_ui(ui,|ui|{ for input in &inputs { if ui.selectable_value(&mut self.inputs.selected,input.id,format!("Input {}{}{}",input.id,if input.signal{""}else{" · no signal"},if self.inputs.drafts.get(&input.id).is_some_and(InputDraft::dirty){" · edited"}else{""})).changed(){ - self.inputs.capture=None;self.inputs.capture_key=None;self.inputs.review=false;self.inputs.drag=None;self.inputs.edit_start=None; + self.inputs.capture=None;self.inputs.capture_key=None;self.inputs.drag=None;self.inputs.edit_start=None; } } }); @@ -183,7 +181,7 @@ impl Editor { let mut keep = draft.keeps_group(group); if ui.checkbox(&mut keep,"Keep device values").on_hover_text("Leave this category untouched when sending. Checking discards its draft edits.").changed() { draft.keep_group(group,keep); - state.review=false; + if group=="Crop" {state.drag=None;} } ui.add_enabled_ui(!keep, |ui| { @@ -212,17 +210,12 @@ impl Editor { ui.small("LUT controls require an allocated resource. Signal/HDCP and resource allocation remain in WebRCS."); }); }); - if before!=draft.values {state.review=false;if !undoing && state.edit_start.is_none(){state.edit_start=Some(before);}} + if before!=draft.values && !undoing && state.edit_start.is_none(){state.edit_start=Some(before);} if !ui.input(|i|i.pointer.any_down()) && let Some(before)=state.edit_start.take(){let history=state.undo.entry(id).or_default();history.push(before);if history.len()>100{history.remove(0);}} ui.separator(); match draft.changes(snapshot) { Ok(changes)=>{ - if ui.add_enabled(!changes.is_empty() && state.pending.is_none() && !self.device.busy(),egui::Button::new("Review input changes")).clicked(){state.review=true;} - if state.review { - ui.label("These are shared input changes, not a Preview-only layer edit."); - for change in &changes {ui.small(format!("{}: {} → {}",change.path.iter().skip(8).cloned().collect::>().join("/"),change.before,change.after));} - if ui.button("Send input settings").clicked(){send=Some(draft.clone());state.review=false;} - } + if ui.add_enabled(!changes.is_empty() && state.pending.is_none() && !self.device.busy(),egui::Button::new("Send changes")).clicked(){send=Some(draft.clone());} } Err(error)=>{ui.colored_label(theme::palette(ui.ctx()).amber,error);} } @@ -231,7 +224,6 @@ impl Editor { }); self.inputs.open = open; if refresh && !self.device.busy() { - self.inputs.review = false; self.inputs.reading = true; let (tx, rx) = std::sync::mpsc::channel(); self.inputs.pending = Some(rx); diff --git a/docs/canvas-pilot/changelog.md b/docs/canvas-pilot/changelog.md index e78cf1e..428c65f 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -4,6 +4,12 @@ ## Unreleased +### v0.9.61 + +- Removed Crop Finder from shared input settings and replaced the review step with + a direct **Send changes** button. Fresh device validation, category protection + and verified readback remain in place. + ### v0.9.60 - Input capture is now a live toggle while Input settings is open, sharing the diff --git a/docs/canvas-pilot/guide/formats-and-crop.md b/docs/canvas-pilot/guide/formats-and-crop.md index cd1ff3e..4867b2f 100644 --- a/docs/canvas-pilot/guide/formats-and-crop.md +++ b/docs/canvas-pilot/guide/formats-and-crop.md @@ -317,8 +317,8 @@ additional controls without downloading the complete device store. This edits preprocessing shared by every consumer of that input, including Program and layers outside the project. Nothing is sent while dragging, selecting -an input, capturing an image or opening the window. Use **Review input changes**, -then **Send input settings** to apply the edited fields and verify them. +an input, capturing an image or opening the window. Use **Send changes** to apply the edited fields directly, with fresh device +validation and verified readback. - **Keep device values:** each category has this toggle. Check it to discard that category’s draft edits, disable its controls and leave it untouched when sending. diff --git a/docs/development/input-settings-refactor.task.md b/docs/development/input-settings-refactor.task.md index 776c269..99fc7f7 100644 --- a/docs/development/input-settings-refactor.task.md +++ b/docs/development/input-settings-refactor.task.md @@ -16,9 +16,9 @@ Layer properties link to the relevant input; layer crop, fit, position and masks remain layer-owned. A local editor source ID is never interpreted as a physical input number. Inputs on different connections require different identities. -Edits remain local drafts until an explicit reviewed Send input settings action. +Edits remain local drafts until an explicit **Send changes** action. Changing a selection, opening a project or capturing an image sends no settings. -The review explains that an input change affects every device consumer, including +The window explains that an input change affects every device consumer, including ones outside this project and potentially Program. No routing or TAKE is implied. Reuse the canvas interaction conventions for crop edges, whole-window movement, diff --git a/docs/interfaces/midra-device-send.md b/docs/interfaces/midra-device-send.md index 3ab532d..969ef46 100644 --- a/docs/interfaces/midra-device-send.md +++ b/docs/interfaces/midra-device-send.md @@ -298,8 +298,8 @@ change. Persistence and migrations are specified in the `device_inputs::InputDraft` is a transient adapter-specific input/active-plug draft, not a persistent project field. The common window edits native input preprocessing without changing editor sources, layer geometry, routing or preset selection. -Only edited fields are sent after fresh signal/plug/settings checks; readback is -verified. There is no automatic retry, rollback or preset-apply pulse. Partial +**Send changes** sends edited fields directly after fresh signal/plug/settings +checks; readback is verified. The input editor does not expose or write Crop Finder. There is no automatic retry, rollback or preset-apply pulse. Partial failures are reported and require refresh. This does not migrate existing source geometry or saved layer-bound input proposals; only their saved data and local geometry compatibility remain.