Skip to content

Possibly fix local prefs getting set on Odysee#3401

Closed
keikari wants to merge 1 commit intomasterfrom
local-pref-bug
Closed

Possibly fix local prefs getting set on Odysee#3401
keikari wants to merge 1 commit intomasterfrom
local-pref-bug

Conversation

@keikari
Copy link
Contributor

@keikari keikari commented Jan 26, 2026

Summary by CodeRabbit

  • Refactor
    • Preference handling now explicitly distinguishes shared vs local: only shared preferences trigger state preparation, propagation, and dispatches.
    • Callback invocation for shared preference changes is restricted to the shared path; local preference updates no longer initiate shared-state construction or related callbacks.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

The middleware now only builds and dispatches shared-state updates when the computed preferenceKey is 'shared'; the local path no longer prepares or dispatches preference updates nor invokes the shared-state callback.

Changes

Cohort / File(s) Summary
Shared-state middleware
ui/redux/middleware/shared-state.js
Control flow changed: collecting sharedStateFilters, assigning shared, calling doPreferenceSet, comparing/assigning oldShared, and invoking sharedStateCb are executed only when preferenceKey === 'shared'. The local branch bypasses shared-state construction and dispatch. Public API unchanged.
Repo metadata
manifest_file, package.json
Minor metadata/manifest edits included in this diff (+11/-8 lines). No functional API changes reported.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped through code with nimble feet,
Found one shared path, tidy and neat,
Local trails I let retreat,
Shared keys now stand in single beat,
I nibble carrots — change is sweet. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Possibly fix local prefs getting set on Odysee' directly describes the main change: fixing an issue where local preferences were incorrectly being set. The file changes confirm this - the middleware now explicitly gates shared state updates to only occur when preferenceKey is 'shared', preventing unintended updates to local preferences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@keikari keikari force-pushed the local-pref-bug branch 2 times, most recently from 4b48319 to 1d2fa0c Compare January 26, 2026 15:07
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.

1 participant