(READ ONLY) Margin is an open annotation layer for the internet. Powered by the AT Protocol. margin.at

Support Firefox Container Tabs #28

Merged joeinn.es
targeting main from joeinn.es/margin:joe/broken-ff-extension-signin
Merged opened by and assigned to joeinn.es
targeting main from joeinn.es/margin:joe/broken-ff-extension-signin

Summary #

  • browser.cookies.get without a storeId reads from the background context's default cookie store, so a margin_session cookie set inside a Firefox container tab was invisible to the extension and the popup stayed on the Sign In screen.
  • getSessionCookie() now tries the active tab's cookieStoreId first, then the default store, then iterates cookies.getAllCookieStores() for the first match.

Test plan #

AI use disclosure #

AI was used to help diagnose the issue and propose the fix. The code has been manually reviewed and tested (there were no automated tests, none have been added).

Commits 1

fix extension sign-in inside Firefox container tabs