From d3797109bf38bc62ea198b01d039a7a6760f56ad Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Thu, 11 Jun 2026 20:37:19 +0800 Subject: [PATCH] fix(extension): clear currentTabId in storage on TabsController.init Reset currentTabId via updateCurrentTabId(null) so the storage projection stays consistent with isAgentRunning. Prevents the previous run's tab from briefly flashing the mask when a new run starts within the heartbeat window. Closes #550 --- packages/extension/src/agent/TabsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension/src/agent/TabsController.ts b/packages/extension/src/agent/TabsController.ts index f5457a5..35f1c45 100644 --- a/packages/extension/src/agent/TabsController.ts +++ b/packages/extension/src/agent/TabsController.ts @@ -42,7 +42,7 @@ export class TabsController { throw new Error('TabsController already disposed') } - this.currentTabId = null + await this.updateCurrentTabId(null) this.disposed = false this.port = undefined this.portRetries = 0