fix(browser): reset TimeBasedDebouncer state on dispose

dispose() cleared the pending timeout but left _refreshTimeoutID and
_additionalRefreshRequested set. After dispose, a stale timeout id or
trailing-refresh flag could confuse a new instance or tests. Match
RenderDebouncer by clearing the timeout id and reset the trailing flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-06-01 15:27:54 +00:00
committed by Cursor Agent
co-authored by Cursor
parent 536eeb4db0
commit 1dd113b38a
+2
View File
@@ -31,7 +31,9 @@ export class TimeBasedDebouncer implements IRenderDebouncer {
public dispose(): void {
if (this._refreshTimeoutID) {
clearTimeout(this._refreshTimeoutID);
this._refreshTimeoutID = undefined;
}
this._additionalRefreshRequested = false;
}
public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {