8d8540e320
fix(note-shares): treat expired shares as not found
...
findShareByToken now returns null when expiresAt is in the past, aligning the public share API with stored metadata.
Add unit tests for expiry, future expiry, missing expiry, and no match.
Made-with: Cursor
2026-03-31 13:05:30 -07:00
5e3e374d3a
fix(notes): export route order and lexical snippet ellipsis
...
Register GET /notes/export before GET /notes/:id so the path is not captured as an id.
Compute search snippets from stripped plain text so the trailing ellipsis matches visible length, not raw HTML length.
Made-with: Cursor
2026-03-31 13:05:29 -07:00
a697752d15
feat: implement WEB_AI_FAST_ROADMAP (web + backend + docs)
...
Phase 1: Command palette (⌘K), editor autosave with quiet auto-saves, dashboard
saved views from API + quick links + onboarding seed CTA, explicit task scan panel.
Phase 2: Context pack formatter with YAML frontmatter, copy on note + workspace .md export.
Phase 3: ADR for hybrid search without embeddings; POST /notes/search (lexical +
ranked hybrid); search UI mode toggle.
Phase 4: POST copilot + suggest-title; in-editor copilot actions; /chat retrieval
answers with citations (backend chat.rag_enabled).
Phase 5: Settings MCP snippet, offline queue note, API token deferral; DEEP_LINKS.md.
Phase 6: Note shares + public GET; share page; POST onboarding-seed.
Phase 7: note_versions on PATCH; version panel; create-note templates; PWA manifest.
Flags: search.hybrid_enabled, copilot.enabled, chat.rag_enabled, onboarding.seed_enabled.
Made-with: Cursor
2026-03-31 13:00:36 -07:00
saravanakumardb1
6acd1a70d4
fix(backend): fix trackEvent call signature and route registration tests
...
- auth.ts: type requireWriter param as { headers: { authorization?: string } } instead of unknown
- notes/routes.ts: fix 3 trackEvent calls from object form to positional args (event, userId, properties)
- workspaces/routes.ts: fix 1 trackEvent call from object form to positional args
- 5 route registration tests: add missing delete mock to app object for Phase 2 DELETE endpoints
2026-03-31 01:00:32 -07:00
8d84bcb841
feat: add DELETE endpoints, role enforcement, telemetry and feature flags
...
Phase 2 of the execution roadmap:
- Add DELETE endpoints for notes (soft-delete), workspaces, tasks, artifacts, relationships
- Add requireWriter() role enforcement on all write routes (POST/PATCH/DELETE)
- Activate trackEvent() telemetry on note.created, note.updated, note.archived, workspace.created
- Gate notes search behind isFeatureEnabled('notes.enabled')
- Update all test mocks to include role and new auth exports
Made-with: Cursor
2026-03-29 20:47:12 -07:00
saravanakumardb1
760afbbc41
chore(backend): add FIELD_ENCRYPT env vars to .env.example
2026-03-27 23:01:36 -07:00
saravanakumardb1
ef5ff92e7a
chore(backend): add vitest.config.ts
2026-03-26 23:10:12 -07:00
saravanakumardb1
891754f16a
chore(backend): add eslint config and lint script
2026-03-26 23:03:09 -07:00
saravanakumardb1
e9dc45d9bc
fix(docker): remove hardcoded corporate proxy and jfrog registry from Dockerfiles
2026-03-24 11:10:33 -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
cbbd9ddce9
fix(docker): upgrade Dockerfiles to node:22-slim + add NODE_TLS + fix next.config.ts
...
- backend/Dockerfile: alpine→slim, add NODE_TLS_REJECT_UNAUTHORIZED=0, 3-stage pattern
- web/Dockerfile: alpine→slim, add NODE_TLS_REJECT_UNAUTHORIZED=0, remove non-existent public/ COPY
- web/next.config.ts: add transpilePackages + webpack symlinks for pnpm @bytelyst/* resolution
Docker smoke tests: backend + web builds pass
2026-03-22 21:06:07 -07:00
saravanakumardb1
90dd2d3bd5
feat(repo): migrate notelett workspace to pnpm
2026-03-22 15:50:54 -07:00
saravanakumardb1
b40097633f
fix(docker): rewrite backend Dockerfile with explicit COPY + .tarballs/ for file: deps
2026-03-22 00:23:13 -07:00
saravanakumardb1
5842ff1b22
fix: align Fastify to 5.7.4 + normalize product.json
2026-03-21 20:32:17 -07:00
saravanakumardb1
f0a75a9dc2
fix(backend): fix server.test.ts mock missing PRODUCT_ID and field-encrypt
2026-03-21 16:22:11 -07:00
saravanakumardb1
20cc3e4e49
feat(backend): admin-panel encryption toggle via initEncryption()
...
- FIELD_ENCRYPT_ENABLED env var (default: true, fallback only)
- initEncryption(productId) polls encryption_enabled from platform-service
- Admin panel toggle takes precedence, 3s timeout graceful fallback
2026-03-21 15:25:41 -07:00
saravanakumardb1
e85cfeb0f1
feat(notelett): encrypt note body with @bytelyst/field-encrypt
...
- Add field-encrypt dependency + config env vars (FIELD_ENCRYPT_*)
- Create backend/src/lib/field-encrypt.ts encryptor singleton
- Update notes repository: encrypt body on create/update, decrypt on read
- Backward-compatible: isEncryptedField guard handles plaintext during migration
- All 86 tests passing
2026-03-21 09:29:44 -07:00
saravanakumardb1
8a1234a460
feat(backend): add GET /api/bootstrap route + test
...
- Returns productId, displayName, backendPort for client bootstrapping
- Integration test validates response shape and types
2026-03-20 21:15:41 -07:00
saravanakumardb1
ff73d60e07
feat(backend): add GET /health test to diagnostics suite
...
- Validates standard health response shape: status, service, version, timestamp
- Ensures consistent health endpoint contract across ecosystem
2026-03-20 21:06:57 -07:00
saravanakumardb1
4baed0b10c
feat(backend): add GET /api/diagnostics/config route + test
...
- Returns sanitized config: productId, serviceName, port, nodeEnv, dbProvider, telemetryEnabled, featureFlagsEnabled
- Integration test validates response shape
2026-03-20 19:36:04 -07:00
saravanakumardb1
1c7ea650cd
test(backend): add diagnostics route integration tests
...
- 3 tests: GET /diagnostics/flags, GET /diagnostics/telemetry, POST /diagnostics/telemetry/flush
- All tests pass
2026-03-20 19:28:09 -07:00
saravanakumardb1
90b4bface4
feat(backend): add /diagnostics/flags + /diagnostics/telemetry routes
...
- GET /api/diagnostics/flags — returns all feature flags
- GET /api/diagnostics/telemetry — returns buffered telemetry events
- POST /api/diagnostics/telemetry/flush — flush telemetry buffer
- Fix server.test.ts mock to include get/post + feature-flags/telemetry mocks
- 80/80 tests pass
2026-03-20 19:12:38 -07:00
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
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
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
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
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
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
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
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
b73d5e9a96
fix(config): complete phase-a identity alignment
2026-03-10 11:59:12 -07:00
saravanakumardb1
a748d78551
test(mcp): verify note draft audit metadata
2026-03-10 09:28:30 -07:00
saravanakumardb1
2340be157e
test(mcp): cover note tool registration adapter
2026-03-10 09:26:02 -07:00
saravanakumardb1
9d4271308c
fix(mcp): enforce product scope guardrails
2026-03-10 09:22:04 -07:00
saravanakumardb1
91559004a8
feat(mcp): add note tool registration adapter
2026-03-10 09:15:28 -07:00
saravanakumardb1
756714e67c
feat(mcp): add executable note tools
2026-03-10 09:12:09 -07:00
saravanakumardb1
771a7d34a6
feat(notes): scaffold web backend and mobile foundations
2026-03-10 08:56:44 -07:00
saravanakumardb1
db7b9f8ff1
feat(notes): scaffold web backend and mobile foundations
2026-03-10 08:53:25 -07:00
saravanakumardb1
4fb859c81c
feat(notes): scaffold product surfaces and backend MCP slices
2026-03-10 08:53:07 -07:00