Commit Graph

241 Commits

Author SHA1 Message Date
saravanakumardb1
1ea3965492 fix(ios): remove duplicate theme enums + add ExportOptions.plist for TestFlight
- Remove duplicate CMColors, CMSpacing, CMRadius, Color.init(hex:) from generated theme file
- Keep canonical versions in ChronoMindTheme.swift
- Add ExportOptions.plist for app-store-connect export
2026-04-04 23:20:54 -07:00
fdd3743f28 feat(phase2): import chronomind routines from plans 2026-04-03 19:30:11 -07:00
saravanakumardb1
9897d2cd09 docs(todos): standardize all TODOs with running numbers and delegatable instructions
Replace ad-hoc AGENTIC-N comments with standardized TODO-NNN format across
the entire codebase. Each TODO has:
  - Running number (TODO-001 through TODO-011)
  - Priority level (high/medium/low)
  - Phase reference (0, A.1, A.4, B, cleanup)
  - Clear step-by-step instructions an AI agent can follow

TODO index:
  TODO-001: Kill switch maintenance banner (providers.tsx)
  TODO-002: Feedback button in settings page
  TODO-003: Accessibility focus trap for modals
  TODO-004: Clone routine template instead of mutating in-place
  TODO-005: Wire real LLM enrichment for context messages
  TODO-006: Centralize backend URL configuration
  TODO-007: MCP tool integration tests (common-plat)
  TODO-008: Wire trackEvent() calls into routes + components
  TODO-009: Unit tests for AI context generation
  TODO-010: Import PRODUCT_ID from product-config (5 route files)
  TODO-011: Wire error boundary to telemetry

Added consolidated TODO Index table at top of AGENTIC_AI_ROADMAP.md
for agent scanning. 219 backend tests pass, no code changes.
2026-04-01 01:05:25 -07:00
saravanakumardb1
f94c2d8424 fix(web): add NEXT_PUBLIC_CHRONOMIND_BACKEND_URL to .env.example
The fetchEnrichedMessage() function in context-messages.ts references this
env var but it was missing from .env.example, making it invisible to new
developers setting up the project.
2026-04-01 00:00:11 -07:00
saravanakumardb1
ea5adcc6ca fix(backend): harden Phase A endpoints — Zod validation, feature flag gate, state filtering
3 bugs fixed in recent Phase A code:

1. POST /api/context-message: Add Zod schema validation, feature flag gate
   (ai_context_messages.enabled), and safe body parsing. Previously had no
   validation and unsafe 'as' cast that could null-ptr on missing body.

2. GET /api/timers/availability: Filter out dismissed/completed/fired timers.
   Previously included inactive timers in occupied intervals, causing the
   endpoint to report less free time than actually available.

3. agent-actions/routes.ts: Import PRODUCT_ID from product-config.ts instead
   of hardcoding 'chronomind' string. Ensures consistency if product identity
   changes.

Also: Add EXTRACTION_SERVICE_URL + PLATFORM_SERVICE_URL to .env.example.

All 219 backend tests pass. No breaking changes.
2026-03-31 23:56:35 -07:00
saravanakumardb1
c0e576e15c docs(roadmap): update Phase A checkboxes with commit links
Mark Phase A.3 (MCP tools) and A.4 (AI context messages) as complete.
Update exit criteria with test counts and commit references.
2026-03-31 23:47:10 -07:00
saravanakumardb1
c80c1e4462 feat(ai-context): Phase A.4 — context-aware AI messages with LLM fallback
Add AI-enriched context message generation:

- backend/src/lib/ai-context.ts: LLM-powered context generator with keyword fallback
  - Calls extraction-service timer-context task when EXTRACTION_SERVICE_URL is set
  - Falls back to keyword rules, then generic message
  - Gated behind isFeatureEnabled('ai_context_messages.enabled')
- backend/src/lib/config.ts: Add EXTRACTION_SERVICE_URL env var
- backend/src/server.ts: POST /api/context-message route
- web/src/lib/context-messages.ts: fetchEnrichedMessage() with graceful degradation
- Updated AGENTIC_AI_ROADMAP.md checkboxes for Phase A.1 + A.2

All 219 backend tests + 394 web tests pass. No breaking changes.
2026-03-31 23:46:00 -07:00
saravanakumardb1
29a48025eb feat(agent-actions): Phase A.2 — agent action audit trail module + tests
Add agent-actions module for AI/MCP operation audit trail:

- types.ts: 3 enums (ACTOR_TYPES, ACTION_STATES, ACTION_TYPES), AgentActionDoc,
  CreateAgentActionSchema, AgentActionQuerySchema, BatchApproveSchema
- repository.ts: CRUD + batchApproveByActor using @bytelyst/datastore
- routes.ts: 5 endpoints (list, create, approve, reject, batch-approve)
  All gated behind isFeatureEnabled('agent_inbox.enabled')
- Registered cm_agent_actions container in cosmos-init.ts
- Registered agentActionRoutes in server.ts

Tests (37 new, 219 total):
- 22 agent-actions schema tests (constants, create, query, batch-approve)
- 15 timer schema tests (RescheduleTimerSchema, AvailabilityQuerySchema)

All 219 backend tests pass. No breaking changes.
2026-03-31 23:38:03 -07:00
saravanakumardb1
686f5fb33e feat(mcp): Phase A.1 — reschedule, availability, and start-routine endpoints
Add 3 new backend REST endpoints for MCP tool support:

- POST /timers/:id/reschedule — shift timer by delta seconds or set new target time
- GET /timers/availability — find free time slots in a window (interval merge algorithm)
- POST /routines/:id/start — transition routine from ready/template → active

All endpoints gated behind isFeatureEnabled('mcp.enabled') flag (default false).
Zod schemas: RescheduleTimerSchema (XOR validation), AvailabilityQuerySchema, FreeSlot type.

All 182 backend tests pass. No breaking changes to existing APIs.
2026-03-31 23:31:04 -07:00
saravanakumardb1
f3e14e28dd feat(ecosystem): Phase 0 — kill-switch, feedback, accessibility, feature flags, telemetry events
Phase 0 of the Agentic AI Roadmap: ecosystem gap fixes.

- Add @bytelyst/kill-switch-client integration (web/src/lib/kill-switch.ts)
- Wire kill switch check into providers.tsx on app init
- Add @bytelyst/feedback-client integration (web/src/lib/feedback.ts)
- Add @bytelyst/accessibility to web dependencies
- Add 7 agentic feature flags to backend (all default false)
- Define 16 telemetry event constants (backend + web)
- Add AGENTIC_AI_ROADMAP.md with full Phase 0-E plan + audit findings

All 182 backend tests pass. All 394 web tests pass.
No breaking changes to existing functionality.
2026-03-31 23:26:37 -07:00
saravanakumardb1
8ca4244855 ci: fix YAML formatting — normalize blank lines 2026-03-29 11:04:08 -07:00
saravanakumardb1
33b4faa283 ci: update CI/CD configuration 2026-03-29 10:50:55 -07:00
saravanakumardb1
9b574b1a2c chore: add .nvmrc pinning Node 22 2026-03-29 10:48:16 -07:00
saravanakumardb1
ac6edec73f fix(tokens): replace hardcoded personal category hex with CSS token var 2026-03-29 10:29:14 -07:00
saravanakumardb1
d192061df3 fix(web): exclude e2e/ from tsconfig to prevent false typecheck errors 2026-03-29 02:19:06 -07:00
saravanakumardb1
8b18a8e74b fix(deps): switch @bytelyst/ui and design-tokens to file: refs for local resolution 2026-03-29 02:12:45 -07:00
saravanakumardb1
a611180537 docs(agents): add @bytelyst/ui and @bytelyst/design-tokens to AGENTS.md 2026-03-29 01:44:01 -07:00
saravanakumardb1
f5dc7332cb fix(tokens): import @bytelyst/design-tokens/css/chronomind — remove hand-written token block 2026-03-29 01:23:57 -07:00
saravanakumardb1
c9448d35e4 fix(e2e): fix escaped backticks in visual-regression template literals 2026-03-29 01:01:14 -07:00
saravanakumardb1
e60efddaab fix(web): remove dead responsive sidebar CSS — ChronoMind uses header layout, no sidebar 2026-03-29 00:06:48 -07:00
saravanakumardb1
72651ceff1 feat(web): add responsive sidebar CSS breakpoints for mobile 2026-03-28 23:30:01 -07:00
saravanakumardb1
947c93d10b feat(web): wire @bytelyst/ui ToastProvider into app providers 2026-03-28 23:25:41 -07:00
saravanakumardb1
075e1850e5 fix(web): add interactive hover/active states for buttons and links 2026-03-28 23:20:44 -07:00
saravanakumardb1
ffe2d28921 test(visual): add Playwright visual regression screenshot tests 2026-03-28 00:55:40 -07:00
saravanakumardb1
1191d9e00d chore(design-system): add responsive sidebar CSS breakpoints (768px collapse) 2026-03-28 00:51:28 -07:00
saravanakumardb1
c2db021568 fix(web): add skip-to-content link for WCAG keyboard accessibility 2026-03-28 00:47:03 -07:00
saravanakumardb1
2d0a47be92 fix(web): add prefers-reduced-motion media query for accessibility 2026-03-28 00:38:48 -07:00
saravanakumardb1
0036e6af10 chore(design-system): add @bytelyst/ui shared component library dependency 2026-03-28 00:36:08 -07:00
saravanakumardb1
3dce28df00 ci: add Playwright E2E job to Gitea CI 2026-03-28 00:35:02 -07:00
saravanakumardb1
bc7430a436 chore(design-system): deploy canonical generated Swift theme tokens from @bytelyst/design-tokens 2026-03-28 00:26:05 -07:00
saravanakumardb1
487464bcaf fix(web): add sr-only utility + prefers-color-scheme light mode to globals.css 2026-03-28 00:25:20 -07:00
saravanakumardb1
662e66fc4b fix(scripts): exclude .env.example from secret scan 2026-03-27 23:08:56 -07:00
saravanakumardb1
c710c8172b chore: add Husky pre-commit hooks + secret-scan scripts 2026-03-27 23:03:33 -07:00
saravanakumardb1
d6cddb9641 chore(backend): add FIELD_ENCRYPT env vars to .env.example 2026-03-27 23:01:26 -07:00
saravanakumardb1
30da27a175 ci: add backend lint step to Gitea CI 2026-03-27 22:58:49 -07:00
saravanakumardb1
7ac57d0ec7 feat(a11y): add axe-core accessibility E2E spec with focus-visible test 2026-03-27 16:42:03 -07:00
saravanakumardb1
98be554adf feat(design-system): add design review PR template with screenshot requirement 2026-03-27 16:37:28 -07:00
saravanakumardb1
3cf08d6cad feat(design-system): add loading.tsx route transition page 2026-03-27 16:34:27 -07:00
saravanakumardb1
d22e73fa0f fix(widgets): add .privacySensitive() to timer label and countdown views 2026-03-27 13:57:15 -07:00
saravanakumardb1
e9e96ba18a fix(e2e): upgrade shallow specs with page.route() API mocking and error state tests 2026-03-27 13:32:05 -07:00
saravanakumardb1
5453cb131a chore(web): add Dockerfile, service worker, and e2e test scaffolds 2026-03-27 11:28:33 -07:00
saravanakumardb1
d179c4c624 feat(watch,mac): complete watchOS + macOS companion targets
- watchOS: add WatchSessionManager (WCSession bridge), WatchNotificationHandler
  (snooze/dismiss actions), recommendations() for AppIntentTimelineProvider
- watchOS: WatchTimerStore tick loop with cascade haptics, App Group sync
- macOS: CreateTimerSheet (countdown/alarm/pomodoro), launch-at-login toggle
- macOS: MenuBarState showCreateSheet, MacSettingsView data tab
- Xcode project updated with new file references
2026-03-27 11:28:13 -07:00
saravanakumardb1
a865b9d655 chore: add standalone docker-compose.yml for local dev 2026-03-26 23:12:22 -07:00
saravanakumardb1
38dbed80ef chore(backend): add eslint config and lint script 2026-03-26 22:59:50 -07:00
saravanakumardb1
2ca292c983 chore: .npmrc use ${GITEA_NPM_HOST}:3300 instead of hardcoded localhost
Enables NETWORK-aware Gitea registry resolution:
- NETWORK=corp → localhost (local Gitea)
- NETWORK=home → Azure VM host (from ~/.gitea_vm_host)

switch-network.sh in common-plat sets GITEA_NPM_HOST accordingly.
Matches existing .npmrc.docker pattern used during Docker builds.
2026-03-24 15:46:33 -07:00
saravanakumardb1
c6e83f991d fix(docker): correct web Dockerfile EXPOSE/PORT to 3030 matching docker-compose 2026-03-24 11:45:29 -07:00
saravanakumardb1
5c67bed5a6 fix(docker): remove hardcoded corporate proxy and jfrog registry from Dockerfiles 2026-03-24 11:12:38 -07:00
saravanakumardb1
c1ffb3c222 chore: remove docker-prep.sh — replaced by Gitea registry-backed Dockerfiles 2026-03-24 06:21:04 -07:00
saravanakumardb1
3b32b78c35 fix(ci): remove stale common-plat build step — packages from Gitea registry now 2026-03-24 05:54:50 -07:00
saravanakumardb1
bfbca2b820 feat(docker): migrate to Gitea registry-backed Docker pattern
- Convert all @bytelyst/* file: refs to semver ^0.1.0
- Remove sibling common-plat workspace references
- Add .npmrc and .npmrc.docker for local Gitea registry
- Rewrite Dockerfiles: pnpm + BuildKit secret mount
- Verified: pnpm install + backend typecheck pass
2026-03-23 20:57:37 -07:00