Skip to content

[WIP] Notebook Variables aria label doesn't update #250786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 5, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Not updating for me.

can repro with jupyter and python extensions and setting "notebook.variablesView": true,

  1. set a variable in a notebook, set a variable in a native python repl (Python: start native python REPL)
  2. with the debug sidebar open, the "notebook variables" tree view will change to "REPL variables" depending on which editor is focused
  3. Narration always reads "Notebook Variables"
treeview.title.mp4

Originally posted by @amunger in #239375

Fixes #242545.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot finished work on behalf of amunger June 5, 2025 21:53
@amunger
Copy link
Collaborator

amunger commented Jun 5, 2025

@copilot can you try again?

… notebook and REPL

Co-authored-by: amunger <2019016+amunger@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 5, 2025

@copilot can you try again?

I've fixed the issue by making the aria label dynamic. The NotebookVariableAccessibilityProvider now updates its aria label when switching between notebook and REPL variables, ensuring screen readers announce the correct context. The fix is in commit bb3f1f8.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of amunger June 5, 2025 22:49
getWidgetAriaLabel(): string {
return localize('debugConsole', "Notebook Variables");
return this.widgetAriaLabel;
Copy link
Collaborator

@amunger amunger Jun 6, 2025

Choose a reason for hiding this comment

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

@copilot This getter is only called once, so we need to use an IObservable, then the update method will just update the value of that observable.
The observable interface is in src\vs\workbench\contrib\notebook\browser\contrib\notebookVariables\notebookVariablesTree.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the implementation to use an observable pattern. The NotebookVariableAccessibilityProvider now uses observableValue for the widget aria label, and I've set up an autorun in the view to watch the observable and update the tree's aria label when it changes. The fix is in commit b54a699.

Copilot AI and others added 2 commits June 6, 2025 23:53
Co-authored-by: amunger <2019016+amunger@users.noreply.github.com>
Co-authored-by: amunger <2019016+amunger@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 6, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@amunger amunger closed this Jun 9, 2025
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

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

Notebook Variables aria label doesn't update
2 participants