FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`conversation-activity-filter` - Clean up state by fregante · Pull Request #9999 · refined-github/refined-github · GitHub

conversation-activity-filter - Clean up state - #9999

Open
fregante wants to merge 11 commits into
mainfrom
conversation-activity-state-unity
Open

conversation-activity-filter - Clean up state#9999
fregante wants to merge 11 commits into
mainfrom
conversation-activity-state-unity

Conversation

fregante commented Aug 24, 2026
edited
Loading

Copy link
Copy Markdown
Member

Test URLs

Screenshot

untested

This comment was marked as resolved.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

fregante marked this pull request as ready for review August 24, 2026 11:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment on lines +43 to +48
$([
// PR
'[class^="prc-PageLayout-PageLayoutWrapper"]',
// Issue
'[class*="IssueViewer-module__mainContainer"]',
]).setAttribute('data-rgh-conversation-activity-filter', value);
Comment thread source/helpers/svelte.ts

Copy link
Copy Markdown
Member Author

Tested a few things:

  • state is reset when ajaxing to new issue
  • state is preserved on back button

Broken:

Copy link
Copy Markdown
Member Author

@copilot the minorFixesIssuePages defaults are overriding all choices, the state can't be changed

…igation

Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@copilot the minorFixesIssuePages defaults are overriding all choices, the state can't be changed

Fixed in the latest commit. The root cause was two issues:

  1. Same-value no-emit: When Turbo navigates back to issue 🍰 Code migrations #7000, the Svelte store already holds hideAllNoise from the previous visit. resetActivityFilterState() calls activityFilterState.set('hideAllNoise') again, but Svelte skips emission when the value hasn't changed — so the new React layout element never received the data-rgh-conversation-activity-filter attribute, making the CSS filter inactive until the user manually toggled it.

  2. Race condition with $(): The subscription used $([...]) (select-dom, returns first match or null) to set the attribute. If the layout wasn't mounted yet (or had been replaced), this would throw or silently fail.

The fix: export layoutSelectors and an applyStateToLayout helper, then add observe(layoutSelectors, applyStateToLayout, {signal}) in init(). Now whenever the layout element appears in the DOM, the current store state is immediately applied to it — independent of whether the store value changed. The subscription is also updated to use querySelectorAll to cover all matching elements.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL