Files
webdev-pipeline/backlog/tasks/task-41 - Repariere-Convex-Typecheck-fuer-Usage-Events.md

2.2 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
id title status assignee created_date updated_date labels dependencies priority ordinal
TASK-41 Repariere Convex-Typecheck fuer Usage Events In Progress
2026-06-06 22:13 2026-06-06 22:16
high 43000

Description

Fix final Convex typecheck blockers after adding usageEvents and external screenshot persistence. This includes updating generated Convex API references if required and making screenshot blob storage type-valid without changing runtime behavior.

Acceptance Criteria

  • #1 pnpm exec convex codegen --dry-run --typecheck enable exits 0
  • #2 pnpm exec tsc --noEmit exits 0 or reports only documented unrelated pre-existing issues
  • #3 pnpm test remains green

Implementation Plan

  1. Reproduce Convex typecheck/codegen failures
  2. Regenerate Convex API if required
  3. Fix screenshot Blob typing with minimal runtime-neutral change
  4. Re-run Convex typecheck, tsc, pnpm test
  5. Leave task In Progress until Matthias confirms Done

Implementation Notes

Verification/results:

  • Reproduced with pnpm exec convex codegen --dry-run --typecheck enable outside sandbox after pnpm sandbox DB failure; initial result failed with TS2339 internal.usageEvents missing and TS2322 Uint8Array<ArrayBufferLike> not assignable to BlobPart in convex/auditGenerationAction.ts.
  • Ran pnpm exec convex codegen outside sandbox; generated convex/_generated/api.d.ts now includes usageEvents.
  • Applied minimal ownership-scoped Blob typing fix in convex/auditGenerationAction.ts by wrapping screenshotBytes with new Uint8Array(screenshotBytes) before Blob storage.
  • pnpm exec convex codegen --dry-run --typecheck enable exits 0.
  • pnpm exec tsc --noEmit exits 2 only because of unrelated pre-existing v2_elemente/* errors (missing local generated modules/imports and implicit any issues); no TASK-41/convex/auditGenerationAction.ts errors remain. Per user instruction, v2_elemente fixes were not touched.
  • pnpm test exits 0: 363 tests passed, 0 failed.