Commit Graph

22 Commits

Author SHA1 Message Date
saravanakumardb1
a83e60a60a fix(workspace): pin React and React-DOM to a single version via pnpm overrides
While migrating CreateNoteModal to use @bytelyst/ui Input/Select/Textarea
(which internally call React.useId), Vitest tests failed with:

  TypeError: Cannot read properties of null (reading 'useId')

Root cause: the web package pins react@19.2.0 but @bytelyst/ui declared
react: '^19.0.0' as a peer, so pnpm resolved 19.2.6 for it from the
common-platform side. Two React copies coexisted (19.2.0 and 19.2.6),
the @bytelyst/ui components linked against one and react-dom test-rendered
against the other, and useId failed because the dispatcher belonged to
a different React instance than the consumer.

Fix: declare pnpm.overrides in the workspace root so the entire monorepo
resolves to a single react@19.2.0 / react-dom@19.2.0 pair. Verified via
'pnpm why react' (all transitive references now point at 19.2.0) and the
on-disk symlinks (web/node_modules/@bytelyst/ui/node_modules/react and
common-plat/packages/ui/node_modules/react both link to
.pnpm/react@19.2.0).
2026-05-23 00:05:31 -07:00
saravanakumardb1
b2d824c8c6 fix(workspace): canonicalize common-plat path to ../learning_ai_common_plat
Restores green build after the May 12 Docker/UI regression.

Root cause: pnpm-workspace.yaml referenced a sibling path
(../learning_ai/learning_ai_common_plat/...) that did not exist on
dev/CI hosts. .pnpmfile.cjs fell back to ../learning_ai_common_plat for
some packages but missed others, so @bytelyst/ui was pulled from a
stale Gitea 0.1.0 tarball with zero exports (breaking web typecheck +
26 tests) and @bytelyst/monitoring was never linked into node_modules
(breaking backend typecheck + 2 test suites).

Changes:
- pnpm-workspace.yaml now references ../learning_ai_common_plat/packages/* directly
- .pnpmfile.cjs swaps DEFAULT/LEGACY common-plat roots so the canonical
  path is the default and the older nested path is the fallback
- scripts/docker-prep.sh, scripts/local-smoke.sh, scripts/release-guard-audit.sh
  follow the same canonical-first / legacy-fallback pattern
- .github/workflows/ci.yml symlinks directly to ../learning_ai_common_plat
- pnpm-lock.yaml regenerated with @bytelyst/ui@0.1.9 and
  @bytelyst/monitoring@0.1.5 linked to the local common-plat checkout

Verified:
- pnpm run verify: backend 373/373, web 96/96, mobile 97/97
- pnpm run audit:release-guards: passes
- backend, web, mobile lint all exit 0 (advisory warnings retained)
2026-05-22 15:08:30 -07:00
0f5ddb400b feat(ui): map platform tokens globally 2026-05-06 11:34:23 -07:00
1da310f2ec chore(deps): default to local bytelyst packages 2026-05-06 11:01:14 -07:00
9bded74567 fix(lint): clear production lint blockers 2026-05-05 14:04:49 -07:00
874dda2f73 feat(backend): add dependency readiness diagnostics 2026-05-05 11:12:23 -07:00
282bb8d6fa fix(deps): link common platform workspace 2026-05-05 01:10:43 -07:00
saravanakumardb1
7c4a09f9e9 chore: add common-plat workspace link and switch to localhost Gitea
- pnpm-workspace.yaml: include ../learning_ai_common_plat/packages/*
  so @bytelyst/* resolve locally without Gitea registry access.
- .npmrc: point registry to localhost:3300 for corp network,
  enable link-workspace-packages and prefer-workspace-packages.
2026-04-13 10:29:23 -07:00
saravanakumardb1
3a229c5b42 fix(backend): convert @bytelyst/llm and @bytelyst/palace from file: refs to Gitea registry
Both packages are published to Gitea (llm@0.1.5, palace@0.1.4).
File refs broke Docker builds and caused 8 test files to fail due to
stale dist/providers/fallback.js.

Also removes unused @bytelyst/events dependency (not on Gitea registry).
2026-04-13 09:58:59 -07:00
saravanakumardb1
38006af1a3 feat(palace): add @bytelyst/palace dep, palace types, 6 cosmos containers, config vars 2026-04-10 01:14:00 -07:00
saravanakumardb1
3260b7ea0a feat(smart-actions): F1-F4 inline editor AI, F15-F19 mobile capture modes, F25-F27 scheduler/webhooks/approval
F1-F4: Inline editor AI
- Backend: expand CopilotAction with fix-rewrite, change-tone, continue, explain
- Backend: add tone parameter to copilot route for change-tone action
- Web: copilot-client adds CopilotTone type and tone parameter
- Web: NoteEditor toolbar gains AI row with Fix & Rewrite, Change Tone dropdown,
  Continue Writing (appends at cursor), Explain (inline popover)

F15-F19: Mobile capture enhancements
- Backend: POST /note-prompts/url-extract endpoint (fetch, strip HTML, LLM summarize)
- Mobile API: extractFromUrl() and copilotTransform() client functions
- Mobile: capture tab rewritten with 6 capture modes grid (text, photo, voice,
  URL, scan, paste) — URL extract + clipboard paste fully wired, camera/voice/scan
  surface native permission prompts (require expo-av/expo-image-picker)
- expo-clipboard added as dependency

F25-F27: Scheduled actions, webhook triggers, approval-gated actions
- New scheduler.ts module with PromptScheduleDoc + PromptWebhookDoc types
- Schedule CRUD: GET/POST/PATCH/DELETE /prompt-schedules
- Webhook CRUD: GET/POST/PATCH/DELETE /prompt-webhooks
- POST /prompt-webhooks/:id/trigger — execute template against note
- Scheduler loop (60s tick) with cron next-run calculation
- Diagnostics endpoint: GET /prompt-schedules/diagnostics
- Cosmos containers: note_prompt_schedules, note_prompt_webhooks
- PromptTemplateDoc gains requiresApproval field (F27)
- Runner produces approvalState: proposed|applied based on template flag
- Create/Update schemas accept requiresApproval boolean
2026-04-06 10:25:34 -07:00
saravanakumardb1
f015ae6f20 chore: resolve pnpm-lock.yaml conflict after rebase 2026-04-06 08:03:46 -07:00
saravanakumardb1
9e3a7206b9 feat(backend): add note-prompts module with Smart Actions LLM integration
- Add @bytelyst/llm dependency (file: ref) + llm.ts singleton wrapper
- Add LLM env vars to config (LLM_PROVIDER, LLM_DEFAULT_MODEL, LLM_VISION_MODEL, LLM_EMBEDDING_MODEL)
- Create note-prompts module: types, repository, runner, routes, seed (20 built-in templates)
- Built-in templates: 8 transform, 3 extract, 3 generate, 2 analyze, 2 vision, 2 export
- Prompt runner supports text, image, and text+image inputs via @bytelyst/llm vision
- Upgrade copilot-transform.ts to use @bytelyst/llm directly (with local heuristic fallback)
- Add reading-time endpoint (GET /api/notes/:id/reading-time)
- Extend agent-action types with smart_action and auto_enrich
- Add note_prompts Cosmos container to cosmos-init
- Register notePromptRoutes in server.ts
- 15 new tests (CRUD, run, slug resolution, seed validation, reading-time)
2026-04-06 08:01:42 -07:00
saravanakumardb1
623d02c32f test(notes): verify phase1 transcript→note import against @bytelyst/events schemas
- Add @bytelyst/events dependency for contract validation
- Expand ecosystem-phase1 tests from 1 to 13 focused tests:
  - transcript artifact import from disk
  - transcript capture event load + missing file graceful
  - note creation with productId, sourceType, links, tags
  - note artifact doc for internal persistence
  - artifact.created event with upstream causation propagation
  - artifact.linked event chained from artifact.created
  - provenance lineage preservation (lysnrai→notelett)
  - NoteArtifactEnvelopeSchema conformance (no contract drift)
  - ArtifactCreatedEventSchema conformance
  - ArtifactLinkedEventSchema conformance
  - disk persistence + index file verification
  - graceful degradation without capture event
- Fix server.test.ts route count (7→8) for ecosystem-phase1 route
2026-04-03 19:13:55 -07:00
saravanakumardb1
5a0175fa66 feat(mobile): add Block H — Vitest RN mock aliases + component smoke tests
- Create __mocks__/ with react-native, expo-router, expo-constants, expo-status-bar, react-native-mmkv, @testing-library/react-native
- Update vitest.config.ts with resolve aliases for all native modules
- Add AuthScreen smoke test (3 tests)
- Add HomeScreen smoke test (2 tests)
- Add @types/react-test-renderer dev dependency
- Total: 32 passing tests (27 store + 5 component)
2026-03-31 00:42:49 -07:00
saravanakumardb1
e4683ad695 fix(mobile): complete block G metadata and accessibility 2026-03-31 00:23:57 -07:00
saravanakumardb1
746cba74ff feat(mobile): add settings tab with feedback client 2026-03-31 00:10:50 -07:00
saravanakumardb1
48896ab879 feat(mobile): integrate broadcast and survey clients 2026-03-31 00:03:20 -07:00
saravanakumardb1
c0a33473f4 chore: update dependencies 2026-03-29 10:50:57 -07:00
saravanakumardb1
891754f16a chore(backend): add eslint config and lint script 2026-03-26 23:03:09 -07:00
saravanakumardb1
33f9379f4a feat(docker): migrate NoteLett to Gitea registry-backed Docker pattern
- Convert all @bytelyst/* file: refs to semver ^0.1.0 (backend, web, mobile)
- Remove sibling common-plat workspace references from pnpm-workspace.yaml
- Add .npmrc and .npmrc.docker for local Gitea registry
- Rewrite backend/web Dockerfiles: pnpm + BuildKit secret mount + corp proxy
- Fix backend tsconfig.json: remove explicit lib to resolve fetch Response types
- Verified: host-side pnpm install, backend tests (86 pass), backend+web Docker builds
2026-03-23 20:11:12 -07:00
saravanakumardb1
90dd2d3bd5 feat(repo): migrate notelett workspace to pnpm 2026-03-22 15:50:54 -07:00