Summary#
browser.cookies.getwithout astoreIdreads from the background context's default cookie store, so amargin_sessioncookie 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'scookieStoreIdfirst, then the default store, then iteratescookies.getAllCookieStores()for the first match.
Test plan#
- In Firefox, log out of margin.at, then sign in to margin.at inside a container tab. Open the extension popup and confirm it shows the signed-in state.
- In a non-container tab, sign in and confirm the popup still works (regression check).
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).