Commit Graph

127 Commits

Author SHA1 Message Date
ccbc86016d Switch email provider from Resend to Mailgun and add cron scheduler
Some checks failed
Deploy / deploy (push) Failing after 1m43s
- Replace resend package with mailgun.js and form-data
- Update email.ts to use Mailgun API with lazy client initialization
- Add instrumentation.ts to schedule cron jobs (notifications :00, Garmin :30)
- Update tests for Mailgun mock structure
- Update .env.example with MAILGUN_API_KEY and MAILGUN_DOMAIN

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:37:24 +00:00
6543c79a04 Show "Goal exceeded" instead of negative remaining minutes
All checks were successful
Deploy / deploy (push) Successful in 1m38s
When weekly intensity exceeds the phase goal, display "Goal exceeded by X min"
instead of the confusing "Remaining: -X min".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:27:32 +00:00
ed14aea0ea Fix intensity goal defaults for PocketBase 0 values
All checks were successful
Deploy / deploy (push) Successful in 2m39s
PocketBase number fields default to 0, not null. Using ?? (nullish
coalescing) caused 0 to be preserved instead of using the default value.
Changed to || so 0 is treated as falsy and falls back to defaults.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:14:39 +00:00
8956e04eca Fix garmin-sync upsert and add Settings UI for intensity goals
All checks were successful
Deploy / deploy (push) Successful in 1m39s
- Fix dailyLog upsert to use range query (matches today route pattern)
- Properly distinguish 404 errors from other failures in upsert logic
- Add logging for dailyLog create/update operations
- Add Settings UI section for weekly intensity goals per phase
- Add unit tests for upsert behavior and intensity goals UI
- Add E2E tests for intensity goals settings flow

This fixes the issue where Garmin sync was creating new dailyLog
records instead of updating existing ones (322 vs 222 intensity
minutes bug, Unknown HRV bug).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:53:43 +00:00
6cd0c06396 Fix Garmin intensity minutes and add user-configurable phase goals
All checks were successful
Deploy / deploy (push) Successful in 2m38s
- Apply 2x multiplier for vigorous intensity minutes (matches Garmin)
- Use calendar week (Mon-Sun) instead of trailing 7 days for intensity
- Add HRV yesterday fallback when today's data returns empty
- Add user-configurable phase intensity goals with new defaults:
  - Menstrual: 75, Follicular: 150, Ovulation: 100
  - Early Luteal: 120, Late Luteal: 50
- Update garmin-sync and today routes to use user-specific phase limits

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:18:20 +00:00
a1495ff23f Fix garmin-sync to upsert dailyLogs instead of always creating
All checks were successful
Deploy / deploy (push) Successful in 1m39s
The sync was creating a new record every time it ran, causing duplicate
records for the same day. Combined with PocketBase's inability to sort
by the 'created' field, this caused the dashboard to display stale data.

Now checks for an existing record for the user+date before creating,
and updates the existing record if found.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:06:03 +00:00
4dad370e66 PB credentials. 2026-01-15 22:02:09 +00:00
a184909957 Fix PocketBase query error by sorting by date instead of created
All checks were successful
Deploy / deploy (push) Successful in 2m28s
The sort=-created parameter was causing PocketBase to return a 400 error
when querying dailyLogs. This is likely a compatibility issue with how
PocketBase handles the auto-generated 'created' field in certain query
combinations. Changing to sort by -date resolves the issue and makes
more semantic sense for dailyLogs which have one record per day.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 21:55:41 +00:00
3e2d9047fb Fix PocketBase date query - use range operators not contains
All checks were successful
Deploy / deploy (push) Successful in 1m39s
The ~ contains operator doesn't work with PocketBase date fields.
Use >= and < operators with YYYY-MM-DD format instead, matching
the working /api/history pattern.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:24:00 +00:00
55a3505b55 Document CI/CD auto-deployment on git push
All checks were successful
Deploy / deploy (push) Successful in 1m39s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:17:44 +00:00
14bd0407f9 Fix PocketBase date format - use YYYY-MM-DD instead of ISO
Some checks failed
Deploy / deploy (push) Has been cancelled
PocketBase filters don't accept ISO format with T separator (causes 400).
Changed both garmin-sync storage and today route query to use simple
YYYY-MM-DD format, matching the working /api/history pattern.

TDD approach: wrote failing tests first, then implemented the fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:16:07 +00:00
1f7c804a4b Add production log access instructions to AGENTS.md
All checks were successful
Deploy / deploy (push) Successful in 2m30s
Document how to use Nomad CLI to view production logs for debugging.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:00:51 +00:00
5f8e913555 Fix dailyLog date query to use proper date comparison
All checks were successful
Deploy / deploy (push) Successful in 1m40s
- Change /api/today query from string contains (~) to date range (>=, <)
- Store dates in full ISO format in garmin-sync for consistent comparison
- PocketBase date fields need proper date operators, not string contains

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:37:53 +00:00
f923e1ce48 Add debug logging for dailyLog query
All checks were successful
Deploy / deploy (push) Successful in 2m39s
2026-01-15 14:28:47 +00:00
599a66bbb5 Sort dailyLogs by created DESC to get most recent record
All checks were successful
Deploy / deploy (push) Successful in 1m38s
When multiple dailyLog records exist for the same date (from multiple
syncs), getFirstListItem was returning the oldest one with stale data.
Now sorts by -created to return the most recent record.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:25:16 +00:00
923b5fdb01 Fix body battery array parsing - use index 1 not 2
All checks were successful
Deploy / deploy (push) Successful in 2m39s
The Garmin API returns bodyBatteryValuesArray as [timestamp, level]
tuples (2 elements), not [timestamp, status, level, quality] (4 elements).
Was accessing index 2 which doesn't exist, now correctly using index 1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:19:27 +00:00
c080e7054d Add debug logging for body battery API response
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Need to inspect the raw response structure to debug why current
and yesterdayLow values are missing despite hasCurrentData=true.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:14:42 +00:00
83fd29b6c6 Fix intensity minutes URL to use path parameters
All checks were successful
Deploy / deploy (push) Successful in 1m38s
The Garmin API uses path parameters, not query parameters:
- Correct: /usersummary-service/stats/im/weekly/{start}/{end}
- Wrong: /usersummary-service/stats/im/weekly?start=...&end=...

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:09:46 +00:00
cf89675b92 Fix body battery and intensity minutes Garmin API endpoints
All checks were successful
Deploy / deploy (push) Successful in 2m27s
Body Battery:
- Change endpoint from /usersummary-service/stats/bodyBattery/dates/
  to /wellness-service/wellness/bodyBattery/reports/daily
- Parse new response format: array with bodyBatteryValuesArray time series
- Current value = last entry's level (index 2)
- YesterdayLow = min level from yesterday's data

Intensity Minutes:
- Change endpoint from /fitnessstats-service/activity
  to /usersummary-service/stats/im/weekly
- Add date parameter to function signature
- Parse new response format: array with moderateValue/vigorousValue

Endpoints verified against python-garminconnect source code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:58:04 +00:00
59d70ee414 Use connectapi.garmin.com directly instead of web proxy
All checks were successful
Deploy / deploy (push) Successful in 1m38s
The connect.garmin.com/modern/proxy URL returns HTML (website) instead
of JSON API responses. Garth library uses connectapi.garmin.com subdomain
directly, which is the actual API endpoint.

- Change base URL from connect.garmin.com/modern/proxy to connectapi.garmin.com
- Update User-Agent to match garth library: GCM-iOS-5.19.1.2
- Factor out headers into getGarminHeaders() to avoid duplication
- Remove NK header (not needed when using connectapi subdomain)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:38:55 +00:00
51f4c8eb80 Add User-Agent header to Garmin API requests
All checks were successful
Deploy / deploy (push) Successful in 2m29s
Garmin now requires a mobile app User-Agent header (GCM-iOS-5.7.2.1)
for API access. Without it, they serve the website HTML instead of
JSON API responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:29:10 +00:00
98293f5ab5 Log raw response when Garmin returns non-JSON
All checks were successful
Deploy / deploy (push) Successful in 1m40s
Garmin is returning HTML error pages instead of JSON data. This
change reads the response as text first, checks if it starts with
{ or [, and logs the first 1000 chars of the response body if not.

This will help diagnose what page Garmin is returning (login, captcha,
rate limit, etc).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:20:28 +00:00
85b535f04a Add build info metric and diagnostic logging for Garmin sync
All checks were successful
Deploy / deploy (push) Successful in 1m44s
- Add phaseflow_build_info metric with version and commit labels
- Inject GIT_COMMIT env var at build time via next.config.ts
- Add logging to all Garmin fetch functions (HRV, body battery, intensity)
- Log API response status codes, actual data values, and errors

This enables verifying which build is deployed and diagnosing
silent failures where Garmin API returns errors but sync reports success.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:09:29 +00:00
7ed827f82c Fix body battery showing zeros on dashboard after Garmin sync
All checks were successful
Deploy / deploy (push) Successful in 2m29s
PocketBase coerces null number fields to 0 when reading. When Garmin
API returned no data (null), we stored null, which became 0 on
retrieval. The nullish coalescing (?? 100) in the API route didn't
catch this because 0 is not nullish.

Now store default value 100 when Garmin returns null, matching the
existing pattern used for decision engine calculations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 12:47:12 +00:00
3a06bff4d4 Fix Garmin sync to handle PocketBase date strings
All checks were successful
Deploy / deploy (push) Successful in 2m38s
PocketBase returns date fields as ISO strings, not Date objects.
The sync was failing with "e.getTime is not a function" because
the code expected Date objects.

- Export mapRecordToUser from pocketbase.ts
- Use mapRecordToUser in cron route to properly parse dates
- Add test for handling date fields as ISO strings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 07:38:37 +00:00
4ba9f44cef Add PocketBase admin auth to garmin-sync cron job
All checks were successful
Deploy / deploy (push) Successful in 2m28s
The cron job needs to list all users, but the users collection
doesn't have a public listRule (for security). Added admin
authentication so the job can access user records.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 07:13:18 +00:00
0579ca2534 Add API rules setup to database initialization
All checks were successful
Deploy / deploy (push) Successful in 2m29s
The period_logs collection was returning 403 errors because API rules
were only configured in the e2e test harness, not in the production
setup script. This consolidates the setup logic so both prod and test
use the same setupApiRules() function.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 06:49:42 +00:00
4a874476c3 Enable 5 previously skipped e2e tests
All checks were successful
Deploy / deploy (push) Successful in 1m37s
- Fix OIDC tests with route interception for auth-methods API
- Add data-testid to DecisionCard for reliable test selection
- Fix /api/today to fetch fresh user data instead of stale cookie data
- Fix period logging test timing with proper API wait patterns
- Fix decision engine test with waitForResponse instead of timeout
- Simplify mobile viewport test locator

All 206 e2e tests now pass with 0 skipped.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 06:30:51 +00:00
ff3d8fad2c Add Playwright fixtures with 5 test user types for e2e tests
Creates test infrastructure to enable previously skipped e2e tests:
- Onboarding user (no period data) for setup flow tests
- Established user (period 14 days ago) for normal usage tests
- Calendar user (with calendarToken) for ICS feed tests
- Garmin user (valid tokens) for connected state tests
- Garmin expired user (expired tokens) for expiry warning tests

Also fixes ICS feed route to strip .ics suffix from Next.js dynamic
route param, adds calendarToken to /api/user response, and sets
viewRule on users collection for unauthenticated ICS access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:54:49 +00:00
b221acee40 Implement automatic Garmin token refresh and fix expiry tracking
- Add OAuth1 to OAuth2 token exchange using Garmin's exchange endpoint
- Track refresh token expiry (~30 days) instead of access token expiry (~21 hours)
- Auto-refresh access tokens in cron sync before they expire
- Update Python script to output refresh_token_expires_at
- Add garminRefreshTokenExpiresAt field to User type and database schema
- Fix token input UX: show when warning active, not just when disconnected
- Add Cache-Control headers to /api/user and /api/garmin/status to prevent stale data
- Add oauth-1.0a package for OAuth1 signature generation

The system now automatically refreshes OAuth2 tokens using the stored OAuth1 token,
so users only need to re-run the Python auth script every ~30 days (when refresh
token expires) instead of every ~21 hours (when access token expires).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:33:10 +00:00
6df145d916 Fix Garmin token storage and flaky e2e test
1. Increase garminOauth1Token and garminOauth2Token max length from
   5000 to 20000 characters to accommodate encrypted OAuth tokens.
   Add logic to update existing field constraints in addUserFields().

2. Fix flaky pocketbase-harness e2e test by adding retry logic with
   exponential backoff to createAdminUser() and createTestUser().
   Handles SQLite database lock during PocketBase startup migrations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:52:01 +00:00
00b84d0b22 Fix E2E test reliability issues and stale data bugs
- Fix race conditions: Set workers: 1 since all tests share test user state
- Fix stale data: GET /api/user and /api/cycle/current now fetch fresh data
  from database instead of returning stale PocketBase auth store cache
- Fix timing: Replace waitForTimeout with retry-based Playwright assertions
- Fix mobile test: Use exact heading match to avoid strict mode violation
- Add test user setup: Include notificationTime and update rule for users

All 1014 unit tests and 190 E2E tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:23:32 +00:00
7dd08ab5ce Remove redundant notifications.spec.ts from enhancement list
All checks were successful
Deploy / deploy (push) Successful in 1m47s
The suggested notifications.spec.ts E2E tests for notification preferences
are already thoroughly covered by existing settings.spec.ts tests which
validate notification time and timezone input, validation, and persistence.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:08:35 +00:00
9709cf27ab Add 2 E2E tests for dark mode system preference detection
All checks were successful
Deploy / deploy (push) Successful in 2m36s
Verifies that the app correctly applies light/dark mode styling based on
the user's system preference (prefers-color-scheme). Tests cover both
light and dark modes using Playwright's emulateMedia API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:03:11 +00:00
04a532bb01 Add 4 Garmin E2E tests for network error recovery
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Add tests to verify error handling when network requests fail:
- Error toast when token save fails (500 response)
- Error toast when disconnect fails (500 response)
- Error state display when status fetch fails
- Retry succeeds after network failure

These tests improve resilience coverage for the Garmin connection flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:54:58 +00:00
b6f139883f Add 8 new E2E tests for accessibility and error recovery
All checks were successful
Deploy / deploy (push) Successful in 1m40s
- calendar.spec.ts: +4 accessibility tests (ARIA role, aria-labels, keyboard navigation, accessible nav buttons)
- settings.spec.ts: +1 error recovery test (retry after failed save)
- mobile.spec.ts: +3 calendar mobile tests (rendering, touch targets, navigation)

Total E2E tests: 190 → 198

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:48:58 +00:00
f3d7f8bd35 Add 4 new E2E tests for mobile viewport behavior
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Tests mobile responsiveness including:
- Login page renders correctly on mobile viewport
- Dashboard displays correctly on mobile viewport
- Dashboard uses single-column layout on mobile (< 768px)
- Navigation elements are interactive on mobile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:42:29 +00:00
e2a600700d Add 6 new E2E tests for OIDC flow and session persistence
All checks were successful
Deploy / deploy (push) Successful in 1m39s
New auth.spec.ts tests:
- OIDC button shows provider name when configured
- OIDC button shows loading state during authentication
- OIDC button is disabled when rate limited
- Session persists after page refresh
- Session persists when navigating between pages
- Logout clears session and redirects to login

E2E test count: 180 → 186 (auth.spec.ts: 14 → 20)
Total tests: 1194 → 1200

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:36:15 +00:00
c4d56f23e2 Add 5 new E2E tests for settings persistence
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Tests added:
- notification time changes persist after page reload
- timezone changes persist after page reload
- multiple settings changes persist after page reload
- cycle length persistence verifies exact saved value
- settings form shows correct values after save without reload

Updated IMPLEMENTATION_PLAN.md with accurate E2E test counts (now 180 E2E tests).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:31:39 +00:00
79414b813a Add 5 new E2E tests for period logging modal and edit/delete flows
All checks were successful
Deploy / deploy (push) Successful in 2m38s
New tests cover:
- Period date modal opens from dashboard onboarding banner
- Period date input restricts future dates via max attribute
- Logging period from modal updates dashboard cycle info
- Edit period modal flow changes date successfully
- Delete period confirmation flow removes entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:26:03 +00:00
5bfe51d630 Add 5 new Garmin E2E tests for expiry warnings and lifecycle
All checks were successful
Deploy / deploy (push) Successful in 1m39s
New tests:
- Yellow warning banner when token expires in 10 days (warning level)
- Red critical banner when token expires in 5 days (critical level)
- Expired token state shows token input for re-entry
- Connection persists after page reload
- Can reconnect after disconnecting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:20:42 +00:00
b3c711b9af Condense IMPLEMENTATION_PLAN.md after feature completion
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Reduced the implementation plan from 1514 lines to 156 lines (90% reduction)
by consolidating completed items into compact summary tables. The project is
feature complete with 1014 unit tests and 165 E2E tests passing.

Key changes:
- Removed detailed task descriptions for completed P0-P5 items
- Consolidated library, API, page, component, and E2E test summaries
- Preserved critical business rules and architecture notes
- Kept E2E enhancement opportunities for future reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:14:35 +00:00
f6b05a0765 Add 14 new E2E tests for ICS content validation and settings form
All checks were successful
Deploy / deploy (push) Successful in 2m27s
Calendar ICS content validation tests (7):
- VCALENDAR structure validation
- VEVENT entries verification
- Phase events with emojis (🩸🌱🌸🌙🌑)
- CATEGORIES for calendar color coding
- 90-day span coverage
- Warning events inclusion
- Content-type header validation

Settings form validation tests (7):
- Notification time HH:MM format acceptance
- Cycle length minimum (21) boundary validation
- Cycle length maximum (45) boundary validation
- Timezone field editability
- Current cycle length value display
- Settings persistence after page reload
- Save button loading state

Total E2E test count: 165 tests across 12 files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:09:37 +00:00
78c658822e Add 16 new dashboard E2E tests for comprehensive UI coverage
All checks were successful
Deploy / deploy (push) Successful in 1m57s
- Decision Card tests: GENTLE/LIGHT/REDUCED status display, icon rendering
- Override behavior tests: stress forces REST, PMS forces GENTLE, persistence after refresh
- Mini Calendar tests: current month display, today highlight, phase colors, navigation
- Onboarding Banner tests: setup prompts, Garmin link, period date prompt
- Loading state tests: skeleton loaders, performance validation

Total dashboard E2E coverage now 42 tests. Overall E2E count: 129 tests across 12 files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:00:41 +00:00
2558930507 Add 13 new E2E tests for period logging flow and calendar display
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Period logging tests (5 new):
- Future date validation
- Cycle length display between periods
- Prediction accuracy display
- Delete period log from history
- Edit period log from history

Calendar tests (8 new):
- Today highlight in calendar view
- Phase colors in calendar days
- Phase legend display
- Today button for quick navigation
- Multi-month navigation with return to today
- Calendar URL generation
- URL format validation
- Copy to clipboard functionality

Total E2E tests: 113 (was 100)
Total unit tests: 1014 (51 test files)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:51:23 +00:00
f4a3f7d9fd Add 14 new dashboard E2E tests for data panel, nutrition, and accessibility
All checks were successful
Deploy / deploy (push) Successful in 2m39s
- Added 8 data panel tests: HRV status, Body Battery, cycle day format,
  current phase, intensity minutes, phase limit, remaining minutes
- Added 4 nutrition panel tests: seed cycling, carb range, keto guidance,
  nutrition section header
- Added 4 accessibility tests: main landmark, skip navigation link,
  keyboard accessible overrides, focus indicators

Total dashboard E2E coverage: 24 tests (up from 10)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:43:56 +00:00
54b57d5160 Add 36 new E2E tests across 5 test files
All checks were successful
Deploy / deploy (push) Successful in 1m41s
New E2E test files:
- e2e/health.spec.ts: 3 tests for health/observability endpoints
- e2e/history.spec.ts: 7 tests for history page
- e2e/plan.spec.ts: 7 tests for exercise plan page
- e2e/decision-engine.spec.ts: 8 tests for decision display and overrides
- e2e/cycle.spec.ts: 11 tests for cycle tracking, settings, and period logging

Total E2E tests: 100 (up from 64)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:37:34 +00:00
2ade07e12a More E2E tests. 2026-01-13 17:29:41 +00:00
27f084f950 Fix Garmin token connection not persisting after save
All checks were successful
Deploy / deploy (push) Successful in 1m38s
Root cause: The setup-db script was missing user field definitions
(garminConnected, tokens, etc.). Production PocketBase had no such
fields, so updates silently failed to persist.

Changes:
- Add user custom fields to setup-db.ts (matches e2e harness)
- Fix status route to use strict boolean check (=== true)
- Add verification in tokens route with helpful error message
- Add ENCRYPTION_KEY to playwright config for e2e tests
- Add comprehensive e2e tests for Garmin connection flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 13:20:50 +00:00
3b9e023736 Remove CI workflow. 2026-01-13 09:41:39 +00:00