fix: proper disposable lifecycle for hint animation timer in UpdateTitleBarEntry#304890
Draft
Copilot wants to merge 2 commits intoeli/update-stylingfrom
Draft
fix: proper disposable lifecycle for hint animation timer in UpdateTitleBarEntry#304890Copilot wants to merge 2 commits intoeli/update-stylingfrom
Copilot wants to merge 2 commits intoeli/update-stylingfrom
Conversation
…itleBarEntry The `hintTimer` was a raw `setTimeout` handle that was not registered as a disposable, violating VS Code's disposable lifecycle guidelines. When the `UpdateTitleBarEntry` was disposed, the timer would still fire and access DOM elements. Fix: - Replace raw `hintTimer` with `_hintTimer = this._register(new MutableDisposable())` - Use `disposableTimeout` and `dom.scheduleAtNextAnimationFrame` (both IDisposable) - Use a `DisposableStore` so cancelling clears all pending work atomically - Simplify `onStateChange` to use `this._hintTimer.clear()` - Capture `content` locally to avoid non-null assertions in async callbacks Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/ce23b534-a19a-4201-bae8-e5cf73b11c3c Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow for Code OSS
fix: proper disposable lifecycle for hint animation timer in UpdateTitleBarEntry
Mar 25, 2026
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.
The
hintTimerfield inUpdateTitleBarEntrywas a rawsetTimeouthandle that was never cleared on disposal, violating VS Code's disposable lifecycle contract.Changes in
updateTitleBarEntry.ts:hintTimer: ReturnType<typeof setTimeout>withprivate readonly _hintTimer = this._register(new MutableDisposable())disposableTimeout+dom.scheduleAtNextAnimationFrame(bothIDisposable) inside aDisposableStoreso cancelling_hintTimeratomically cancels all pending work — outer timeout, animation frame, and inner 3-second timeoutDisposableStoreand add all pending work before assigning to_hintTimer.valueonStateChangecleanup tothis._hintTimer.clear()contentas a local variable inside the callback to eliminate the!non-null assertion onthis.contentWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/microsoft/vscode/actions/jobs/68598610686/logs/usr/bin/gh gh api repos/microsoft/vscode/actions/jobs/68598610686/logs(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.