docs: note preprocessing panel fold into TrackList tabs

This commit is contained in:
daniel-c-harvey
2026-06-05 18:27:53 -04:00
parent 76e16fe32e
commit 59dbfb8aab
+11 -9
View File
@@ -8,17 +8,17 @@ Newest entries at the top. Group by phase/wave header (mirroring `PLAN.md` / `CM
## WaveformSeeker Wave 3 — CMS PreProcessing panel
**Status:** W3 (CMS track-preprocessing panel) landed on 2026-06-05 (branch `waveform-w3-cms`, pending merge to dev).
**Status:** W3 (CMS track-preprocessing panel) refactored on 2026-06-05 (branch `waveform-w3-cms`, merged to dev).
### W3 — CMS PreProcessing panel
**Landed 2026-06-05.**
**Landed 2026-06-05. Refactored 2026-06-05.**
Implemented the CMS surface for on-demand waveform profile generation: a new `/tracks/preprocessing` page (table view of all tracks with profile status) and two API endpoints for querying and triggering profile generation.
Implemented the CMS surface for on-demand waveform profile generation. Initial implementation created a new `/tracks/preprocessing` page; refactored to fold the preprocessing panel into `TrackList.razor` as a second `MudTabPanel` alongside the existing Tracks tab.
**API endpoints (`DeepDrftAPI`):**
- New `GET api/track/waveform-status` (ApiKey) — returns `WaveformStatusDto[]` with per-track profile existence (one entry per track in the database, indicating whether a profile sidecar exists in the vault).
- New `POST api/track/{trackId}/waveform` (ApiKey) — triggers on-demand profile compute and store for an existing track. Skips if profile already exists; errors surface gracefully (no profile → HTTP 404, track not found → HTTP 400).
- `GET api/track/waveform-status` (ApiKey) — returns `WaveformStatusDto[]` with per-track profile existence (one entry per track in the database, indicating whether a profile sidecar exists in the vault).
- `POST api/track/{trackId}/waveform` (ApiKey) — triggers on-demand profile compute and store for an existing track. Skips if profile already exists; errors surface gracefully (no profile → HTTP 404, track not found → HTTP 400).
**Models (`DeepDrftModels`):**
- `WaveformStatusDto` — carries `TrackId`, `EntryKey`, `TrackName`, `HasProfile` boolean, and metadata for display/sorting.
@@ -27,17 +27,19 @@ Implemented the CMS surface for on-demand waveform profile generation: a new `/t
- `GetWaveformStatusAsync()` — service method wrapping the `api/track/waveform-status` call; returns `Result<WaveformStatusDto[]>` for error handling.
- `GenerateWaveformProfileAsync(entryKey)` — service method wrapping the per-track generation endpoint; returns `Result<bool>` (success → true, profile already exists → true, error → false with result code).
**CMS UI (`DeepDrftManager/Components/Pages/Tracks/TrackPreProcessing.razor`):**
- New page mounted at `/tracks/preprocessing` (guarded by CMS auth).
- Table layout: track name, artist, "Profile Status" indicator (✓ or ○), with a per-row `Generate` button.
**CMS UI (`DeepDrftManager/Components/Pages/Tracks/TrackList.razor`):**
- Added "Preprocessing" `MudTabPanel` as the second tab in `TrackList.razor`, alongside the existing "Tracks" tab.
- Table layout within the panel: track name, artist, "Profile Status" indicator (✓ or ○), with a per-row `Generate` button.
- Sequential "Generate All Missing" bulk action button — iterates tracks with `HasProfile == false`, calls `GenerateWaveformProfileAsync`, shows progress. On completion, refreshes the table.
- Nav link added to `TrackList.razor` and `CmsLayout.razor` / `Index.razor` so the page is discoverable from the track management surface.
- The standalone `TrackPreProcessing.razor` page at `/tracks/preprocessing` was eliminated; the page route is no longer exposed.
- Nav link to preprocessing removed from `Index.razor` dashboard (consolidation makes a separate link unnecessary; the tab is discoverable from `TrackList.razor`).
**Architecture notes:**
- Waveform generation on-demand (not automatic on upload like in W1) is intentional: Wave 1 profiles were computed for all future-uploaded tracks; Wave 3 adds a retroactive tool to populate profiles for existing tracks uploaded before Wave 1. The bulk action supports batching.
- Service calls are fire-and-forget-result, not throw-on-error — `GenerateWaveformProfileAsync` returns a `Result` for the caller to inspect. This matches the FileDatabase philosophy (errors in compute/store are swallowed at the service boundary, callers check return values).
- Profile endpoint uses the same `WaveformProfileService` that computes profiles during upload — no new algorithm or storage path introduced. CMS can only trigger on-demand what the upload path does automatically.
- HTTP cache headers are deferred (same as W1-T2). Each `api/track/waveform-status` call lists all tracks and their current state; this is acceptable for the admin surface where refreshes are infrequent.
- **Consolidation rationale:** Folding the preprocessing panel into `TrackList` reduces UI fragmentation — track management (list, add, edit, delete, preprocess) lives in one cohesive view rather than split across separate pages. The tab structure keeps preprocessing distinct from the main track listing without requiring a dedicated route.
---