Skip to content

fix streaming services filter resetting every time the filtering moda…#2774

Closed
KristjanKruusRIA wants to merge 1 commit intoseerr-team:developfrom
KristjanKruusRIA:develop
Closed

fix streaming services filter resetting every time the filtering moda…#2774
KristjanKruusRIA wants to merge 1 commit intoseerr-team:developfrom
KristjanKruusRIA:develop

Conversation

@KristjanKruusRIA
Copy link
Copy Markdown

@KristjanKruusRIA KristjanKruusRIA commented Mar 28, 2026

Description

  • Fixes issue with Streaming Services filter resetting when opening the filter modal.
  • Fix generated by AI, built and tested by me.

How Has This Been Tested?

Built the dockerfile locally and tested in the browser

Screenshots / Logs (if applicable)

Checklist:

  • [ x] I have read and followed the contribution guidelines.
  • [ x] Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • [ x] All new and existing tests passed.
  • [ x] Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

Bug Fixes

  • Fixed filter count calculations for more accurate active filter state representation.
  • Improved provider selection state synchronization with component props.
  • Corrected endpoint URL formatting.

Style

  • Reformatted component class declarations.

@KristjanKruusRIA KristjanKruusRIA requested a review from a team as a code owner March 28, 2026 14:11
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 012d93c0-460a-4914-99e9-f18eaad46621

📥 Commits

Reviewing files that changed from the base of the PR and between 20c2ed8 and 6685bb1.

📒 Files selected for processing (2)
  • src/components/Discover/constants.ts
  • src/components/Selector/index.tsx

📝 Walkthrough

Walkthrough

This PR updates filter logic to ensure consistent source references when counting active filters and synchronizes component state with props through a new effect hook. Additionally, template literal formatting is adjusted for improved readability.

Changes

Cohort / File(s) Summary
Filter Constants Logic
src/components/Discover/constants.ts
Updated countActiveFilters to consistently reference clonedFilters for all range-based upper-bound checks (*Lte fields) instead of mixing references to filterValues, ensuring a single source of truth for filter state evaluation.
Provider Selector State Sync
src/components/Selector/index.tsx
Added useEffect hook to synchronize activeProvider state with activeProviders prop; refined useSWR endpoint template literal formatting; reformatted provider icon className template literals for improved readability without functional changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop, the filters now align,
One source of truth, a code design,
State syncs sweetly, providers in place,
Template strings now have proper grace!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix - preventing the streaming services filter from resetting when the filtering modal opens, which aligns with both file changes addressing filter state synchronization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fallenbagel
Copy link
Copy Markdown
Collaborator

fallenbagel commented Mar 28, 2026

#2636

PR #2636 already fixed this and is merged on develop.

I can confirm it even works right now, so i'm not sure what this PR is trying to fix?

Current develop at 20c2ed8:

filters.mp4

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants