Skip to content

fix completion tomorrow preview progression for buddy sessions#175

Merged
auerbachb merged 1 commit into
mainfrom
issue-132-completion-tomorrow-preview
Apr 18, 2026
Merged

fix completion tomorrow preview progression for buddy sessions#175
auerbachb merged 1 commit into
mainfrom
issue-132-completion-tomorrow-preview

Conversation

@auerbachb
Copy link
Copy Markdown
Owner

@auerbachb auerbachb commented Apr 18, 2026

Summary

  • Fix CompletionScreen tomorrow preview to use day-based progression (BASE_DURATION + dayNumber * INCREMENT) instead of duration + INCREMENT.
  • Keep completed sit copy accurate by renaming the local prop alias to completedDuration and adding a comment to avoid confusing session duration with progression base.
  • This resolves issue CompletionScreen "tomorrow" line uses sit duration + increment (wrong after buddy sit) #132 where buddy completion could show an incorrect tomorrow line when the completed duration differs from the viewer's canonical day duration.

Closes #132.

Test plan

  • Run npm run build
  • Verify logic alignment with HomeView progression formula (BASE_DURATION + (currentDay - 1) * INCREMENT)
  • Confirm solo regression path remains correct (tomorrow computed from completed day progression)
  • Confirm buddy regression scenario is fixed (tomorrow no longer depends on completed sit duration)

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes
    • Completion screen now displays "seconds of sustained attention" for your completed session
    • Refined tomorrow's predicted session duration and blocks—calculations now scale based on your progression rather than applying a fixed increment

Use day-based progression math for the completion tomorrow line so buddy sessions and any non-canonical completed durations still show the viewer's correct next sit duration.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
still-point Ready Ready Preview, Comment Apr 18, 2026 9:47pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 91e438df-b294-4235-a75b-f70596bc1607

📥 Commits

Reviewing files that changed from the base of the PR and between 8e93f7f and e607d59.

📒 Files selected for processing (1)
  • src/components/CompletionScreen.tsx

📝 Walkthrough

Walkthrough

The change fixes the completion screen's "tomorrow" sit preview for buddy participants by clarifying the duration prop as completedDuration and recalculating the next day's duration using a day-based progression formula (BASE_DURATION + dayNumber * INCREMENT) instead of incrementing the completed session's duration.

Changes

Cohort / File(s) Summary
Completion Screen Logic & Props
src/components/CompletionScreen.tsx
Renamed duration destructuring to completedDuration for clarity. Updated UI text to display completed duration. Fixed "tomorrow" footer calculation from duration + INCREMENT to BASE_DURATION + dayNumber * INCREMENT to correctly show next day's sit duration based on user progression rather than current session length.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hippity hop, the math now shines,
No borrowed durations crossing the lines,
Each bunny sees their true tomorrow wait,
Day by day, progression feels just great!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix completion tomorrow preview progression for buddy sessions' clearly relates to the main change: fixing the 'tomorrow' preview computation in CompletionScreen for buddy scenarios.
Linked Issues check ✅ Passed The PR addresses all requirements from issue #132: changes CompletionScreen to use BASE_DURATION + dayNumber * INCREMENT for tomorrow preview, maintains solo completion behavior, and adds prop clarification.
Out of Scope Changes check ✅ Passed All changes in CompletionScreen are directly scoped to issue #132: the prop renaming, computation logic update, and documentation are all necessary to fix the buddy completion bug.

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

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #132

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-132-completion-tomorrow-preview

Comment @coderabbitai help to get the list of available commands and usage tips.

@auerbachb auerbachb merged commit 25ed6fc into main Apr 18, 2026
6 checks passed
@auerbachb auerbachb deleted the issue-132-completion-tomorrow-preview branch April 18, 2026 23:06
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.

CompletionScreen "tomorrow" line uses sit duration + increment (wrong after buddy sit)

1 participant