Repository navigation
feat(drag): save browser images, text, and web links - #1547
Conversation
|
Final scoped validation: Scope: the explicit attachment correction affects the shared Columns/Icons/List, breadcrumb, sidebar and tab drop receivers. Coverage includes binary receiver attachment/routing, original bytes and captured destination, no-clobber publication, plus startup/live drop preferences across two views and view rebuilds. These native checks do not establish actual-browser transport interoperability. Owner override: no further E2E runs. Earlier full results remain historical, not replaced by the scoped checks: Rust 2527 passed / 6 failed / 9 ignored; E2E 995 passed / 1 failed. The two uncertain Rust cases now pass above. Three other notification/settings failures reproduced on unchanged baseline; the archive-chord failure passed earlier isolated native/pinned reruns. The E2E text-size failure remains unresolved. Two binary-offer cases failed against the removed deserializer implementation and were not rerun against the final async receiver. Required CI and manual browser confirmation remain necessary before merge. Visual evidence still pending: no final-build before/after recording is attached. Earlier failure captures are retained locally:
These are failure evidence, not final-success screenshots. Please capture the final manual browser drop before/after and upload sanitized captures through the GitHub editor, then embed its attachment URLs in Visual evidence. No captures or task reports were committed. Detailed local handoff: |
This comment has been minimized.
This comment has been minimized.
|
CI follow-up pushed in The failed check was E2E shard 2, Grid reveal previously bypassed deferred reveal handling. It now retains the request until the GTK model is ready and the modal has closed, then focuses the selected output without changing the selection. The existing E2E scenario and assertions are unchanged. Scoped validation on final code:
Scope rationale: this changes only the GridView reveal path; existing List/Columns handling, model selection semantics, transfer services, dependencies, runtime images, and harness inputs are unchanged. Tests cover native focus/lifecycle behavior, not layout assertions. No local E2E runs were performed, as explicitly requested by the owner. Full local Rust suites were omitted for this bounded correction. The exact failing E2E scenario and required GitHub checks still need CI confirmation; no green CI or completed manual verification is claimed. Existing browser interoperability/manual-validation limitations remain in the description. |
|
Worth discussing how dropped URLs are handled. The common approach in file managers (Finder, Dolphin, Nautilus) is to save a bookmark or link file for a dropped URL without fetching it. The browser only provides real file data when the user drags an actual image or file. Here, dropping a link makes an outbound request to check whether it's an image ( Could URL drops default to just writing the |
Dropping browser content on a folder row, pane background, breadcrumb, sidebar folder, or tab saves it as a new file in local folders: image data as PNG, a browser's image file contents with their original bytes, selected text as UTF-8 text, and HTTP(S) addresses as freedesktop Type=Link entries. Dropped addresses are never fetched; opening a saved link hands its address to the default browser. Names never replace existing entries, and files appear only once complete. Web addresses dropped on the sidebar Trash are refused instead of being handed to GIO. The QA foreign drag source can now offer raw MIME content. Refs #1545
4407511 to
0baa91a
Compare
ReviewReviewed head Minor1.
2. Image data takes priority over a real file list (
3. Chromium file-contents drops have no fallback and fail silently (
The drop is not retried as the
4. A list mixing web and local addresses still goes through the file transfer (
5. No hover feedback for Chromium image drags ( |
… content Address review findings on browser content drops: - Fall back to an exclusive in-place write when the destination can neither rename without replacing nor hard link, as on some FUSE mounts, so content drops and image paste keep working there. A failed write removes the partial file. - Read a dropped file list before image data. A drag offering real files with an image copies the files; image data is read only when the list holds web addresses alone or is absent. - Read images in the asynchronous companion target at drop time, falling back to the offered addresses or text, and show the save error when nothing can be saved. The main target now gives all hover feedback, so image drags highlight rows, spring-load folders, and auto-scroll. - Refuse URI lists mixing web addresses with files instead of handing them to GIO, so a dropped address is never contacted. Refs #1545
Fixes applied
Validation: |
Description
Reworked from a clean
main. Drag content from a browser or another app onto a folder row, pane background, breadcrumb, sidebar folder, or tab, in any view, and Strata saves it as a new file in that (local) folder:image.pngapplication/octet-stream;name="…") → original bytes, extension taken from the actual image formatdropped text.txtexample.com.desktop, aType=Linkentry with noExecPer review feedback, dropping an address never contacts it: no probing, no download, even for image URLs. Opening a saved link sends the address to the default browser. Existing names are never replaced (numbered names, dangling symlinks kept), files appear only once complete, and Open folder after dropping files applies. Remote, Trash, and Recent destinations don't accept new content. Strata's own tab and sidebar reorder drags are never saved as text. Web addresses dropped on the sidebar Trash are now refused instead of being handed to GIO.
The QA foreign drag source can now offer raw MIME content; the new
content_dropsscenarios drag real content from a separate process and count local HTTP requests to show that nothing is fetched.Visual evidence
N/A. Agent-prepared change; behaviour is described above and covered by QA scenarios.
How to test
.desktopfile.Expected result: Firefox images save as
image.png, Chromium images save with their original name and bytes, and text saves asdropped text.txt. A link saves as<host>.desktopwithout network access, and opening it launches the default browser. Repeated drops get numbered names. A read-only folder shows "Unable to save dropped content". Dragging files between folders behaves as before.Related issue
Closes #1545