Skip to content

feat(api): expose BrowserExtension.closeTab to extensions - #2044

Open
Keyruu wants to merge 2 commits into
vicinaehq:mainfrom
Keyruu:expose-browser-close-tab-to-extensions
Open

Keyruu wants to merge 2 commits into
vicinaehq:mainfrom
Keyruu:expose-browser-close-tab-to-extensions

Conversation

@Keyruu

@Keyruu Keyruu commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Adds closeTab(browserId, tabId) to the BrowserExtension RPC and surfaces it on the TS API namespace so custom extensions can close browser tabs.

  • figura/tsapi.fig: add closeTab to BrowserExtension service
  • ext-browser-extension-service.hpp: implement override (delegates to BrowserExtensionService::closeTab)
  • api.ts (generated): TS client gets closeTab method
  • browser.ts: Tab type gains browserId and close(); new BrowserExtension.closeTab(browserId, tabId) standalone helper

Verification:

  • tsapi.hpp regenerates with closeTab virtual + routing
  • api.ts regenerates with closeTab method
  • Server build target ran past tsapi generation; remaining extension-runtime.js error is pre-existing pnpm/TS dependency setup, unrelated

Mirrors focusTab signature and routing.

Keyruu added 2 commits October 1, 2026 22:25
Drop the closeWindow call from the closeTab action so vicinae stays
focused after closing a browser tab. The tab list refreshes via
BrowserExtensionService::tabsChanged in both the root search and the
built-in browser tabs view, so the closed tab disappears on its own.
Adds a closeTab RPC to the tsapi schema so user extensions can close
browser tabs from their own commands. Mirrors focusTab signature and
routing.

Generated tsapi.hpp and api.ts proto updated via figura codegen.
Tab wrapper in browser.ts now exposes browserId and a close() helper
matching focus().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant