Skip to content

conversation-activity-filter: race condition - #9992

Closed
naps62 wants to merge 1 commit into
refined-github:mainfrom
naps62:fix-activity-filter-reapply
Closed

naps62 wants to merge 1 commit into
refined-github:mainfrom
naps62:fix-activity-filter-reapply

Conversation

@naps62

@naps62 naps62 commented Aug 21, 2026 •

Copy link
Copy Markdown

I'm running into what seems to be a race condition, where resolved comments are loaded into the page after the activity-filter triggers, and they end up still showing

browser: zen browser 1.21.9b
os: NixOS

the fix in this PR works for me, though I'm not fully sure it should be necessary, or if it's the best approach

screenshot before the fix
image

the linear and vercel bot comments are hidden if I toggle the behavior. but after a hard refresh they consistently appear
with this fix they get consistently hidden

disclaimer: claude code used to help onboard myself to the repo and debug this. all the writing and manual testing is my own

@github-actions github-actions Bot changed the title conversation-activity-filter: race condition conversation-activity-filter: race condition Aug 21, 2026

@fregante fregante left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few notes:

  • we already observe selectors, MutationObserver isn't needed
  • individual items are already observed and "marked" by their type, it's CSS that then takes care of hiding any items that match the current state
  • if the current state isn't reaching the items, it just means that it needs to be stored higher up in the DOM to a common ancestor

In short the only fix should be to update the single selector where the state is stored, ensuring that this element isn't cleared by GitHub.

@naps62
naps62 force-pushed the fix-activity-filter-reapply branch from 04cfe58 to 51299bd Compare August 21, 2026 12:35
@github-actions

Copy link
Copy Markdown

Please avoid force-pushing to this PR. It makes it harder for reviewers to track what changed since the last review.

Just push new commits on top of the branch instead — PRs are squashed on merge, so the commit history doesn't need to be clean.

@naps62
naps62 force-pushed the fix-activity-filter-reapply branch from 51299bd to 55330a6 Compare August 21, 2026 12:39
@naps62

naps62 commented Aug 21, 2026

Copy link
Copy Markdown
Author

@fregante updated. as you said, moving to an upper container was the only thing needed. I'm just not sure what I picked is acceptable or if there's a better alternative. seems to be the lowest one that fixed the behavior

@fregante

Copy link
Copy Markdown
Member

I can't reproduce what you're suggesting or the repro steps are not clear.

I don’t think it has anything to do with race conditions, but I'm sure that there's some Ajax-related issue (e.g. set value, change page) that I'm trying to figure out in #9999

@naps62

naps62 commented Aug 25, 2026

Copy link
Copy Markdown
Author

I'll see if I can record a video on this, or even try with different browsers

@fregante

Copy link
Copy Markdown
Member

I made substantial changes to the state logic in #9999. Let me know if it fixes it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants