From bc42be20740bcbded0771ebe0acfbcfe6c686652 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 20:37:23 -0700 Subject: [PATCH 01/19] docs(common): correct ST sequence metadata and comment typos - EscapeSequenceParser: ESC ST is ESC backslash (0x1B 0x5C), not ESC plus a double-quote character; align @vt metadata with C1 ST on the following line. - Color.contrastRatio: document l2 as the second luminance argument. - Marker.dispose: fix "change" -> "chance" in dispose listener comment. - Buffer.clear: fix possessive "it's" -> "its" in JSDoc. Co-authored-by: Cursor --- src/common/Color.ts | 2 +- src/common/buffer/Buffer.ts | 2 +- src/common/buffer/Marker.ts | 2 +- src/common/parser/EscapeSequenceParser.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/Color.ts b/src/common/Color.ts index d416d670e..b8a9d8d60 100644 --- a/src/common/Color.ts +++ b/src/common/Color.ts @@ -373,7 +373,7 @@ export function toPaddedHex(c: number): string { /** * Gets the contrast ratio between two relative luminance values. * @param l1 The first relative luminance. - * @param l2 The first relative luminance. + * @param l2 The second relative luminance. * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef */ export function contrastRatio(l1: number, l2: number): number { diff --git a/src/common/buffer/Buffer.ts b/src/common/buffer/Buffer.ts index be3df09b1..f41b9da67 100644 --- a/src/common/buffer/Buffer.ts +++ b/src/common/buffer/Buffer.ts @@ -142,7 +142,7 @@ export class Buffer extends Disposable implements IBuffer { } /** - * Clears the buffer to it's initial state, discarding all previous data. + * Clears the buffer to its initial state, discarding all previous data. */ public clear(): void { this._stringCache.clear(); diff --git a/src/common/buffer/Marker.ts b/src/common/buffer/Marker.ts index ed5124add..c21575919 100644 --- a/src/common/buffer/Marker.ts +++ b/src/common/buffer/Marker.ts @@ -30,7 +30,7 @@ export class Marker implements IMarker { } this.isDisposed = true; this.line = -1; - // Emit before super.dispose such that dispose listeners get a change to react + // Emit before super.dispose such that dispose listeners get a chance to react this._onDispose.fire(); dispose(this._disposables); this._disposables.length = 0; diff --git a/src/common/parser/EscapeSequenceParser.ts b/src/common/parser/EscapeSequenceParser.ts index a0c97b610..868ab574f 100644 --- a/src/common/parser/EscapeSequenceParser.ts +++ b/src/common/parser/EscapeSequenceParser.ts @@ -18,7 +18,7 @@ import { ApcParser } from './ApcParser'; // @vt: #Y ESC CSI "Control Sequence Introducer" "ESC [" "Start of a CSI sequence." // @vt: #Y ESC OSC "Operating System Command" "ESC ]" "Start of an OSC sequence." // @vt: #Y ESC DCS "Device Control String" "ESC P" "Start of a DCS sequence." -// @vt: #Y ESC ST "String Terminator" "ESC \" "Terminator used for string type sequences." +// @vt: #Y ESC ST "String Terminator" "ESC \\" "Terminator used for string type sequences." // @vt: #Y ESC PM "Privacy Message" "ESC ^" "Start of a privacy message." // @vt: #Y ESC APC "Application Program Command" "ESC _" "Start of an APC sequence." // @vt: #Y C1 CSI "Control Sequence Introducer" "\x9B" "Start of a CSI sequence." From b45167e00b8656917789e27404cefc98fd5a5f7f Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 20:38:08 -0700 Subject: [PATCH 02/19] docs: fix comment typos in ThemeService and Constants Co-authored-by: Cursor --- src/browser/services/ThemeService.ts | 2 +- src/common/buffer/Constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/services/ThemeService.ts b/src/browser/services/ThemeService.ts index 9b39b99ad..e12e5e2b3 100644 --- a/src/browser/services/ThemeService.ts +++ b/src/browser/services/ThemeService.ts @@ -132,7 +132,7 @@ export class ThemeService extends Disposable implements IThemeService { colors.ansi[i + 16] = parseColor(theme.extendedAnsi[i], DEFAULT_ANSI_COLORS[i + 16]); } } - // Clear our the cache + // Clear the cache this._contrastCache.clear(); this._halfContrastCache.clear(); this._updateRestoreColors(); diff --git a/src/common/buffer/Constants.ts b/src/common/buffer/Constants.ts index 5ce075cf7..592b5258b 100644 --- a/src/common/buffer/Constants.ts +++ b/src/common/buffer/Constants.ts @@ -24,7 +24,7 @@ export const NULL_CELL_CODE = 0; /** * Whitespace cell. * This is meant as a replacement for empty cells when needed - * during rendering lines to preserve correct aligment. + * during rendering lines to preserve correct alignment. */ export const WHITESPACE_CELL_CHAR = ' '; export const WHITESPACE_CELL_WIDTH = 1; From 7b05c8a1b2d14645347f4dbda2878a8e9533b309 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 20:51:02 -0700 Subject: [PATCH 03/19] docs: fix comment and JSDoc spelling typos Correct "occurred" in IMouseEvent and keydown JSDoc, remove duplicate "This" in EscapeSequenceParser ZDM comment, use "elapsed" instead of "lapsed" in TimeBasedDebouncer, and fix "event" in Keyboard comment. Co-authored-by: Cursor --- src/browser/CoreBrowserTerminal.ts | 2 +- src/browser/TimeBasedDebouncer.ts | 2 +- src/common/Types.ts | 2 +- src/common/input/Keyboard.ts | 2 +- src/common/parser/EscapeSequenceParser.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/CoreBrowserTerminal.ts b/src/browser/CoreBrowserTerminal.ts index f7e20b914..d089c62c0 100644 --- a/src/browser/CoreBrowserTerminal.ts +++ b/src/browser/CoreBrowserTerminal.ts @@ -102,7 +102,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal { private _keyDownHandled: boolean = false; /** - * Records whether a keydown event has occured since the last keyup event, i.e. whether a key + * Records whether a keydown event has occurred since the last keyup event, i.e. whether a key * is currently "pressed". */ private _keyDownSeen: boolean = false; diff --git a/src/browser/TimeBasedDebouncer.ts b/src/browser/TimeBasedDebouncer.ts index 0860e7927..6c92aad24 100644 --- a/src/browser/TimeBasedDebouncer.ts +++ b/src/browser/TimeBasedDebouncer.ts @@ -47,7 +47,7 @@ export class TimeBasedDebouncer implements IRenderDebouncer { // enough time to pass before refreshing again. const refreshRequestTime: number = performance.now(); if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) { - // Enough time has lapsed since the last refresh; refresh immediately + // Enough time has elapsed since the last refresh; refresh immediately this._lastRefreshMs = refreshRequestTime; this._innerRefresh(); } else if (!this._additionalRefreshRequested) { diff --git a/src/common/Types.ts b/src/common/Types.ts index 9e1481fd3..b73fc8413 100644 --- a/src/common/Types.ts +++ b/src/common/Types.ts @@ -181,7 +181,7 @@ export interface ICoreMouseEvent { x: number; y: number; /** - * Button the action occured. Due to restrictions of the tracking protocols + * Button the action occurred. Due to restrictions of the tracking protocols * it is not possible to report multiple buttons at once. * Wheel is treated as a button. * There are invalid combinations of buttons and actions possible diff --git a/src/common/input/Keyboard.ts b/src/common/input/Keyboard.ts index 2c3ca28cd..2f8de1963 100644 --- a/src/common/input/Keyboard.ts +++ b/src/common/input/Keyboard.ts @@ -46,7 +46,7 @@ export function evaluateKeyboardEvent( // Whether to cancel event propagation (NOTE: this may not be needed since the event is // canceled at the end of keyDown cancel: false, - // The new key even to emit + // The new key event to emit key: undefined }; const modifiers = (ev.shiftKey ? 1 : 0) | (ev.altKey ? 2 : 0) | (ev.ctrlKey ? 4 : 0) | (ev.metaKey ? 8 : 0); diff --git a/src/common/parser/EscapeSequenceParser.ts b/src/common/parser/EscapeSequenceParser.ts index 868ab574f..9fffbcb4f 100644 --- a/src/common/parser/EscapeSequenceParser.ts +++ b/src/common/parser/EscapeSequenceParser.ts @@ -243,7 +243,7 @@ export const VT500_TRANSITION_TABLE = (function (): TransitionTable { * * This parser is currently hardcoded to operate in ZDM (Zero Default Mode) * as suggested by the original parser, thus empty parameters are set to 0. - * This this is not in line with the latest ECMA-48 specification + * This is not in line with the latest ECMA-48 specification * (ZDM was part of the early specs and got completely removed later on). * * Other than the original parser from vt100.net this parser supports From 3a4f9e235d739f7c821eeb3737defd65e5b14ea4 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:38:39 -0700 Subject: [PATCH 04/19] docs: fix "transferred" spelling in CONTRIBUTING.md Correct typo in the note about moving support questions to GitHub discussions. Co-authored-by: Cursor --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe61ad265..b20229f1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ The preferred way to report bugs or request features is to use It's pretty common for maintainers of large open source projects to suffer from burnout, especially when needing to triage a large number of incoming issues instead of actually building things. Here are some of the steps we take to try mitigate this: -- Support questions live in [GH discussions](https://github.com/xtermjs/xterm.js/discussions), issues may be transfered there without further comment and core maintainers may or may not participate in discussions. +- Support questions live in [GH discussions](https://github.com/xtermjs/xterm.js/discussions), issues may be transferred there without further comment and core maintainers may or may not participate in discussions. - Issues are strictly for well defined features or bugs that are _actionable_. - Sometimes features are out of scope. A common example of this is a niche feature that the pricipal implementation ([VS Code](https://code.visualstudio.com/)) won't leverage and therefore would be difficult to maintain and likely suffer from bitrot. The reporter may not agree with this, but you could always create an addon if that works or maintain your own fork if it comes to that. - If a feature does not have a clear way forward or needs more discussion it may be closed ro moved to a discussion. From e12f007597c8c5d288bb39817b8967208a18009f Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:53:21 -0700 Subject: [PATCH 05/19] docs(buffer): fix Content enum names in Constants JSDoc The Content bitmask JSDoc examples used camelCase names that do not exist on the enum (codepointMask, isCombined, hasContent, widthMask, widthShift). Update examples to match the real members: CODEPOINT_MASK, IS_COMBINED_MASK, HAS_CONTENT_MASK, WIDTH_MASK, and WIDTH_SHIFT as used throughout BufferLine and CellData. Co-authored-by: Cursor --- src/common/buffer/Constants.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/common/buffer/Constants.ts b/src/common/buffer/Constants.ts index 592b5258b..c02dba50d 100644 --- a/src/common/buffer/Constants.ts +++ b/src/common/buffer/Constants.ts @@ -36,18 +36,18 @@ export const WHITESPACE_CELL_CODE = 32; export const enum Content { /** * bit 1..21 codepoint, max allowed in UTF32 is 0x10FFFF (21 bits taken) - * read: `codepoint = content & Content.codepointMask;` - * write: `content |= codepoint & Content.codepointMask;` + * read: `codepoint = content & Content.CODEPOINT_MASK;` + * write: `content |= codepoint & Content.CODEPOINT_MASK;` * shortcut if precondition `codepoint <= 0x10FFFF` is met: * `content |= codepoint;` */ CODEPOINT_MASK = 0x1FFFFF, /** - * bit 22 flag indication whether a cell contains combined content - * read: `isCombined = content & Content.isCombined;` - * set: `content |= Content.isCombined;` - * clear: `content &= ~Content.isCombined;` + * bit 22 flag indicating whether a cell contains combined content + * read: `isCombined = content & Content.IS_COMBINED_MASK;` + * set: `content |= Content.IS_COMBINED_MASK;` + * clear: `content &= ~Content.IS_COMBINED_MASK;` */ IS_COMBINED_MASK = 0x200000, // 1 << 21 @@ -55,19 +55,19 @@ export const enum Content { * bit 1..22 mask to check whether a cell contains any string data * we need to check for codepoint and isCombined bits to see * whether a cell contains anything - * read: `isEmpty = !(content & Content.hasContent)` + * read: `isEmpty = !(content & Content.HAS_CONTENT_MASK)` */ HAS_CONTENT_MASK = 0x3FFFFF, /** * bit 23..24 wcwidth value of cell, takes 2 bits (ranges from 0..2) - * read: `width = (content & Content.widthMask) >> Content.widthShift;` - * `hasWidth = content & Content.widthMask;` + * read: `width = (content & Content.WIDTH_MASK) >> Content.WIDTH_SHIFT;` + * `hasWidth = content & Content.WIDTH_MASK;` * as long as wcwidth is highest value in `content`: - * `width = content >> Content.widthShift;` - * write: `content |= (width << Content.widthShift) & Content.widthMask;` + * `width = content >> Content.WIDTH_SHIFT;` + * write: `content |= (width << Content.WIDTH_SHIFT) & Content.WIDTH_MASK;` * shortcut if precondition `0 <= width <= 3` is met: - * `content |= width << Content.widthShift;` + * `content |= width << Content.WIDTH_SHIFT;` */ WIDTH_MASK = 0xC00000, // 3 << 22 WIDTH_SHIFT = 22 From cf1484d7fd43ed32cbeacc69713a23046d523ca1 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:54:19 -0700 Subject: [PATCH 06/19] docs(browser): fix incomplete and typo comments in Mouse.ts getCoords had a truncated comment ("if there are no valid") and a typo ("addition" vs "additional") in the selection precision note. Complete the char-size guard comment and fix the selection wording. Co-authored-by: Cursor --- src/browser/input/Mouse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/input/Mouse.ts b/src/browser/input/Mouse.ts index 5f73743fb..9ea1d6019 100644 --- a/src/browser/input/Mouse.ts +++ b/src/browser/input/Mouse.ts @@ -31,7 +31,7 @@ export function getCoordsRelativeToElement(window: Pick, event: Pick, element: HTMLElement, colCount: number, rowCount: number, hasValidCharSize: boolean, cssCellWidth: number, cssCellHeight: number, isSelection?: boolean): [number, number] | undefined { - // Coordinates cannot be measured if there are no valid + // Coordinates cannot be measured if there is no valid character size. if (!hasValidCharSize) { return undefined; } @@ -45,7 +45,7 @@ export function getCoords(window: Pick, event: Pick< coords[1] = Math.ceil(coords[1] / cssCellHeight); // Ensure coordinates are within the terminal viewport. Note that selections - // need an addition point of precision to cover the end point (as characters + // need an additional point of precision to cover the end point (as characters // cover half of one char and half of the next). coords[0] = Math.min(Math.max(coords[0], 1), colCount + (isSelection ? 1 : 0)); coords[1] = Math.min(Math.max(coords[1], 1), rowCount); From e2d1420ff763c5aa347dc1323631991c6d78468c Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:57:19 -0700 Subject: [PATCH 07/19] docs(common): fix throughput typo in WriteBuffer comment Correct "throughtput" to "throughput" in the FPS vs throughput tradeoff note inside WriteBuffer. Co-authored-by: Cursor --- src/common/input/WriteBuffer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/input/WriteBuffer.ts b/src/common/input/WriteBuffer.ts index 85774363b..0b4619690 100644 --- a/src/common/input/WriteBuffer.ts +++ b/src/common/input/WriteBuffer.ts @@ -267,7 +267,7 @@ export class WriteBuffer extends Disposable { * this condition here, also the renderer has no way to spot nonsense updates either. * FIXME: A proper fix for this would track the FPS at the renderer entry level separately. * - * If favoring of FPS shows bad throughtput impact, use the following instead. It favors + * If favoring of FPS shows bad throughput impact, use the following instead. It favors * throughput by eval'ing `startTime` upfront pulling at least one more chunk into the * current microtask queue (executed before setTimeout). */ From 5ef80014139c726ad661f57ec59ae1ab970f3860 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:58:21 -0700 Subject: [PATCH 08/19] docs(common): fix activeVersion onChange JSDoc wording The onChange event comment said "activate version changed" while the property is activeVersion. Clarify that the event fires when the active Unicode version changes. Co-authored-by: Cursor --- src/common/services/Services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index cd1bc9cd4..32e67f181 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -350,7 +350,7 @@ export interface IUnicodeService { readonly versions: string[]; /** Currently active version. */ activeVersion: string; - /** Event triggered, when activate version changed. */ + /** Event triggered when the active version changes. */ readonly onChange: IEvent; /** From fd13893687acd77f4acd0d6179ad8de39ebb5a8b Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:59:22 -0700 Subject: [PATCH 09/19] docs(buffer): fix possessive typo in Windows conpty comment Change "it's view" to "its view" in the comment explaining why new rows are appended on Windows when using conpty. Co-authored-by: Cursor --- src/common/buffer/Buffer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/buffer/Buffer.ts b/src/common/buffer/Buffer.ts index f41b9da67..c7d094a43 100644 --- a/src/common/buffer/Buffer.ts +++ b/src/common/buffer/Buffer.ts @@ -197,7 +197,7 @@ export class Buffer extends Disposable implements IBuffer { for (let y = this._rows; y < newRows; y++) { if (this.lines.length < newRows + this.ybase) { if (this._optionsService.rawOptions.windowsPty.backend !== undefined || this._optionsService.rawOptions.windowsPty.buildNumber !== undefined) { - // Just add the new missing rows on Windows as conpty reprints the screen with it's + // Just add the new missing rows on Windows as conpty reprints the screen with its // view of the world. Once a line enters scrollback for conpty it remains there this.lines.push(new BufferLine(this._stringCache, newCols, nullCell, false)); } else { From 26e771d0756dcd15f9498031e7aad862b691e751 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:09:34 -0700 Subject: [PATCH 10/19] docs(common): fix grammar in Unicode and platform comments Use "a Unicode" instead of "an Unicode" on IUnicodeService.register, and "user's platform" instead of "users platform" above the platform detection exports. Co-authored-by: Cursor --- src/common/Platform.ts | 2 +- src/common/services/Services.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/Platform.ts b/src/common/Platform.ts index 9ccf8bda8..a034ca69c 100644 --- a/src/common/Platform.ts +++ b/src/common/Platform.ts @@ -44,7 +44,7 @@ export function getSafariVersion(): number { return parseInt(majorVersion[1], 10); } -// Find the users platform. We use this to interpret the meta key +// Find the user's platform. We use this to interpret the meta key // and ISO third level shifts. // http://stackoverflow.com/q/19877924/577598 export const isMac = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'].includes(platform); diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index 32e67f181..8f0aeeed1 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -344,7 +344,7 @@ export type UnicodeCharWidth = 0 | 1 | 2; export const IUnicodeService = createDecorator('UnicodeService'); export interface IUnicodeService { serviceBrand: undefined; - /** Register an Unicode version provider. */ + /** Register a Unicode version provider. */ register(provider: IUnicodeVersionProvider): void; /** Registered Unicode versions. */ readonly versions: string[]; From 8854430df4c08b58a312129bf824f685c787b856 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:11:27 -0700 Subject: [PATCH 11/19] docs(parser): fix sub-parameter limit name in Params JSDoc addSubParam documents a cap on stored sub parameters; the limit is enforced via maxSubParamsLength, not subParamsLength (the current count). Co-authored-by: Cursor --- src/common/parser/Params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/parser/Params.ts b/src/common/parser/Params.ts index 6986a48ba..76dbe2b3d 100644 --- a/src/common/parser/Params.ts +++ b/src/common/parser/Params.ts @@ -172,7 +172,7 @@ export class Params implements IParams { * Add a sub parameter value. * The sub parameter is automatically associated with the last parameter value. * Thus it is not possible to add a subparameter without any parameter added yet. - * `Params` only stores up to `subParamsLength` sub parameters, any later + * `Params` only stores up to `maxSubParamsLength` sub parameters, any later * sub parameter will be ignored. */ public addSubParam(value: number): void { From 2db34c49554bb4292bea9ea2aaec3e321316bbb4 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:13:26 -0700 Subject: [PATCH 12/19] docs(common): fix main thread spelling in TaskQueue comment Change "mainthread" to "main thread" in the workload scheduling note. Co-authored-by: Cursor --- src/common/TaskQueue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/TaskQueue.ts b/src/common/TaskQueue.ts index 9e15c823a..b1bcf023a 100644 --- a/src/common/TaskQueue.ts +++ b/src/common/TaskQueue.ts @@ -8,7 +8,7 @@ import type { ILogService } from './services/Services'; interface ITaskQueue { /** * Adds a task to the queue which will run in a future idle callback. - * To avoid perceivable stalls on the mainthread, tasks with heavy workload + * To avoid perceivable stalls on the main thread, tasks with heavy workload * should split their work into smaller pieces and return `true` to get * called again until the work is done (on falsy return value). */ From be3dd80171748116cc0fc9cfecb4df733dc8ffb8 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 21:35:46 -0700 Subject: [PATCH 13/19] docs(parser): fix JSDoc typos in IFunctionIdentifier Correct "representation" and "registration" spelling in the comment describing how handler identifiers are encoded for EscapeSequenceParser. Co-authored-by: Cursor --- src/common/parser/Types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/parser/Types.ts b/src/common/parser/Types.ts index 7306cdf76..f7c8ae2d4 100644 --- a/src/common/parser/Types.ts +++ b/src/common/parser/Types.ts @@ -234,8 +234,8 @@ export interface IApcParser extends ISubParser Date: Sun, 31 May 2026 22:06:29 -0700 Subject: [PATCH 14/19] test(search): send real CSI CUP in #3834 null-char case The integration test intended to move the cursor forward with ESC [ C but wrote the literal string \x1b[C due to double escaping. Use a single-escaped '\x1b[CHi Hi' so the terminal receives the control sequence and creates the null cell the scenario describes. Co-authored-by: Cursor --- addons/addon-search/test/SearchAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-search/test/SearchAddon.test.ts b/addons/addon-search/test/SearchAddon.test.ts index a4ccb6c0e..89f0ff4fa 100644 --- a/addons/addon-search/test/SearchAddon.test.ts +++ b/addons/addon-search/test/SearchAddon.test.ts @@ -501,7 +501,7 @@ test.describe('Search Tests', () => { window.search.onDidChangeResults(e => window.calls.push(e)); `); // Move cursor forward 1 time to create a null character, as opposed to regular whitespace - await ctx.proxy.write('\\x1b[CHi Hi'); + await ctx.proxy.write('\x1b[CHi Hi'); strictEqual(await ctx.page.evaluate(`window.search.findPrevious('h', { decorations: { activeMatchColorOverviewRuler: '#ff0000' } })`), true); deepStrictEqual(await ctx.page.evaluate('window.calls'), [ { resultCount: 2, resultIndex: 1 } From a9a2a8e3c166a05bb13bbab0f812ca01de8f0297 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:28:51 -0700 Subject: [PATCH 15/19] test(search): reject readFile errors in #2444 fixture loader beforeAll always resolved the readFile promise with data even when err was set, which led to calling toString on undefined. Reject the promise on err so fixture load failures surface clearly. Use res/rej callback names to avoid shadowing path.resolve. Co-authored-by: Cursor --- addons/addon-search/test/SearchAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-search/test/SearchAddon.test.ts b/addons/addon-search/test/SearchAddon.test.ts index 89f0ff4fa..3438772a8 100644 --- a/addons/addon-search/test/SearchAddon.test.ts +++ b/addons/addon-search/test/SearchAddon.test.ts @@ -417,7 +417,7 @@ test.describe('Search Tests', () => { test.describe('#2444 wrapped line content not being found', () => { let fixture: string; test.beforeAll(async () => { - fixture = (await new Promise(r => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => r(data)))).toString(); + fixture = (await new Promise((res, rej) => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => err ? rej(err) : res(data)))).toString(); if (process.platform !== 'win32') { fixture = fixture.replace(/\n/g, '\n\r'); } From 8e7e4f16e5cf5487afdc366762ac115e1cb90108 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:10:27 -0700 Subject: [PATCH 16/19] test(parser): fix typo in EscapeSequenceParser test title Rename the mocha case "inital states" to "initial states". Co-authored-by: Cursor --- src/common/parser/EscapeSequenceParser.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/parser/EscapeSequenceParser.test.ts b/src/common/parser/EscapeSequenceParser.test.ts index f684da2c8..73238d039 100644 --- a/src/common/parser/EscapeSequenceParser.test.ts +++ b/src/common/parser/EscapeSequenceParser.test.ts @@ -243,7 +243,7 @@ describe('EscapeSequenceParser', () => { p = new TestEscapeSequenceParser(tansitions); assert.deepEqual(p.transitions, tansitions); }); - it('inital states', () => { + it('initial states', () => { assert.equal(parser.initialState, ParserState.GROUND); assert.equal(parser.currentState, ParserState.GROUND); assert.equal(parser.osc, ''); From 9a70816dad388d7d09ab2716d28b0a190221080b Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 1 Jun 2026 07:42:15 -0700 Subject: [PATCH 17/19] test(addon-attach): correct Playwright suite name in AttachAddon tests The integration test file used test.describe('Search Tests'), copied from addon-search. That mislabels attach-addon results in Playwright reports and makes the suite harder to filter or debug. Rename the block to 'AttachAddon' so the describe name matches the addon under test. No test logic changed. Validated with: npm run build && npm run esbuild, npm run test-unit, npm run esbuild-demo-client && npm run esbuild-demo-server && npm run test-integration, npm run package, npm run package-headless. Co-authored-by: Cursor --- addons/addon-attach/test/AttachAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-attach/test/AttachAddon.test.ts b/addons/addon-attach/test/AttachAddon.test.ts index b49d9f337..ee9b22c2e 100644 --- a/addons/addon-attach/test/AttachAddon.test.ts +++ b/addons/addon-attach/test/AttachAddon.test.ts @@ -15,7 +15,7 @@ test.beforeAll(async ({ browser }) => { }); test.afterAll(async () => await ctx.page.close()); -test.describe('Search Tests', () => { +test.describe('AttachAddon', () => { test.beforeEach(async () => { await ctx.proxy.reset(); From 096707d7363cb7085e568eecf96e7f2449a75381 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 1 Jun 2026 15:29:18 +0000 Subject: [PATCH 18/19] test: fix typos in test titles and comments Apply test-only hunks from docs typo fixes: SharedRendererTests duplicate word, SerializeAddon workaround comment, and mouse range spelling in MouseService and InputHandler tests. Co-authored-by: Daniel Imms --- addons/addon-serialize/test/SerializeAddon.test.ts | 2 +- src/browser/services/MouseService.test.ts | 2 +- src/common/InputHandler.test.ts | 2 +- test/playwright/SharedRendererTests.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/addon-serialize/test/SerializeAddon.test.ts b/addons/addon-serialize/test/SerializeAddon.test.ts index fb42d807d..c8dba3039 100644 --- a/addons/addon-serialize/test/SerializeAddon.test.ts +++ b/addons/addon-serialize/test/SerializeAddon.test.ts @@ -192,7 +192,7 @@ test.describe('SerializeAddon', () => { const cols = 10; const line = '+'.repeat(cols); const lines: string[] = [ - sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags a the end, serialize will use \x1b[0m to clear instead of the sepcific disable sequence + sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags at the end, serialize will use \x1b[0m to clear instead of the specific disable sequence sgr(INVERSE) + line, sgr(BOLD) + line, sgr(UNDERLINED) + line, diff --git a/src/browser/services/MouseService.test.ts b/src/browser/services/MouseService.test.ts index 6d760ff0a..b4655a1a1 100644 --- a/src/browser/services/MouseService.test.ts +++ b/src/browser/services/MouseService.test.ts @@ -176,7 +176,7 @@ describe('MouseService _triggerMouseEvent', () => { for (let i = 0; i < bufferService.cols; ++i) { assert.equal(trigger({ col: i, row: 0, x: 0, y: 0, button: CoreMouseButton.LEFT, action: CoreMouseAction.DOWN }), true); if (i > 222) { - // supress mouse reports if we are out of addressible range (max. 222) + // suppress mouse reports if we are out of addressable range (max. 222) assert.deepEqual(toBytes(reports.pop()), []); } else { assert.deepEqual(toBytes(reports.pop()), [0x1b, 0x5b, 0x4d, 0x20, i + 33, 0x21]); diff --git a/src/common/InputHandler.test.ts b/src/common/InputHandler.test.ts index 3cfc9e019..8f0109727 100644 --- a/src/common/InputHandler.test.ts +++ b/src/common/InputHandler.test.ts @@ -1241,7 +1241,7 @@ describe('InputHandler', () => { await inputHandler.parseP('\x1b[e'); assert.deepEqual(getCursor(bufferService), [8, 5]); }); - describe('should clamp cursor into addressible range', () => { + describe('should clamp cursor into addressable range', () => { it('CUF', async () => { bufferService.buffer.x = 10000; bufferService.buffer.y = 10000; diff --git a/test/playwright/SharedRendererTests.ts b/test/playwright/SharedRendererTests.ts index db5c4c073..1983fd410 100644 --- a/test/playwright/SharedRendererTests.ts +++ b/test/playwright/SharedRendererTests.ts @@ -980,7 +980,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void }); test.describe('selectionInactiveBackground', async () => { - test('should render the the inactive selection when not focused', async () => { + test('should render the inactive selection when not focused', async () => { const theme: ITheme = { selectionBackground: '#FF000080', selectionInactiveBackground: '#0000FF80' From 94958c2489ec7ec9c16c1c51ecab9f4bb416dce8 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 1 Jun 2026 08:33:02 -0700 Subject: [PATCH 19/19] Fix whitespace --- src/common/parser/EscapeSequenceParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/parser/EscapeSequenceParser.ts b/src/common/parser/EscapeSequenceParser.ts index 9fffbcb4f..87844113a 100644 --- a/src/common/parser/EscapeSequenceParser.ts +++ b/src/common/parser/EscapeSequenceParser.ts @@ -18,7 +18,7 @@ import { ApcParser } from './ApcParser'; // @vt: #Y ESC CSI "Control Sequence Introducer" "ESC [" "Start of a CSI sequence." // @vt: #Y ESC OSC "Operating System Command" "ESC ]" "Start of an OSC sequence." // @vt: #Y ESC DCS "Device Control String" "ESC P" "Start of a DCS sequence." -// @vt: #Y ESC ST "String Terminator" "ESC \\" "Terminator used for string type sequences." +// @vt: #Y ESC ST "String Terminator" "ESC \\" "Terminator used for string type sequences." // @vt: #Y ESC PM "Privacy Message" "ESC ^" "Start of a privacy message." // @vt: #Y ESC APC "Application Program Command" "ESC _" "Start of an APC sequence." // @vt: #Y C1 CSI "Control Sequence Introducer" "\x9B" "Start of a CSI sequence."