fix(ui-core): the browser's native image drag is impossible on every asset surface - #435
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #428
What changed
The browser's native image drag is now impossible on every asset surface, in both modes.
What the render paths actually are — checked, not assumed: the workspace draws the asset as an
<img>inside the stage (there is no canvas-drawn path), and product-wide exactly two<img>elements exist — that canvas image, andAssetThumbnail, which the frame-gallery overlay puts inside the workspace and the batch gallery uses for its tiles.draggable={false},pointerEvents: "none"anduserSelect: "none"since the adapter's first commit — so it could not be dragged at HEAD; it gains the chromium tests that hold that true.AssetThumbnailwas the open surface: its<img>carried no protection, so a drag on a frame-gallery tile (or a batch-gallery tile) lifted a ghost of the picture. It gainsdraggable={false}— the attribute alone, because an<img draggable={false}>starts no native drag in any engine this product supports, and a second guard behind it would be an untestable double (theAnnotatorPanelprecedent).The e2e stub now gives assets a
thumbnail_hashand serves/thumbnail, so the overlay renders real<img>tiles for the test to attack.Test plan
Both in chromium, with a capture-phase
dragstartcounter armed before any gesture:Harness verification: putting
draggable={true}on the thumbnail (the explicit spelling of HEAD's default) turns the first test red — which both proves the counter genuinely observes native drag machinery and is the red-at-HEAD demonstration, since HEAD shipped exactly that state. Reverted by its exact diff; tree byte-identical to the commit.Gate stages (staged; exit codes verbatim):
uv run pytest -q(green except the ten ffmpeg-environment tests recorded on #429)uv run ruff check ./uv run ruff format --check .uv run mypy src/visionset/uv run lint-importspnpm -r build/pnpm test/pnpm -r lintCI=1 playwright test, 230 tests)CI=1 playwright test -c playwright.cycle.config.ts)