Do not auto-run notebooks when switching to presentation layout#50
Merged
TorreyBetts merged 1 commit intoMay 7, 2026
Merged
Conversation
Contributor
|
Once the merge conflicts have been resolved as mentioned in #49, I can merge this PR. |
641e12f to
9ec20ab
Compare
Contributor
Author
|
Rebased this branch onto current |
Contributor
|
Thanks for fixing this. Tying execution to a layout switch was the wrong default for exactly the reasons you called out. I appreciate the contribution. |
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.
Problem
Switching to Presentation mode automatically ran all notebook cells. Layout changes should be view-only operations, but the previous behavior called
HandleRunAll()when the active layout becamepresentation.That could unexpectedly rerun expensive cells, mutate external systems, or overwrite outputs just because the user changed how the notebook is displayed.
Approach
Remove the implicit Run All call from both notebook page implementations. Presentation mode now renders whatever outputs already exist, and execution only happens when the user explicitly runs a cell or chooses Run All.
Notable changes
HandleRunAll()from the WASM notebook page layout-change handler.HandleRunAll()from the Blazor Server notebook page layout-change handler.Validation
dotnet build src/Verso.Blazor.Wasm/Verso.Blazor.Wasm.csproj --no-restoredotnet build src/Verso.Blazor/Verso.Blazor.csproj --no-restorenpm run build:allManual check
Switching to Presentation mode no longer starts notebook execution. Existing outputs remain visible, and cells only execute after an explicit Run or Run All action.
Review notes
This PR intentionally changes only the layout switch side effect. It does not alter presentation layout rendering or toolbar command behavior.