Skip to content

docs(lite): keep JupyterLite contents in memory so republished notebooks are never stale - #819

Merged
petercorke merged 1 commit into
mainfrom
docs/jupyterlite-memory-storage
Oct 17, 2026
Merged

petercorke merged 1 commit into
mainfrom
docs/jupyterlite-memory-storage

Conversation

@petercorke

Copy link
Copy Markdown
Owner

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

…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
petercorke enabled auto-merge (squash) October 17, 2026 00:26
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 4e8073d into main Oct 17, 2026
23 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (68f525a) to head (ba38bec).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant