Repository navigation
Rules can play chosen adverts from the Adverts list - #41
Conversation
…dvertiser name In a rule's "What plays", choosing the Adverts list now offers "every advert" or "only the adverts I tick", with a ticked list of the adverts (several can be ticked). Rules saved before keep playing every advert. Adverts get a stable id (assigned on load for old settings) and an advertiser / company field, and each advert shows which rules play it. Deleting an advert removes it from the rules. Closes #38 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016m2QHUAvwMZBtY3v4DS7m6
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
Reviewed by MergeGuard AI
MergeGuard agent actionsFix all findingsFix-all did not complete. Manual fixes needed (1)MergeGuard could not commit these automatically. Expand each file for the suggested fix. `src/adsui.rs` — Skipped committing — the fix removed closing brace(s) from the enclosing…Skipped committing — the fix removed closing brace(s) from the enclosing function/block (lines 471-473). Please apply this change manually — MergeGuard drafted a fix but could not commit it to this branch. Suggested approach: Model confidence: 78%. You can try again with the checkbox:
Or reply with All issues (1)
|
Requested by epell · project thread
Closes #38
What changes
idso rules keep the right adverts when the list is edited or reordered. Adverts saved by older versions get ids when the settings load (and in the Ads tool, for settings that come from an older server). Deleting an advert takes it out of the rules that chose it.rule_poolonly takes the chosen adverts. "Taking turns" goes through them in Adverts list order.Compatibility
Existing rules have
ad_choose = false, so they keep playing every advert in the list. When connected to a server, the new fields travel with theads/ad_rulessettings the Ads permission already covers, so it works the same there. The web portal doesn't edit rules, so it has nothing to change.Checks
cargo fmt,cargo clippy --all-targets -- -D warnings,cargo test(two new tests: chosen adverts / deletion, and ids for old adverts),tools/extract_strings.py,tools/check_glyphs.py. Checked in the running app under Xvfb. It merges cleanly with #36.Generated by Claude Code