Repository navigation
briefing: say why, from reasons worked out on the phone - #1074
abdulsaheel wants to merge 4 commits into
Conversation
…sons opt-in and off by default
Reviewer's GuideData structuresAdd the persisted journal-reasons preference and record the setting used to generate each briefing so cached notes can be compared with it.
APIExpose robust-history helpers for reason calculation and make briefing reads account for the journal-reasons setting when deciding whether a morning cache is stale.
Uses of the APIPass the current journal-reasons setting into cache lookup so the app refreshes a morning note when the setting changes.
ImplementationSelect up to three deterministic, history-based association lines, optionally include yesterday’s journal alcohol metric, and constrain the prompt to those lines rather than invented causes.
UIShow a morning-briefing opt-in switch with an explanation of when journal data may be sent, and update the briefing copy across supported languages.
ConfigurationInclude the new journal-reasons preference in backup preference type handling.
TestsCover reason selection and thresholds, journal opt-in and failures, prompt restrictions, cache invalidation, and preference persistence.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
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. |
There was a problem hiding this comment.
Hey - I've found 8 issues
Sourcery assessment
Needs a human reviewer. 8 findings to address first, and when a user opts in, yesterday’s alcohol units can be included in the briefing prompt sent to the configured model provider. Reverting stops future disclosures, but it cannot retrieve prompts already sent.
Blocking findings: lib/ui2/screens/ai_briefing.dart:68, lib/ai/briefing_engine.dart:654, lib/ai/briefing_engine.dart:266, lib/ai/briefing_reasons.dart:46, lib/ai/ai_prefs.dart:72, and 3 more
the morning briefing only restated numbers. now it gets up to three reasons (strain, short sleep, low hrv, high resting hr, alcohol) that are at least 1.5 robust-z off your own history over 14+ days, worded as 'came with', not 'because'. the alcohol/journal ones are off until you turn them on in the briefing settings. stacked on the language pr.
Summary by Sourcery
Give morning briefings concise, history-based context for recovery readings while keeping journal-derived reasons opt-in.
New Features:
Enhancements:
Tests:
Chores: