feat(release): front int PK with app-minted GUID EntryKey on the public addressing surface (P11 W5, 11.H)

This commit is contained in:
daniel-c-harvey
2026-06-16 17:11:55 -04:00
parent fe28573b68
commit f07d29cdcf
37 changed files with 627 additions and 160 deletions
+11 -10
View File
@@ -1,25 +1,26 @@
@page "/tracks/{Id:long}"
@page "/tracks/{EntryKey}"
@using DeepDrftPublic.Client.Services
@inject IReleaseDataService ReleaseData
@inject NavigationManager Navigation
@* Addressable deep-link fallback for a bare release id (Phase 11 §2, shape iii). Unlike the player
bar / Archive / AlbumsView call sites, an external /tracks/{id} link carries only the id, so this
page fetches the release to discover its medium, then forwards through the same ReleaseRoutes
resolver — one medium→route table, no second source. replace:true keeps the router out of history
so Back skips this hop. Capture Id before the await per the InteractiveAuto route-param convention. *@
@* Addressable deep-link fallback for a bare release EntryKey (Phase 11 §2, shape iii). Unlike the
player bar / Archive / AlbumsView call sites, an external /tracks/{entryKey} link carries only the
key, so this page fetches the release to discover its medium, then forwards through the same
ReleaseRoutes resolver — one medium→route table, no second source. replace:true keeps the router
out of history so Back skips this hop. Capture EntryKey before the await per the InteractiveAuto
route-param convention. *@
@code {
[Parameter] public long Id { get; set; }
[Parameter] public string EntryKey { get; set; } = string.Empty;
protected override async Task OnParametersSetAsync()
{
var id = Id;
var result = await ReleaseData.GetById(id);
var entryKey = EntryKey;
var result = await ReleaseData.GetByEntryKey(entryKey);
var target = result is { Success: true, Value: { } release }
? ReleaseRoutes.DetailHref(release)
: "/cuts"; // Unknown id: fall back to the Cuts gallery rather than 404.
: "/cuts"; // Unknown key: fall back to the Cuts gallery rather than 404.
Navigation.NavigateTo(target, forceLoad: false, replace: true);
}