saravanakumardb1
21ad6ed978
feat(backend): add @bytelyst/backend-flags + backend-telemetry, fix config defaults
...
- Add @bytelyst/backend-flags and @bytelyst/backend-telemetry packages
- Create feature-flags.ts and telemetry.ts wrappers using shared packages
- Add TELEMETRY_ENABLED, FEATURE_FLAGS_ENABLED, DB_PROVIDER=memory, JWT_SECRET dev default
- 80/80 tests pass (integration tests now work without env vars)
2026-03-20 17:31:53 -07:00
saravanakumardb1
fa1377892c
fix(ci): add common-plat checkout for backend, upgrade Node to 22, add concurrency
...
- Backend: common-plat checkout + pnpm build so @bytelyst/* file: deps resolve
- All jobs: Node 20→22, concurrency group for PR dedup
2026-03-20 15:20:18 -07:00
saravanakumardb1
2f9cfbef6a
fix(docker): remove deprecated version key from docker-compose.yml
2026-03-20 15:12:34 -07:00
saravanakumardb1
cc91e3dac7
fix(backend): use config.DB_PROVIDER instead of process.env.DB_PROVIDER in datastore.ts
...
- Reads validated DB_PROVIDER from Zod config instead of raw env
- Removes stale isTest fallback logic (now handled by config defaults)
2026-03-20 08:29:36 -07:00
saravanakumardb1
b04189df3f
refactor(backend): migrate config.ts to @bytelyst/backend-config base schema
...
- Extends baseBackendConfigSchema with product-specific overrides
- DB_PROVIDER now declared in all repos (was missing in 3)
2026-03-20 07:56:29 -07:00
saravanakumardb1
942d00cc25
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:59 -07:00
saravanakumardb1
2a32a54ae7
refactor(backend): remove errors.ts re-export, import @bytelyst/errors directly
2026-03-20 07:19:29 -07:00
saravanakumardb1
6babe05560
docs: update IMPLEMENTATION_TRACKER, AGENTS, GAP_ANALYSIS to reflect completed implementation [E1]
...
- IMPLEMENTATION_TRACKER: all 8 phases marked complete with commit SHAs
- IMPLEMENTATION_TRACKER: progress log updated with all 8 commits
- IMPLEMENTATION_TRACKER: test target summary updated with actual final numbers (117 tests)
- AGENTS.md: test counts updated (80 backend, 14 web, 23 mobile)
- AGENTS.md: repo layout updated (CreateNoteModal, LinkNoteModal, Dockerfiles, CI, stores)
- AGENTS.md: 6 new API endpoints documented (archive, restore, summarize, export, search)
- GAP_ANALYSIS.md: current state summary updated with final counts
- GAP_ANALYSIS.md: totals table updated with actual results
2026-03-19 09:05:39 -07:00
saravanakumardb1
e5535252c7
feat(backend+web): note summarization + export endpoints [B3, B6]
...
- backend: POST /notes/:id/summarize — calls extraction-service, stores summary artifact
- backend: GET /notes/export — JSON + Markdown format support
- backend: extraction-client.ts for extraction-service integration
- backend: 4 new integration tests (summarize, export JSON, export MD, invalid format)
- web: summarizeNote + exportNotes client functions
- web: Summarize button on note detail page
- web: Export Notes button on workspaces page
- web: exclude e2e/ from vitest config
- Total: 80 backend, 14 web, 23 mobile = 117 tests
2026-03-19 08:59:26 -07:00
saravanakumardb1
dd62d3bf5c
test(web+mobile): Playwright E2E scaffold + 23 mobile store tests [C4, B7]
...
- web: playwright.config.ts + e2e/navigation.spec.ts (7 navigation tests, scaffolded)
- web: exclude e2e/ from tsconfig (playwright not yet installed as dep)
- mobile: notes-store.test.ts (7 tests: hydrate, openNote, saveDraft, updateNote)
- mobile: workspace-store.test.ts (5 tests: hydrate, preserve/reset active, set/clear)
- mobile: inbox-store.test.ts (5 tests: hydrate, approve, reject, unknown id guards)
- mobile: auth-store.test.ts (6 tests: bootstrap, signIn, signOut, failure paths)
- Total: 76 backend, 14 web, 23 mobile = 113 tests
2026-03-19 08:51:36 -07:00
saravanakumardb1
a71747e3fb
chore(devops): add Dockerfiles, docker-compose, CI workflow, docker-prep script [C1-C5]
...
- backend/Dockerfile: multi-stage Node.js build (install → build → runtime)
- web/Dockerfile: multi-stage Next.js standalone build
- docker-compose.yml: backend (4016) + web (3000) with health check
- scripts/docker-prep.sh: pack @bytelyst/* tarballs + rewrite file: refs (--restore to undo)
- .github/workflows/ci.yml: backend (typecheck+test+build), web (typecheck+test+build), mobile (typecheck)
2026-03-19 08:47:04 -07:00
saravanakumardb1
a3267e4b1b
feat(web+backend): add create note, archive/restore, link note flows [B1, B2, B8]
...
- backend: add POST /notes/:id/restore endpoint (mirrors archive pattern)
- web: CreateNoteModal component (workspace picker, title, body, tags)
- web: LinkNoteModal component (search, select, relationship type picker)
- web: Dashboard 'New Note' button + CreateNoteModal integration
- web: Note detail Archive/Restore buttons + LinkNote button
- web: 4 CreateNoteModal tests + 4 LinkNoteModal tests
- backend: 1 restore integration test
- Total: 76 backend tests, 14 web tests
2026-03-19 08:44:39 -07:00
saravanakumardb1
bf2785bcf9
test(backend): add integration tests for all 7 route modules [A5]
...
- Add test-helpers.ts with buildTestApp() + resetMemoryDatastore()
- notes: 11 tests (CRUD, archive, filter, search, validation)
- workspaces: 7 tests (CRUD, summaries with noteCount, validation)
- note-tasks: 6 tests (CRUD, filter by workspaceId, validation)
- note-artifacts: 7 tests (CRUD, filter by noteId, validation)
- note-relationships: 4 tests (create, list, validation)
- note-agent-actions: 8 tests (CRUD, pending, batch-review, validation)
- saved-views: 8 tests (CRUD, filter by scope, delete, validation)
- Fix listPendingActions to avoid unsupported $in operator in memory provider
- Total: 75 backend tests (was 24)
2026-03-19 08:38:21 -07:00
saravanakumardb1
ee586065dd
refactor(web+backend): consolidate types, optimize N+1 queries [D1, A3, A4, D2]
...
- types.ts: consolidate NoteDoc, WorkspaceDoc, NoteAgentActionDoc etc. from client files
- notes-client.ts: import from types.ts, optimize getNoteDetail with direct GET /notes/:id
- review-client.ts: import from types.ts, use /note-agent-actions/pending (eliminates N+1)
- notes-client.ts: use /workspaces/summaries (eliminates fetch-all-notes for counts)
- backend: add GET /workspaces/summaries with noteCount per workspace
- backend: add GET /note-agent-actions/pending (cross-workspace)
- backend: add countNotesByWorkspaces + listPendingActions repository functions
- Add createNote, archiveNote, restoreNote, createNoteRelationship client functions
- Fix existing tests for new route counts and mock order
2026-03-19 07:32:54 -07:00
saravanakumardb1
dbb1a84dba
fix(web): lazy-init extraction + blob clients, add use-client to notes-client
...
- extraction-client.ts: lazy singleton (SSR crash fix) [A1]
- blob-client.ts: lazy singleton + remove dead re-export [A1]
- notes-client.ts: add "use client" directive [A6]
- next.config.ts: add output: "standalone" [A2]
- Delete mock-data.ts and review-data.ts (dead code) [D3, D4]
2026-03-19 07:20:28 -07:00
saravanakumardb1
e50df779da
docs: fix 7 inaccuracies in implementation tracker after systematic review
...
Corrections:
- Remove duplicate task 7.3 (Gap A4 already in Phase 2 task 2.3), renumber
- Fix task 3.5: remove false DELETE claim (note-relationships has GET+POST only)
- Fix task 1.2: add note about removing dead 'export { blobClient }' re-export
- Fix 'How to Use' parallelization: Phase 5 needs Phase 1 only, not Phase 3
- Add phase-level [ ] checkboxes to all 8 phase headers
- Align Phase 3 test target: '60+' → '~60-75' (matches summary table)
- Fix Phase 7 effort estimate (4-5h → 3-4h after removing duplicate task)
- Fix test target summary to use ranges instead of single estimates
2026-03-19 07:15:26 -07:00
saravanakumardb1
1d068e748c
docs: add detailed implementation tracker with 8 phases and 35 checkbox tasks
...
Derived from GAP_ANALYSIS.md (25 gaps across 5 categories).
Structured as 8 sequential phases with:
- Per-task checkboxes with gap IDs for traceability
- Specific file paths and code patterns for each fix
- Verification commands per phase
- Commit message conventions
- Test target summary (30→132 tests across all surfaces)
- Progress log table for tracking commits
- Deferred items (B4 webhooks, B5 sharing, E2 WINDSURF_CONTEXT)
Phases: 1-Bug Fixes, 2-Code Quality, 3-Backend Tests,
4-Web Features, 5-DevOps, 6-E2E+Mobile Tests,
7-AI Enrichment, 8-Docs Alignment
2026-03-19 07:09:47 -07:00
saravanakumardb1
ee033f4eab
docs: fix 8 inaccuracies in gap analysis after systematic self-review
...
Corrections:
- Remove D5 (factually wrong — backend tsconfig already excludes test files)
- Fix web component count 12→10, lib file count 11→18
- Fix B1 title: 'No note delete' → 'No note restore' (PRD says archive/restore)
- Add A6: notes-client.ts missing 'use client' (fragile SSR import chain)
- Expand A1 to include blob-client.ts module-scope instantiation
- Note telemetry/flags/kill-switch are lower risk (client-only imports)
- Strengthen D3/D4: confirmed zero-import dead code, not just 'unclear'
- A5: note that auth.test.ts and MCP tests do have real behavior tests
- Update bug count 5→6, total gaps 29→25
2026-03-19 07:06:05 -07:00
saravanakumardb1
513ee5a6a5
docs: comprehensive gap analysis — 29 numbered gaps across 5 categories
...
Systematic audit of backend (7 modules, 24 tests), web (6 pages, 12
components, 6 tests), and mobile (4 tabs, 0 tests) against PRD.
Key findings:
- 5 bugs (extraction-client SSR crash, missing standalone output,
N+1 queries, registration-only backend tests, tsconfig exclude)
- 8 missing features (no web note create, no import/export, no
sharing, no summarization, no relationship UI, zero mobile tests)
- 5 DevOps gaps (no Dockerfiles, no docker-compose, no CI, no E2E)
- 5 code quality issues (duplicate types, mock-data leftovers, N+1)
- 2 documentation gaps (roadmap checklists not updated)
Includes 7-sprint prioritized implementation plan with estimates.
2026-03-19 06:56:24 -07:00
saravanakumardb1
4da42b2d27
fix(web): wrap search + workspaces pages in Suspense for useSearchParams prerendering
2026-03-12 17:18:12 -07:00
saravanakumardb1
4ffe7569b0
fix(auth): JWKS URL-tracking singleton + expanded test coverage
2026-03-12 11:22:04 -07:00
saravanakumardb1
8e2a1b37c3
feat(auth): RS256 JWKS verification — NoteLett backend
2026-03-12 11:15:06 -07:00
saravanakumardb1
14aeeafe83
chore(docs): regenerate AI agent config files
2026-03-10 22:56:39 -07:00
saravanakumardb1
724a6659df
docs: update AGENTS.md with api-helpers.ts and corrected test counts
...
- Added api-helpers.ts to web lib repo layout
- Backend tests: 18 → 19 (11 files) after saved-views route test
2026-03-10 19:57:40 -07:00
saravanakumardb1
b651210edc
chore(web): remove unused PRODUCT_ID import from notes-client
...
Stale import left behind after extracting API client factory to api-helpers.ts.
2026-03-10 19:56:27 -07:00
saravanakumardb1
420945e081
fix(web): stabilize useKeyboardShortcuts with ref-based callback
...
- Use useRef to hold shortcuts array, read from ref inside event handler
- Event listener registered once on mount (empty deps), avoids re-subscription
when callers forget to memoize the shortcuts array
- Prevents subtle memory leak from rapid add/remove of keydown listeners
2026-03-10 19:54:50 -07:00
saravanakumardb1
c2202e9e52
refactor(web): extract shared API client factory, fix types, use crypto.randomUUID
...
- Created api-helpers.ts with shared getAccessToken() + createNotesApiClient()
- Removed duplicate API client factory from notes-client.ts, review-client.ts,
saved-views-client.ts (3 copies → 1 shared module)
- Added reviewedBy/reviewedAt/reviewNote fields to review-client NoteAgentActionDoc
type to match backend response shape
- Search page: use crypto.randomUUID() for saved view IDs instead of Date.now()
to prevent collisions on rapid saves
Verification: web typecheck + 6/6 tests pass.
2026-03-10 19:53:45 -07:00
saravanakumardb1
c6aa775cd3
fix(backend): saved-views DELETE 204 response + add route test
...
- DELETE /saved-views/:id now uses reply.code(204).send() for explicit
empty response (Fastify 5 best practice)
- Added routes.test.ts for saved-views module (verifies 2 GET, 1 POST,
1 PATCH, 1 DELETE handler registration)
- Backend now at 19 tests across 11 files
2026-03-10 19:50:52 -07:00
saravanakumardb1
d09259c42e
docs: update AGENTS.md + ROADMAP.md with all completed features, register saved_views container
...
- AGENTS.md: added saved-views module, lib/platform.ts, batch-review endpoint, saved-views endpoints, blob-client to shared packages, 7 Cosmos containers, keyboard shortcuts + debounce hooks
- ROADMAP.md: 6 new commit entries, all blockers/deferrals marked resolved
- cosmos-init.ts: registered saved_views container with /userId partition
All 3 surfaces verified: backend 18/18, web 6/6, mobile typecheck pass.
2026-03-10 19:45:13 -07:00
saravanakumardb1
f8a4c18f27
feat(mobile): wire review note input to inbox approve/reject
...
- note-agent-actions API: updateApprovalState now accepts optional reviewNote
- inbox-store: approve/reject actions pass reviewNote through to backend
- Inbox screen: TextInput for review note above approval cards
- Review note cleared after successful approve/reject
Verification: mobile typecheck passes.
2026-03-10 19:41:39 -07:00
saravanakumardb1
12d90098eb
feat(web): saved views CRUD, keyboard shortcuts, debounced search
...
- saved-views-client.ts: full CRUD client for backend saved-views module
- use-keyboard-shortcuts.ts: reusable hook for global keyboard shortcuts
- KeyboardShortcuts.tsx: wired into (app) layout — Cmd+K search, Cmd+N workspaces, Cmd+Shift+D dashboard, Cmd+Shift+R reviews, Esc blur
- use-debounce.ts: shared debounce hook (replaces inline setTimeout in search)
- Search page: saved views loaded from backend with save/delete UI
- Search page: search debounced at 250ms via useDebounce hook
- Updated search page test to mock saved-views-client and useDebounce
Verification: web typecheck + 6/6 tests pass.
2026-03-10 19:39:28 -07:00
saravanakumardb1
ca3cdbad4e
feat(web): wire full review UX — batch select, review notes, batch approve/reject
...
- Reviews page: batch selection mode with Select All / Clear
- Reviews page: batch Approve N / Reject N buttons
- Reviews page: review note textarea shared by single + batch flows
- review-client.ts: added batchReviewItems() calling POST /batch-review
- review-client.ts: approve/reject now pass reviewNote to backend
- Clears review note + batch selection after successful action
Verification: web typecheck passes.
2026-03-10 19:35:40 -07:00
saravanakumardb1
bdbf387f88
feat(backend): add batch review endpoint + saved-views module
...
- note-agent-actions: added POST /batch-review for bulk approve/reject (up to 50 items)
- note-agent-actions: PATCH now auto-sets reviewedBy/reviewedAt on approve/reject
- saved-views: new module with full CRUD (types, repository, routes)
- Cosmos container: saved_views, partition: /userId
- Supports scope filtering (workspace, search, review)
- Registered saved-views routes in server.ts (7 modules total)
- Updated route count tests
Verification: backend typecheck + 18/18 tests pass.
2026-03-10 19:33:33 -07:00
saravanakumardb1
878c644dd8
feat(platform): wire shared platform packages into mobile + refactor web blob-client (DRY)
...
Phase 1 — Platform SDK integration:
- Mobile: added @bytelyst/telemetry-client, feature-flag-client, kill-switch-client, blob-client deps
- Mobile: created src/lib/platform.ts — centralized platform init (telemetry, flags, kill-switch, blob)
- Mobile: wired initPlatform() into root layout startup
- Web: refactored blob-client.ts to use shared @bytelyst/blob-client (eliminates hand-rolled SAS fetch code)
- Web: added @bytelyst/blob-client dep
DRY: Both web and mobile now use the same @bytelyst/blob-client package for blob operations.
Verification: web typecheck + mobile typecheck pass.
2026-03-10 19:29:00 -07:00
saravanakumardb1
9d392eab39
docs: add AGENTS.md, README.md, and update roadmap with session commit refs
...
- AGENTS.md: full AI agent onboarding guide following ecosystem conventions
- README.md: quick start, architecture overview, env setup, test commands
- ROADMAP.md: added commit references for identity lock, MCP tools, platform integrations, blob client
- Marked resolved blockers (product identity, blob artifacts)
2026-03-10 19:01:48 -07:00
saravanakumardb1
196b2106d8
feat(web): add blob upload/download client for artifact management
...
- getArtifactUploadUrl() — SAS URL with write permissions
- uploadArtifact() — direct browser-to-blob upload via SAS
- downloadArtifact() — fetch blob content via SAS read URL
- Uses platform-service /blob/sas endpoint for SAS token generation
Verification: web typecheck passes.
2026-03-10 18:58:25 -07:00
saravanakumardb1
8755661049
feat(web): wire feature-flag and kill-switch platform clients
...
- Added @bytelyst/feature-flag-client and @bytelyst/kill-switch-client deps
- Created web/src/lib/feature-flags.ts — poll-based flag client (fail-open)
- Created web/src/lib/kill-switch.ts — kill-switch check client (fail-open)
- Telemetry, diagnostics, extraction were already wired
Verification: web typecheck + 6 tests pass.
2026-03-10 18:56:14 -07:00
saravanakumardb1
12058ed745
feat(mcp): add update-note, link-notes, extract-tasks, attach-artifact MCP tools
...
4 new executable MCP tools with full audit trail:
- notes.notes.update — update title/body/status/tags with dry-run support
- notes.relationships.link — create typed relationships between notes
- notes.tasks.extract — extract actionable tasks from note body (checkbox + TODO patterns)
- notes.artifacts.attach — attach file/summary/extraction/citation/export artifacts
All tools follow the existing pattern:
- Product scope enforcement
- Agent action audit recording
- Idempotency key + correlation ID propagation
- Dry-run preview support
Also updated .env.example with notelett identity.
Verification: backend typecheck + 18 tests pass.
2026-03-10 18:53:28 -07:00
saravanakumardb1
e1fde25afd
feat(identity): lock NoteLett product identity across all surfaces
...
- productId: notelett
- displayName: NoteLett
- domain: notelett.app
- iOS bundle: com.bytelyst.notelett
- Android bundle: com.notelett.app
- backend port: 4016
- token namespace: --nl-* (CSS), NoteLettTheme (native)
Rippled through:
- shared/product.json (canonical source)
- backend package.json, config, cosmos-init, all 10 test files
- web package.json, landing page, notes-client test
- mobile app.json, package.json, auth screen
- docs: PRD, ROADMAP, architecture review, foundations, web/mobile roadmaps
- registered in learning_ai_common_plat/products/notelett/
Verification: backend typecheck + 18 tests, web typecheck + 6 tests, mobile typecheck — all pass.
2026-03-10 18:47:01 -07:00
saravanakumardb1
e6beef83eb
docs(notes): record dashboard note progress
2026-03-10 18:23:21 -07:00
saravanakumardb1
8a1b79c4e4
fix(notes): link recent note tags
2026-03-10 18:21:32 -07:00
saravanakumardb1
b147f14b1c
docs(notes): record search filter progress
2026-03-10 18:19:40 -07:00
saravanakumardb1
fa87efd13b
fix(notes): link search result filters
2026-03-10 18:17:13 -07:00
saravanakumardb1
dc917df240
docs(notes): record review state progress
2026-03-10 18:14:20 -07:00
saravanakumardb1
758d5d42a4
fix(notes): link note review state
2026-03-10 18:12:23 -07:00
saravanakumardb1
66d4cd4c6e
docs(notes): record workspace filter progress
2026-03-10 18:10:21 -07:00
saravanakumardb1
260428d6f3
fix(notes): link workspace filters
2026-03-10 18:08:16 -07:00
saravanakumardb1
dbf0fa84ab
docs(notes): record metadata progress
2026-03-10 18:05:49 -07:00
saravanakumardb1
6d72561b30
fix(notes): link note metadata
2026-03-10 18:04:15 -07:00
saravanakumardb1
c3e738cff3
docs(notes): finish dashboard metric progress
2026-03-10 18:01:25 -07:00