Skip to content

File operations: progress, conflicts, drag-drop engine, launching#1

Open
quzopl wants to merge 16 commits into
mainfrom
feat/linux-explorer
Open

File operations: progress, conflicts, drag-drop engine, launching#1
quzopl wants to merge 16 commits into
mainfrom
feat/linux-explorer

Conversation

@quzopl

@quzopl quzopl commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Makes file operations work like Windows Explorer:

  • Threaded copy/move engine (operations/transfer.py): chunked with byte-level progress, same-drive rename fast path, cancel, per-item error collection.
  • Progress dialog (deferred show >400 ms; current file, item X/N, %, MB/s, Cancel) and conflict dialog (Replace / Skip / Keep both, "apply to all").
  • Drag & drop in the views and onto the sidebar now route through the engine — dragging hundreds of files no longer hangs (Ctrl=copy, Shift=move).
  • Launching fixed: .desktop files and executables/AppImages run (Run/Open/Cancel prompt) instead of throwing "can't run application".
  • Status bar: folder item count + selection count/size.
  • English/Polish strings throughout.

Two bugs caught in review and fixed:

  • Copying a file into its own folder destroyed it (data loss).
  • Transfer-completion/conflict slots ran GUI code on the worker thread (crash risk) — now queued onto the GUI thread.

Design + plan under docs/superpowers/.

Test Plan

  • pytest — 126 passed
  • End-to-end: large copy with progress; same-folder copy duplicates safely; conflict → Keep both; no cross-thread Qt warnings
  • Manual: drag 200+ files into a subfolder; run an AppImage and a .desktop; check status bar

bartek and others added 16 commits June 11, 2026 16:06
…nching

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cts, launching

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rror collection

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…le hang)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sidebar now emits files_dropped(srcs, dest, mode) instead of copying inline;
MainWindow runs it through the threaded engine with progress. Test updated to
assert the new delegation contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The same-path guard skipped conflict handling, then _copy_file removed the
target (which was the source) before reading it, deleting the file. Now a
same-path copy always duplicates with a fresh name and a same-path move is a
no-op. Adds regression tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
worker.finished/conflict/error were connected to plain closures, which Qt
invokes with a direct connection — so dialog/refresh code (and ConflictDialog
creation) ran on the worker thread, triggering cross-thread QWidget warnings and
risking a crash. Connect to bound methods of the window instead (queued
cross-thread delivery); per-transfer state is stashed on the worker and read via
sender().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant