Repository navigation
Fix notification Accessible View close listener lifetime - #338383
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoSep 28, 2026
Conversation
Refs microsoft#293200 (notification-accessible-view-69). Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The bounded lifecycle fix is correct and covered across replacement, hide, and accessibility-help restoration paths.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes notification Accessible View listener accumulation by tying close subscriptions to each view showing.
Changes:
- Allows
onOpento return per-show disposable resources. - Disposes notification close listeners on hide, replacement, and help transitions.
- Adds notification and Accessible View lifecycle tests.
| File | Description |
|---|---|
src/vs/platform/accessibility/browser/accessibleView.ts |
Documents and types the disposable onOpen contract. |
src/vs/workbench/contrib/accessibility/browser/accessibleView.ts |
Registers onOpen resources in the per-show store. |
src/vs/workbench/browser/parts/notifications/notificationAccessibleView.ts |
Moves close subscription ownership into onOpen. |
src/vs/workbench/contrib/accessibility/test/browser/accessibleView.test.ts |
Tests re-show and help restoration lifecycles. |
src/vs/workbench/test/browser/notificationAccessibleView.test.ts |
Tests notification close-listener disposal. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
September 28, 2026 17:09
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 28, 2026 17:09
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Paul (pwang347)
approved these changes
Sep 28, 2026
Dmitriy Vasyura (dmitrivMS)
merged commit Sep 28, 2026
65e0116
into
microsoft:main
55 of 56 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #293200
Addresses only the unchecked
notificationAccessibleView.ts:69direct event subscription (notification-accessible-view-69, queue ID47).Change
Opening a notification in Accessible View subscribed to the notification's close event, but closing Accessible View left that listener attached until the notification itself was dismissed. Repeatedly reopening a surviving notification accumulated listeners.
Return this subscription from the provider's
onOpenhook and register it in Accessible View's existing per-show disposable store. The optionalonOpenreturn contract is documented. Each showing owns exactly its subscription, including same-provider re-shows and providers copied/restored through accessibility help.Validation
[1,3,5,8,11], versus expected[1,2,2,3,3]; the candidate passes.gpt-6-astra,claude-opus-5.5, default effort) found a help/re-show regression in an initial onDispose-only approach. The revised per-show fix addresses it; both reviewers completed follow-up with no remaining significant/new bugs.Scope and limits
The matched adjacent runtime pair used exception pause/resume instrumentation. An independent no-debug candidate run also retained only the original three listeners when closed. Some earlier attempts and later baseline launches timed out on initial Accessible View opening; those remain unexplained and are not counted as passes or attributed to automation. Original successful and unsuccessful raw results are preserved in the local task evidence.
Historical notification analogues for #207638, #191705, #249426, and #221497/#221521 were exercised. Physical screen-reader/macOS/Linux behavior, the original Chat/inline-completion scenarios, and streaming Chat cursor behavior remain unverified. A second owned-window focus attempt did not cause an observed document focus transition, so the original #268338 Alt+Tab case is explicitly unverified. The nonstreaming candidate notification cursor retained its column after Escape/Alt+F2.
This is a bounded listener-lifetime fix, not a universal leak-freedom or performance claim. It does not close the umbrella issue or change other checkbox owners. Open leak-labelled PRs and current main were rechecked for duplicate ownership fixes before publication.