From 9792d4346ef53a6ddc57592cc2ab61fd94e20504 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Thu, 11 Jun 2026 17:58:31 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20add=20Phase=208=20=C2=A78.6=20to=20COMP?= =?UTF-8?q?LETED=20(cache=20invalidation=20+=20orphaned=20release=20fixes)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- COMPLETED.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/COMPLETED.md b/COMPLETED.md index 220c621..3bfd224 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -8,6 +8,22 @@ Newest entries at the top. Group by phase/wave header (mirroring `PLAN.md` / `CM ## Phase 8 — CMS Track Browser +### 8.6 CMS cache invalidation + orphaned release deletion (Wave 6) + +**Landed:** 2026-06-12 on dev. + +Three linked CMS bug fixes discovered during Phase 8 browser work: + +1. **Cache invalidation on mutations** — Added `CmsTrackBrowserViewModel.Invalidate()` method called from `TrackEdit`, `BatchEdit`, and `TrackList.OnAlbumsChanged` after any track/release mutation. Ensures the album/genre browse cache is never stale when tracks are added, edited, or deleted. + +2. **Orphaned release handling** — `CmsAlbumBrowser` now handles 0-track (orphaned) releases with a confirmation dialog + `DeleteReleaseAsync` via a new `DELETE api/track/release/{id}` endpoint. Partial-failure album-delete path also invalidates the cache. Admin can now clean up releases that have lost all their tracks. + +3. **Cascade-delete on last-track removal** — EF migration `SoftDeleteOrphanedReleases` (data-only, raw SQL) backfills orphaned release rows with soft-delete markers. `UnifiedTrackService.DeleteAsync` now cascades a release soft-delete when the last live track in a release is deleted (non-fatal; orphaned releases do not block track deletion). + +**Completion note:** `CmsTrackBrowserViewModel.Invalidate()` added and wired into mutation paths. New `DELETE api/track/release/{id}` endpoint implemented on `UnifiedTrackService`. `CmsAlbumBrowser` updated with orphaned release confirmation + delete. `SoftDeleteOrphanedReleases` migration authored and applied. All three fixes integrated; Phase 8 browse modes remain stable with correct cache coherence and release cleanup semantics. + +--- + ### 8.0 `TrackEntity` normalization **Landed:** 2026-06-11 on dev.