Repository navigation
docs(lite): keep JupyterLite contents in memory so republished notebooks are never stale - #819
Merged
Merged
Conversation
…oks are never stale JupyterLite stores each opened notebook in the browser (IndexedDB) under its file name, so a republished site does not replace a notebook the visitor has already opened, and old outputs and kernel state survive with it. Store contents and settings in memory only: every page load starts from the notebooks the site ships. The trade-off is that a visitor's own edits do not survive a reload, which suits a "Try it Now" demo. Tested on a local JupyterLite site (VS Code's browser): a notebook republished under the same name showed the new version on a plain reload. Safari is untested. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
petercorke
enabled auto-merge (squash)
October 17, 2026 00:26
Up to standards ✅🟢 Issues
|
7 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #819 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 144 144
Lines 14931 14931
=====================================
Misses 14931 14931 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
JupyterLite stores each opened notebook in the browser (IndexedDB) under its file name. A republished site does not replace a notebook the visitor has already opened, and old outputs and kernel state survive with it. This made the "Try it Now" notebooks show stale content.
Store contents and settings in memory only (three keys in `docs/lite/jupyter-lite.json`), so every page load starts from the notebooks the site ships.
Trade-off: a visitor's own edits do not survive a reload. That suits a demo site; a visitor who wants to keep an edit downloads the notebook.
Tested on a local JupyterLite site in VS Code's browser: a notebook republished under the same name showed the new version after a plain reload (VERSION 1 to VERSION 2). Not tested in Safari.
🤖 Generated with Claude Code