Commit Graph

101 Commits

Author SHA1 Message Date
saravanakumardb1
b4e450d68a feat(admin-web): add @bytelyst/command-palette (Cmd-K) to dashboard (UX-3)
- Mount CommandRegistryProvider in (dashboard)/layout.tsx and a CommandMenu
  that binds the global Cmd-K / Ctrl-K hotkey (useCommandPalette) and lazy-loads
  the dialog via next/dynamic (own chunk; dynamic target is a local re-export
  command-palette-dialog.tsx because the package declares only an `import`
  export condition).
- src/lib/admin-commands.ts: pure builder for 21 navigate-mode commands across
  the major surfaces (Users, Subscriptions, Licenses, Billing, Usage,
  Broadcasts, Flags, Experiments, Audit, Ops, …) plus theme-toggle and sign-out
  actions wired to the existing auth/theme contexts; onNavigate -> router.push.
- @bytelyst/command-palette added as workspace:* (importer-only lockfile change;
  --frozen-lockfile clean).
- vitest.config: inline command-palette + dedupe react for the interaction test.

Tests: pure command-set assertions + a happy-dom Cmd-K/Ctrl-K interaction test
(react-dom/client + act, no new deps).

Verify: typecheck+lint+build green (123 routes); vitest 19 files / 165 tests
(+6); format:check no new failures; e2e 11 passed / 80 failed (unchanged vs
UX-1 baseline — environmental, no backend).

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-29 13:58:49 -07:00
saravanakumardb1
50704c6e45 docs(admin-web): tick UX-2 with SHA + test counts (UX-2) 2026-05-29 13:47:11 -07:00
saravanakumardb1
01f79afaf3 feat(admin-web): migrate recharts to @bytelyst/charts + data-viz, drop recharts (UX-2)
Replace all 5 direct recharts usages with the shared, token-themed SVG
primitives, lazy-loaded for bundle savings:
- dashboard, usage, users/[id], ops/client-logs, extraction/entity-chart
  now render AreaChart/BarChart/Donut from @bytelyst/charts.
- new src/components/charts: next/dynamic wrappers (own chunk, ssr:false)
  that dynamic-import a local static re-export (primitives.tsx) — the chart
  packages declare only an `import` export condition, so a direct
  import('@bytelyst/charts') trips Next's resolver.
- new src/lib/chart-data.ts: pure, finite-safe data mappers (unit-tested).
- recharts removed from package.json + the admin-web lockfile importer entry
  (now fully unused). Lockfile delta is importer-only (+charts/+data-viz as
  workspace:*, -recharts); no monorepo re-normalization; --frozen-lockfile clean.
- vitest.config: inline @bytelyst/{charts,data-viz} + dedupe react so the
  SSR no-NaN render tests use a single React copy.

Fidelity notes (charts are single-series/vertical; StackedBar is charts 0.2.x):
stacked severity chart -> single bars colored by dominant severity; pie charts
-> Donut; horizontal bars -> vertical.

Verify: typecheck+lint+build green (123 routes); vitest 18 files / 159 tests
(+19); format:check no new failures; e2e 11 passed / 80 failed (unchanged vs
UX-1 baseline — failures are environmental, no backend).

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-29 13:46:28 -07:00
saravanakumardb1
a993c5c924 docs(admin-web): tick UX-1 with SHA + test counts (UX-1) 2026-05-29 13:25:26 -07:00
saravanakumardb1
df72199cd1 feat(admin-web): --bl-* token bridge + UI-drift ratchet + baseline audit (UX-1)
Additive phase-1 foundation for ByteLyst UX integration:
- globals.css: bridge the shared --bl-* contract onto admin's shadcn OKLCH
  ramp (surfaces/borders/text/accent/danger/focus) so @bytelyst/* components
  theme correctly in light AND dark. Mappings reference admin --* vars that
  flip under .dark, so parity is inherited with zero new color literals.
  Status hues (success/warning/info) intentionally inherit design-tokens.
- eslint.config.mjs: no-restricted-imports ratchet forbidding direct
  @bytelyst/ui imports outside the Primitives.tsx adapter seam.
- primitives-exports.test.ts: export-presence guard for the adapter surface.
- roadmap: author verified baseline audit + green/red gate table + e2e baseline.

Verify: typecheck+lint+build green; vitest 17 files / 140 tests (+29);
format:check no new failures (29 pre-existing, out of scope); e2e baseline
11 passed / 80 failed (80 environmental — no backend).

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-29 13:25:00 -07:00
saravanakumardb1
b2539f21d0 docs(admin-web): note deferred phase-2 shadcn-layer migration 2026-05-29 13:07:27 -07:00
saravanakumardb1
42aaea03e5 docs(admin-web): add ByteLyst UX integration roadmap (additive phase 1) 2026-05-29 13:05:00 -07:00
saravanakumardb1
d1d88db4dd chore(gitea): rename npm package owner ByteLyst -> learning_ai_user 2026-05-26 18:38:57 -07:00
saravanakumardb1
eed654418e fix(admin-web/eslint): hoist .cjs ignore to index-0 ignores block
The previous fix (commit a4ee36b6) added '.pnpmfile.cjs' to the
globalIgnores() call at the END of the admin-web eslint config,
but flat-config v9 only applies ignores from the FIRST config
object that contains an 'ignores' key — every subsequent config
item is matched against the file before the late ignore is read.
That's why CI run 66 still failed with the same require() error
even after the dashboard-level ignore was in place.

Fix: declare an explicit '{ ignores: [...] }' at array index 0,
which is the documented eslint v9 pattern for skipping files
before any rule config attaches:

  defineConfig([
    { ignores: ['**/.pnpmfile.cjs', '**/*.cjs'] },  // <-- now first
    ...nextVitals,
    ...nextTs,
    { rules: { ... } },
    globalIgnores([ ... ]),
  ])

Verified locally:
  cd dashboards/admin-web && npx eslint .  -> 0 errors, 0 warnings
2026-05-23 17:15:34 -07:00
saravanakumardb1
a4ee36b681 fix(admin-web/eslint): also ignore .pnpmfile.cjs at the dashboard level
The previous root-level eslint.config.js .cjs ignore (commit
1be38bef) had no effect on CI because 'pnpm -r exec eslint .' walks
into each workspace and invokes the LOCAL eslint config. admin-web
has its own dashboards/admin-web/eslint.config.mjs (extending
eslint-config-next), which did NOT ignore .cjs files. So the same
.pnpmfile.cjs require() errors kept failing run 64 and run 65 with
identical output.

Fix at the consumer (dashboard) level so 'pnpm -r exec eslint' sees
the ignore regardless of which workspace it runs from:

  globalIgnores([
    ...
    '.pnpmfile.cjs',
    '**/*.cjs',
  ])

Verified locally:
  cd dashboards/admin-web && pnpm lint  -> 0 errors

tracker-web has no .pnpmfile.cjs and no other .cjs configs, so its
eslint config does not need the same change yet — adding it would
be defensive but not required.
2026-05-23 17:06:56 -07:00
saravanakumardb1
a59fd92632 fix(admin-web): replace useAuth-getAccessToken with localStorage helper
The devops page was importing useAuth from '@bytelyst/react-auth'
and destructuring a non-existent 'getAccessToken' method:

  src/app/devops/page.tsx
    Type error: Module '@bytelyst/react-auth' has no exported member
    'useAuth'.
    Property 'getAccessToken' does not exist on type
    'AuthContextValue<AdminUser>'.

This had been silently masked because admin-web wasn't being built
in the consumer-repo CI workflows that just used `pnpm build`
filtered to /packages/*. Once those CI workflows switched to a
broader `pnpm build` (in the fastgap and local_llms workflow
rewrites), this dashboard build failure surfaced and blocked
EVERY consumer-repo CI run that pulls common-plat at the start
(fastgap, local_llms, jarvis_jr, etc.).

Two fixes applied to the same file:

1. Import path — useAuth lives in '@/lib/auth-context' (admin-web's
   own provider exposed via createAuthProvider), not in
   '@bytelyst/react-auth'. That package only exports the factory,
   types, and LoginResult.

2. Token access — getAccessToken is NOT on AuthContextValue. The
   canonical pattern used throughout admin-web
   (settings/security, settings/devices, debug-sessions, …) is to
   read the token directly from localStorage under the
   'admin_access_token' key. Switched to that pattern with a small
   typed helper at the top of the file.

Both changes documented in-source with a comment block so the
next agent doesn't try to re-introduce a useAuth.getAccessToken
import.
2026-05-23 15:03:02 -07:00
root
c39da91588 feat(platform): add /devops page with platform common devops package
- Add @bytelyst/devops backend endpoints to platform-service
- Add /api/devops/version (public) and /api/devops/info (admin) endpoints
- Add /devops page to admin-web using @bytelyst/devops/ui DevopsPanel
- Add devops link to admin web sidebar navigation
- Add build metadata and runtime information display
- Follow trading web devops pattern

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-11 03:38:06 +00:00
root
35bf51302c feat(admin-web): adopt trading web deployment model with docker-compose
- Add admin-web to docker-compose.yml following trading pattern
- Update admin-web Dockerfile with multi-stage build and metadata
- Add build metadata (commit SHA, branch, timestamp, author, message)
- Add hotcopy deployment script for quick updates
- Add unauthorized page and rate limiting library
- Add runtime utilities and auto-refresh hook

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-11 03:24:33 +00:00
root
b6e996714d refactor(admin-web): integrate design tokens and improve accessibility
- Updated Badge component to use design token CSS variables (bl-*)
- Updated Button component to use design token CSS variables (bl-*)
- Improved focus states with proper design token colors
- Added aria-label to logout button in sidebar for better accessibility
- Maintains backward compatibility while improving consistency

This moves admin web toward design system compliance while ensuring
no breaking changes to existing functionality.

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-11 02:06:04 +00:00
root
a058419828 feat(admin-web): add UX foundation - local package resolution and design tokens
Phase 1 of UX compliance implementation:
- Add .pnpmfile.cjs for local package resolution from common platform
- Install @bytelyst/ui for shared UI components
- Create Primitives.tsx product adapter for type-safe component extensions
- Integrate @bytelyst/design-tokens CSS variables
- Enable design token usage via CSS custom properties

This establishes the foundation for component normalization and
consistent styling across ByteLyst products, following the UX
implementation guide patterns.

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-11 01:51:47 +00:00
10895977d4 chore(admin-web): clear dashboard warning sweep
What changed:
- Removed unused admin dashboard imports and props.
- Wrapped dashboard loaders in stable callbacks for hook dependency correctness.
- Rendered experiment list load errors and migrated the security QR image to next/image.

Warning impact:
- @bytelyst/admin-web scoped warnings: 16 -> 0.
- Workspace warning total: 173 -> 157.

Verification:
- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx
- pnpm --filter @bytelyst/admin-web typecheck
- pnpm --filter @bytelyst/admin-web test
- pnpm --filter @bytelyst/admin-web build
- pnpm lint
2026-05-04 16:27:02 -07:00
db4257fd76 chore(admin-web): clear feedback warnings
What changed:

- Removed unused feedback router import and unused catch bindings.

- Wrapped feedback loading in useCallback to satisfy hook dependencies.

- Replaced screenshot lightbox img with unoptimized Next Image.

Warning impact:

- dashboards/admin-web feedback page: 7 warnings -> 0 warnings.

- Workspace lint warning lines: 191 -> 176 in /tmp/lint-before-agent-a.log and /tmp/lint-after-fix-agent-a.log.

Verification:

- pnpm --filter @bytelyst/admin-web typecheck

- pnpm --filter @bytelyst/admin-web test

- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx

- pnpm lint
2026-05-04 15:58:49 -07:00
f8949d230f chore(admin-web): reduce high-signal lint warnings 2026-04-04 17:56:53 -07:00
631784e551 chore(admin-web): clear repo-wide lint errors 2026-04-04 17:50:20 -07:00
82a44c249f feat(runtime): add Cowork checkpoint drill-in 2026-04-04 17:29:12 -07:00
d328c7ad68 feat(admin-web): harden timeline review console 2026-04-04 11:40:56 -07:00
71ef2ac6f6 feat(admin-web): add agent runtime console 2026-04-04 01:45:45 -07:00
6f3a563edf feat(admin-web): add ecosystem timeline dashboard 2026-04-04 01:40:20 -07:00
root
eba9a3abb1 chore(admin): remove localmemgpt from VM ops inventory 2026-03-31 09:19:42 +00:00
root
0e0da504a2 chore(admin): refine LLM web app classifications 2026-03-31 09:12:50 +00:00
root
509ea89280 feat(admin): track VM-hosted web surfaces in ops 2026-03-31 08:55:40 +00:00
root
4b9ae37ead feat(admin): add restart controls and valkey delete actions 2026-03-31 08:44:44 +00:00
root
bd7ebeb248 feat(admin): add VM inventory and Valkey inspector 2026-03-31 08:32:30 +00:00
root
89f2f1288b feat(admin): add ops quick links 2026-03-31 07:34:52 +00:00
root
534395bb5e fix(dashboards): restore runtime and expose internal ops health 2026-03-31 07:26:43 +00:00
root
c0cf80d96b docs(devops): add Track A handoff and prep gateway changes 2026-03-29 23:57:03 +00:00
root
eba6c7a641 chore(platform): align docker and package outputs 2026-03-29 23:41:08 +00:00
saravanakumardb1
e928ec6025 fix(infra): audit round 2 — token guard, frozen-lockfile, build cache, docs
- Add require_gitea_token() guard — fail early with actionable message
  if GITEA_NPM_TOKEN is empty after restore (prevents silent failures
  in Phase 4/5/7)
- Wire require_gitea_token() into phase4_build and setup_compose_env
- Remove --frozen-lockfile from admin-web + tracker-web Dockerfiles
  (Docker context is missing services/ and scripts/ workspace members;
  Phase 4 reconciles lockfile so --frozen-lockfile is unnecessary)
- Add docker builder prune after Phase 7 builds (reclaim 20-40 GB)
- Update README: pre-flight thresholds, Ollama stop/restart behavior,
  Loki + Azurite in port map, updated memory pressure note
2026-03-24 13:37:21 -07:00
saravanakumardb1
2b9fd71740 fix(docker): make proxy optional in dashboard Dockerfiles, strip proxy in VM setup 2026-03-24 10:35:00 -07:00
saravanakumardb1
eac1ba3faf fix(dashboards): upgrade Dockerfiles from node:20 to node:22-alpine 2026-03-24 10:05:11 -07:00
saravanakumardb1
4d050696c1 fix(dashboards): add typecheck script, remove stale engines.node 20.x 2026-03-24 08:39:58 -07:00
saravanakumardb1
ef246989b6 fix(docker): align dashboard images with node 20 2026-03-23 16:17:42 -07:00
saravanakumardb1
618ba6a86d fix(docker): harden dashboard container builds 2026-03-23 16:16:47 -07:00
saravanakumardb1
0ffbdce0ef fix(ci): fix admin-web test mocks + workflow build command
- Add getCurrentUserFromRequest + requireAdmin to all 8 auth-server test mocks
- Fixes Vitest 4.x strict mock requiring all accessed exports
- Skip pnpm install in CI workflow (deps already installed locally)
2026-03-22 21:11:24 -07:00
saravanakumardb1
34c34360b7 fix(dashboards): wire telemetry error reporting in admin-web + tracker-web error boundaries
- Import trackEvent from @/lib/telemetry in both error.tsx files
- Report unhandled errors with error name, message, and digest
- Resolves P0 TODO items #1 and #2 from WORKSPACE_TODO_AUDIT.md
2026-03-21 23:49:14 -07:00
saravanakumardb1
9180954903 fix(platform+admin-web): 3 bugs in delivery retry + webhooks delivery loading
Backend (delivery retry):
- Use NotFoundError (404) instead of BadRequestError (400) for missing log doc
- Add telegram + slack retry support (was email-only, threw error for others)

Frontend (delivery page):
- Add pk field to DeliveryEntry interface
- Pass pk query param in retry call so backend can look up the doc
- Fix handleRetry to accept full entry object instead of just id

Frontend (webhooks page):
- Parallelize delivery fetches with Promise.allSettled (was sequential for loop)
- Significant page load improvement for subscriptions with many deliveries
2026-03-21 23:21:58 -07:00
saravanakumardb1
29605da16d fix(admin-web): implement debug-session JSON download, remove console.log 2026-03-21 23:13:58 -07:00
saravanakumardb1
ead9457345 feat(platform+admin-web): implement 4 missing backend endpoints + re-enable frontend
Backend endpoints added:
- POST /delivery/logs/:id/retry — re-dispatches failed email deliveries (Q1)
- POST /reviews/:id/flag — flags review item with reason + admin metadata (Q2)
- DELETE /agent-evals/suites/:id — deletes evaluation suite with 204 response (Q3)

Frontend re-enabled:
- delivery: retry button for failed entries
- reviews: flag dropdown menu item
- agent-evals: delete dropdown menu item + Trash2 icon

Frontend fixed:
- webhooks: per-subscription delivery loading via GET /subscriptions/:id/deliveries (Q4)
2026-03-21 23:11:38 -07:00
saravanakumardb1
8c45e440df feat(admin-web): add experiments + ab-testing proxy routes, fix webhooks deliveries
New proxy routes:
- /api/experiments → rewrites to /api/ab-testing/experiments (base + catch-all)
- /api/ab-testing/[...path] → /api/ab-testing/* (for suggestions, hypotheses)

Bug fix:
- B20: webhooks page called GET /webhooks/deliveries (404) — removed broken call,
  backend only has GET /webhooks/subscriptions/:id/deliveries (TODO Q4)
2026-03-21 22:56:22 -07:00
saravanakumardb1
880338b79c feat(admin-web): add missing proxy routes for ai-diagnostics + feedback pages
- ai-diagnostics: GET/POST /api/ai-diagnostics/* → platform-service /api/ai-diagnostics/*
- feedback: GET/POST/DELETE /api/feedback/* → platform-service /api/feedback/*
- feedback base: GET/POST /api/feedback → platform-service /api/feedback

These pages existed with sidebar items but had no proxy routes, causing 404s.
2026-03-21 21:17:04 -07:00
saravanakumardb1
c54a3fe277 fix(admin-web): fix agent-evals run endpoint + disable delete (no backend)
- B18: POST /agent-evals/suites/:id/run → /suites/:id/runs (plural)
- B19: DELETE /agent-evals/suites/:id has no backend endpoint — disabled with TODO Q3
2026-03-21 21:14:52 -07:00
saravanakumardb1
587d22e107 fix(admin-web): correct 4 more broken API calls in organizations + marketplace
Organizations fixes:
- B13: GET /orgs/:id/members → GET /orgs/:id/memberships (match backend)
- B14: DELETE /orgs/:id/delete → DELETE /orgs/:id (no suffix needed)

Marketplace fixes:
- B16: GET /marketplace/listings → GET /marketplace/admin/pending (admin view)
- B17: POST /marketplace/listings/:id/approve → POST /marketplace/admin/:id/approve
- B17: POST /marketplace/listings/:id/reject → POST /marketplace/admin/:id/reject
2026-03-21 21:12:32 -07:00
saravanakumardb1
a3e94f3f3d fix(admin-web): correct 12 broken API calls across 5 pages
Pages fixed:
- waitlist: GET /waitlist/list → GET /waitlist (root)
- delivery: GET /delivery/log → GET /delivery/logs; disable retry button (no backend endpoint)
- reviews: GET /reviews/list → GET /reviews; approve/reject → POST /:id/decision with body; disable flag (no endpoint)
- jobs: GET /jobs/list → GET /jobs; GET /runs/list → GET /runs; trigger → POST /jobs/trigger with {jobId}
- gdpr-export: GET /exports/list → GET /exports; POST /exports/create → POST /exports

TODO Q1: delivery retry endpoint not implemented in backend
TODO Q2: reviews flag endpoint not implemented in backend
2026-03-21 21:06:49 -07:00
saravanakumardb1
0b8e45a9b0 fix(admin-web): jobs proxy route missing PATCH+DELETE exports — page uses PATCH in handleToggle 2026-03-21 20:46:53 -07:00
saravanakumardb1
e5ffdad8e8 fix(admin-web): jobs page uses PUT instead of PATCH — matches backend API 2026-03-21 20:44:00 -07:00