Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6051c810cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const label = element.getAttribute('aria-label') || ''; | ||
| const text = `${label} ${element.textContent || ''}`.toLowerCase(); | ||
|
|
||
| if (filters.some(filter => text.includes(filter))) { | ||
| const container = element.closest('section') || |
There was a problem hiding this comment.
Restrict sidebar matches to module headers
The filter logic matches any sidebar text that contains the filter string (e.g., the literal "spaces" from the same function), so enabling “Hide Spaces” will also match unrelated sidebar content that happens to include that word, such as a trending topic like “SpaceX” or “Spaces”, and then hide that item’s closest container. This can unintentionally hide the Trends module or other cards even when hideTrends is off. Consider matching only the module header (specific heading/aria-label) or a stable testid for the Spaces module to avoid false positives.
Useful? React with 👍 / 👎.
Motivation
Description
popup.htmlunder the Parameters section forHide SpacesandHide Trends, and wired them into the popup state inpopup.jsby extendingDEFAULT_CONFIGwithhideSpacesandhideTrendsand reflecting their states inupdateUI.content.jsdefaultconfigwithhideSpacesandhideTrends, and added a sidebar filtering subsystem withgetSidebar,collectSidebarTargets, andapplySidebarFiltersthat finds the sidebar (e.g.data-testid="sidebarColumn"oraside[aria-label]) and marks matching sections using the reversible CSS class.be-hidden..be-hiddenrule into its stylesheet and runsapplySidebarFiltersduringinit(), inside theMutationObservercallback, and when receivingconfigUpdatedmessages so changes are applied immediately and for dynamic content..be-hiddenfrom elements no longer matching the active filters.Testing
popup.html,DEFAULT_CONFIGand UI reflect the new flags inpopup.js, andcontent.jscontains theapplySidebarFilterslogic and.be-hiddenCSS (no automated verification was executed).Codex Task