Skip to content

Feat/polish - #3

Merged
potato-robert merged 6 commits into
mainfrom
feat/polish
Aug 3, 2026
Merged

potato-robert merged 6 commits into
mainfrom
feat/polish

Conversation

@potato-robert

Copy link
Copy Markdown
Owner
  • Better library rescanning with handling of renames
  • More granular rescanning and data resetting
  • UI fixes
  • COM apartment-threading fix for the folder picker
  • Regression tests for ctypes/COM init
  • Settings reset panel moved behind a toggle
  • Selector, unit, and E2E test updates

potato-robert and others added 6 commits August 2, 2026 16:14
Folder picker subprocess errors were not always surfaced, and the browse dialog could fail on Windows due to an incorrect ctypes type.

Changes:

- Return unavailable when the picker subprocess exits non-zero

- Cast pszDisplayName to LPWSTR for SHBrowseForFolderW

Co-authored-by: Cursor <cursoragent@cursor.com>
Library scans only matched files by exact path, so renames created duplicates and deleted files left orphaned rows. Scans also re-parsed every file on every run.

Changes:

- Reconcile moved episodes and movies by metadata when the old path is gone

- Prune stale library rows and their watch progress after each scan

- Track file mtime/size to skip unchanged files in quick mode

- Add POST /api/scan?mode=quick|full with expanded scan stats

Co-authored-by: Cursor <cursoragent@cursor.com>
Users need a way to wipe corrupted data and rebuild, plus a clearer choice between a fast change scan and a full rescan.

Changes:

- Add POST /api/settings/reset-data that preserves media roots

- Split Settings into Scan for changes and Full rescan buttons

- Add danger zone with type-to-confirm before resetting all data

- Cover reset flow and new scan controls in unit and E2E tests

Co-authored-by: Cursor <cursoragent@cursor.com>
Document new scan endpoints, Settings testids, and verification notes after the library scan overhaul.

Changes:

- Add reset-data and scan mode to API contract and AGENTS.md

- Document new Settings testids and renamed scan button labels

- Update verify skills and README for quick/full scan behavior

Co-authored-by: Cursor <cursoragent@cursor.com>
The folder picker silently failed because SHBrowseForFolderW needs
single-threaded apartment COM; multi-threaded mode returns no dialog.
Also tuck the reset-data danger zone behind a toggle so it is less
prominent on the settings page.

Changes:
- Initialize COM with COINIT_APARTMENTTHREADED in pick_folder_dialog.py
- Add regression tests for ctypes marshaling and COM apartment mode
- Move reset controls behind a Reset app data toggle in Settings
- Update selectors, unit tests, and E2E coverage for the new flow

Verified with ruff + .\scripts\test.ps1 -Layer all

Co-authored-by: Cursor <cursoragent@cursor.com>
Quick scans on unchanged files finished before the UI could show
Scanning..., causing flaky E2E failures. Set running=true when
queuing the scan and wait for a real running cycle before clearing
the scanning state.

Changes:
- Set scan running flag synchronously in start_background_scan
- Improve waitForScanComplete to observe running=true before idle
- Assert rescan button disabled/enabled in E2E instead of label text
- Add regression test for pre-task running state

Verified with ruff + .\scripts\test.ps1 -Layer all

Co-authored-by: Cursor <cursoragent@cursor.com>
@potato-robert
potato-robert merged commit 77a47cf into main Aug 3, 2026
1 check passed
@potato-robert
potato-robert deleted the feat/polish branch August 3, 2026 16:56
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