From 587c09f0bd7b87be60eb754899d18aa96fd8ef1c Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:55:30 +0200 Subject: [PATCH] Fix padawan watcher debounce --- src/github/copilotPrWatcher.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github/copilotPrWatcher.ts b/src/github/copilotPrWatcher.ts index b1497ca145..2ae5ec6fa7 100644 --- a/src/github/copilotPrWatcher.ts +++ b/src/github/copilotPrWatcher.ts @@ -140,9 +140,10 @@ export class CopilotPRWatcher extends Disposable { private _initialize() { this._getStateChanges(); this._pollForChanges(); + const updateState = debounce(() => this._getStateChanges(), 50); this._register(this._reposManager.onDidChangeAnyPullRequests(e => { if (e.some(pr => COPILOT_ACCOUNTS[pr.model.author.login])) { - debounce(this._getStateChanges, 50); + updateState(); } })); this._register(PullRequestOverviewPanel.onVisible(e => this._model.clearNotification(e.remote.owner, e.remote.repositoryName, e.number)));