- Restore TotalWorkSeconds, CurrentStreak, LongestStreak writes in
computeAndAwardXP and updateStreak (incremental on clock out)
- Add recalcDayWorkSeconds and recalcAggregates for event edit path
(recompute day + total + streak from scratch when events change)
- Call recalcAggregates after editEventTimeSet, deleteEventConfirm,
addEventDo in calendar.go
- Remove runtime computeStreaks and totalWorkSeconds (N+1 scan)
from RPG display, burnout, and clockOut
- Add SetDailyWorkSeconds, SumDailyWorkSeconds store methods
- Clean up unused dead functions and dead code in rpg.go
- GenerateMonthlyReport now takes explicit Gregorian start/end range,
computed via monthGregorianRange, so Jalali/Hijri months spanning
two Gregorian months are fully covered in exports.
- Added loadLocation helper (UTC fallback on error) and replaced all
11 ignored-error call sites in handlers + export.
- Added periodicCleanup goroutine in NewHandler to prevent unbounded
growth of the rateLimit map.
- schemaPath is now read from SCHEMA_PATH env var (init), defaulting
to /app/db/schema.sql.
- Migrated sendDayView to use sendOrEdit helper, removing duplicated
send/edit branching.
- Removed dead code: userYearMonthToGregorian (unused), the old
startOffset function (replaced).
- Updated README with calendar docs, new env vars, full project tree.
- Updated .env.example and docker-compose.yml with SCHEMA_PATH.
- Simplified Makefile: added fmt, tidy, check, run-dev targets;
removed broken Make-glob prerequisite pattern.
- Fix Jalali/Gregorian/Hijri day-of-week startOffset formulas
(dow returns 0=Sat, not 0=Sun as the old comment claimed)
- Fix calendar and export month picker navigation jumping 2 months
(navMonth buttons already have pre-computed values; handlers
were decrementing/incrementing them again)
- Fix GetOrCreateUser/GetOrCreateDay race condition with INSERT OR IGNORE
- Add month/day bounds validation in handleEditMsg to prevent panic
- Hijri (قمری) calendar added as 3rd calendar option with tabular conversion
- Calendar type select menu (like accent) with gregorian/jalali/hijri
- Calendar type applied to exports and reports
- Midnight crossover: virtual splits at computation time (no synthetic DB events)
- Handles both UTC and local timezone boundaries
- Timezone changes handled naturally (recomputed on-the-fly)
- Rate limiting per user ID instead of chat ID
- WAL mode enabled for SQLite
- Smart reply keyboard updates after every state change
- Overlapping time edits rejected (must preserve in/out alternation)
- Single event deletion warns if timeline needs repair
- Day off no longer prevents clock in/out
- Accent colors shown with descriptive names in select menu
- Delete button label changed to DEL for visual distinction
- Add chat_id to events, settings, and days_off for per-user data
- Add proper graceful shutdown (signal handling, WaitGroup)
- Separate polling and webhook modes with goroutine management
- Add schema migration from single-user to multi-user schema
- Refactor handlers with shared actionFunc pattern (msg + callback)
- Fix schema path for Docker deployment (/app/db/schema.sql)
- Remove emoji from output text for cleaner formatting