Repository navigation
VI-5068 Offer Open for a live source in the embed, not only a closed one - #23
Merged
Merged
Conversation
The Open button was gated on durationMs > 0, standing in for "the flow has at least one segment" (530b49a). That proxy only holds for a closed flow: a growing flow reports an open-ended timerange, so both bounds are never known and durationMs stays null however many segments have landed. A live source therefore showed the LIVE badge but had nothing to click -- even though handleOpen already sends status "growing" for exactly that case. Gate on the segments themselves instead. timerangeHasMedia reads the bounds from the timerange string, as isInitSegmentEntry does, because parseTimerange collapses empty, inverted and unparsable onto the same 0n..0n result. An open-ended range counts as media; an empty, zero-length or unparsable one does not, so a flow with no segments yet stays unopenable as intended. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 26, 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.
Ticket
VI-5068 — [tamstool] Upgrade TAMS Store Browser to TAMS 8.2
The bug
In
/#/embed, a source that is currently ingesting shows the LIVE badge but no Open button, so a live recording cannot be sent to CuttingRoom from the embed at all.Why
The button was gated on a computed duration:
and
durationMsis only ever set when both bounds of the flow's timerange are known:A growing flow reports an open-ended timerange (
[start_), which parses toend: null. SodurationMsstaysnullno matter how many segments have landed, and the button never renders. The LIVE badge sits on a different condition (detailsLoaded && isGrowing), which is why the row lights up but has nothing to click.The gate came from 530b49a — "Hide Open button until flow has at least one segment… the asset would otherwise resolve to an empty flow." The intent is right; duration was the wrong proxy for it, and it only ever held for closed flows.
Worth noting
handleOpenalready anticipates this case — it postsstatus: source.isGrowing ? "growing" : "ready"to the parent — so opening a live source is a supported path the UI was hiding.The fix
Gate on the segments themselves. New
timerangeHasMediainsrc/utils/timerange.jsreads the bounds from the timerange string rather than fromparseTimerange, for the same reasonisInitSegmentEntrydoes:parseTimerangecollapses "empty", "inverted" and "did not parse" onto the same0n..0nresult, so trusting it would treat a corrupt timerange as openable.timerangeHasMediadurationMs > 0)[1750000000:0_1750000060:0)— closed[1750000000:0_— growing_1750000060:0)— open start[1750000000:0_1750000000:0)— zero length()/[]— empty1750000000:0— bare timestampnonsense/ absentA flow with no segments yet still stays unopenable, which is what 530b49a was protecting.
Testing
npm run buildpasses (Node 22, same as CI)timerangeHasMediaagainst the realTIMERANGE_REGEXandEMPTY_PATTERNS— all 13 cases in the table above, plusnull/undefined/"", confirming the growing case flips from hidden to shown and nothing else changesnpm run lintstill cannot run in this repo (ESLint 9 needs a flat config, deliberately left out of VI-5068 Support TAMS 8.2 in the TAMS Store Browser #20) — the build is the gateNot verified against a live 8.2 store — I have no ingesting endpoint to point at, so the live path is exercised by the timerange logic rather than end to end. The failing gate is unambiguous in code, but the shape a given store reports for a growing flow is worth a look on first use.
🤖 Generated with Claude Code