do not detach not connected tabs

This commit is contained in:
Tommy D. Rossi
2025-12-30 13:21:58 +01:00
parent 774bc46afb
commit 561a5d3730
+5
View File
@@ -998,6 +998,11 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
void connectTab(tabId)
}
} else if (tabs.has(tabId)) {
const tabInfo = tabs.get(tabId)
if (tabInfo?.state !== 'connected') {
logger.debug('Tab removed from group while not connected, ignoring:', tabId)
return
}
logger.debug('Tab manually removed from playwriter group:', tabId)
void disconnectTab(tabId)
}