extension: remove chrome.alarms keepalive and alarms permission

The alarm added in 0.0.73 was a no-op — the maintainLoop while(true) + sleep(1000)
and setInterval(checkMemory, 5000) already keep the service worker alive.
Removing it drops the unnecessary alarms permission from the manifest.

Bumps extension to 0.0.75.
This commit is contained in:
Tommy D. Rossi
2026-03-10 21:28:17 +01:00
parent 3a045c17d4
commit 1ced689153
3 changed files with 7 additions and 14 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.0.75
### Changes
- **Remove `alarms` permission and keepalive**: Removed `chrome.alarms` keepalive added in 0.0.73. The `maintainLoop` while-loop and `setInterval(checkMemory)` already keep the service worker alive. The alarm was a no-op that required an unnecessary permission.
## 0.0.74
### Bug Fixes
+1 -2
View File
@@ -1,10 +1,9 @@
{
"manifest_version": 3,
"name": "Playwriter",
"version": "0.0.74",
"version": "0.0.75",
"description": "Automate your Browser using Cursor, Claude, VS Code. More capable and context efficient than Playwright MCP.",
"permissions": [
"alarms",
"debugger",
"tabGroups",
"contextMenus",
-12
View File
@@ -1520,18 +1520,6 @@ async function onActionClicked(tab: chrome.tabs.Tab): Promise<void> {
resetDebugger()
connectionManager.maintainLoop()
// MV3 service workers can be terminated by Chrome despite setInterval.
// chrome.alarms is the only reliable way to keep a service worker alive.
// Without this, the maintainLoop stops, the WebSocket closes, and the
// extension silently disconnects from the relay server.
chrome.alarms.create('keepalive', { periodInMinutes: 0.25 })
chrome.alarms.onAlarm.addListener((alarm) => {
if (alarm.name === 'keepalive') {
// No-op — the alarm firing is enough to wake the service worker.
// The maintainLoop will handle reconnection if needed.
}
})
chrome.contextMenus
.remove('playwriter-pin-element')
.catch(() => {})