Standardized status messages, foreground progress dialogs, and N+1 fixes (0.9.0) #180
No reviewers
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ai-collab/bulk-image-organizer!180
Loading…
Reference in a new issue
No description provided.
Delete branch "0.8.0/dupe-compare-progress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
core/status_message.py: a single standard for every long-running action's status text —{action} [Stage n/total name]: {count}/{total} (rate unit/s; M:SS remain) {item_name}, with a 10-second rolling-average rate. Dialogs render it as up to three lines (action/stage, count/rate/ETA, item name); the status bar keeps the single-line form.NetworkHydrateDialog— cache pull on directory open.NetworkSyncDialog— cache push on close/switch/exit (no cancel — interrupting a share write mid-copy could corrupt it).SubdirTagBuildDialog— "Create Tags from Sub-directories," now shown before planning starts instead of after.SortIntoFoldersDialog— rebuilt around a loading/content stack so the preview-building step shows progress in the same dialog that then displays the result; toggling multi-tag directories re-triggers the loading step.VERSIONto0.9.0(compiled inputs changed), added theCHANGELOG.mdsection, recordeddocs/DECISIONS.mdDR-044, and updatedresources/help/USER_GUIDE.mdfor all the above.Follow-up work filed (not fixed in this PR)
WorkingDB) rather than a status-reporting fix, so it's tracked separately.Test plan
ruff check ./ruff format --check .— cleanpytest -q— 775 passed, 1 skipped./scripts/check-version-bump.sh— confirmsVERSIONbumped (0.8.0→0.9.0)https://claude.ai/code/session_01TrNqVfQQpmRfwhoUkKkkiJ
Stage 1 now reads "Stage 1 of 2: Scanning {count} of {total} ({rate} img/s) {name}", tracking image throughput over a rolling 5-second window rather than a since-start average so the rate reacts to recent speed. Stage 2 mirrors this with "{done} of {total_pairs} ({rate} pairs/s)" for visual scans, omitting whichever fields aren't available yet (exact scans have no pairwise sub-progress, so stage 2 there stays a bare label). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrNqVfQQpmRfwhoUkKkkiJDerive an M:SS ETA from the same rolling-5s rate already shown, using (remaining_count / rate), and append it next to the rate in both stages: "Stage 1 of 2: Scanning {n} of {total} ({rate} img/s; {mm:ss} remain) {name}" and, when a rate is known, "Stage 2 of 2: Comparing {n} of {total} ({rate} pairs/s; {mm:ss} remain)" for visual scans. The ETA (like the rate) is simply omitted from the message when not yet computable. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrNqVfQQpmRfwhoUkKkkiJIntroduce core/status_message.py (RateTracker with a rolling 10s window, Stage, build_status_message) as a single formatter for the app's "{action} [Stage n/total name]: count/total (rate unit/s; M:SS remain) item_name" status-text shape, with each piece included only when calculable. Migrate every background operation onto it: DupeWorker (gains real ACTION text: "Scan Duplicate Files" / "Scan Visual Duplicates"), the directory-scan pipeline (discover/enrich phases, replacing the old since-start-average ui/scan_progress.py, now deleted), thumbnail generation, DeleteWorker, SortWorker, SearchMetadataWorker, the thumbnail-benchmark dialog, and the sort/subdir-tag-build dialogs (now simple set_message(str) passthroughs of the worker-built string instead of building their own count/total text). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrNqVfQQpmRfwhoUkKkkiJThe "Create from Sub-directories" dialog only appeared after plan_tags_from_subdirs() had already run synchronously, so large workspaces froze with no feedback before the dialog was even visible. Show the dialog immediately and split the work into two visible stages: "Scanning Directories" (planning) then "Assigning Tags" (apply, unchanged mechanism). apply_subdir_tags_incremental() now accepts a precomputed plan to avoid recomputing it a second time. Also fix an N+1 query in plan_tags_from_subdirs() (per-image get_tags_for_image() loop -> one batched get_tags_for_images() call) and skip loading thumbnail BLOBs there, since only paths/tags are needed — the real source of the "large directory" slowness. Add a QProgressBar to every dialog that shows a status counter (SortProgressDialog, SubdirTagBuildDialog — NetworkHydrateDialog already had one), each laid out message-label -> progress-bar -> buttons. Add core/status_message.dialog_message(): splits a build_status_message() string into "{action}[stage]}\n{count/rate/name}" for dialog display, while the shared builder itself (and the main window's status bar) stay single-line. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrNqVfQQpmRfwhoUkKkkiJ