Skip to content

feat(player): M3 smart music folder import and safe missing-file relink - #500

Closed
masarray wants to merge 3 commits into
mainfrom
feature/arson-player-m3-smart-folder-relink-20261109
Closed

masarray wants to merge 3 commits into
mainfrom
feature/arson-player-m3-smart-folder-relink-20261109

Conversation

@masarray

@masarray masarray commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

ArSon Player M3.1 — smart stage setlist: Add Folder + Locate Missing Music

Built from fully qualified M2 main 9bd81a1b8da764a2f4523e70c0db60f583aa291f (PR #496 merged). This is a separate additive live-setlist milestone; it does not touch the ASIO callback, device selection, VST3 chain, PCM graph or mixer routing.

Product workflow

  • ♫ Player → folder icon: choose one folder once. A bounded background juce::DirectoryIterator recursively collects supported music (WAV/MP3/FLAC/AIFF/OGG), naturally sorts filenames, deduplicates existing library entries, and saves the same versioned atomic player-library.json with existing per-song KEY/TEMPO values. User can continue listening while enumeration is underway; UI shows inline progress, no consent/Lab or extra thread in the audio callback.
  • Missing track → Locate file: a contextual button appears only when a selected entry is missing. Native FileChooser accepts only an explicit existing media file with matching filename stem; prevents silent wrong-song substitution, refuses duplicates and stale selection changes. The same setlist row, ID, order and KEY/TEMPO preset survive relinking, and relink never auto-starts playback or switches physical outputs.
  • Premium compact UI: small SVG folder icon and inline Locate file, no bulky cards, no other renderer or WebAudio, no changes to approved mixer console HTML.
  • Safety: scan bounded at 2,000 supported songs / 20,000 filesystem entries; no filesystem enumeration on UI message thread or realtime audio callback. Truncation is reported. App shutdown does not commit background results to a destroyed window (JUCE SafePointer).

Tests

  • tests/player_native_decode_test.cpp covers nested folders, natural order (01/02/03/10), extension filtering, explicit same-name relink and wrong-song rejection; existing real WAV → ASIO-sized prepared PCM and M2 pitch/tempo fixtures preserved.
  • tests/approved_preview_mobile_navigation_smoke.py covers SVG folder control across phone widths, hidden Locate action in empty public preview, and no simulated browser playback.

Current HEAD 504e143865a2d27fe60f79c851d47208758e9cec — DRAFT until exact-SHA fast native/UI and targeted full Chromium + Windows FAT pass. Physical ASIO singer listening, OBS and long performance soak remain PENDING. Current parallel first-launch #491 edits src/Main.cpp and must be reconciled when it becomes mergeable; do not overwrite it.

CI economy: one Fast UI + Fast Native on normal PR push; only one ui and one fat on the final reviewed SHA. No duplicate native lane alongside FAT.

M3.1 exact-head audit checkpoint

  • Product source: folder-selection workflow, bounded 20k-entry/2k-song worker scan, recursive natural sort, existing setlist dedupe, same-filename explicit missing-media relink. No changes to AUDIO/ASIO callback, device graph, or stored song KEY/TEMPO.
  • Original Chromium check #42660925111 caught a real CSS ownership regression: a second #playerAdd { margin-left: ... } declaration. Root cause fixed, not waived, by editing the original selector in-place and removing duplicate overlay in 504e143865a2d27fe60f79c851d47208758e9cec.
  • Quick checks at exact SHA: Fast UI #42661420015 PASS; Fast Native #42661420133 PASS.
  • Full Chromium at exact SHA: #42661689026, in progress at last observation.
  • Windows FAT: initial source 50af303d run #42660957838 was already running and MUST NOT be confused with final CSS source. One exact-head FAT for 504e143865a2d27fe60f79c851d47208758e9cec is still needed after the previous job completes; do not run overlapping Windows builds or declare installer available early.
  • Parallel first-launch P0 first-launch: genuine SOURCE NONE ChannelId mixer, zero-capture output-only FX workspace #491 remains separately owned. It overlaps src/Main.cpp, so the other PR must be reconciled against M2/M3 main when its owner completes. Avoid overwriting its work.
  • Physical FAT: source-folder selection on a real Windows installation, missing USB media relink, ASIO playback and OBS copy are PENDING user-hardware checks. Fast CI never proves them.

M3.2 — safe one-click folder relocation recovery

Commit: 13c49be3b92507d6de01c6733783385808cca0ca (based on the already-merged ArSon Player M2 main, 9bd81a1b8da764a2f4523e70c0db60f583aa291f).

A single user-directed Add Folder now performs two independent, bounded steps: (1) recover existing missing songs that have a uniquely matching full filename including extension, and (2) add genuinely new files. The setlist row/ID, order, selection and per-song KEY/TEMPO settings remain intact.

Safety gates: no silent stem-only substitution; reject duplicate candidate basenames in nested folders, a candidate already owned by another row, and multiple missing rows with the same filename. The currently loaded music row is protected. Both scan and expensive per-path existence checks run on the filesystem worker, not the realtime callback or UI thread; GUI applies the finished plan only when the saved row still matches the worker snapshot. No automatic Play, no output reroute, no manual wizard, no second audio engine.

Tests: tests/player_native_decode_test.cpp now exercises exact full-name recovery across nested folders, CURRENT protection, already-owned path, two ambiguous candidates, duplicated missing identifiers, and filename-extension mismatch; M1 WAV decoding and M2 independent KEY/TEMPO fixtures are retained.

CI at exact SHA: Fast Native and Fast UI PASS via #42723955241 and #42723955249. Prior full Chromium #42661689026 PASS at GUI-identical 504e143; no full Chromium rerun required because this patch changes only C++ worker, native stage integration and CTest. One FAT command posted for exactly 13c49be3b92507d6de01c6733783385808cca0ca to validate MSVC/CTest and deliver a new Windows installer; result PENDING until its workflow completes. Prior FAT #42660957838 PASS, but pertains to earlier M3 source. Physical USB media/ASIO/OBS listening still PENDING.

Parallel first-launch PR #491 remains separate; no direct change to device selection, ASIO, FX/WIRE graph or its branch.

masarray commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 50af303

masarray commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 50af303

masarray commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 504e143

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 13c49be
Status: ✅  Deploy successful!
Preview URL: https://92d05c9a.arsonmix.pages.dev
Branch Preview URL: https://feature-arson-player-m3-smar.arsonmix.pages.dev

View logs

masarray commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 13c49be

masarray added a commit that referenced this pull request Nov 10, 2026
Forward-port production deltas from #512/#511, #500, and #498 without reverting the newer logical mixer or branded Harmonice. Fence generic ASIO recovery by registered driver and original pins, preserve saved capture patches, keep the native GUI readiness handshake independent of hardware, and verify unique USB-file relinks and sanitized native footer status.

Copy link
Copy Markdown
Owner Author

Repository housekeeping (2026-11-10): Closed as already integrated/superseded, NOT merged from this PR. The actual current main has the M3.1 player folder picker, bounded background PlayerLibraryPolicy::scanFolder, Add Folder UI, explicit Locate Missing Music chooser, same-filename validation, duplicate check, setlist identity/KEY/TEMPO preservation and regression tests, via integrated M14 #499. Old planMissingRelinks() batch helper from this draft is not in main; current product deliberately offers explicit per-track user-selected relink, not automatic bulk path reassignment. Re-merging the pre-integration Main.cpp/player code would risk regressing later GUI/engine work. Closing this duplicate delivery PR; live player/UAT/ASIO/OBS acceptance remains open in #412.

Historical code review and SHA remain available; this is not a hardware qualification or new release.

@masarray masarray closed this Nov 10, 2026
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