chore(deps): bump @xterm/* to beta.213 to pick up overview ruler dispose fix#313817
Merged
Conversation
…ose fix Picks up xterm.js commit 08ae141 (xtermjs/xterm.js#5826) which adds dispose / hasRenderer guards in OverviewRulerRenderer and cancels its pending requestAnimationFrame on dispose. This addresses the long-standing 'Cannot read properties of undefined (reading ''dimensions'')' crash tracked in #303546.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the repo’s xterm.js dependency set to pick up the upstream OverviewRuler dispose/rAF race fix that caused Cannot read properties of undefined (reading 'dimensions') in terminal lifecycle scenarios.
Changes:
- Bump
@xterm/xtermand related@xterm/*addons to6.1.0-beta.213/*-beta.213across root,remote/, andremote/web/. - Keep
@xterm/addon-webglon0.20.0-beta.212(latest published) while aligning its peer dependency range with@xterm/xterm@beta.213. - Update the corresponding
package-lock.jsonfiles to reflect the new resolved tarballs and integrity hashes.
Show a summary per file
| File | Description |
|---|---|
| package.json | Bumps root @xterm/* dependency versions (webgl to beta.212; others to beta.213). |
| package-lock.json | Updates root lock entries/resolutions for the bumped @xterm/* packages. |
| remote/package.json | Bumps remote/ @xterm/* dependency versions to match root. |
| remote/package-lock.json | Updates remote/ lock entries/resolutions for the bumped @xterm/* packages. |
| remote/web/package.json | Bumps remote/web/ @xterm/* dependency versions to match root (no headless here). |
| remote/web/package-lock.json | Updates remote/web/ lock entries/resolutions for the bumped @xterm/* packages. |
Copilot's findings
Files not reviewed (2)
- remote/package-lock.json: Language not supported
- remote/web/package-lock.json: Language not supported
- Files reviewed: 3/6 changed files
- Comments generated: 0
Contributor
|
Lets merge this Monday |
anthonykim1
approved these changes
May 4, 2026
bryanchen-d
added a commit
that referenced
this pull request
May 7, 2026
After bumping xterm.js to beta.213 (#313817), three error buckets keep firing the same Cannot read properties of undefined (reading 'dimensions') TypeError on the latest insider builds (1.120.0-insider 79d6cea / 0aed0a9): - aaa283a2 - resize -> _resizeYCallback -> _updatePtyDimensions, triggered by config-change -> setVisible -> _resize. - 4826565b - debounced _debounceResizeX timer firing after the renderer is gone. - 1e83a096 - _onProcessExit -> dispose -> setVisible(false) -> _resize -> _resizeBothCallback. All three reach RenderService.get dimensions() in xterm.js, which dereferences this._renderer.value (undefined post-dispose) and throws synchronously. The optional chaining on rawXterm.dimensions doesn't help because the getter itself throws. The upstream beta.213 fix added isDisposed guards at the OverviewRuler call sites, not inside the getter, so the correct symmetrical fix here is to guard the call sites that VS Code owns: * terminalInstance.ts: bail out of the resize closures and _updatePtyDimensions when the instance is already disposed; defensively wrap the dimensions read in try/catch so a future renderer-dispose race fails silently instead of bubbling as an unhandled error. * terminalResizeDebouncer.ts: bail out of resize/flush and the runWhenWindowIdle / @debounce-scheduled callbacks when the debouncer's store is disposed - the @debounce decorator schedules a setTimeout that isn't tied to the disposable store. Refs #303546, #313817
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.
Fixes #303546
What
Bumps all
@xterm/*dependencies (root,remote/, andremote/web/) tobeta.213(webgl tobeta.212, the latest published). Previously pinned atbeta.197/beta.196.Why
#303546(Cannot read properties of undefined (reading ''dimensions'')) is caused by a race in xterm.jsOverviewRulerRenderer: arequestAnimationFramequeued by_queueRefreshcould fire after the renderer was disposed, ending up inRenderService.get dimensions()which doesreturn this._renderer.value!.dimensions;—_renderer.valueisundefinedpost-dispose, hence the TypeError.The upstream fix is xtermjs/xterm.js#5826 / commit
08ae141"Improve overview ruler lifecycle":if (this._store.isDisposed || !this._renderService.hasRenderer()) return;guards to_refreshCanvasDimensionsand_refreshDecorations.requestAnimationFramevia atoDisposableregistered on the renderer''s store._queueRefreshand anisDisposedre-check inside the rAF callback.That fix shipped in
@xterm/xterm@6.1.0-beta.198. We were pinned atbeta.197, so this issue has continued to be reported against 1.115 → 1.118.1 (~5M+ hits in 1.118.1 alone across the four related buckets).Related buckets
8612c55d4826565b1e83a096aaa283a2How to test
npm installat the workspace root, run a dev build, open an integrated terminal, exercise terminal lifecycle (open / close / split / window resize / DPR change).Risk
package-lock.jsonupdates in the three lockfiles.2026-04-06→2026-05-01covered. Notable changes are lifecycle/perf hardening (7a6e724,08ae141,0911688) with no public API change. Image addon defaults were tweaked (41938b3); flag if a compatibility concern.extensions/copilot/package.jsonstill pins@xterm/headless@^5.5.0— left untouched (stable major, unrelated).