Conversation
Greptile SummaryThe PR adds drag-and-drop video opening to the main preview while preserving the existing click-to-open workflow.
Confidence Score: 5/5The PR appears safe to merge, with invalid or unsupported drops handled by the existing load-error path. The new drop flow delegates to the established backend loader, preserves existing click behavior in normal states, and includes coverage for drag acceptance and backend invocation without introducing an established blocking failure.
|
| Filename | Overview |
|---|---|
| src/Main.qml | Adds the drop target, visual feedback, interaction gating, and forwarding of the first dropped URL to the existing loader; no actionable defect was established. |
| tests/backend_tests.cpp | Extends the backend stub and adds an integration test verifying URL drag-and-drop reaches the QML DropArea and invokes the loader once. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[User drags URLs over preview] --> B{DropArea enabled and URLs present?}
B -- No --> C[Ignore drop]
B -- Yes --> D[Accept copy action]
D --> E[Take first dropped URL]
E --> F[backend.load URL]
F --> G{Valid local video?}
G -- Yes --> H[Load video]
G -- No --> I[Show load error notice]
Reviews (1): Last reviewed commit: "Support a drop zone to open files" | Re-trigger Greptile
A drop can fail before anything is open — a directory, a file that is not a video, a URL that is not a file — but the status line only joined the layout once a video was loaded, so the error it carried never reached the screen and the notice timer cleared it five seconds later. Dropping something unloadable on the empty window looked exactly like dropping nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The drag source writes its own uri-list, and a web page can compose one with DataTransfer.setData, so every entry in it is a stranger's text. It went straight to load(), which hands QUrl::toLocalFile() to ffprobe as the input argument — and a file: URL with no absolute path keeps its path verbatim. "file:http://host/clip" arrives as a network URL, which ffprobe fetches; "file:-report" arrives as an option, which ffprobe acts on, writing a log beside the process. Neither is a file, so neither is opened now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
acceptProposedAction() answers the source with whatever the source proposed, and with Shift held a file manager proposes a move — which it completes by deleting the file it just handed over. Opening a video only reads it, so the answer is always a copy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
ffprobe quotes the path it could not open back in its error, and a dropped path is a stranger's text. Label defaults to AutoText and Qt::mightBeRichText matches tags anywhere in the string, so a path holding markup was parsed as markup: the characters in it were never drawn, and the message the user needed to read came out mangled. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
|
Reviewed by Claude Opus 5 with an independent second opinion from Codex at xhigh reasoning. The drop zone works — a video dropped on the window loads, gets its filmstrip, and the click-to-open button, Ctrl+O, the portal picker and the Everything below was run on a disposable Omarchy VM with a real Hyprland session, never on the machine doing the review. A crafted URL reached ffprobe as a network URL or as an option ( The drop told the source the file had been moved ( Failed drops were completely silent ( Markup in a path was rendered as markup ( Two things left alone deliberately. Only On the second opinion: Codex found the move-action, the relative- Nothing here is merged or approved — that is the maintainer's call, and #5 overlapping this file is the thing worth deciding first. |
In the spirit of Omarchy making things simple and opinionated with good default settings, here's a Grok-powered solution to have a drop zone in addition to being able to manually open a video.
omacut-drop-zone.mp4