Commit Graph

158 Commits

Author SHA1 Message Date
saravanakumardb1
a7b0ae9cdc refactor(backend): migrate auth.ts + request-context.ts to @bytelyst/fastify-auth
- auth.ts: 80→18 lines, delegates to createAuthMiddleware()
- request-context.ts: delegates to createRequestContext()
- Re-exports JwtPayload, AuthPayload from shared package
2026-03-20 07:45:58 -07:00
saravanakumardb1
30872465d3 refactor(backend): load product identity from shared/product.json 2026-03-20 07:23:31 -07:00
saravanakumardb1
b4a6c62e15 refactor(backend): remove errors.ts re-export, import @bytelyst/errors directly 2026-03-20 07:19:29 -07:00
saravanakumardb1
c362fa61cf chore: update dependencies 2026-03-19 21:25:38 -07:00
saravanakumardb1
ead99e7729 feat: add product.json manifest (chronomind, port 4011) 2026-03-19 19:44:05 -07:00
saravanakumardb1
83e54c29be fix(web): append /api to baseUrl for shared clients
getBaseUrl() returns 'http://localhost:4003' without /api suffix.
Shared feature-flag-client and subscription-client expect the API
prefix in the URL. Without this fix, requests hit /flags/poll and
/subscriptions/me instead of /api/flags/poll and /api/subscriptions/me.
2026-03-19 17:08:44 -07:00
saravanakumardb1
6dd31490b2 fix(android): complete ChronoMind Android compile fixes — all tests pass
- Fix SyncRepository.timerToDTO: timer.pomodoro → timer.pomodoroConfig/pomodoroState
- Fix SyncRepository.dtoToEntity: add missing TimerEntity fields (dismissedAt, snoozedUntil,
  snoozeCount, elapsedBeforePause, category), fix non-nullable cascadePreset/cascadeIntervalsJson
- Fix PomodoroDTO field mapping: focusMinutes→workMinutes, shortBreakMinutes→breakMinutes, etc.
- ChronoMind Android now compiles and all tests pass
2026-03-19 17:07:57 -07:00
saravanakumardb1
9f2325078d fix(android): partial compile fixes for ChronoMind Android
- Fix AuthService: add MapSerializer/serializer imports, replace fully-qualified calls
- Fix CMColors: add missing textPrimary and textTertiary tokens
- Fix TimerWidget: add Glance clickable/ColorProvider imports, add night param
- Fix SyncRepository: replace pomodoroJson with individual pomodoro fields
- Note: SyncRepository still has CMTimer model drift errors (deferred)
2026-03-19 17:02:16 -07:00
saravanakumardb1
f49ef788a2 feat(web): migrate billing-client + feature-flags to shared packages
- billing-client.ts: hand-rolled fetch → @bytelyst/subscription-client
  wrapper with backwards-compatible Subscription type adapter
- feature-flags.ts: hand-rolled polling → @bytelyst/feature-flag-client
  (71→42 lines, same public API)
- providers.tsx: remove platform param (now configured at client level)
- ChronoMind-specific usage API stays as local fetch call
2026-03-19 16:52:47 -07:00
saravanakumardb1
b7bb6ec53f docs: add corporate network/Gradle proxy section to AGENTS.md 2026-03-19 15:22:41 -07:00
saravanakumardb1
c49829cd3e fix(android): add gradlew + wrapper JAR, fix dependencyResolutionManagement 2026-03-19 15:14:11 -07:00
saravanakumardb1
424e804396 fix(ios): resolve Swift compile errors for iOS 26 / Xcode 26
- Fix CloudKitSyncManager deinit concurrency violation
- Replace deprecated List(selection:) with VStack+ForEach sidebar
- Replace removed Animation.none with Animation.linear(duration: 0)
- Fix CountdownRing initializer parameter mismatch
- Unwrap optional timer.duration in ShareableTimerManager and DataExportManager
- Add missing .event case to exhaustive switch
- Change CascadeWarning.scheduledTime from let to var
- Fix CalendarSyncManager CMTimer init (add elapsedBeforePause, remove non-existent params)
- Add missing UserNotifications import in SleepManager
- Remove parameterized App Intents phrases (iOS 26 restriction)
- Temporarily remove watchOS target dependency for iOS build
2026-03-19 14:22:50 -07:00
saravanakumardb1
403d35e016 chore(web): update lockfile + regenerate service worker 2026-03-12 17:25:20 -07:00
saravanakumardb1
82e7a9c367 fix(auth): JWKS URL-tracking singleton + expanded test coverage 2026-03-12 11:22:03 -07:00
saravanakumardb1
3d2ce9325f feat(auth): RS256 JWKS verification — ChronoMind backend 2026-03-12 11:15:03 -07:00
saravanakumardb1
8cc21d8586 refactor(backend): use shared optional jwt context 2026-03-06 13:38:18 -08:00
saravanakumardb1
f9439f4519 chore(docs): regenerate AI agent config files 2026-03-05 14:37:31 -08:00
saravanakumardb1
909daf8853 fix(diagnostics): getAuthToken throws when no token (type-safe), void .start(), unsyncedCount replaces conflictCount 2026-03-05 11:18:27 -08:00
saravanakumardb1
4a3ac76ff7 feat(mcp): add GET /timers/sync-status endpoint (chronomind.syncStatus MCP tool) 2026-03-05 11:04:44 -08:00
saravanakumardb1
cb79c9b3ad feat(diagnostics): wire @bytelyst/diagnostics-client init in ChronoMind web 2026-03-05 10:57:58 -08:00
saravanakumardb1
2e2f3c25ca ci: update CI/CD configuration 2026-03-04 20:01:34 -08:00
saravanakumardb1
411cc17c3c refactor(workflows): remove duplicate repo-management workflows
- Removed duplicate workflows now centralized in common-plat:

  - repo_sync-repos, repo_push-repos, repo_backup-and-push

  - repo_backup-main-branch, repo_commit-workspace, repo_update-agent-docs

- Updated README.md to reference central workflows in learning_ai_common_plat

All repo-management workflows now maintained in common-plat/.windsurf/workflows/
2026-03-03 16:16:30 -08:00
saravanakumardb1
99889871ff ci: update CI/CD configuration 2026-03-03 12:08:26 -08:00
saravanakumardb1
35756f95c0 chore(backend): remove orphaned cosmos.ts — all repos now use datastore.ts 2026-03-02 01:49:24 -08:00
saravanakumardb1
4cb5d3e627 fix(backend): replace $contains with post-filter for webhook events array query
$contains generates CONTAINS() SQL in Cosmos (string match), not
ARRAY_CONTAINS() needed for string[] fields. Use findMany + in-memory
post-filter for correct behavior across both providers.
2026-03-02 01:49:18 -08:00
saravanakumardb1
8731cf38fd fix(backend): add NODE_ENV=test auto-selection and sync setProvider with global singleton 2026-03-02 01:49:11 -08:00
saravanakumardb1
03d4b7def9 refactor(backend): migrate ChronoMind repositories to @bytelyst/datastore 2026-03-02 01:45:16 -08:00
saravanakumardb1
d6b1bb6f63 fix(sync): fix BatchResult.errors type mismatch — backend returns {id,error} objects not strings 2026-03-01 21:27:44 -08:00
saravanakumardb1
48b88d3a29 fix(sync): add x-product-id header and fix pullDelta response decode mismatch 2026-03-01 21:26:12 -08:00
saravanakumardb1
8cd0ea7fa7 fix(backend): use config.JWT_SECRET instead of direct process.env read 2026-03-01 21:21:12 -08:00
saravanakumardb1
f10b83c122 feat(backend): scaffold product-specific Fastify backend (port 4011)
Add backend/ directory with Fastify 5 + TypeScript ESM service:
- Modules: timers, routines, households, shared-timers, webhooks (migrated from platform-service)
- Cosmos containers: timers, routines, households, shared_timers, webhook_subscriptions, webhook_events
- JWT verification via jose (matches platform-service issuer)
- Shared @bytelyst/* packages via file: refs
- 171 Vitest tests passing

Update AGENTS.md: update backend integration section with product backend details
2026-03-01 20:39:08 -08:00
saravanakumardb1
6b82ca1b33 feat(android): migrate auth, telemetry, feature flags to ByteLyst Kotlin Platform SDK 2026-03-01 18:16:13 -08:00
saravanakumardb1
b7688b55d1 fix(security): move PlatformSyncManager auth token from UserDefaults to Keychain 2026-03-01 16:37:39 -08:00
saravanakumardb1
e0c7f24954 fix(tests): stats.test.ts topCategory test broken on Sundays — wrong Monday calculation 2026-03-01 16:37:07 -08:00
saravanakumardb1
3adab843cd refactor(ios): migrate CrashReporter to ByteLystPlatformSDK's BLCrashReporter
Replaced standalone MetricKit crash reporter (153 lines) with thin wrapper (34 lines)
delegating to SDK's BLCrashReporter. Preserves existing call-site API.
2026-02-28 22:38:55 -08:00
saravanakumardb1
d1b4534b22 refactor(ios): migrate Cloud/ files to ByteLystPlatformSDK — eliminate duplicated platform code
Replaced standalone implementations with thin wrappers over shared SDK:
- KeychainHelper → delegates to BLKeychain (53→27 lines)
- TelemetryService → delegates to BLTelemetryClient (139→55 lines)
- FeatureFlagService → delegates to BLFeatureFlagClient (72→39 lines)
- AuthService → delegates to BLAuthClient (359→171 lines)
- project.yml → added ByteLystPlatformSDK local package dependency

Total: 623 lines of duplicated code → 292 lines of thin wrappers.
PlatformSyncManager kept as-is (product-specific timer DTOs).
All existing call-site APIs preserved — zero breaking changes.
2026-02-28 22:12:37 -08:00
saravanakumardb1
3596a8f350 feat(sync): wire platform sync into timer and routine stores, extend fullSync for routines, add error/not-found pages 2026-02-28 20:24:53 -08:00
saravanakumardb1
fe75bc30de test(web): add 21 tests for exportAll/importRoutines/parseImportData 2026-02-28 19:29:39 -08:00
saravanakumardb1
141fcc2a38 feat(web): wire routine export/import into history page UI 2026-02-28 19:28:37 -08:00
saravanakumardb1
77254b751e fix(telemetry): lowercase osFamily to match server enum 2026-02-28 19:26:52 -08:00
saravanakumardb1
75927d00e2 chore(ios): add TelemetryService + FeatureFlagService to Xcode project 2026-02-28 19:25:01 -08:00
saravanakumardb1
e5d18b1c9c feat(web): gate routines nav behind feature flag 2026-02-28 19:14:01 -08:00
saravanakumardb1
672acadba6 feat(android): add telemetry client, feature flags client, wire into DI + ViewModel 2026-02-28 19:12:15 -08:00
saravanakumardb1
180c98160b feat(ios): add telemetry client, feature flags client, Settings login/register form 2026-02-28 19:10:08 -08:00
saravanakumardb1
ef27f9dcc6 fix(web): beacon transport, remove dead sync wrappers, add routine export/import 2026-02-28 19:07:14 -08:00
saravanakumardb1
a5aec74e4d feat(web): add billing/subscription client stub for Pro tier
- billing-client.ts: getMySubscription, cancelSubscription, getUsageSummary
- Calls platform-service /subscriptions + /usage endpoints
2026-02-28 14:24:55 -08:00
saravanakumardb1
95f71f4625 feat(web): add feature flag client with platform-service polling 2026-02-28 14:18:06 -08:00
saravanakumardb1
09ded150f4 feat(web): add routine sync operations to platform-sync client
- SyncRoutineDTO + SyncRoutineStepDTO types
- pullRoutineDelta, pushRoutine, updateRemoteRoutine, deleteRemoteRoutine, batchUpsertRoutines
- routineToDTO / dtoToRoutinePatch conversion functions
- OfflineQueueItem now supports entityType (timer|routine)
2026-02-28 13:54:43 -08:00
saravanakumardb1
6e339c6cf0 feat(web): accept snooze suggestion to auto-adjust timer timing
- Accept button on snooze suggestions shifts matching active timers
- Applies suggestedDelayMinutes to targetTime of pattern-matched timers
- Dismiss still available alongside Accept
2026-02-28 13:53:06 -08:00
saravanakumardb1
ad4bc946a8 feat(web): wire TimerChain[] into Zustand store with auto-start
- chains[] persisted alongside timers in localStorage
- addChain/removeChain with linkedTimerId bookkeeping
- removeTimer auto-cleans chain references
- complete() auto-starts next timer in chain via getNextInChain
- 373/373 tests pass
2026-02-28 13:52:20 -08:00