Back to Developer Logs

Build Log — February 2, 2026

Build Log — February 2, 2026

Context / Focus for Today

Major bug fix day addressing user-reported issues. Timezone bugs, AI Coach reliability, Garmin error handling UX, and developer tooling improvements.


Things I Got Done Today

User-Reported Bug Fixes (David's Issues)

Date Picker Timezone Bug

  • Selecting 10/11/26 displayed as 10/10/26 due to UTC parsing
  • JavaScript's Date parses 'YYYY-MM-DD' as UTC midnight
  • In US timezones, UTC midnight = previous day local time
  • Fix: parseLocalDate() utility parses dates at local noon
  • Applied to Settings page and TrainingPlanBuilder

AI Coach Hallucinating Training History

  • AI was fabricating detailed training patterns when no data existed
  • Example: "Based on your recent 22-mile long run..." with no Garmin sync
  • Added explicit NO HALLUCINATION RULE to all system prompts:
    • Never fabricate training history not in context
    • Ask athlete about training when history is missing
    • Use conservative defaults and explain the caution

AI Coach "Clear All Workouts" Not Working

  • AI would say it cleared workouts but not actually delete them
  • Was using dates array instead of clear_all: true flag
  • Fix: Updated tool descriptions with CRITICAL section about clear_all usage
  • Now "clear all", "delete all", "start fresh" properly triggers deletion

Training Plan Generator Timezone Fix

  • Same UTC issue affecting plan date calculations
  • Added parseLocalDate() and formatLocalDate() helpers
  • Better error display in plan load wizard

Garmin Error UX (Major Compound PR)

Structured API Error System

  • ErrorCode enum with categorized codes (AUTH_, VALIDATION_, RESOURCE_, SERVICE_)
  • ApiErrorResponse type with code, message, fieldErrors, retryable, retryAfter
  • Helper functions: unauthorized(), badRequest(), notFound(), conflict()
  • Client utilities: isApiError(), isAuthError(), isRetryableError()

User-Friendly Error Messages

  • GarminApiError extended with userMessage, recoverable, action fields
  • ERROR_MESSAGE_MAP maps all error codes to user-friendly text
  • Each error has a recovery strategy (retry, reconnect, sign_in, contact_support)

Reconnect Button for Auth Errors

  • OAuth token expiration shows "Reconnect" button in toast
  • Properly disconnects before starting new OAuth flow
  • Applied to import, export, and sync operations

Try Again Button with Rate Limit Countdown

  • Network errors show "Try Again" button immediately
  • Rate limit errors show live countdown (e.g., "Wait 45s")
  • Button enables when cooldown completes
  • Fixed interval memory leak when user clicks early

Persistent Error Banner

  • Appears after 2+ consecutive sync failures
  • Shows service name, failure count, error message
  • Retry and dismiss buttons
  • Resets on successful sync

Kanban Agent API (Major Feature)

Expanded API for AI Agents

New endpoints for Clawdbot and Claude Code to manage planning board:

GET /api/planning/agent — List tasks with filters

  • Filter by status, assignee, labels
  • Supports pagination

POST /api/planning/agent — Task actions

  • create — Create new task with labels, effort
  • claim — Claim task and start work
  • update — Update allowed fields
  • add-note — Add progress note
  • set-status — Change status
  • attach-pr — Attach GitHub PR (auto moves to in_review)
  • complete — Mark done
  • unclaim — Release back to backlog

New Database Fields

  • assignee — Who is working on the task
  • pr_url — GitHub PR URL
  • notes — JSONB array of progress notes
  • started_at / completed_at — Timestamps
  • labels — Array of tags
  • external_ref — External references
  • effort — Estimated effort level (S/M/L)

Kanban Board UI Updates

  • Labels as colored badges (bug=red, feature=blue, urgent=orange)
  • Effort indicator (S/M/L badges)
  • Assignee with user icon
  • PR link (GitHub icon)
  • Notes count indicator
  • Task cards now clickable

Claude Code GitHub Workflow

  • Added @claude mention workflow for PR reviews
  • Write permissions for Claude to create commits, comments, branches
  • Enables AI-assisted code review directly on PRs

AI Coach Race Plan Fix

  • AI was defaulting to 16-week plan regardless of available time
  • Now calculates available weeks FIRST before designing plan
  • Updated examples for 16/12/10/8/6 week scenarios
  • Fixes 10-week-away race getting 16-week structure

TypeScript Clean Slate

  • Resolved all 187 TypeScript errors in test files
  • Fixed 14 test files with proper type assertions
  • All 2820 tests pass with 0 TypeScript errors
  • Major files: build-training-workout.test.ts (95 errors), wire-payload-transform.test.ts (40 errors)

Infrastructure & Fixes

  • Migration timestamp conflicts resolved
  • Missing migration fallback for production
  • ErrorCode import fixes in Garmin routes
  • Cross-platform analytics-mcp command (pipx)

Commits Today

  • 18 commits focused on reliability and UX
  • Major: Garmin error handling compound PR (structured errors, retry, reconnect)
  • Major: Kanban Agent API for AI workflows
  • Feature: Claude Code GitHub workflow
  • Fixes: Timezone bugs, AI Coach hallucinations, clear_all flag
  • Infra: 187 TypeScript errors resolved

In Progress

  • Strava production API access (pending)
  • Mobile UX design iteration
  • Intervals.icu testing

Targets for Tomorrow

  1. Test Agent API — Verify Clawdbot can claim and work on tasks
  2. User feedback — Check if David's issues are resolved
  3. Error handling — Monitor new Garmin error UX in production
  4. Mobile UX — Continue High Density Precision design

Notes / Observations

  • Timezone bugs are sneaky — UTC midnight parsing is a classic JavaScript gotcha
  • AI hallucination prevention requires explicit "don't make things up" rules
  • The Kanban Agent API enables interesting AI-first workflows where agents pick up and complete tasks autonomously
  • Compound PRs are great for shipping related features together but make for long commit logs
  • 187 TypeScript errors in tests = a lot of as any casts needed for mock data
  • David's bug reports are valuable for finding edge cases real users hit

Momentum Score: 8 / 10

Solid bug fix day that improves reliability and user experience. The timezone fixes were overdue, and the AI Coach hallucination prevention is important for trust. The Garmin error UX with retry/reconnect buttons is a real quality-of-life improvement. The Kanban Agent API opens up interesting automation possibilities. Good foundation work even if not flashy feature-shipping.