gstack/extension
Fred Chu 9e2c0ad395 fix(extension): add "tabs" permission so live tab awareness works on non-localhost sites
Without "tabs", chrome.tabs.query() returns tab objects with undefined
url/title for any site outside host_permissions (everything except
127.0.0.1). snapshotTabs() in background.js then writes empty strings
into tabs.json, and the active-tab.json gate (`if (active && active.url
&& ...)`) silently skips the write. The sidebar agent loses track of
what page the user is actually on.

The "tabs" permission is a no-warning install-time grant in MV3 (not a
host permission). It exposes tab.url / tab.title / tab.favIconUrl across
all tabs, but does not grant content-script injection or cross-origin
fetch — a tight scope match for what snapshotTabs() actually needs.
activeTab is too narrow (only after a user gesture on the extension
action) for background polling.

Reproduces on every gstack version since v1.14.0.0 (ed1e4be), where the
chrome.tabs.onUpdated listener was added but the manifest only gained
`ws://127.0.0.1:*/` for the new PTY channel — tab-related permissions
were never broadened.

Adds a manifest source-level test in sidebar-tabs.test.ts that asserts
`permissions` contains "tabs", to guard against future regressions.

Closes #1256
2026-04-28 15:15:44 +08:00
..
icons feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
background.js feat: gstack browser sidebar = interactive Claude Code REPL with live tab awareness (v1.14.0.0) (#1216) 2026-04-25 22:52:15 -07:00
content.css feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
content.js refactor: AI slop reduction with cross-model quality review (v0.16.3.0) (#941) 2026-04-10 17:13:15 -10:00
inspector.css feat: sidebar CSS inspector + per-tab agents (v0.13.9.0) (#650) 2026-03-30 12:51:05 -06:00
inspector.js refactor: AI slop reduction with cross-model quality review (v0.16.3.0) (#941) 2026-04-10 17:13:15 -10:00
manifest.json fix(extension): add "tabs" permission so live tab awareness works on non-localhost sites 2026-04-28 15:15:44 +08:00
popup.html feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
popup.js feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
sidepanel-terminal.js feat: gstack browser sidebar = interactive Claude Code REPL with live tab awareness (v1.14.0.0) (#1216) 2026-04-25 22:52:15 -07:00
sidepanel.css feat: gstack browser sidebar = interactive Claude Code REPL with live tab awareness (v1.14.0.0) (#1216) 2026-04-25 22:52:15 -07:00
sidepanel.html feat: gstack browser sidebar = interactive Claude Code REPL with live tab awareness (v1.14.0.0) (#1216) 2026-04-25 22:52:15 -07:00
sidepanel.js feat: gstack browser sidebar = interactive Claude Code REPL with live tab awareness (v1.14.0.0) (#1216) 2026-04-25 22:52:15 -07:00