Files
GroundedHelper/frontend/lib/Grounded/see/home/ConnectHome.dart
alvocool 4b71257429 Add groups with shared goals, objectives and chat; drop the water tracker
Groups let people keep each other honest: create one or join with a
six-letter invite code. Each group has shared goals split into measurable
objectives (km, sessions, words) that every member logs toward, a
leaderboard of kept rate and streak with nudges, and a group chat where
check-ins and nudges appear as cards beside the talk. The open chat polls
for new messages.

Reached from a new Groups tab (Training moves into the day rail), a Home
"Your groups" rail that opens the chat, and a Group tile in the add sheet.
Mock mode seeds two groups, a joinable one and members who reply.

The water tracker is removed; it did not fit the app. Bottom sheets are
now square app-wide via the theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
2026-11-03 11:46:41 +03:00

49 lines
1.8 KiB
Dart

import '../../about/external/data/Commitment.dart';
import '../../about/external/data/ExcuseCluster.dart';
import '../../about/external/data/Group.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);
/// Your groups, for the rail on Home.
void onGroupsLoaded(List<Group> groups);
/// 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);
}