Commit Graph

371 Commits

Author SHA1 Message Date
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
saravanakumardb1
3e88ed6a12 docs(notes): record dashboard metric progress 2026-03-10 18:00:02 -07:00
saravanakumardb1
2a9f49048d fix(notes): link dashboard metrics 2026-03-10 17:58:51 -07:00
saravanakumardb1
042cace2f3 docs(notes): record workspace progress 2026-03-10 17:55:14 -07:00
saravanakumardb1
22df6d956f fix(notes): activate workspace saved views 2026-03-10 17:53:32 -07:00
saravanakumardb1
bd7fc9d7a7 docs(notes): record search entrypoint progress 2026-03-10 17:51:07 -07:00
saravanakumardb1
88c11c25f2 fix(notes): activate saved searches 2026-03-10 17:49:02 -07:00
saravanakumardb1
ea7f1c15f8 docs(notes): record review workflow progress 2026-03-10 17:46:02 -07:00
saravanakumardb1
99bc7a93ba fix(notes): link review workflows 2026-03-10 17:43:57 -07:00
saravanakumardb1
49d4790344 docs(notes): record workflow progress 2026-03-10 17:40:38 -07:00
saravanakumardb1
6222fdaaa0 fix(notes): link dashboard workflows 2026-03-10 17:38:49 -07:00
saravanakumardb1
e0ad97023a docs(notes): record review progress 2026-03-10 17:36:27 -07:00
saravanakumardb1
5ce940110f fix(notes): select review queue items 2026-03-10 17:34:47 -07:00
saravanakumardb1
504b339203 docs(notes): record sidebar progress 2026-03-10 17:32:15 -07:00
saravanakumardb1
437651965e fix(notes): remove hardcoded sidebar note 2026-03-10 17:30:11 -07:00
saravanakumardb1
2abf983321 docs(notes): record saved view progress 2026-03-10 17:25:44 -07:00
saravanakumardb1
99484a5636 feat(notes): connect dashboard saved views 2026-03-10 17:23:23 -07:00
saravanakumardb1
ea2a746c21 docs(notes): record dashboard progress 2026-03-10 17:16:44 -07:00
saravanakumardb1
9f2670ca8e fix(notes): link dashboard note activity 2026-03-10 17:14:24 -07:00
saravanakumardb1
d8d6e71670 docs(notes): record mobile workspace progress 2026-03-10 17:11:57 -07:00
saravanakumardb1
7d23793728 feat(notes): support mobile all-workspace view 2026-03-10 17:09:16 -07:00
saravanakumardb1
6c14b6b696 docs(notes): record mobile inbox progress 2026-03-10 17:02:37 -07:00
saravanakumardb1
7a8009454f fix(notes): guard mobile review actions 2026-03-10 16:59:40 -07:00
saravanakumardb1
e1b9e95ec0 docs(notes): record mobile capture progress 2026-03-10 16:56:05 -07:00