From c43ead202fbedc92ccd487f7bcf0de0ceacc58d0 Mon Sep 17 00:00:00 2001 From: Don Omondi <282319807+mockydevs@users.noreply.github.com> Date: Thu, 22 Oct 2026 04:30:22 +0300 Subject: [PATCH] M1: verify tab drag tool reset and scope clipboard evidence Exercise Selection-tool busy state before takeover and verify it is idle after tab activation, drop, Escape and outside release. Session::set_active already reconstructs the tool via reset_tool_for_doc_switch, so the reported missing-Up busy state does not reproduce and no additional synthetic release is needed. Narrow documentation to the internal clipboard asserted by the regressions and correct the stationary-pointer sentence. All 10 cargo xtask ci gates pass. --- crates/ui-egui/src/tests_document_drag.rs | 4 ++++ docs/development.md | 11 ++++++++--- docs/gaps.md | 3 ++- docs/roadmap.md | 3 ++- docs/target-app-parity.md | 3 ++- docs/ui-parity.md | 3 ++- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/tests_document_drag.rs b/crates/ui-egui/src/tests_document_drag.rs index d75365301..7001e13be 100644 --- a/crates/ui-egui/src/tests_document_drag.rs +++ b/crates/ui-egui/src/tests_document_drag.rs @@ -78,12 +78,14 @@ fn dragging_artwork_over_a_tab_switches_then_copies_on_drop() { frame(&mut app, &ctx, 0.05, vec![Event::PointerMoved(grab), button(grab, true)]); frame(&mut app, &ctx, 0.1, vec![Event::PointerMoved(grab + egui::vec2(20.0, 10.0))]); assert!(app.session.in_interaction()); + assert!(app.session.tool_busy(), "the Selection tool owns the source drag"); let tab = tabs[1].center(); frame(&mut app, &ctx, 0.2, vec![Event::PointerMoved(tab)]); frame(&mut app, &ctx, 0.25, vec![]); assert_eq!(app.session.active_index(), Some(0), "crossing a tab briefly must not switch"); frame(&mut app, &ctx, 0.8, vec![]); assert_eq!(app.session.active_index(), Some(1), "holding the artwork over the target tab activates it"); + assert!(!app.session.tool_busy(), "document activation resets the source Selection tool before drop"); assert_eq!(app.session.documents()[0].doc, source, "the source preview must be rolled back"); let drop = canvas::Xf::new(app.canvas_rect.unwrap(), app.view().unwrap()).to_screen(Point::new(170.0, 120.0)); frame(&mut app, &ctx, 0.9, vec![Event::PointerMoved(drop)]); @@ -94,6 +96,7 @@ fn dragging_artwork_over_a_tab_switches_then_copies_on_drop() { assert!((placed.center().x - 170.0).abs() < 0.01 && (placed.center().y - 120.0).abs() < 0.01, "{placed:?}"); assert_eq!(st.history.undo.len(), dest_undo + 1); assert_eq!(app.session.clipboard, clipboard, "a drag must preserve the user's clipboard"); + assert!(!app.session.tool_busy(), "a completed tab transfer leaves the Selection tool idle"); assert_eq!(app.session.documents()[0].doc, source); assert_eq!(app.session.documents()[0].history.undo.len(), source_undo); assert!(app.session.documents()[0].doc.node(vectorcraft_doc::NodeId(id)).is_some()); @@ -190,6 +193,7 @@ fn escape_or_release_over_tab_cancels_the_transfer_without_edits() { assert_eq!(app.session.active().unwrap().doc, target); assert_eq!(app.session.active().unwrap().history.undo.len(), undo); assert!(!app.session.in_interaction()); + assert!(!app.session.tool_busy(), "Escape and outside release leave the Selection tool idle"); } } diff --git a/docs/development.md b/docs/development.md index b9a737ea0..4fc518178 100644 --- a/docs/development.md +++ b/docs/development.md @@ -408,12 +408,16 @@ covers upstream brush-key sampling. Scores and estimates unchanged. Hold a Selection-tool move over another visible document tab for 400 ms to activate it, then release over its canvas to copy the selected artwork. The original grab point is kept across different zoom levels and view rotations. The source preview is rolled back before -the switch; source artwork, source history and both clipboards are preserved. Returning +the switch; source artwork, source history and the internal clipboard are preserved. Returning to the source tab resumes a move (Alt copies). Escape or release outside the canvas cancels. Changing the source revision or unexpectedly changing/closing the destination cancels a stale transfer; focus loss, touch cancellation and multitouch cancel too. Moving tabs under a stationary -pointer do not activate further tabs until the pointer moves. The close icon does not activate a tab during a drag. Overflow-menu hover activation and +pointer does not activate further tabs until the pointer moves. The close icon does not activate a tab during a drag. Overflow-menu hover activation and cross-window dragging remain outside this change. +The cited regressions assert the internal clipboard; they do not exercise the native +system-clipboard adapter. Tab activation resets the Selection tool through +`Session::set_active`; gesture regressions verify it is idle after switching, dropping +and cancelling a transfer. `edit.dropSelection {sourceDocument, ids, grab, at}` uses document-scoped ids (`sourceDocument` is `document.inspect`’s session-unique `uid`), validates 1–10000 ids @@ -444,10 +448,11 @@ Scores and hour estimates are unchanged. | 2026-10-14 | minor | Document registration of every explicitly supplied craft-fonts face after the existing script-specific prefix; empty input and web selection remain unchanged. | | 2026-10-13 | minor | Document pinned PngSuite files, integrity checks and download budgets (#1729). | -> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. +> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. | Date | Change | Tab-drag history | |---|---|---| +| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. | | 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged | diff --git a/docs/gaps.md b/docs/gaps.md index 030f4cce2..87f36378f 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -521,10 +521,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development | 2026-10-10 | minor | Alpha blockers checked against the core-workflow gate: none | | 2026-10-10 | major | Moved from the ROADMAP's "Where we're lacking"; kept ids G1–G8, added G9–G19 (file formats, stability, bugs, preferences, 30.x additions, pen hardware, performance, localization, ecosystem, AI, accessibility) and re-ranked | -> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. +> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. | Date | Change | Tab-drag history | |---|---|---| +| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. | | 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged | diff --git a/docs/roadmap.md b/docs/roadmap.md index 0b5be2147..0ced22399 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -221,10 +221,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development | 2026-10-10 | minor | Added the Alpha gate table (core-workflow gate): all six workflows work end to end, `.ai` exchange partial but not blocking; stage stays alpha | | 2026-10-10 | major | Created from ROADMAP.md's milestone table and "Where we're going"; added Current focus and the beta list | -> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. +> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. | Date | Change | Tab-drag history | |---|---|---| +| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. | | 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index ed712990e..ce5882482 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1132,10 +1132,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development | 2026-10-05 | major | (in ROADMAP.md) M3 and M4 rows re-derived after the paint and files milestones | | 2026-10-02 | major | (in ROADMAP.md) First 22-area weighted estimate | -> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. +> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. | Date | Change | Tab-drag history | |---|---|---| +| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. | | 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 53dd8df14..dee75ec29 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -383,10 +383,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development | 2026-10-11 | minor | Direct Selection: dragging a path selected whole by an anchor moves it whole; Alt-drag copies by an anchor too, toggles during the drag and snaps onto the original (#1104); score unchanged (estimated) | | 2026-10-10 | major | First checklist, built from the tool sources and tests against Illustrator 2026's public documentation | -> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. +> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged. | Date | Change | Tab-drag history | |---|---|---| +| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. | | 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. | | 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |