Skip to content

The week view shows the days after the one shown (#66 I9) - #68

Merged
sayed0am merged 1 commit into
developfrom
fix/week-active-minutes
Nov 12, 2026
Merged

sayed0am merged 1 commit into
developfrom
fix/week-active-minutes

Conversation

@sayed0am

@sayed0am sayed0am commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

What was wrong

Open Your week from a past day in the middle of a week, and the days after it had no active minutes and no sleep. Steps showed for every day.

  • Active minutes are worked out by the engine for the 14 days ending on the day shown, so later days had none.
  • Nights load up to the day shown, so the night after it and every later night were missing.

The fix

The week view now also reads the week as its last day has it (today, for this week) and fills in the later days.

  • DayViewModel.weekThrough(end) gives each day's active minutes from the result for end, and the nights as of the morning after end, or today.
  • WeekDetail uses it only when the day shown is before today. Days up to the one shown keep their own numbers, so they match the rest of the app.
  • The engine is not changed.

Checked

  • Tests, lint and detekt pass. One new view model test covers the later days, this week's last morning, and active minutes that fail.
  • On the emulator
  • Active minutes are covered by the test only. The data used had none after the first day of the week.

Last open item from #66 that was planned to be fixed.

Opened from a past day, Your week had no active minutes or sleep for the
days after it: both are worked out or loaded only up to the day shown.
It now also reads the week as its last day has it, and fills those days in.

Issue #66, I9.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sayed0am
sayed0am merged commit 4e81431 into develop Nov 12, 2026
5 checks passed
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.

1 participant