mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 11:45:20 +02:00
1923e1972f
Adds a primary tab bar (Terminal | Chat) above the existing tab-content
panes. Terminal is the default-active tab; clicking Chat returns to the
existing claude -p one-shot flow which is preserved verbatim.
manifest.json: adds ws://127.0.0.1:*/ to host_permissions so MV3 doesn't
block the WebSocket upgrade.
sidepanel.html: new primary-tabs nav, new #tab-terminal pane with a
"Press any key to start Claude Code" bootstrap card, claude-not-found
install card, xterm mount point, and "session ended" restart UI. Loads
xterm.js + xterm-addon-fit + sidepanel-terminal.js. tab-chat is no
longer the .active default.
sidepanel.js: new activePrimaryPaneId() helper that reads which primary
tab is selected. Debug-close paths now route back to whichever primary
pane is active (was hardcoded to tab-chat). Primary-tab click handler
toggles .active classes and aria-selected. window.gstackServerPort and
window.gstackAuthToken exposed so sidepanel-terminal.js can build the
/pty-session POST and the WS URL.
sidepanel-terminal.js (new): xterm.js lifecycle. Lazy-spawn — first
keystroke fires POST /pty-session, then opens
ws://127.0.0.1:<terminalPort>/ws. Origin + cookie are set automatically
by the browser. Resize observer sends {type:"resize"} text frames.
ResizeObserver, tab-switch hooks, restart button, install-card retry.
On WS close shows "Session ended, click to restart" — no auto-reconnect
(codex outside-voice flagged that as session-burning).
sidepanel.css: primary-tabs bar + Terminal pane styling (full-height
xterm container, install card, ended state).
32 lines
783 B
JSON
32 lines
783 B
JSON
{
|
|
"manifest_version": 3,
|
|
"name": "gstack browse",
|
|
"version": "0.1.0",
|
|
"description": "Live activity feed and @ref overlays for gstack browse",
|
|
"permissions": ["sidePanel", "storage", "activeTab", "scripting"],
|
|
"host_permissions": ["http://127.0.0.1:*/", "ws://127.0.0.1:*/"],
|
|
"action": {
|
|
"default_icon": {
|
|
"16": "icons/icon-16.png",
|
|
"48": "icons/icon-48.png",
|
|
"128": "icons/icon-128.png"
|
|
}
|
|
},
|
|
"side_panel": {
|
|
"default_path": "sidepanel.html"
|
|
},
|
|
"background": {
|
|
"service_worker": "background.js"
|
|
},
|
|
"content_scripts": [{
|
|
"matches": ["<all_urls>"],
|
|
"js": ["content.js"],
|
|
"css": ["content.css"]
|
|
}],
|
|
"icons": {
|
|
"16": "icons/icon-16.png",
|
|
"48": "icons/icon-48.png",
|
|
"128": "icons/icon-128.png"
|
|
}
|
|
}
|