Skip to content

Hide irrelevant upstream notebook commands in Positron notebooks#12637

Open
nstrayer wants to merge 1 commit intomainfrom
positron-nb-command-audit
Open

Hide irrelevant upstream notebook commands in Positron notebooks#12637
nstrayer wants to merge 1 commit intomainfrom
positron-nb-command-audit

Conversation

@nstrayer
Copy link
Contributor

@nstrayer nstrayer commented Mar 20, 2026

Addresses #10481.

Hides upstream VS Code notebook commands (developer troubleshooting, layout configuration, sticky scroll, etc.) from the command palette when the Positron notebook editor is active. These commands target the upstream notebook implementation and don't apply to Positron notebooks.

Introduces a shared POSITRON_NOTEBOOK_IS_NOT_ACTIVE_EDITOR context key expression used as a precondition (for f1: true commands) or when clause (for explicit MenuId.CommandPalette entries) to gate visibility. Also replaces a hard-coded editor ID string in ghost cell actions with the POSITRON_NOTEBOOK_EDITOR_ID constant.

Before changes (note developer commands etc.)

image

After changes

image

Release Notes

New Features

  • N/A

Bug Fixes

QA Notes

@:notebooks @:positron-notebooks

  1. Open a .ipynb file in the Positron notebook editor
  2. Open the command palette (Cmd+Shift+P)
  3. Search for "notebook" -- verify the following commands are not listed:
    • Customize Notebook Layout
    • Toggle Notebook Sticky Scroll
    • Toggle Notebook Layout Troubleshoot
    • Inspect Notebook Layout
    • Clear Notebook Editor Type Cache
    • Clear Notebook Kernels MRU Cache
    • Toggle Notebook Clipboard Troubleshooting
    • Toggle Notebook View Zones
    • Add Cell Output to Chat
  4. Open a .ipynb in the standard VS Code notebook editor (disable Positron notebook) and verify those commands do appear

@github-actions
Copy link

github-actions bot commented Mar 20, 2026

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

readme  valid tags

@nstrayer nstrayer requested review from dhruvisompura and seeM March 20, 2026 14:59
@cindyytong
Copy link
Contributor

This looks great!

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