2 Commits

Author SHA1 Message Date
redz1029 2946945ce3 fix(programmer-tasks): tab switching + help-given live data
Tab switching: _buildTabs was recreating TabController on every build
because `_tabs == tabs` compares List by reference identity, not content.
programmerTasksTabsFor() always returns a new list, so the guard was
always false, resetting the controller to initialIndex 0 on every tap.
Fixed by using listEquals from flutter/foundation.

Help given: computeProgrammerStats accumulated helpGivenThisMonth only
from approvedSnapshot rows, which only exist after admin approval.
Programmers who helped others but had pending sheets saw 0m indefinitely.
Fixed by adding helpGivenThisMonthProvider (FutureProvider.family) that
queries programmer_task_work_logs directly for the current Manila month,
and passing it as liveHelpThisMonthSec to computeProgrammerStats.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-28 22:25:25 +08:00
redz1029 ab82af119b feat(programmer): day activity data + run-state provider
Implements DayActivityData, fetchDayActivityData, computeRunStates,
clockTickerProvider, todayKeyProvider, programmerActivitySignalProvider,
programmerDayDataProvider, and programmerRunStatesProvider in
lib/providers/programmer_day_data_provider.dart.

Includes four passing tests in test/programmer_day_data_test.dart
covering run-state computation and day-scoped activity fetching.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-27 21:16:04 +08:00