Skip to content

Fix: respect 'open in same tab' setting for feeds (#337)#338

Merged
olsh merged 2 commits intomasterfrom
fix/issue-337-same-tab
Mar 3, 2026
Merged

Fix: respect 'open in same tab' setting for feeds (#337)#338
olsh merged 2 commits intomasterfrom
fix/issue-337-same-tab

Conversation

@olsh
Copy link
Copy Markdown
Owner

@olsh olsh commented Mar 3, 2026

Summary

Fixes a bug where feeds could open in a new tab even when open in same tab is enabled.

Root cause

In Manifest V3, the background service worker can restart and lose in-memory state (feedTabId), so the extension no longer knows which tab to reuse.

Changes

  • Persist feedTabId in session storage (with local-storage fallback)
  • Recover gracefully from stale/closed tab IDs
  • Keep existing behavior for creating/opening when no reusable tab exists

Validation

  • npm run lint (passes)

Closes #337

In MV3, the service worker can be terminated after inactivity, losing the
in-memory feedTabId. Persist it to browser.storage.session (with fallback
to local storage) so it survives service worker restarts. Also handle
stale tab IDs gracefully by falling back to creating a new tab.
@olsh olsh force-pushed the fix/issue-337-same-tab branch from 23b493d to c3b1738 Compare March 3, 2026 19:40
@olsh olsh merged commit 70ff564 into master Mar 3, 2026
10 of 11 checks passed
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.

[Bug] Feeds do not open in same tab although configured in options

1 participant