Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jan 8, 2026

We previously would show the previous session in Run, when we only want to do this in edit mode.

Supersedes #7619

@vercel
Copy link

vercel bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 8, 2026 3:16pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where the previous session was being shown in RUN mode when it should only be displayed in EDIT mode. The fix adds an additional condition to the CachingExtension initialization to ensure caching is only enabled in EDIT mode.

  • Modified the CachingExtension initialization to include a mode check (mode == SessionMode.EDIT)
  • Added a test to verify that caching is only enabled in EDIT mode with auto_instantiate=False

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
marimo/_session/session.py Added SessionMode.EDIT check to CachingExtension initialization condition
tests/_server/test_sessions.py Added test to verify caching is enabled only in EDIT mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mscolnick mscolnick added the bug Something isn't working label Jan 8, 2026
@mscolnick mscolnick merged commit 0b0875c into main Jan 8, 2026
33 of 49 checks passed
@mscolnick mscolnick deleted the ms/session-caching-in-edit-mode branch January 8, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants