Commit Graph

161 Commits

Author SHA1 Message Date
saravanakumardb1
30a30ceb0f feat(web/ui5): migrate settings page + 4 modals to @bytelyst/ui primitives
Completes the high-leverage half of UI5 by migrating the most form-heavy
authenticated screens off the legacy 'input-shell' / inline-style pattern
onto Input, Textarea, Select, and AlertBanner primitives.

Migrated:
- web/src/app/(app)/settings/page.tsx — change-password form, feedback
  form, MCP/API-tokens/offline-queue cards. Replaces 'surface-card'
  sections with Card components, 'input-shell' inputs/selects/textareas
  with Input/Select/Textarea, and inline error/success divs with
  AlertBanner.
- web/src/components/CreateNoteModal.tsx — template/workspace/title/body/tags
  fields. Select primitive uses options=[{value,label}].
- web/src/components/LinkNoteModal.tsx — search input + relationship-type
  select + alert banner for errors.
- web/src/components/ShareDialog.tsx — user-id input, permission select,
  collaborator/public-link rows now use AlertBanner (tone='neutral') for
  the muted-surface look. Web Share API unsupported message is now a
  proper tone='warning' banner.
- web/src/components/PromptTemplateEditor.tsx — full form (name, slug,
  description, 3 selects, 2 textareas) migrated.

All existing tests continue to pass without modification because
@testing-library queries (getByLabel, getByPlaceholder, getByText) are
robust against the underlying HTML structure changes.

Verified:
- pnpm --filter @notelett/web run typecheck: passes
- pnpm --filter @notelett/web run test: 96/96 (existing CreateNoteModal,
  LinkNoteModal, ShareDialog suites all green)
- pnpm run verify: end-to-end (backend 380/380, web 96/96, mobile 97/97)
- Legacy class matches in web/src dropped from 89 to 69 over the UI5
  slice; remaining matches are in UI6/UI7 territory (dashboard, search,
  workspaces list, notes detail, chat, palace, NoteEditor).
2026-05-23 00:05:49 -07:00
saravanakumardb1
f4564d7cd6 chore(web): remove dead code surfaced by lint
Three mechanical lint warnings in the web package are resolved with
zero behavior change:

- web/src/app/(app)/notes/[noteId]/page.tsx — rename onTagsAccepted
  callback param to '_tags' to match the no-unused-vars allowlist
  (the param is intentionally unused; we trigger a re-save regardless).
- web/src/lib/feedback-client.ts — drop the unused PRODUCT_ID import.
- web/src/lib/notes-client.ts — delete the dead toWorkspaceSummary()
  helper. Workspace summaries are produced by listWorkspaceSummaries()
  on the backend response now; the local helper had no callers.

Web lint goes from 23 → 20 warnings. Remaining 20 are React-compiler
advisories about setState-in-effect patterns; those require careful
per-component refactoring (useReducer, derive-from-props, or
startTransition) and are tracked under Sprint D / Q1 tech debt rather
than fixed mechanically.
2026-05-22 23:51:59 -07:00
saravanakumardb1
9c65899387 feat(web/ui5): migrate auth pages and CreateWorkspaceModal to @bytelyst/ui primitives
Sprint C / UI5 — migrate the highest-leverage user-facing forms off the
legacy 'input-shell' / inline-style pattern onto the @bytelyst/ui Input,
Textarea, and AlertBanner primitives via the local Primitives.tsx adapter.

Adapter additions (web/src/components/ui/Primitives.tsx):
- Re-export AlertBanner, FormSection, and FieldGrid from @bytelyst/ui so
  product code never imports from the underlying package directly.

Migrated screens:
- web/src/app/(auth)/login/page.tsx
- web/src/app/(auth)/register/page.tsx
- web/src/app/(auth)/forgot-password/page.tsx
- web/src/components/CreateWorkspaceModal.tsx

Each migration replaces the ad-hoc 'input-shell' inputs and manual
label/error/success divs with the Input (label + hint props), Textarea,
and AlertBanner (tone='error'|'success') primitives. Inline style blocks
are replaced with Tailwind utility classes that read from the existing
--nl-* CSS custom properties so the visual tokens remain unchanged.

The 3 auth pages alone remove 9 input-shell call sites; the
CreateWorkspaceModal removes 2 more.

Verified:
- pnpm --filter @notelett/web run typecheck: passes
- pnpm --filter @notelett/web run test: 96/96 pass
- pnpm run verify: end-to-end green (backend 380/380, web 96/96, mobile 97/97)
2026-05-22 23:51:34 -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
root
3dd981198e fix: Update docker configuration for production deployment
- Fixed NEXT_PUBLIC_NOTES_API_URL to use public API endpoint
- Updated docker-compose.yml environment format to proper YAML
- Updated Dockerfiles to remove Gitea secrets and use .docker-deps
- Added docker-prep.sh script for dependency packaging
- Changed NODE_ENV back to development for compatibility with memory DB

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-12 08:20:12 +00:00
root
fa00722a39 revert(docker): revert to docker-prep.sh approach due to workspace complexity
The base image approach is too complex for the current pnpm workspace structure.
Products cannot easily use the base image's workspace because pnpm expects all
workspace packages to be present during install. Reverting to the proven
docker-prep.sh tarball approach for now.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-09 23:35:37 +00:00
root
28189ac916 fix(docker): install all dependencies in builder stage for build tools
The base image only includes production dependencies, so we need to install
all dependencies (including devDependencies) in the builder stage to have
TypeScript and Next.js available for building.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-09 23:23:36 +00:00
root
b50e340f5a refactor(docker): use shared base images for @bytelyst/* packages
Update Dockerfiles to use bytelyst-common-base-backend and bytelyst-common-base-web
images instead of installing @bytelyst/* packages via tarballs.

Benefits:
- Smaller final images (~50MB vs ~250MB)
- Faster builds (base image cached)
- Consistent package versions across products
- No need for docker-prep.sh tarball packing

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-09 23:22:57 +00:00
root
3fe4f0786c feat(ux): add UX testing setup guide and common platform integration 2026-05-09 22:09:43 +00:00
db9b4557d8 refactor(ui): remove legacy shell css 2026-05-06 13:40:24 -07:00
7063e59078 refactor(ui): isolate notelett navigation 2026-05-06 13:37:49 -07:00
63211c0019 feat(ui): consume common app shell 2026-05-06 13:35:54 -07:00
6c562f05d8 test(ui): add review visual smoke 2026-05-06 13:28:57 -07:00
6472a58ad1 feat(ui): add review empty states 2026-05-06 13:18:52 -07:00
d63fdd1def feat(ui): add review keyboard shortcuts 2026-05-06 13:15:37 -07:00
de75d93e59 refactor(ui): split review workflow components 2026-05-06 13:13:46 -07:00
c79aa2b6fd feat(ui): migrate review workflow primitives 2026-05-06 11:43:34 -07:00
cf5e9c03fd feat(ui): add notelett primitive defaults 2026-05-06 11:36:05 -07:00
0f5ddb400b feat(ui): map platform tokens globally 2026-05-06 11:34:23 -07:00
b73c969d14 feat(ui): wire platform core primitives 2026-05-06 11:12:09 -07:00
5e38496d8a test(web): run Playwright release flows 2026-05-05 14:07:34 -07:00
9bded74567 fix(lint): clear production lint blockers 2026-05-05 14:04:49 -07:00
00d022071d docs(roadmap): record P10.1 verification 2026-05-05 13:56:26 -07:00
d929247db5 ci(web): add playwright e2e job 2026-05-05 13:27:12 -07:00
6b896949d4 chore(web): add bundle analysis gate 2026-05-05 12:45:20 -07:00
62cda1fb22 test(web): add release journey e2e coverage 2026-05-05 12:34:25 -07:00
e71febe51a fix(sharing): harden note share revocation flows 2026-05-05 12:25:16 -07:00
09f30c003e feat(notes): harden import export readiness 2026-05-05 12:15:11 -07:00
a72d6b79d3 fix(web): add user-facing dependency states 2026-05-05 11:59:17 -07:00
454b2003e9 fix(web): add mutation retry handling 2026-05-05 11:45:25 -07:00
6418ab2836 fix(web): harden auth session refresh flow 2026-05-05 11:40:55 -07:00
837a187bd1 fix(web): stabilize mobile layouts 2026-05-05 10:58:10 -07:00
d26a4ae9de refactor(web): use shared ui primitives 2026-05-05 10:49:25 -07:00
01c2d31514 fix(web): label interactive controls 2026-05-05 10:22:49 -07:00
6ede2bee7e refactor(web): replace hardcoded app colors 2026-05-05 10:17:06 -07:00
efa20979fc test(platform): verify client propagation 2026-05-05 09:33:10 -07:00
da3129c89b fix(platform): align mcp service urls 2026-05-05 09:19:11 -07:00
saravanakumardb1
cc6558277c fix(docker): bash 3.2 compat + .docker-deps COPY + pnpm.overrides for transitive deps
- docker-prep.sh: replace declare -A with temp file (macOS bash 3.2)
- docker-prep.sh: inject pnpm.overrides so transitive @bytelyst/* deps resolve from tarballs
- backend/Dockerfile + web/Dockerfile: COPY .docker-deps/ into build context
- .npmrc.docker: remove scoped registry (tarballs handle all @bytelyst/* resolution)
2026-04-13 14:02:31 -07:00
saravanakumardb1
cce4ca610f refactor(web): merge platform-api.ts into platform.ts
platform.ts and platform-api.ts both created PlatformClient instances.
Merge all typed helpers (getUserSettings, updateUserSettings,
listSessions, revokeSession, updateProfile) into platform.ts and
delete the duplicate file. Use lazy singleton instead of eager.
2026-04-13 11:06:40 -07:00
saravanakumardb1
4813c850a3 feat(web,mobile): add @bytelyst/billing-client and platform-client
Web:
- New lib/billing-client.ts: factory wrapper using shared getAccessToken.
- Add @bytelyst/billing-client to web deps.

Mobile:
- New lib/billing-client.ts: factory wrapper using MMKV token storage.
- New lib/platform-api.ts: typed platform-client wrapper for settings,
  sessions, and profile management.
- Add @bytelyst/billing-client and @bytelyst/platform-client to deps.
2026-04-13 10:30:02 -07:00
saravanakumardb1
58a778bc1e feat(web): init feature flags + kill switch on startup, fix hardcoded colors
- Providers.tsx now calls initFeatureFlags() and checkKillSwitch()
  on mount (both were wired but never initialized).
- globals.css: replace hardcoded #0b1020 with color-mix() from canvas token.
- layout.tsx: make themeColor responsive (dark/light media queries).
- use-theme.ts: prefix localStorage key with PRODUCT_ID for consistency.
2026-04-13 09:59:54 -07:00
saravanakumardb1
4246d58798 fix(docker): switch Alpine to Debian slim and remove prod NODE_TLS_REJECT_UNAUTHORIZED
Alpine breaks under corporate proxy TLS interception. Debian slim
works reliably. NODE_TLS_REJECT_UNAUTHORIZED=0 removed from production
stages — only kept in build stages where npm registries need it.
2026-04-13 09:59:36 -07:00
saravanakumardb1
71062a57be fix(web): fix auth token key inconsistency and DRY getAccessToken()
feature-flags.ts and prompt-client.ts used bare 'access_token' key
instead of PRODUCT_ID-prefixed key — auth tokens were never sent.

Consolidates 10 web lib files to import the shared getAccessToken()
from api-helpers.ts instead of each redefining their own copy.
2026-04-13 09:59:18 -07:00
saravanakumardb1
ddb5bfb49a chore(deps): use wildcard (*) for @bytelyst/* internal packages
All @bytelyst/* packages are internal to the ByteLyst ecosystem and
published to the private Gitea registry. Using "*" eliminates version
bump noise — always resolves to latest available.
2026-04-13 01:05:35 -07:00
root
a73b3e5bc4 chore: bump @bytelyst/* deps to latest registry versions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 06:04:34 +00:00
saravanakumardb1
e6dacbe809 feat(palace): web UI — palace client, 4 components, palace page, sidebar nav, 6 tests 2026-04-10 01:46:51 -07:00
saravanakumardb1
e5f287c7ea feat(web): add intake URL bar, share dialog, intake API client — dashboard + enhanced sharing UI 2026-04-06 20:35:02 -07:00
saravanakumardb1
18646fac6d fix(tests): fix all failing tests — server mock, ecosystem schema stubs, CreateNoteModal body assertion 2026-04-06 19:13:35 -07:00
saravanakumardb1
d4cc696e02 fix: align PromptTemplateEditor, SmartActionsPanel, prompts page with backend enums; fix RunPromptModal type cast 2026-04-06 16:27:22 -07:00
saravanakumardb1
192c7baf2f fix: align web+mobile types with backend (categories, output types, field names, durationMs telemetry) 2026-04-06 16:24:31 -07:00