Skip to content

Do not auto-run notebooks when switching to presentation layout#50

Merged
TorreyBetts merged 1 commit into
DataficationSDK:mainfrom
eosfor:pr/presentation-no-auto-run
May 7, 2026
Merged

Do not auto-run notebooks when switching to presentation layout#50
TorreyBetts merged 1 commit into
DataficationSDK:mainfrom
eosfor:pr/presentation-no-auto-run

Conversation

@eosfor
Copy link
Copy Markdown
Contributor

@eosfor eosfor commented May 6, 2026

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 became presentation.

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

  • Remove automatic HandleRunAll() from the WASM notebook page layout-change handler.
  • Remove automatic HandleRunAll() from the Blazor Server notebook page layout-change handler.
  • Keep explicit Run/Run All behavior unchanged.
  • Keep presentation rendering behavior unchanged, other than no longer triggering execution on layout switch.

Validation

  • dotnet build src/Verso.Blazor.Wasm/Verso.Blazor.Wasm.csproj --no-restore
  • dotnet build src/Verso.Blazor/Verso.Blazor.csproj --no-restore
  • npm run build:all

Manual 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.

@TorreyBetts
Copy link
Copy Markdown
Contributor

Once the merge conflicts have been resolved as mentioned in #49, I can merge this PR.

@eosfor eosfor force-pushed the pr/presentation-no-auto-run branch from 641e12f to 9ec20ab Compare May 7, 2026 04:30
@eosfor
Copy link
Copy Markdown
Contributor Author

eosfor commented May 7, 2026

Rebased this branch onto current main with -Xrenormalize and force-pushed. GitHub now reports it as mergeable.

@TorreyBetts
Copy link
Copy Markdown
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.

@TorreyBetts TorreyBetts merged commit e7a4b9d into DataficationSDK:main May 7, 2026
4 of 5 checks passed
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.

2 participants