Commit Graph

9 Commits

Author SHA1 Message Date
8f541c9f87 chore(audit): unblock workspace lint pipeline + 13 mechanical fixes
The first `pnpm -r exec eslint .` run was bailing at the very first
package (design-tokens), hiding any lint state in the rest of the 69
workspace packages. This commit fixes the structural blockers so the
pipeline runs end-to-end, then sweeps the small, low-risk lint errors
in the next 4 packages it surfaces. Real lint debt that remains
(85 errors, mostly @typescript-eslint/no-unused-vars across many
unrelated packages) is cataloged in docs/AUDIT_PLATFORM.md for follow-
up by package owners.

Structural fixes (eslint config):
  - eslint.config.js (root):
      • New flat-config block for **/*.cjs and **/scripts/**/*.{js,cjs}
        with Node globals (process, console, require, module, __dirname)
        and no-console disabled. CLI scripts legitimately print to
        stdout. This alone clears the 45 errors in design-tokens'
        validate-tokens.cjs.
      • Added XMLHttpRequest + ProgressEvent to browser globals so
        feedback-client compiles.
  - packages/ui/eslint.config.js:
      • Added @typescript-eslint/parser — the package-local override
        replaced (didn't merge with) the root config, so TS syntax was
        being parsed by espree and erroring on every `interface` /
        type import.
      • Added ignores for dist/** (root's ignores aren't inherited).
      • Extended the files glob to .storybook/**/*.{ts,tsx}.

Mechanical lint fixes (no behaviour change):
  - design-tokens/scripts/{validate,token-coverage}.cjs: empty catch
    binding (catch (e) → catch).
  - feedback-client/src/index.ts:
      • captureScreen(): preserve caught error via `{ cause: err }`
        on the rethrown Error (preserve-caught-error rule, real bug —
        previous chain dropped the original stack).
      • captureElement(): rename unused parity params mimeType/quality
        to _mimeType/_quality and document why they exist.
  - logger/__tests__/logger.test.ts: drop unused `LoggerConfig` import.
  - extraction-service/{lib/circuit-breaker,modules/extract/{sidecar-
    monitor,usage}}.test.ts: drop 3 unused vitest/type imports.
  - tracker-web/__tests__/tracker-proxy.test.ts: rename unused local
    `url` → `_url`.

New: docs/AUDIT_PLATFORM.md
  Tooling-backed audit summary (pnpm install / typecheck / test / lint
  results), classification of remaining lint debt by rule, and an
  ordered hand-off plan for package owners to clear the rest with
  `pnpm --filter <pkg> lint:fix` followed by an eyeball review.

Verified before commit:
  - `pnpm typecheck` → pass (all 69 packages compile)
  - `pnpm test`      → pass (~2,200 tests across 18+ suites)
  - `pnpm lint`      → 85 pre-existing errors surfaced (none introduced
    by this commit; all in unrelated packages — see AUDIT_PLATFORM.md
    section P).

Out of scope (left untouched in working tree):
  - In-progress nomgap-on-Vercel migration: docker-compose.ecosystem.yml,
    products/nomgap/product.json, services/platform-service/src/
    modules/flags/seed.ts.
  - pnpm-lock.yaml: my `pnpm install -r` regenerated it (+2.9k/-8.5k
    lines) — not part of the audit, owner should commit deliberately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:21:34 -07:00
saravanakumardb1
1576b699b0 feat(platform-service): resolve all P3 TODOs — diagnostics notifications + test cleanup
- diagnostics/subscribers: notify admin via email when debug session is
  cancelled (looks up session creator via getSession + getUserById)
- diagnostics/subscribers: email session summary (logs/traces/screenshots)
  to admin when debug session completes
- diagnostics/subscribers: send Slack alert via dispatchSlack for FATAL
  logs ingested during debug sessions (on-call engineer notification)
- feedback-client/integration.test.ts: replace TODO-4 with clear NOTE,
  fix unused var lint errors
- feedback-client/gdpr.test.ts: mark lifecycle policy as accepted,
  remove console.log + unused blobPath variable
- Update WORKSPACE_TODO_AUDIT.md — P3 section: all 5 resolved
- Typecheck clean, 1483/1483 tests pass
2026-03-22 01:03:51 -07:00
saravanakumardb1
5195f9c052 fix(platform): production readiness — admin-web client bundling, config sub-path exports, stale tests
- dashboards/admin-web: split product-constants.ts for client-safe imports
- dashboards/admin-web: serverExternalPackages + webpack fallbacks for @bytelyst/config
- dashboards/admin-web: instrumentation.ts uses @bytelyst/config/keyvault sub-path
- packages/config: add ./keyvault and ./product-identity sub-path exports
- packages/feedback-client: fix stale test expectation (TODO-1 → actual error message)
- packages/sync: fix reprocessFailed test (flush already pushes items)
2026-03-12 16:49:15 -07:00
saravanakumardb1
8749aa211d fix(feedback-client): update tests to use fetch instead of post 2026-03-03 12:26:02 -08:00
saravanakumardb1
914e344a92 fix(feedback-client): correct ApiClient method usage and types 2026-03-03 12:20:43 -08:00
saravanakumardb1
88fda8cf39 test(feedback): implement TODO-5 and TODO-7 - GDPR test and Azure lifecycle docs
- Add gdpr.test.ts with GDPR deletion compliance tests
- Add Azure lifecycle policy configuration section to roadmap
- Include Azure Portal, CLI, and Terraform examples
- Document 90-day TTL for GDPR compliance
2026-03-03 07:20:23 -08:00
saravanakumardb1
bd19d444f1 test(feedback-client): implement TODO-4 - integration tests for screenshot flow
- Add integration tests for full SAS flow (generate SAS → upload → submit)
- Add test for feedback without screenshot
- Add upload progress tracking test
- Add unit tests for content type validation and size limits
- Skip integration tests if blob storage not configured
2026-03-03 07:11:40 -08:00
saravanakumardb1
921f21164d feat(feedback-client): implement TODO-1 - web screenshot capture
- Add ScreenshotOptions and CaptureResult interfaces
- Implement captureScreenshot() with getDisplayMedia for screen capture
- Implement captureElement() placeholder for DOM element capture
- Implement captureAndSubmit() flow
- Fix getDisplayMedia constraints (remove cursor property)
2026-03-03 07:11:07 -08:00
saravanakumardb1
b261cda1cd feat(feedback-client): Phase 2.1 - create @bytelyst/feedback-client TypeScript SDK 2026-03-03 00:03:03 -08:00