Repository navigation
VI-5068 Re-check embed sources on a timer, not on the source listing - #25
Merged
Merged
Conversation
A recording that started while /embed was open still never grew an Open button, and never lit up as LIVE either; a reload produced both at once. The re-check was keyed on the sources listing. That listing is deliberately made to never change: paginationFetcher strips segments_updated so the data stays deeply equal between polls, and SWR hands back the very same array when it is. Effects keyed on it therefore do not fire, so nothing looked at the source again while the ingest it was waiting for was actually happening. The re-check now runs on its own interval, independent of the listings. LIVE failed for a related reason: isGrowing was judged on the listing record, the one with segments_updated stripped, so isFlowGrowing fell back to created and a flow created more than ten minutes before its ingest read as abandoned. It is now judged on the flow detail, which is already fetched for the timerange and does carry segments_updated. Verified against a stub TAMS 8.2 store driven in headless Chrome: before this change Open never appears while the page stays open and appears on reload; after it, Open and LIVE both arrive 5s after the recording starts. Opening #/embed?debug traces what each source resolved to, for stores that can only be reached from the deployed origin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Third go at this; #23 and #24 each fixed a real defect but not the one that bites. This one is reproduced, not deduced.
The bug
With
/#/embedopen against an 8.2 store, a recording that starts never grows an Open button and never lights up as LIVE. A reload produces both at once.Reproduction
A stub TAMS 8.2 store driven through the real app in headless Chrome, starting a recording while the page sits open:
Worth recording what it took to reproduce: a plain source and a multi-source both passed on main. The failure needs a store whose ingesting listing does not change when the recording starts — with that, the symptom is exact, including the reload asymmetry.
Why
The re-check was keyed on the sources listing:
and that listing is deliberately built never to change.
paginationFetcher:SWR then keeps the previous reference when the new data is deeply equal:
So while an ingest is under way — exactly when a source has something new to say — the listing is unchanged, the array reference is unchanged, and the effect does not fire. #24 rested on "the 5s sources poll re-examines them"; that poll re-renders nothing. The re-check now runs on its own
setInterval, independent of the listings.LIVE failed for a related reason:
isGrowingwas judged on the listing record — the one withsegments_updatedstripped — soisFlowGrowingfell back tocreated, and a flow created more than ten minutes before its ingest read as an abandoned one. It is now judged on the flow detail, which is already fetched for the timerange and does carrysegments_updated. That is thelive:false→live:truein the table above.Also included
#/embed?debugtraces what each source resolved to — flow id, status, timerange,isGrowing,hasSegments,settled. The stores this affects can only be reached from the deployed origin (they whitelist the tamstool origin, not localhost), so a reload-free way to see the decision from a browser console is worth the six lines.Testing
mainand confirmed fixed here, via the stub store + headless Chrome run abovenpm run buildpasses (Node 22, same as CI)npm 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 yet confirmed against the real 8.2 store: it whitelists the deployed origin, so this has to ship before it can be tested there. The stub reproduces the reported symptom exactly, but whether the real store's trigger gap is the same one is what the deploy will settle.
🤖 Generated with Claude Code