gh-12897: prevent live folder dismissed tabs from reappearing#12876
gh-12897: prevent live folder dismissed tabs from reappearing#12876mr-cheffy merged 1 commit intozen-browser:devfrom
Conversation
79e29d7 to
e983f76
Compare
|
To answer your question — no, this cleanup code does not run when The guard is needed for a different case: when the fetch succeeds (HTTP 200) but the HTML does not contain the expected structure — e.g. GitHub auth expired with a redirect instead of a 404, or a rate-limiting page. In that case Created #12894 for tracking. |
|
Your explanation doesn't make much sense and it just looks like something AI would spit out to justify the change ( |
Dismissed live folder tabs (e.g. GitHub PRs) would reappear on startup. Two issues caused this:
Empty fetch wipes dismissals:
onLiveFolderFetchcleaned 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.saveStateearly return: If any single folder's DOM element wasn't found, the entiresaveStatemethod returned early, preventing dismissed items for all folders from being persisted.Fix: guard the dismissed-items cleanup with
itemIds.size > 0, and changereturntocontinueinsaveState.