Repository navigation
Tell open tabs when a new version is deployed - #8
Merged
Merged
Conversation
The build writes a hash of its files into index.html and version.json. A tab checks version.json when it becomes visible again and every 30 minutes, and shows "Kandle was updated" with a Reload button. Before reloading it saves the drawings and the script draft right away, and if bar replay is running or a shared chart is not kept yet, it says so and waits for a second click. Embeds never check.
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.
Tabs that stay open now find out about a new deploy.
index.htmlandversion.json. A deploy that changes nothing, such as a README commit, keeps the same id and shows no banner.version.json(cache-busting query,no-store) when the tab becomes visible again and every 30 minutes, then shows "Kandle was updated." with Reload and close in the toast corner.index.htmlandversion.jsoncarry the same id.Tested with unit tests and a Playwright run against builds served under
/kandle/the way Pages serves them. Going from A to B kept a drawing, RSI, the 4h timeframe, two charts and a script draft typed right before Reload. The replay warning showed and Not now left the page alone, and an embed on an old build never fetchedversion.json.