Home now opens on a deep green header: greeting, a Today / Weekly toggle, a seven-day streak with a leaf on every kept day, minutes held with a + ring, plan thumbnails, the report-card letter as the score, and one bar per commitment class (weekly view swaps in per-day bars and class rates). The + opens an "Add to today" sheet over the blurred day. A water tracker sits below the header, kept on the device. The nav marks the selected tab as a filled block and drops the side action button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
48 lines
1.7 KiB
Dart
48 lines
1.7 KiB
Dart
import '../../about/external/data/Commitment.dart';
|
|
import '../../about/external/data/ExcuseCluster.dart';
|
|
import '../../about/external/data/ReportCard.dart';
|
|
import '../../about/external/data/RoutineChain.dart';
|
|
import '../../about/internal/application/Standing.dart';
|
|
import '../../about/internal/application/TodoItem.dart';
|
|
import '../../about/internal/application/UserDetails.dart';
|
|
|
|
abstract class ConnectHome {
|
|
void onUserLoaded(UserDetails details);
|
|
|
|
void onPlanLoaded(List<Commitment> plan);
|
|
|
|
void onOverdueLoaded(List<Commitment> overdue);
|
|
|
|
/// The routine library, for the up-next rail.
|
|
void onRoutinesLoaded(List<RoutineChain> routines);
|
|
|
|
/// This week's report card, for the streak row, the score and the weekly
|
|
/// view. Null when it could not be loaded.
|
|
void onWeekLoaded(ReportCard? week);
|
|
|
|
/// Water drunk today, in ml.
|
|
void onWaterLoaded(int ml);
|
|
|
|
/// The quick to-do list, read from the device.
|
|
void onTodosLoaded(List<TodoItem> todos);
|
|
|
|
/// Standing arrives derived, with the debt it was derived from.
|
|
void onStandingResolved(Standing standing, double debtScore);
|
|
|
|
/// The one excuse pattern worth confronting the user with today.
|
|
void onExcuseInsight(ExcuseCluster? cluster);
|
|
|
|
/// Distress detected — the strict persona drops entirely.
|
|
void onDistressDetected();
|
|
|
|
/// Creating a commitment is refused at this standing.
|
|
void onCreationBlocked(String reason);
|
|
|
|
/// A tick landed. [late] is true when the window had already closed, so the
|
|
/// row can show it was recorded as a late complete rather than a clean one.
|
|
void onTicked(Commitment item, bool late);
|
|
|
|
/// The tick failed and the row has to go back to unchecked.
|
|
void onTickFailed(Commitment item);
|
|
}
|