Skip to content

Add option to hide Most relevant section#223

Open
lscarneiro wants to merge 5 commits intoOsaSoft:masterfrom
lscarneiro:feature/hide-most-relevant-section
Open

Add option to hide Most relevant section#223
lscarneiro wants to merge 5 commits intoOsaSoft:masterfrom
lscarneiro:feature/hide-most-relevant-section

Conversation

@lscarneiro
Copy link

@lscarneiro lscarneiro commented Feb 3, 2026

Summary

  • Adds a new setting to hide the algorithmic recommendation shelf from the YouTube subscription feed
  • Follows the existing pattern for hiding Shorts/Premieres/Lives/Members-only content
  • Includes test configuration updates

Screenshots

Most relevant section New option for hiding the most relevant section

Changes

  1. Setting definition: Added settings.hide.most.relevant to DEFAULT_SETTINGS
  2. Runtime logic: Detects and hides the algorithmic recommendation shelf when enabled (language-independent detection via DOM structure)
  3. Settings UI: Added toggle in the Subscriptions Feed settings section

Test plan

  • Load extension in Chrome/Firefox
  • Navigate to youtube.com/feed/subscriptions
  • Verify recommendation shelf is visible with setting OFF
  • Open extension settings, enable "Hide Most relevant section"
  • Refresh subscriptions page
  • Verify recommendation shelf is hidden
  • Disable setting, refresh, verify section reappears
  • Run npm test - all tests pass

🤖 Generated with Claude Code

lscarneiro and others added 3 commits February 2, 2026 22:24
- Add "settings.hide.most.relevant" to DEFAULT_SETTINGS in common.js
- Add corresponding test configuration in tests/setup.js
- Add hideMostRelevant to loadVideo context in tests/helpers/load-source.js

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hideMostRelevant global variable in subs.js
- Load setting value in initSubs() function
- Enhance shelf processing in subs-ui.js to detect and hide
  "Most relevant" section when setting is enabled
- Preserve existing behavior of hiding empty shelves

Note: Title matching is hardcoded to English "Most relevant" text.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add checkbox toggle in Subscriptions Feed settings section
- Include accessible aria labels and descriptions
- Position after "Hide Shorts" setting for logical grouping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@OsaSoft
Copy link
Owner

OsaSoft commented Feb 3, 2026

obrazek

this is absolutely not true. I try to make everything work no matter the language of the youtube ui. Please try to find a way to address this issue without relying on user language settings

Instead of checking for hardcoded English text, detect the shelf by
structural characteristics: algorithmic recommendation shelves have
both #avatar and #icon elements hidden, unlike channel-specific
shelves which display the channel avatar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lscarneiro
Copy link
Author

obrazek this is absolutely not true. I try to make everything work no matter the language of the youtube ui. Please try to find a way to address this issue without relying on user language settings

That's why we can't vibe code late at night, lol!
Claude jump straight into the lowest hanging fruit and coated it with "consistent" to make it look "good" lol.
Bad Claude, bad Claude!

The change should be language independent, now.

@OsaSoft
Copy link
Owner

OsaSoft commented Feb 3, 2026

haha yeah, it sometimes does that 😅

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new setting to hide the algorithmic "Most relevant" recommendation shelf from the YouTube subscriptions feed, following the established pattern for hiding other content types (Shorts, Premieres, Lives, Members-only).

Changes:

  • Added settings.hide.most.relevant setting with default value false
  • Implemented language-independent detection of algorithmic recommendation shelves based on DOM structure (hidden avatar and icon elements)
  • Added settings UI toggle with appropriate ARIA labels for accessibility
  • Updated test configuration to include the new setting

Reviewed changes

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

Show a summary per file
File Description
common.js Added default setting definition for settings.hide.most.relevant
subs.js Added initialization logic for hideMostRelevant variable
subs-ui.js Implemented shelf detection and hiding logic with language-independent DOM checks
pages/settings/settings.html Added UI toggle for the new setting with accessibility attributes
tests/setup.js Added test constant for the new setting
tests/helpers/load-source.js Exposed hideMostRelevant in test context

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Move settings.hide.most.relevant between shorts and lives to match
the visual ordering in the settings page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lscarneiro
Copy link
Author

Hey @OsaSoft, would you mind taking another look? I think you might not have seen the changes made after the review.

Cheers!

}

// Hide algorithmic recommendation shelf if setting is enabled
// Detection: channel-specific shelves show an avatar, algorithmic shelves have both
Copy link
Owner

Choose a reason for hiding this comment

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

in the screenshot of the algo shelf, i see the channel avatars, so is this true? Or this referring to some other element?

@OsaSoft
Copy link
Owner

OsaSoft commented Feb 18, 2026

Hey @OsaSoft, would you mind taking another look? I think you might not have seen the changes made after the review.

Cheers!

oh sh, sorry i had one more question, but left it pending without sending it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants