Skip to content

Conversation

@seeM
Copy link
Contributor

@seeM seeM commented Oct 10, 2025

Add the Restart Kernel button to Positron notebooks, addresses #9789. The button lives in the new Kernel Actions menu, addressing #9722. The Kernel Actions button shows the runtime status and name, matching the style used in the console.

image

Also removed the titles from Run All and Clear Outputs buttons, and moved + Code and + Markdown to the left.

image

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

@:notebooks

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

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

readme  valid tags

@rodrigosf672
Copy link
Member

@seeM Based on your changes, what do you expect to happen in the scenarios 2-4?

Cases

  1. User attempts to restart the kernel of a saved notebook while nothing is running (most trivial).
  2. User attempts to restart the kernel of an unsaved notebook while nothing is running (trivial);
  3. User attempts to restart the kernel of a saved notebook while something is running (complex);
  4. User attempts to restart the kernel of an unsaved notebook while something is running (most complex).

Outcomes

  1. Kernel restarts with no additional prompts/dialogs.
  2. ?
  3. ?
  4. ?

@cindyytong
Copy link

@seeM Awesome!

This is looking good however I am concerned that we are running out of space in the nav bar and not grouping related actions in the same area. I put 2 mockups for exploration here to determine next steps: https://www.figma.com/design/z9EOP4qLLzR08PNxe4M0Ei/Positron-Notebooks---Design-Audit?node-id=305-2&t=8CHFBPPjEQfYYkiB-1

nstrayer
nstrayer previously approved these changes Oct 14, 2025
Copy link
Contributor

@nstrayer nstrayer left a comment

Choose a reason for hiding this comment

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

Code itself looks great. I'll leave the design part to further discussions.

@seeM seeM force-pushed the fix/positron-nb-restart-kernel branch from ca6b680 to 8b66d2d Compare October 16, 2025 14:29
@seeM
Copy link
Contributor Author

seeM commented Oct 16, 2025

Thanks for the reviews! I've updated the UI based on your feedback:
image

  1. Run All and Clear Outputs no longer show titles – they have tooltips to clarify any confusion
  2. "+ Code" and "+ Markdown" moved to the left
  3. Restart Kernel moved to the right and no title (to be moved into a submenu in Positron Notebooks: Enhanced kernel info in the notebook toolbar #9722)
  4. Show Console moved to the More Actions submenu

@cindyytong
Copy link

cindyytong commented Oct 16, 2025

@seeM looking great! Based on the design we made the other day with a new dropdown for the kernel, are you suggesting that whole dropdown gets handled in #9722

Where restart kernel and show console would be a submenu item in this dropdown?
Screenshot 2025-10-16 at 11 12 58 AM

My understanding was that 9722 would just capture putting the kernel info in the new dropdown

midleman
midleman previously approved these changes Oct 16, 2025
Copy link
Contributor

@midleman midleman left a comment

Choose a reason for hiding this comment

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

I don't see any particular e2e tests that exercise the notebook kernel restart. I can def add a test for that. However, I was curious if there are any particular checks I should assert? Is there any kind of persistence that is expected or is everything wiped?

@seeM
Copy link
Contributor Author

seeM commented Oct 17, 2025

@midleman in terms of state, it should behave exactly as restarting a console session. Some ideas:

  • The button is disabled while the session is starting, and while shutting down after clicking
  • Can execute a cell afterwards, execution order is reset and all state was wiped

@seeM
Copy link
Contributor Author

seeM commented Oct 17, 2025

@rodrigosf672 IIUC whether the notebook is saved or not shouldn't affect restart behavior.

Perhaps restarting while something is running should display a warning, and perhaps a warning should also be displayed based if data will be lost. Will start a discussion in Slack.

@midleman
Copy link
Contributor

FYI, added a ticket to create an e2e test for this feature: #10033

@seeM seeM force-pushed the fix/positron-nb-restart-kernel branch 2 times, most recently from 202ebc4 to fbd23f2 Compare October 20, 2025 18:50
@nstrayer nstrayer self-requested a review October 20, 2025 20:14
Copy link
Contributor

@nstrayer nstrayer left a comment

Choose a reason for hiding this comment

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

Re-reviewed and all looks good to me! I like the new design!

Copy link
Contributor

@dhruvisompura dhruvisompura left a comment

Choose a reason for hiding this comment

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

Thanks for all this work!

I marked as Request changes because of the runtime status icon bug which does effect the console session list too. The fix is a small one line change which I dropped as a code suggestion. Mostly looking great. Had a couple comments/questions but nothing majorly blocking once that status icon color bug is fixed!

@seeM seeM force-pushed the fix/positron-nb-restart-kernel branch from e1fe2f5 to 8ab40eb Compare October 21, 2025 07:34
dhruvisompura
dhruvisompura previously approved these changes Oct 21, 2025
@seeM seeM merged commit bc3737c into main Oct 22, 2025
12 checks passed
@seeM seeM deleted the fix/positron-nb-restart-kernel branch October 22, 2025 06:41
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2025
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.

6 participants