Tasks now carry a tick box rather than being read-only rows. Ticking strikes the title through and leaves the item in place, so a day still reads as a record of what was asked rather than only what is left. New in designs/Checkbox.dart: - TickBox the square box itself, animating between empty and filled - TickRow box + struck-through title + caller-supplied detail and trailing - addTaskAffordance the centred "Add new task" control beneath a day's list Applied to the home plan, the overdue queue and the goal task list. Each screen holds a set of optimistically ticked ids so the tick lands immediately and rolls back if the call fails; the set is reconciled whenever fresh data arrives. A tick completes the item outright, whatever its proof requirement. The proof flow is still reachable from the Complete button in the overdue queue, so tasks that need an artefact have a route that asks for one — but the tick itself no longer enforces it. Late completes stay visually distinct: the row keeps a Late pill and the warning accent, and the user is told the window had already closed. flutter analyze lib/ reports no errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mfu2gQLSFN21YRBcU2NrTt
32 lines
1.1 KiB
Dart
32 lines
1.1 KiB
Dart
import '../../about/external/data/Commitment.dart';
|
|
import '../../about/external/data/ExcuseCluster.dart';
|
|
import '../../about/internal/application/Standing.dart';
|
|
import '../../about/internal/application/UserDetails.dart';
|
|
|
|
abstract class ConnectHome {
|
|
void onUserLoaded(UserDetails details);
|
|
|
|
void onPlanLoaded(List<Commitment> plan);
|
|
|
|
void onOverdueLoaded(List<Commitment> overdue);
|
|
|
|
/// 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);
|
|
}
|