notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Fix for issue 1750-prevent re-execution of already running cell

Open SsaiSanjanna03 opened this issue 6 months ago • 2 comments
trafficstars

Fixes https://github.com/jupyter/notebook/issues/1750:Prevent concurrent cell executions in Jupyter Notebook.

Changes:

  • Updated packages/notebook/src/actions.tsx to use metadata['running'] to block execution if a cell is running, logging "Cell is already running".
  • Added UI test in ui-tests/tests/runcell.spec.ts to verify:
    • Single output for rapid cell executions.
    • Correct variable state (i == 1).
    • Console log for ignored requests.

Testing:

  • Manually verified by rapid Shift+Enter on a long-running cell.

Related:

  • Closes https://github.com/jupyter/notebook/issues/1750

Ready for review.

SsaiSanjanna03 avatar Apr 27 '25 05:04 SsaiSanjanna03