Skip to content

feat: add guided daily session - #33

Open
PositivePhill wants to merge 2 commits into
mainfrom
feature/v1.6-guided-daily-session
Open

feat: add guided daily session#33
PositivePhill wants to merge 2 commits into
mainfrom
feature/v1.6-guided-daily-session

Conversation

@PositivePhill

Copy link
Copy Markdown
Owner

Summary

Adds Positive Phill v1.6 Guided Daily Session.

Added

  • Ritual timer support inside Daily Session
  • Auto-read on ritual start when Voice + Auto-Read are enabled
  • Guided auto-advance through session affirmations
  • Debounced TTS after manual or automatic index changes
  • Cleanup on pause, reset, back, and dispose
  • Completion-in-flight guard for session completion

Reward safety

  • XP/streak/quest payout logic unchanged
  • Rewards still happen only through the existing _completeSession() path
  • Last card does not auto-complete
  • Same-day provider safeguards remain unchanged

Guardrails

  • No UserProvider reward logic changes
  • No QuestProvider reward logic changes
  • No TTS provider internals changed
  • No ads changes
  • No Sanctuary Sounds changes
  • No video background changes
  • No Rescue behavior changes
  • docs/app deploy output not included

Verification

  • flutter analyze: No issues found
  • flutter build web --release --base-href /positive-phill/app/ --no-tree-shake-icons: success

Copilot AI review requested due to automatic review settings May 19, 2026 00:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a guided pacing layer to the Daily Session screen by reusing RitualTimerBar (now generalized with optional title/subtitle) and wiring it to a RitualProvider-driven auto-advance through the session pack, with debounced TTS auto-read and a completion-in-flight guard to prevent double payout.

Changes:

  • Generalize RitualTimerBar with optional title and subtitle so Daily Session and Rescue Flow can both use it.
  • Drive guided auto-advance in SessionFlowScreen from RitualProvider, with a debounced TTS speak and timer cleanup on pause/reset/back/dispose.
  • Guard _completeSession() with a _completionInFlight flag and pause the ritual before payout to keep XP/quest logic single-shot.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/widgets/ritual_timer_bar.dart Adds optional title/subtitle parameters and updated doc comment so the bar can be reused outside Rescue Flow.
lib/screens/session_flow_screen.dart Wires RitualProvider + TtsProvider into the session: guided advance timer, debounced auto-read, PopScope/dispose cleanup, and a completion-in-flight guard around _completeSession.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/screens/session_flow_screen.dart Outdated
icon: Icon(Icons.close, color: colorScheme.onSurface),
onPressed: () => context.pop(),
onPressed: () {
_onPopInvokedOrClose();

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment on lines +198 to +202
void _onPopInvokedOrClose() {
_cancelLocalTimersOnly();
context.read<RitualProvider>().pause();
}

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.

2 participants