fix(portals): preserve playlist ownership during detail handoffs

This commit is contained in:
4gray committed 2026-10-04 15:28:45 +02:00
1 parent bf3cf87b65
commit 2283d368d3
21 files changed
+920 -52

No files matched your search

@@ -270,6 +270,22 @@ handler as the header Back.
- Do not force both portals into the same browse/detail behavior unless the full
portal detail architecture is being changed.
### Arrival and asynchronous ownership
The shared catalog view initializes the category and consumes its Stalker
handoff together, after the facade's optional `routeReady` signal allows it.
Stalker exposes the route session's readiness, withheld from NavigationStart
until the destination playlist and section are installed. Cancelled navigation
reconciles the current route. Reused category routes also reinitialize when
their playlist changes; readiness changes alone must not close an open detail
on query-only navigation.
Collection detail wrappers invalidate pending playlist loads before restoring
their store snapshot on destruction. Route sessions must compare the actual
store owner with the route, rather than trusting only their last initialized
playlist id. Xtream playlist reads likewise discard completions superseded by
a selection, metadata update, reset or newer read.
## Xtream
Xtream category and search details are represented by canonical routes.
+8
View File
@@ -393,6 +393,14 @@ Internal structure to preserve:
`isCategoryResourceFailed()` / `isPaginatedContentFailed()` for explicit
error handling.
Category arrays belong to `categoryPlaylistKey`, not just the content type.
Every category reader checks that owner; a portal switch clears all four
section caches before loading the destination. Aborted or foreign-portal
responses (including errors and radio fallbacks) cannot write into the active
cache. Explicit category resets reload even when the playlist object remains
unchanged. This contract applies to collection details as well as routed
catalogs, because both use the root Stalker store.
Failure-handling rule:
- Failed category or content requests must degrade into empty/error UI state,