marimo-team / marimo

A reactive notebook for Python β€” run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
5.35k stars 156 forks source link

fix: Persist stale cells on session resume #1625

Closed wasimsandhu closed 2 weeks ago

wasimsandhu commented 2 weeks ago

πŸ“ Summary

Fixes #1444, an edge case bug that caused cells to lose "stale" status on session resume.

Important to note that this bug was only for uninstantiated cells, or effectively, the first session resume. Cells that had been run and later became stale were already persisted on subsequent resumes.

πŸ” Description of Changes

Uninstantiated cells after session resume:

Screenshot 2024-06-16 at 1 06 57β€―PM

Stale cells after session resume:

Screenshot 2024-06-16 at 4 53 13β€―PM

πŸ“‹ Checklist

πŸ“œ Reviewers

@mscolnick

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
marimo-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 17, 2024 0:07am
marimo-storybook βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 17, 2024 0:07am
mscolnick commented 2 weeks ago

awesome! nice fix and improved messaging!

github-actions[bot] commented 2 weeks ago

πŸš€ Development release published. You may be able to view the changes at https://marimo.app?v=0.6.20-dev4

akshayka commented 2 weeks ago

@wasimsandhu @mscolnick I think there may be a regression with this PR, with cells incorrectly marked as stale on startup.

image
wasimsandhu commented 2 weeks ago

@akshayka After testing the 4 runtime combinations, I removed a line of code that I thought was unnecessary and only tested with autorun on startup disabled. Sorry about that! Fixed in #1626.