From bb988dc7ffdd275baf150f56b82a8c64821ed0ac Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:13:22 +0100 Subject: [PATCH 1/8] Add automation points with Command-click Route Command-click in an automation view through the existing Pencil insertion path while retaining the active tool and drag handling. --- crates/ui-egui/src/edit_window/input.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ui-egui/src/edit_window/input.rs b/crates/ui-egui/src/edit_window/input.rs index 6451fa80e..ab5d29c4d 100644 --- a/crates/ui-egui/src/edit_window/input.rs +++ b/crates/ui-egui/src/edit_window/input.rs @@ -340,6 +340,8 @@ fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Res let (track, lane, s, auto_view) = (c.inp.track, c.inp.lane, c.inp.s, &c.inp.auto_view); let (point_hit, curve_handle, hit) = (&c.hits.point_hit, c.hits.curve_handle, &c.hits.hit); let (mods, p, at, eff, selector_press) = (c.mods, c.p, c.at, c.eff, c.selector_press); + // Command-click inserts a point like the Pencil without changing the active tool or its drags. + let eff = if mods.command && auto_view.is_some() { Tool::Pencil } else { eff }; if resp.clicked() && let Some((param, at)) = &point_hit { From 705697178c7b439dcbdbbc67062d4b448e7c08ce Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:14:13 +0100 Subject: [PATCH 2/8] Cover Command-click automation points and undo Drive actual modifier clicks with Smart, Grabber and Selector tools; check the clicked time/value, plain-click control, unchanged clips and one-step undo. The regression fails with the original handler and passes with the fix. --- crates/ui-egui/src/edit_window/tests.rs | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/ui-egui/src/edit_window/tests.rs b/crates/ui-egui/src/edit_window/tests.rs index 37dd3be92..72dd23bd8 100644 --- a/crates/ui-egui/src/edit_window/tests.rs +++ b/crates/ui-egui/src/edit_window/tests.rs @@ -1528,6 +1528,34 @@ fn alt_click_on_a_breakpoint_deletes_it() { } } +/// Modifier clicks insert an undoable point with the existing tools; plain clicks leave the curve alone. +#[test] +fn command_click_adds_an_automation_point_without_changing_clips_and_undoes() { + for tool in ["smart", "grabber", "selector"] { + let (mut h, track, [a, b], clips) = breakpoints_over_a_clip(tool); + let before = volume_points(&h, track); + let at = pos2((a.x + b.x) * 0.5, a.y); + let sample = sample_at(h.state().engine.session(), timeline(&h), at.x); + + click(&mut h, at); + assert_eq!(volume_points(&h, track), before, "{tool}: a plain click adds no point"); + h.run_steps(30); + fade_shot(&mut h, &format!("automation-command-{tool}-before")); + click_with(&mut h, at, egui::Modifiers::COMMAND); + let points = volume_points(&h, track); + assert_eq!(points.len(), before.len() + 1, "{tool}: {points:?}"); + let point = points.iter().find(|(at, _)| *at == sample).expect("a point at the clicked sample"); + assert!((point.1 + 40.0).abs() < 0.01, "{tool}: clicked volume is {}", point.1); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-{tool}-after")); + + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), before, "{tool}: one undo removes only the new point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: undo leaves clips alone"); + } +} + #[test] fn alt_click_on_a_marker_deletes_it() { let mut engine = soundcraft_engine::demo::demo_engine(); From 6d7fec682b3b846d588e7f3b5fd59c79774a3a6a Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:15:11 +0100 Subject: [PATCH 3/8] Record the Command-click automation fix Note the undoable modifier-click behavior for issue #1394 and retain the existing readiness estimates. --- ROADMAP.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 0edff22b1..2856d6397 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: pre-alpha** · next: alpha, ~5% and ~110–180 h away (the alpha gate's three failing workflows) -> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-10-25 · **Change:** trivial (Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 +> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-05 · **Change:** trivial (Command-click automation points, Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 SoundCraft is a clean-room, pure-Rust digital audio workstation that aims at full parity with Avid Pro Tools, and then beyond it: faster, open, scriptable and agent-controllable. This page is @@ -122,6 +122,7 @@ mutated and truncated movies. Field reports from the first public week are track ## Progress log +- **2026-11-05:** Command-click in an automation lane adds a point at the clicked time and value with the current editing tool (#1394), using the existing Pencil mapping. Plain clicks and clip contents stay unchanged, and one Undo removes the new point. No readiness percentage change. - **2026-10-25:** Alt+Shift+E (`view.zoom_toggle_cancel`) and an Alt-click on the Zoom Toggle button cancel Zoom Toggle and keep the current view: the zoom, the scroll and the track heights stay as they are, and the button is no longer lit. The next Zoom Toggle zooms in from that view and goes back to it. No readiness percentage change. - **2026-10-25:** Tracks and Groups and the Clip List sit in dock columns that run the Edit window's full height at its left and right edges, with the MIDI Editor under the session view between them; Mix docks Tracks and Groups at its left edge. A panel dragged onto a dock group joins it as a tab, stacks above or below it, or makes a new column; one dragged to an empty window edge makes a dock there. A list with no saved place reopens in its dock, and makes the dock again when it is gone. Preferences and window configurations saved with the earlier split-frame layouts load with the new default layouts and keep their other settings. No readiness percentage change. - **2026-10-25:** Auto Pan moves the balance of a stereo track: the left channel's level falls as the position moves right and the right channel's as it moves left, at constant power, and each channel stays on its own side. At the center the track passes unchanged, so a wide or out-of-phase stereo image keeps its width, and the envelope follower follows the louder channel. No readiness percentage change. @@ -177,6 +178,7 @@ mutated and truncated movies. Field reports from the first public week are track | Date | Change | Summary | |---|---|---| +| 2026-11-05 | trivial | Progress log: Command-click adds an undoable automation point (#1394); readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: Cancel Zoom Toggle; readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: side panels in dock columns; readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: Auto Pan stereo balance; readiness estimates unchanged | From dafcc16c32e6217194a717db6cd3aaddbc29f99b Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:53:33 +0100 Subject: [PATCH 4/8] Preserve selection and target the drawn automation lane Resolve the visible parameter for Command-click and defer Selector insertion until a real drag starts. Keep the stored lane view and existing drag, fade and clip-gain dispatch unchanged. --- crates/ui-egui/src/edit_window/input.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/edit_window/input.rs b/crates/ui-egui/src/edit_window/input.rs index ab5d29c4d..029f8e3e5 100644 --- a/crates/ui-egui/src/edit_window/input.rs +++ b/crates/ui-egui/src/edit_window/input.rs @@ -337,9 +337,11 @@ fn drag_clip_gain(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui: /// Click handling for the lane: breakpoints, clip selection, spot dialogs, zoom and pencil points. fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Response) { - let (track, lane, s, auto_view) = (c.inp.track, c.inp.lane, c.inp.s, &c.inp.auto_view); + let (track, lane, s) = (c.inp.track, c.inp.lane, c.inp.s); let (point_hit, curve_handle, hit) = (&c.hits.point_hit, c.hits.curve_handle, &c.hits.hit); let (mods, p, at, eff, selector_press) = (c.mods, c.p, c.at, c.eff, c.selector_press); + let command_view = if mods.command { shown_automation(track) } else { None }; + let auto_view = command_view.as_ref().or(c.inp.auto_view.as_ref()); // Command-click inserts a point like the Pencil without changing the active tool or its drags. let eff = if mods.command && auto_view.is_some() { Tool::Pencil } else { eff }; if resp.clicked() @@ -372,7 +374,7 @@ fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Res let _ = app.run(if mods.alt { "view.zoom_out" } else { "view.zoom_in" }, json!({})); } Tool::Pencil => { - if let Some(param) = &auto_view { + if let Some(param) = auto_view { let (lo, hi, _) = param.range(); let (lo, hi) = if matches!(param, AutoParam::Volume | AutoParam::SendLevel(_)) { (-60.0, 12.0) @@ -454,7 +456,12 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l ui.ctx().set_cursor_icon(egui::CursorIcon::ResizeVertical); } let selector_press = eff == Tool::Selector && fade_corner.is_none() && curve_handle.is_none() && gain_icon_at(origin).is_none(); - if selector_press && resp.is_pointer_button_down_on() && ui.input(|i| i.pointer.primary_pressed()) { + // A Command-click keeps the prior selection; real drags still start their normal selection gesture. + if selector_press + && (!mods.command || shown_automation(track).is_none()) + && resp.is_pointer_button_down_on() + && ui.input(|i| i.pointer.primary_pressed()) + { place_insertion(app, ui, &s, track.id, at, mods.shift); } let gain_drag = if resp.drag_started() { gain_icon_at(origin) } else { None }; From b2f89783871d70b1ce21144a7403051a68fd7405 Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:54:21 +0100 Subject: [PATCH 5/8] Cover fallback lanes and selection-preserving Command-click Reproduce the fallback-volume and existing-selection failures with actual UI events, then cover undo and Command-drag behavior. Strengthen the clicked-value assertion with an off-curve midpoint. Both added regressions fail on the previous handler; all 232 UI tests pass with the correction. --- crates/ui-egui/src/edit_window/tests.rs | 74 ++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/edit_window/tests.rs b/crates/ui-egui/src/edit_window/tests.rs index 72dd23bd8..44d474a84 100644 --- a/crates/ui-egui/src/edit_window/tests.rs +++ b/crates/ui-egui/src/edit_window/tests.rs @@ -1534,7 +1534,10 @@ fn command_click_adds_an_automation_point_without_changing_clips_and_undoes() { for tool in ["smart", "grabber", "selector"] { let (mut h, track, [a, b], clips) = breakpoints_over_a_clip(tool); let before = volume_points(&h, track); - let at = pos2((a.x + b.x) * 0.5, a.y); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.center().y); let sample = sample_at(h.state().engine.session(), timeline(&h), at.x); click(&mut h, at); @@ -1545,7 +1548,7 @@ fn command_click_adds_an_automation_point_without_changing_clips_and_undoes() { let points = volume_points(&h, track); assert_eq!(points.len(), before.len() + 1, "{tool}: {points:?}"); let point = points.iter().find(|(at, _)| *at == sample).expect("a point at the clicked sample"); - assert!((point.1 + 40.0).abs() < 0.01, "{tool}: clicked volume is {}", point.1); + assert!((point.1 + 24.0).abs() < 0.01, "{tool}: the lane midpoint is -24 dB, above the -40 dB curve: {}", point.1); assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); h.run_steps(2); fade_shot(&mut h, &format!("automation-command-{tool}-after")); @@ -1556,6 +1559,73 @@ fn command_click_adds_an_automation_point_without_changing_clips_and_undoes() { } } +/// A modifier click adds a point while retaining an existing clip and range selection, including after undo. +#[test] +fn command_click_preserves_an_existing_edit_selection() { + for tool in ["smart", "selector"] { + let (mut h, track, [a, b], clips) = breakpoints_over_a_clip(tool); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.min.y + lane.height() * 0.35); + h.state_mut().engine.execute("edit.select", &json!({"clips": [clips[0].id.0]})).unwrap(); + h.run_steps(2); + let before = h.state().engine.session().edit.clone(); + let points_before = volume_points(&h, track); + assert!(!before.selection.is_empty()); + assert!(!before.selected_clips.is_empty()); + fade_shot(&mut h, &format!("automation-command-selection-{tool}-before")); + + click_with(&mut h, at, egui::Modifiers::COMMAND); + assert_eq!(volume_points(&h, track).len(), points_before.len() + 1, "{tool}"); + let after = &h.state().engine.session().edit; + assert_eq!(after.selection, before.selection, "{tool}: the range stays"); + assert_eq!(after.selected_clips, before.selected_clips, "{tool}: selected clips stay"); + assert_eq!(after.selected_tracks, before.selected_tracks, "{tool}: selected tracks stay"); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-selection-{tool}-after")); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), points_before, "{tool}: one undo removes the point"); + assert_eq!(h.state().engine.session().edit.selection, before.selection, "{tool}: undo retains the range"); + assert_eq!(h.state().engine.session().edit.selected_clips, before.selected_clips, "{tool}: undo retains selected clips"); + + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + drag(&mut h, at, at + vec2(50.0, 0.0)); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + let after_drag = &h.state().engine.session().edit; + assert!(!after_drag.selection.is_empty(), "{tool}: a Command-drag still selects a range"); + assert_ne!(after_drag.selection, before.selection, "{tool}: drag selection changes once the gesture starts"); + assert_eq!(volume_points(&h, track), points_before, "{tool}: dragging adds no point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + } +} + +/// Tracks that always paint volume automation also accept modifier clicks when their stored view is not automation. +#[test] +fn command_click_adds_to_fallback_volume_views() { + for kind in [TrackKind::Master, TrackKind::Aux, TrackKind::Vca] { + let mut engine = soundcraft_engine::Engine::default(); + let track = engine.session_mut().add_track(kind, soundcraft_model::ChannelFormat::Stereo, None); + engine.execute("track.view", &json!({"track": track.0, "view": "waveform"})).unwrap(); + engine.execute("edit.tool", &json!({"tool": "smart"})).unwrap(); + let mut h = harness_with(engine); + let s = h.state().engine.session_arc(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, 0), timeline(&h)); + let at = pos2(lane.min.x + 100.0, lane.center().y); + let sample = sample_at(&s, timeline(&h), at.x); + fade_shot(&mut h, &format!("automation-command-fallback-{kind:?}-before")); + click_with(&mut h, at, egui::Modifiers::COMMAND); + let points = volume_points(&h, track); + assert_eq!(points.len(), 1, "{kind:?}: status {}", h.state().ui.status); + assert_eq!(points[0].0, sample, "{kind:?}"); + assert!((points[0].1 + 24.0).abs() < 0.01, "{kind:?}: {}", points[0].1); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-fallback-{kind:?}-after")); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert!(volume_points(&h, track).is_empty(), "{kind:?}: one undo removes the point"); + } +} + #[test] fn alt_click_on_a_marker_deletes_it() { let mut engine = soundcraft_engine::demo::demo_engine(); From d842ee7421ac0386c683dc5dbf44a5a528199007 Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:55:26 +0100 Subject: [PATCH 6/8] Document preserved selection and fallback volume clicks Update the existing #1394 progress entry to describe the corrected selection and visible fallback-volume behavior, without changing readiness estimates. --- ROADMAP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 2856d6397..1343eeb66 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -122,7 +122,7 @@ mutated and truncated movies. Field reports from the first public week are track ## Progress log -- **2026-11-05:** Command-click in an automation lane adds a point at the clicked time and value with the current editing tool (#1394), using the existing Pencil mapping. Plain clicks and clip contents stay unchanged, and one Undo removes the new point. No readiness percentage change. +- **2026-11-05:** Command-click in an automation lane adds a point at the clicked time and value with the current editing tool (#1394), using the existing Pencil mapping. Command-click preserves the existing selection and also works on the fallback volume lanes of Master, Aux and VCA tracks. Plain clicks and clip contents stay unchanged, and one Undo removes the new point. No readiness percentage change. - **2026-10-25:** Alt+Shift+E (`view.zoom_toggle_cancel`) and an Alt-click on the Zoom Toggle button cancel Zoom Toggle and keep the current view: the zoom, the scroll and the track heights stay as they are, and the button is no longer lit. The next Zoom Toggle zooms in from that view and goes back to it. No readiness percentage change. - **2026-10-25:** Tracks and Groups and the Clip List sit in dock columns that run the Edit window's full height at its left and right edges, with the MIDI Editor under the session view between them; Mix docks Tracks and Groups at its left edge. A panel dragged onto a dock group joins it as a tab, stacks above or below it, or makes a new column; one dragged to an empty window edge makes a dock there. A list with no saved place reopens in its dock, and makes the dock again when it is gone. Preferences and window configurations saved with the earlier split-frame layouts load with the new default layouts and keep their other settings. No readiness percentage change. - **2026-10-25:** Auto Pan moves the balance of a stereo track: the left channel's level falls as the position moves right and the right channel's as it moves left, at constant power, and each channel stays on its own side. At the center the track passes unchanged, so a wide or out-of-phase stereo image keeps its width, and the envelope follower follows the louder channel. No readiness percentage change. From a743f5b4ef3a9cc489ddc526fcfc2f23ccbbe043 Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Sun, 8 Nov 2026 13:45:59 +0100 Subject: [PATCH 7/8] fix(ui): preserve automation point hits on Command-click Keep existing automation points and clip controls ahead of modifier insertion, expose an insertion cursor and hint, and preserve active-tool drags and edit selection. Add actual-app regression coverage across tools, point deletion and undo, cursor restoration, and a Selector drag starting near a point. --- crates/ui-egui/src/edit_window/input.rs | 26 +++++++-- crates/ui-egui/src/edit_window/tests.rs | 78 +++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/edit_window/input.rs b/crates/ui-egui/src/edit_window/input.rs index 029f8e3e5..04df6f5b7 100644 --- a/crates/ui-egui/src/edit_window/input.rs +++ b/crates/ui-egui/src/edit_window/input.rs @@ -120,6 +120,7 @@ struct LaneCtx<'a> { eff: Tool, fade_corner: Option, selector_press: bool, + command_point: bool, } /// The lane's response, with its clip context menu and the drops it accepts. @@ -160,10 +161,10 @@ fn lane_menu_and_drops(app: &mut SoundApp, ui: &mut Ui, track: &Track, lane: Rec } /// Hit-test the press point against breakpoints, fade handles and clip bodies. -fn hit_test<'a>(inp: &LaneInput<'a>) -> LaneHits<'a> { +fn hit_test<'a>(inp: &LaneInput<'a>, command: bool) -> LaneHits<'a> { let (track, lane, tl, s, tool, origin, at_origin) = (inp.track, inp.lane, inp.tl, inp.s, inp.tool, inp.origin, inp.at_origin); let auto_view = &inp.auto_view; - let point_hit = if matches!(tool, Tool::Smart | Tool::Grabber | Tool::Pencil) { + let point_hit = if command || matches!(tool, Tool::Smart | Tool::Grabber | Tool::Pencil) { shown_automation(track).and_then(|param| breakpoint_at(s, tl, lane, track, ¶m, origin).map(|at| (param, at))) } else { None @@ -340,10 +341,10 @@ fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Res let (track, lane, s) = (c.inp.track, c.inp.lane, c.inp.s); let (point_hit, curve_handle, hit) = (&c.hits.point_hit, c.hits.curve_handle, &c.hits.hit); let (mods, p, at, eff, selector_press) = (c.mods, c.p, c.at, c.eff, c.selector_press); - let command_view = if mods.command { shown_automation(track) } else { None }; + let command_view = if c.command_point { shown_automation(track) } else { None }; let auto_view = command_view.as_ref().or(c.inp.auto_view.as_ref()); // Command-click inserts a point like the Pencil without changing the active tool or its drags. - let eff = if mods.command && auto_view.is_some() { Tool::Pencil } else { eff }; + let eff = if c.command_point { Tool::Pencil } else { eff }; if resp.clicked() && let Some((param, at)) = &point_hit { @@ -427,7 +428,9 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l let at_origin = sample_at(&s, tl, origin.x).max(0); let auto_view = AutoParam::parse(&track.view); let inp = LaneInput { track, lane, tl, s: &s, tool, origin, at_origin, auto_view }; - let hits = hit_test(&inp); + // Command changes a click's target, while a drag retains the active tool's normal hits. + let command_click = mods.command && !resp.drag_started() && !resp.dragged(); + let hits = hit_test(&inp, command_click); let eff = effective_tool(&inp, &hits); if resp.hovered() { let icon = match eff { @@ -455,6 +458,13 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l if resp.hovered() && gain_icon_at(p).is_some() { ui.ctx().set_cursor_icon(egui::CursorIcon::ResizeVertical); } + // Existing points and clip controls keep their normal hit priority over modifier insertion. + let command_point = mods.command + && shown_automation(track).is_some() + && hits.point_hit.is_none() + && fade_corner.is_none() + && curve_handle.is_none() + && gain_icon_at(p).is_none(); let selector_press = eff == Tool::Selector && fade_corner.is_none() && curve_handle.is_none() && gain_icon_at(origin).is_none(); // A Command-click keeps the prior selection; real drags still start their normal selection gesture. if selector_press @@ -465,10 +475,14 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l place_insertion(app, ui, &s, track.id, at, mods.shift); } let gain_drag = if resp.drag_started() { gain_icon_at(origin) } else { None }; - let cx = LaneCtx { inp, hits, mods, p, at, eff, fade_corner, selector_press }; + let cx = LaneCtx { inp, hits, mods, p, at, eff, fade_corner, selector_press, command_point }; start_gesture(app, ui, &cx, &resp, gain_drag); drag_clip_gain(app, ui, &cx, &resp); lane_click(app, ui, &cx, &resp); + if command_point && resp.hovered() && !resp.dragged() { + ui.ctx().set_cursor_icon(egui::CursorIcon::Crosshair); + resp.on_hover_text("Click to add an automation point"); + } } fn place_insertion(app: &mut SoundApp, ui: &Ui, s: &Session, track: TrackId, at: Samples, extend: bool) { diff --git a/crates/ui-egui/src/edit_window/tests.rs b/crates/ui-egui/src/edit_window/tests.rs index 44d474a84..978a670b2 100644 --- a/crates/ui-egui/src/edit_window/tests.rs +++ b/crates/ui-egui/src/edit_window/tests.rs @@ -1626,6 +1626,84 @@ fn command_click_adds_to_fallback_volume_views() { } } +/// Command-click keeps an existing visible breakpoint as the hit target with every active tool. +#[test] +fn command_click_near_an_existing_breakpoint_does_not_insert_another_point() { + for tool in ["smart", "grabber", "pencil", "selector", "trim", "scrubber", "zoom"] { + let (mut h, track, [_, point], clips) = breakpoints_over_a_clip(tool); + h.state_mut().engine.execute("edit.select", &json!({"clips": [clips[0].id.0]})).unwrap(); + h.run_steps(2); + let before = volume_points(&h, track); + let edit = h.state().engine.session().edit.clone(); + assert!(!edit.selection.is_empty()); + assert!(!edit.selected_clips.is_empty()); + // Inside the six-point hit target, but a different sample from the stored point. + let near = point + vec2(3.0, 0.0); + let sample = sample_at(h.state().engine.session(), timeline(&h), near.x); + assert_ne!(sample, before[1].0); + click_with(&mut h, near, egui::Modifiers::COMMAND); + assert_eq!(volume_points(&h, track), before, "{tool}: the existing point wins over insertion"); + let after = &h.state().engine.session().edit; + assert_eq!(after.tool, edit.tool, "{tool}: active tool stays"); + assert_eq!(after.selection, edit.selection, "{tool}: range selection stays"); + assert_eq!(after.selected_clips, edit.selected_clips, "{tool}: clip selection stays"); + assert_eq!(after.selected_tracks, edit.selected_tracks, "{tool}: track selection stays"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + + click_with(&mut h, near, egui::Modifiers::COMMAND | egui::Modifiers::ALT); + assert_eq!(volume_points(&h, track), before[..1], "{tool}: Alt still deletes the existing point"); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), before, "{tool}: deletion remains undoable"); + } +} + +/// Command advertises insertion over empty automation space, while a breakpoint keeps its grab cursor. +#[test] +fn command_hover_shows_insertion_only_away_from_existing_breakpoints() { + let (mut h, track, [a, b], _) = breakpoints_over_a_clip("selector"); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.center().y); + let points = volume_points(&h, track); + + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Text, "plain Selector hover stays unchanged"); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Crosshair, "Command shows the insertion gesture"); + h.run_steps(40); + fade_shot(&mut h, "automation-command-hover-insertion"); + h.hover_at(b + vec2(3.0, 0.0)); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Grab, "the existing point stays the target"); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Text, "releasing Command restores the active tool cursor"); + assert_eq!(volume_points(&h, track), points, "hover adds no points"); +} + +/// The Command click shortcut does not turn a Selector drag beginning beside a point into a point move. +#[test] +fn command_drag_near_an_existing_breakpoint_retains_the_selector_gesture() { + let (mut h, track, [_, point], clips) = breakpoints_over_a_clip("selector"); + let points = volume_points(&h, track); + let before = h.state().engine.session().edit.clone(); + let near = point + vec2(3.0, 0.0); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + drag(&mut h, near, near + vec2(50.0, 0.0)); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + let after = &h.state().engine.session().edit; + assert!(!after.selection.is_empty(), "a Command-drag still selects a range"); + assert_ne!(after.selection, before.selection, "the Selector gesture changes the range"); + assert_eq!(after.tool, before.tool, "the active tool stays selected"); + assert_eq!(volume_points(&h, track), points, "dragging the selection does not move or insert a point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "the clips stay"); +} + #[test] fn alt_click_on_a_marker_deletes_it() { let mut engine = soundcraft_engine::demo::demo_engine(); From 51c3159ff126c3ef57d6f1cca4a4318f91aac425 Mon Sep 17 00:00:00 2001 From: Mex <44814932+MMexicann@users.noreply.github.com> Date: Sun, 8 Nov 2026 13:49:15 +0100 Subject: [PATCH 8/8] docs: record Command-click automation review corrections Record existing-point and clip-control priority, the insertion cursor and hint, and the added selection and drag regression coverage while preserving earlier progress notes and readiness estimates. --- ROADMAP.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 1343eeb66..c86a3a282 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: pre-alpha** · next: alpha, ~5% and ~110–180 h away (the alpha gate's three failing workflows) -> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-05 · **Change:** trivial (Command-click automation points, Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 +> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-08 · **Change:** trivial (Command-click target priority and cursor, Command-click automation points, Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 SoundCraft is a clean-room, pure-Rust digital audio workstation that aims at full parity with Avid Pro Tools, and then beyond it: faster, open, scriptable and agent-controllable. This page is @@ -122,6 +122,7 @@ mutated and truncated movies. Field reports from the first public week are track ## Progress log +- **2026-11-08:** Command-click near an existing automation breakpoint keeps that point as the click target with every active tool, and existing fade and clip-gain controls retain their normal priority. Empty automation space shows a crosshair and an insertion hint while Command is held. The active tool's drag gestures stay unchanged. No readiness percentage change. - **2026-11-05:** Command-click in an automation lane adds a point at the clicked time and value with the current editing tool (#1394), using the existing Pencil mapping. Command-click preserves the existing selection and also works on the fallback volume lanes of Master, Aux and VCA tracks. Plain clicks and clip contents stay unchanged, and one Undo removes the new point. No readiness percentage change. - **2026-10-25:** Alt+Shift+E (`view.zoom_toggle_cancel`) and an Alt-click on the Zoom Toggle button cancel Zoom Toggle and keep the current view: the zoom, the scroll and the track heights stay as they are, and the button is no longer lit. The next Zoom Toggle zooms in from that view and goes back to it. No readiness percentage change. - **2026-10-25:** Tracks and Groups and the Clip List sit in dock columns that run the Edit window's full height at its left and right edges, with the MIDI Editor under the session view between them; Mix docks Tracks and Groups at its left edge. A panel dragged onto a dock group joins it as a tab, stacks above or below it, or makes a new column; one dragged to an empty window edge makes a dock there. A list with no saved place reopens in its dock, and makes the dock again when it is gone. Preferences and window configurations saved with the earlier split-frame layouts load with the new default layouts and keep their other settings. No readiness percentage change. @@ -178,6 +179,7 @@ mutated and truncated movies. Field reports from the first public week are track | Date | Change | Summary | |---|---|---| +| 2026-11-08 | trivial | Command-click breakpoint/control priority and insertion affordance; active-tool drags retained; readiness estimates unchanged | | 2026-11-05 | trivial | Progress log: Command-click adds an undoable automation point (#1394); readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: Cancel Zoom Toggle; readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: side panels in dock columns; readiness estimates unchanged |