Repository navigation
Show total size of selected files in maintenance cards (#220) - #223
Conversation
Untracked Files, Backup Cleanup and Duplicates now show the combined size next to the Selected: N counter, so the amount of data an action will touch is visible before clicking. Sizes come from the rows' existing data-size attributes. Group rows in Untracked Files carry the whole group's size in data-size (used for sorting) and their children are selected too, so group rows expose their own file in a new data-file-size attribute to avoid counting children twice. Duplicate file rows get a data-size attribute. formatBytes() mirrors core.system_utils.format_bytes so the figure matches the operation pill.
…ree cards Untracked Files, Backup Cleanup and Duplicates now show the action buttons on the first line and the "Selected: N · size" summary on its own line below them, in a slightly larger type. This gives the summary room and keeps the three cards identical. Spacing above the buttons and below the summary is balanced. On the Duplicates card the "Sonarr/Radarr integration active" notice moves next to "Scanned ..." in the badge row, which frees the line above the buttons, and the left and right button groups are top-aligned. Purely visual and independent of the size display in the previous commit; it can be dropped without affecting it.
|
Thanks, this is nicely done. I rendered both commits against current main with some sample data (a group with sidecars, single files, backups and duplicates) and the totals come out right on all three cards, with the group's sidecars counted once. The I was going to ask you to drop commit 2, but seeing it side by side changed my mind. The selection line is much easier to read on its own row than squeezed in next to the buttons, all three cards change the same way, and moving the Sonarr/Radarr line up next to "Scanned" saves the line you add. Happy to keep both. One small thing: could Once that's in, this looks good to merge from my side. |
|
Small note on the base and on other open PRs: the branch is based on current main (6bc18fe, the #219 merge), but that doesn't matter for this PR. Between e2010d6 (#222) and 6bc18fe only web/static/css/custom.css changed. The three templates this PR touches (maintenance/index.html, partials/audit_results.html, partials/duplicate_card.html) are identical in both, so it applies cleanly on either, and it doesn't depend on #219. It also doesn't overlap with #218: that PR only changes web/static/css/custom.css and web/templates/base.html, while this one only touches the three maintenance templates above and uses inline styles instead of custom.css. No shared files, so the two can be merged in any order without conflicts. |
As suggested in review: app.js is loaded on every page, so other pages can use the same helper instead of carrying their own copy. It mirrors core.system_utils.format_bytes. settings/cache.html declares its own GB/TB-only formatBytes() before app.js loads, so the shared one is only defined when no page has declared one already; that page keeps its current output.
|
give me some moments ... i will comment if i updated everything to final |
If formatBytes() is not available (for example a browser still using a cached app.js from before the helper moved there), setSelectedSize() threw inside the checkbox handler, so selecting a group no longer selected its children and the count was wrong. Catch it and just show no size.
|
Thanks! I pushed two small follow-ups. Feel free to have a look @Brandon-Haney @StudioNirin 1. 2. The size display can no longer break the selection. While testing I ended up with the new Easy to check: keep an old Heads-up for testing/updating: if the size doesn't show up after an update, please clear the browser cache for |
Brandon-Haney
left a comment
There was a problem hiding this comment.
Both follow-ups look good, thanks. Approving from my side.

Closes #220
Analyzed, written and tested together with Claude Sonnet 5.5 (Anthropic).
What changed
Commit 1 – Show the combined size next to the "Selected: N" counter on Untracked Files, Backup Cleanup and Duplicates (e.g. "Selected: 47 · 31.68 GB").
Commit 2 (optional, independent of commit 1, easy to drop) – Layout of the selection bar on all three cards: action buttons on the first line, the selection summary on its own line below in slightly larger type, spacing above the buttons and below the summary balanced.
On Duplicates, "Sonarr/Radarr integration active" moves next to "Scanned …", and the left and right button groups are top-aligned. The button order and the buttons themselves are unchanged. I know you'd rather not change the button position on one card alone, so this changes all three identically; if you'd rather keep the current layout, just drop commit 2.
Testing
UNSELECTED UNTRACKED FILES
UNSELECTED DUPLICATE FILES
SELECTED UNTRACKED FILES
SELECTED DUPLICATE FILES