feat(reviews): independent per-user daily and weekly review toggles - #111
Merged
Conversation
Adds a migration splitting the single review_preferences flag into independent daily_enabled and weekly_enabled columns (seeded from the old combined value so existing opt-outs keep their behaviour, which then defaults to enabled for everyone else) and reworks ReviewPreferenceRepository around per-review getters and setters. The daily and weekly delivery workers now consult their own preference, and the /reviews backend reports and sets the two flags independently while keeping /reviews on|off as a shorthand for both.
Parses "/reviews daily on|off" and "/reviews weekly on|off" into the new per-review commands, keeps "/reviews on|off" applying to both, and shows both settings in "/reviews". Documents the independent toggles and their relationship to the global operator switches in the README.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reviews_enabledintodaily_enabled/weekly_enabled, seeded from the old combined value so existing opt-outs are preserved; absence of a row still defaults to ON for everyone)./reviewsnow shows both settings;/reviews daily on|offand/reviews weekly on|offtoggle one;/reviews on|offremains a shorthand for both. On-demand/day_review//week_revieware unaffected.FROID_DAILY_REVIEW_DELIVERY_ENABLED/FROID_WEEK_REVIEW_WORKER_ENABLEDenv switches remain the master switches on top.Testing
cargo fmt --all --check,cargo check --locked --all-targets,cargo clippy --locked --all-targets -- -D warnings,cargo test --locked --all-targets(608 tests passing, 0 failed). Both commits compile individually.