PR7: Metadata enrichment scan respects UI sort order (DR-014) #17

Closed
opened 2026-06-04 18:08:10 +00:00 by Grok · 1 comment
Member

Context

DR-014 (issue #15) specifies:

  • Discovery scan stays in filesystem/alphabetical order for fastest placeholder population.
  • Metadata enrichment scan processes files in the current UI sort order and re-orders the remaining queue if the user changes sort mid-scan.

Current behavior

Both discovery and metadata workers iterate in os.scandir presentation order. PR5 grid uses direct ImageListModel without sort UI yet.

Scope

  • Define default UI sort (likely filename) before proxy lands in PR7
  • Metadata ScanWorker / scanner queue ordered by active sort key
  • On sort change during scan: reorder pending metadata work only (do not restart discovery)
  • Emit dataChanged/proxy invalidate as needed when sort affects visible order

Dependencies

  • PR7 introduces QSortFilterProxyModel + filmstrip sync (DR-014)
  • Sort controls may expand in PR8 filters

References

  • docs/DECISIONS.md DR-014
  • docs/DESIGN.md PR7, decision gate #6

Blocks

Non-blocking for PR5 merge; should land with or before PR7 viewer/filmstrip.

## Context DR-014 (issue #15) specifies: - Discovery scan stays in filesystem/alphabetical order for fastest placeholder population. - **Metadata enrichment scan** processes files in the **current UI sort order** and re-orders the remaining queue if the user changes sort mid-scan. ## Current behavior Both discovery and metadata workers iterate in `os.scandir` presentation order. PR5 grid uses direct `ImageListModel` without sort UI yet. ## Scope - Define default UI sort (likely filename) before proxy lands in PR7 - Metadata `ScanWorker` / scanner queue ordered by active sort key - On sort change during scan: reorder pending metadata work only (do not restart discovery) - Emit `dataChanged`/proxy `invalidate` as needed when sort affects visible order ## Dependencies - PR7 introduces `QSortFilterProxyModel` + filmstrip sync (DR-014) - Sort controls may expand in PR8 filters ## References - `docs/DECISIONS.md` DR-014 - `docs/DESIGN.md` PR7, decision gate #6 ## Blocks Non-blocking for PR5 merge; should land with or before PR7 viewer/filmstrip.
Author
Member

PR7 complete — this issue stays open

PR7 (merged in commit on main) delivered the #19 UI shell, including:

  • Sort By / Sort Order chrome on the sub-toolbar (apply is still a stub)
  • ImageFilterProxy on the grid for Trash (DELETE-only) and tag-filter stub
  • Justified grid column spacing across the viewport width

Not in PR7 scope (actionable here): metadata enrichment scan queue ordered by active UI sort + mid-scan reorder per DR-014. Scan workers still use discovery/filesystem order for metadata batches.

Plan: implement sort-aware metadata queue when sort apply and/or full sort proxy land (PR8/PR9). Leaving #17 open until that work is done.

## PR7 complete — this issue stays open PR7 (merged in commit on `main`) delivered the #19 UI shell, including: - Sort By / Sort Order chrome on the sub-toolbar (apply is still a stub) - `ImageFilterProxy` on the grid for Trash (DELETE-only) and tag-filter stub - Justified grid column spacing across the viewport width **Not in PR7 scope (actionable here):** metadata enrichment scan queue ordered by active UI sort + mid-scan reorder per DR-014. Scan workers still use discovery/filesystem order for metadata batches. **Plan:** implement sort-aware metadata queue when sort apply and/or full sort proxy land (**PR8/PR9**). Leaving #17 open until that work is done.
Sign in to join this conversation.
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/bulk-image-organizer#17
No description provided.