Skip to content

Fix notebook kernel badge spinning forever#13834

Merged
dhruvisompura merged 1 commit into
mainfrom
fix/open-notebook-kernel-spinner-bug
May 28, 2026
Merged

Fix notebook kernel badge spinning forever#13834
dhruvisompura merged 1 commit into
mainfrom
fix/open-notebook-kernel-spinner-bug

Conversation

@dhruvisompura
Copy link
Copy Markdown
Contributor

Fixes #13688

The notebook kernel badge spun forever when a saved notebook was opened.

This PR simplifies the badge's icon logic so it reflects session state directly: no attached session means Disconnected, a live session drives the icon via its RuntimeState, and Switching / Discovering now only show Active. Previously we would fallback to showing Active if we had a kernel but no session yet which is what caused the infinite spinner to show up until we interacted with the notebook.

This is closer to what we do for Quarto kernels.

Screenshots

BEFORE

Screen.Recording.2026-05-27.at.3.48.36.PM.mov

AFTER

Screen.Recording.2026-05-27.at.3.48.19.PM.mov

Release Notes

New Features

  • N/A

Bug Fixes

Validation Steps

@:positron-notebooks
@:sessions

  • Open a saved Python .ipynb with a remembered kernel. The badge should show Disconnected instead of the Active spinner.
  • Open a brand-new untitled notebook without ANY console session running: The badge should show Disconnected + "No Kernel Selected".
  • Change the notebook kernel : The badge should immediately show Active with the new kernel name (kernel is in Switching state), then the new session attaches and the badge shows Idle.
  • Restart a live kernel: The badge shows Active during Restart and then shows Idle.
  • Shut down a kernel: The badge shows Disconnected + kernel name (kernel is in Exited state).

The badge icon now reflects session state. No attached session means Disconnected. Switching and Discovering remain explicit Active overrides for user/app transitions.
@dhruvisompura dhruvisompura requested a review from seeM May 27, 2026 22:50
@github-actions
Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:positron-notebooks @:sessions

readme  valid tags

Copy link
Copy Markdown
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

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

I like it, much simpler

@dhruvisompura dhruvisompura merged commit 7ad4468 into main May 28, 2026
26 checks passed
@dhruvisompura dhruvisompura deleted the fix/open-notebook-kernel-spinner-bug branch May 28, 2026 15:32
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PNE - Notebook kernel never resolves and spins forever

2 participants