Skip to content

Summarize files added and overwritten after adds - #21

Merged
ClementJ18 merged 4 commits into
ClementJ18:mainfrom
triatomic:feature/overwrite-summary
May 30, 2026
Merged

Summarize files added and overwritten after adds#21
ClementJ18 merged 4 commits into
ClementJ18:mainfrom
triatomic:feature/overwrite-summary

Conversation

@triatomic

@triatomic triatomic commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

After add-to-archive operations, show an information dialog summarizing how many files were added — split into new vs overwritten.

Previously, when the Add Overwrite Default is set to Overwrite, existing files were replaced silently; the only feedback was the * modified-marker in the title bar. This adds explicit confirmation.

Where it fires

  • Single file add (_add_file / _add_file_with_name)
  • Folder add (_add_folder)
  • Archive merge (merge_archives — one combined summary across all source archives)
  • Drag-and-drop (one aggregated summary for the whole drop, instead of one popup per item)

The disk-extract flow (extract / extract_all / extract_filtered) is intentionally left as-is — it delegates to the pyBIG library and does not surface per-file overwrite info.

Details

The dialog shows e.g. Added 2019 file(s) — 2016 new, 3 overwritten. When any files were overwritten, their names are listed under the dialog's Show Details... button, so long lists stay collapsed by default.

Notes

  • In the drag-and-drop single-file path with smart replace enabled, the detail list shows the dropped file name rather than the resolved (renamed) archive target. The folder-add and merge paths — where bulk overwrites typically happen — always show exact archive names.

Show an info dialog after add-to-archive operations (single add,
folder add, archive merge, and drag-drop) reporting how many files
were new versus overwritten. The overwritten file names are listed
under the dialog Show Details button so a silent Overwrite default
no longer hides what was replaced.
@triatomic
triatomic force-pushed the feature/overwrite-summary branch from 3ca06c9 to 2709472 Compare May 29, 2026 09:46
@ClementJ18

Copy link
Copy Markdown
Owner

This doesn't seem to work correctly, with some behaviours, like dragging between archives, files are falsely reported as new. Similar problem when drag-dropping multiple files from a folder and then doing Yes All

@triatomic

Copy link
Copy Markdown
Contributor Author

This doesn't seem to work correctly, with some behaviours, like dragging between archives, files are falsely reported as new. Similar problem when drag-dropping multiple files from a folder and then doing Yes All

this was intended for the silent behavior (overwrite)

@ClementJ18

Copy link
Copy Markdown
Owner

Why can't the feature work consistently across all behaviours as described in _classify_add? Feature should consistently identify if a file wasn't added, replaced an existing file or created a new entry.

triatomic added 3 commits May 30, 2026 03:03
Overwrites under skip_all (drag between archives, Yes-to-All) were
miscounted as new because the classifier read the dialog button, which
is absent when no prompt shows. Return an explicit AddOutcome instead.
QMessageBox can't be resized, so the file list was cramped. Replace it
with AddSummaryDialog: resizable, maximizable, with a Show/Hide Details
toggle listing new files then a separator then overwritten files.
The drop handler tallied each file under its dropped name, but
smart-replace or the rename prompt may store it under another. Return
the resolved name from _add_resolved so the summary lists the real entry.
@ClementJ18
ClementJ18 merged commit ff3e7b1 into ClementJ18:main May 30, 2026
1 check passed
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.

2 participants