Repository navigation
fix(web): show the selected version's own pre-play track inventory - #445
Merged
Merged
Conversation
The item page's Audio and Subs menus counted catalog rows as published inventory. A discovered virtual row carries a listing placeholder instead of probe evidence: one synthesized audio track with no language and, at most, the subtitle languages parsed from the release name. The page therefore listed that fabricated track as the file's audio, and showed an unenumerated empty subtitle list as "No subtitles available." - even though the same version in the player offered the tracks the served file carries. Treat only probe evidence (the watch detail's or the catalog row's probed_at, or a player inventory for this exact file) as published. Without it both menus stay in discovery and then report "unavailable" with a retry, which is what a pre-play probe that fell back (a neutral row, a damper, or provider bytes that did not match the declared release) really established. The player also republished its plan inventory under the requested file id whenever that differed from the effective one. A virtual rotation keeps effective_media_file_id at the requested row, so the ids differ exactly when another release was served (a substitution or a lower version), and the requested version's page then showed that release's audio and subtitle tables. Publish under the requested row only while the plan still serves it.
randrini
marked this pull request as ready for review
November 14, 2026 02:46
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related issue: #432
Validation tasks: none
Opening a version's page before playing it can show audio and subtitle menus that do not describe that version. A discovered virtual catalog row stores a listing placeholder, not probe evidence: one synthesized audio track with no language, and at most the subtitle languages parsed from the release name. The page counted those rows as published inventory, so it listed that fabricated track as the file's audio and showed an unenumerated empty subtitle list as "No subtitles available." When the same version later played, the player offered a different, real inventory — or the server substituted another release and the page adopted the substitute's tracks, because the player republished its plan inventory under the requested file id whenever that id differed from the effective one.
This affects anyone browsing a virtual library (AltMount, Stremio) before playback, where the pre-play probe legitimately declines: a provider-neutral row names no exact candidate, a failed probe is dampered, or the provider serves bytes that do not match the declared release, so no evidence is ever committed.
Approach
The item page now treats only probe evidence as published inventory: the watch detail's or the catalog row's
probed_at, or a player inventory for that same file. Without it, both menus stay in discovery and then report "unavailable" with a retry, which is what a probe that fell back actually established. A verified empty inventory still renders as "No subtitles available."The player publishes its plan inventory under the effective file id only, and under the requested id only while the plan still serves that row. A virtual rotation keeps
effective_media_file_idat the requested catalog row and movesvirtual_source_revisioninstead, so the two ids differ exactly when another release was served — a substitution or a lower version chosen for the device. That release's track table is no longer relabelled as the requested version's.No server change: the plan already reports the effective file's inventory with
inventory_status/inventory_provenance, the pre-play probe already re-reads and re-probes a newly selected version, and a substitution is already disclosed by the version notice and the version list's source-mismatch marker. The defect was in how the client attributed that inventory to a catalog row.Validation
go build ./...(containersilo-ladder-go-vipswith caches under/tmp): pass.make verify-playback-fixtures(same container): playback fixtures are current.make lint-changed BASE_REF=kipsilabs/main(same container): no changed Go packages; 0 issues.node scripts/typecheck.mjs): pass. ESLint on the touched files: 0 errors. Prettier check: clean.src/pages/ItemDetail+src/playersuites: 148 files pass; one PGS parser memory test also fails on unmodifiedmainunder the same parallel run and passes alone, so it is a pre-existing load-sensitive flake, not caused by this change.--no-verify: itsmake lint-changedstep runs on the host without libvips, where golangci-lint cannot typecheck the tree. The equivalent container run above passed, and the hook's web lint and format steps pass locally.Risks
Client-only. Menus that previously displayed declared placeholder rows as settled now read as undiscovered until a probe commits, so an unprobed version offers a retry instead of a track list. No API, database, or plan-contract change.
Checklist
AI Disclosure
ollama-cloud, reported as DeepSeek V4.1 Flash 1017)mainto isolate a flaky PGS test, and both menu states were reproduced in a browser against live data before and after the change. No independent adversarial review.