Upgrade copy-completed-torrent: config, tabs, Transmission cleanup #1

Merged
Grok merged 13 commits from media/copy-completed-torrent-upgrade into main 2026-09-06 20:49:27 +00:00
Member

Summary

  • Tab 1 Copy: existing Show All / Show Unchecked / Copy Unchecked / list / progress / log; Source/Dest and checklist _copied.txt behavior unchanged aside from paths coming from INI config.
  • Tab 2 Cleanup completed: Transmission RPC (torrent-get) vs completed-dir items; dry-run Preview candidates; delete only after Yes/No confirmation with count + preview. Never deletes unchecked items or torrents still in Transmission; removes matching _copied.txt lines after successful delete.
  • Config: gitignored media/copy-completed-torrent.cfg (INI [paths] / [transmission] / [gui]), committed copy-completed-torrent.cfg.example, Settings dialog with explicit Save, optional COPY_COMPLETED_TORRENT_CFG env override.
  • UX: larger default window, anchors, status bar, File / Settings, PS 5.1 warning retained.

How to run

pwsh -File media/copy-completed-torrent.ps1

Copy media/copy-completed-torrent.cfg.example to media/copy-completed-torrent.cfg (or use Settings on first run).

Test plan

  • First launch creates cfg / opens Settings; Save persists INI
  • Tab 1 still lists, checks _copied.txt, robocopies unchecked
  • Tab 2 Preview lists only copied + not-in-Transmission items
  • Delete confirmation shows count; Cancel leaves files; Yes deletes and updates checklist
  • Bad Transmission host shows clear UI/log error (no silent crash)
## Summary - **Tab 1 Copy**: existing Show All / Show Unchecked / Copy Unchecked / list / progress / log; Source/Dest and checklist `_copied.txt` behavior unchanged aside from paths coming from INI config. - **Tab 2 Cleanup completed**: Transmission RPC (`torrent-get`) vs completed-dir items; dry-run **Preview candidates**; delete only after Yes/No confirmation with count + preview. Never deletes unchecked items or torrents still in Transmission; removes matching `_copied.txt` lines after successful delete. - **Config**: gitignored `media/copy-completed-torrent.cfg` (INI `[paths]` / `[transmission]` / `[gui]`), committed `copy-completed-torrent.cfg.example`, Settings dialog with explicit **Save**, optional `COPY_COMPLETED_TORRENT_CFG` env override. - **UX**: larger default window, anchors, status bar, File / Settings, PS 5.1 warning retained. ## How to run ```powershell pwsh -File media/copy-completed-torrent.ps1 ``` Copy `media/copy-completed-torrent.cfg.example` to `media/copy-completed-torrent.cfg` (or use Settings on first run). ## Test plan - [ ] First launch creates cfg / opens Settings; Save persists INI - [ ] Tab 1 still lists, checks `_copied.txt`, robocopies unchecked - [ ] Tab 2 Preview lists only copied + not-in-Transmission items - [ ] Delete confirmation shows count; Cancel leaves files; Yes deletes and updates checklist - [ ] Bad Transmission host shows clear UI/log error (no silent crash)
Gitignore local copy-completed-torrent.cfg; ship an example with
documented [paths]/[transmission]/[gui] fields and a short media README.
Move Source/Dest into INI config with Settings Save dialog. Keep Tab 1
copy/checklist/robocopy behavior. Add Tab 2 dry-run preview and confirmed
deletes for copied items absent from Transmission RPC.
Under Set-StrictMode, empty/single pipeline results lack .Count — wrap
stale/remaining lists as arrays on the post-Save Refresh-List path.
Settings stays on File menu only.
Single entry point: in-app root locate, start.cfg git ff-only self-update,
cfg artifact from .example, then Settings/tabs. Spec + thin start.* wrappers.
Apply civitai dark palette across form, tabs, lists, buttons, menu, logs.
Startup stays in-app only. Spec documents in-app stages; no generated launchers.
Double-quoted strings that embed $_ blow up under StrictMode/format when
the exception text contains {…}. Build messages with -f after [string]$_.
Install AGENTS.md + docs/VERSIONING.md (canonical VERSION). Main had 1
commit (0.1.0 adopt base); MINOR for application-code changes on this
branch including version display. Application paths: media/**/*.ps1,
windows/**/*.ps1.
Trailing ' after $script:logBox / cleanupLogBox broke parsing and
surfaced as a string-format InvalidOperation at startup.
Remove civitai-inspired palette, owner-draw tabs, and Set-Ui* styling.
Keep tabs, config, startup, and version display.
Match create-start-script / civitai Windows GUI behavior: SW_MINIMIZE
before startup+ShowDialog, restore console when the form closes.
Prevent 1-item HashSet/list pipeline unwrapping (WriteObject enumerateCollection=false),
use Get-CountSafe everywhere, return candidates as object[], and catch delete-handler errors.
Unary-comma return wrapped object[] inside another array; foreach then
hit .Name on the inner array. Return via WriteObject(array, false) and
normalize with ConvertTo-ObjectArray.
Grok merged commit 22c2efd339 into main 2026-09-06 20:49:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai-collab/toolbox!1
No description provided.