Skip to content

refactor(tui): centralize library selection and preserve saved identity - #107

Merged
patricksmill merged 1 commit into
mainfrom
integrate/library-selection-105
Nov 4, 2026
Merged

patricksmill merged 1 commit into
mainfrom
integrate/library-selection-105

Conversation

@patricksmill

Copy link
Copy Markdown
Owner

Summary

Library selection
  position-based identity + ROM count
    ├── selected cache entry
    ├── selected ROM request
    ├── collection prefetch
    └── persisted selection
App → screen.get_roms_request()

Concentrate platform/manual/smart/virtual selection interpretation and remove separate request methods plus App forwarding. Includes prerequisite saved-selection persistence/restoration changes that were already uncommitted in the checkout; these are required for the behavior covered by the spec. Agent-skill setup files are excluded.

Closes #105
Closes #106

Evidence

  • Before: library-browse characterization suite: 17 passed; 0 failed, including overlapping collection IDs and missing versus empty virtual IDs.
    After: the same suite: 17 passed; 0 failed after consolidation.
  • After: cargo test --workspace: 439 passed across 28 suites.
  • After: cargo fmt --check and both cargo clippy --all-targets --all-features -- -D warnings and cargo clippy --all-targets --no-default-features -- -D warnings completed successfully.
  • After: throwaway cargo run -p romm-tui --example selection_smoke printed PASS: filtered smart selection, request identity, saved restoration, neighbor prefetch, metadata reorder and count-change reload. Smoke source removed afterward.
  • Independent Standards and Spec reviews of the consolidation against the preserved uncommitted baseline: no findings. These reviews did not treat the prerequisite persistence implementation as new refactor work.
  • No live RomM server or interactive-terminal visual check.

Merge Danger

Door: two-way

No cache-format migration. Prerequisite persistence adds an optional, defaulted tui_layout.library_selection configuration field. Existing configuration files remain readable. The library-browse Rust interface replaces get_roms_request_platform / get_roms_request_collection with get_roms_request; in-repo callers are migrated, but external Rust consumers using those methods must migrate too.

Blast Radius: library

Affects library selection, request targeting, prefetch, and saved-selection restoration. Generation guards, cancellation, debounce, and cache-paint policy are unchanged.

@patricksmill
patricksmill merged commit d751fd7 into main Nov 4, 2026
11 of 13 checks 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.

Consolidate library selection identity and request interpretation Simplify library selection interpretation without changing browsing behavior

1 participant