Skip to content

fix: prevent live folder dismissed tabs from reappearing#12876

Open
genu wants to merge 1 commit intozen-browser:devfrom
genu:genu/live-folder-dismissed-tabs
Open

fix: prevent live folder dismissed tabs from reappearing#12876
genu wants to merge 1 commit intozen-browser:devfrom
genu:genu/live-folder-dismissed-tabs

Conversation

@genu
Copy link

@genu genu commented Mar 22, 2026

Dismissed live folder tabs (e.g. GitHub PRs) would reappear on startup. Two issues caused this:

  1. Empty fetch wipes dismissals: onLiveFolderFetch cleaned up dismissed items by removing any not in the current fetch results. If a fetch returned an empty list (auth expired, HTML structure changed), all dismissals were cleared — causing every PR to reappear on the next successful fetch.

  2. saveState early return: If any single folder's DOM element wasn't found, the entire saveState method returned early, preventing dismissed items for all folders from being persisted.

Fix: guard the dismissed-items cleanup with itemIds.size > 0, and change return to continue in saveState.

@genu genu requested a review from mr-cheffy as a code owner March 22, 2026 13:27
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Bug labels Mar 22, 2026
@genu genu force-pushed the genu/live-folder-dismissed-tabs branch from 79e29d7 to e983f76 Compare March 22, 2026 14:37
@mr-cheffy mr-cheffy requested a review from Slowlife01 March 22, 2026 16:12
Copy link
Member

@mr-cheffy mr-cheffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this even run if there has been an error while fetching? Also, is there an existing issue for this? If not, please create one if you dont mind

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants