make icon green on new pages. add test for it.

This commit is contained in:
Tommy D. Rossi
2025-11-24 15:54:11 +01:00
parent fb5182d0a5
commit a13906de73
4 changed files with 66 additions and 2 deletions
+11
View File
@@ -339,6 +339,17 @@ async function ensureConnection(): Promise<void> {
}
logger.debug('Removed tab from _connectedTabs map')
},
onTabAttached: (tabId, targetId) => {
// logger.debug('=== Tab attached callback for tab:', tabId, '===')
useExtensionStore.setState((state) => {
const newTabs = new Map(state.connectedTabs)
newTabs.set(tabId, {
targetId,
state: 'connected',
})
return { connectedTabs: newTabs, connectionState: 'connected' }
})
},
})
useExtensionStore.setState({ connection: newConnection })