diff --git a/.agents/memory/MEMORY.md b/.agents/memory/MEMORY.md index 5cc2357..d587784 100644 --- a/.agents/memory/MEMORY.md +++ b/.agents/memory/MEMORY.md @@ -3,3 +3,4 @@ - [NDJSON streaming on Replit](ndjson-streaming-express-replit.md) — use `res.on("close")`+`writableFinished` (NOT `req.on("close")`); persist on disconnect; proxy doesn't buffer; gate fallback to avoid dup rows. - [Skill fingerprint & relation matching](skill-fingerprint-matching.md) — don't put display name in fingerprint path; match modified by file-path Jaccard (hash-Jaccard misses single-file edits), report content-aware similarity. - [Testing api-server from shell](api-server-local-curl.md) — external `$REPLIT_DEV_DOMAIN/api` curl returns HTTP 000; curl `http://localhost:/api` instead (port from workflow log). +- [Stale codegen & unapplied migrations](skillguard-stale-codegen-and-migrations.md) — "field already in API" tasks: dev/test DB + lib `dist/*.d.ts` lag; run drizzle push + `tsc -b` the lib. diff --git a/.agents/memory/skillguard-stale-codegen-and-migrations.md b/.agents/memory/skillguard-stale-codegen-and-migrations.md new file mode 100644 index 0000000..550bc9d --- /dev/null +++ b/.agents/memory/skillguard-stale-codegen-and-migrations.md @@ -0,0 +1,16 @@ +--- +name: SkillGuard stale codegen & unapplied migrations +description: In an isolated task env, schema/codegen from prior tasks may not be applied; symptoms and fixes. +--- + +When a frontend-only task says "the field is already delivered by the API, no backend change needed," the field may still be **absent from the running dev/test database and from the built type artifacts** in an isolated task environment, because the prior task that added it hasn't been merged/applied here. + +**Symptoms:** +- `tsc` against an artifact fails with `Property 'X' does not exist on type` even though `lib/api-client-react/src/generated/*.ts` clearly has it. The artifact tsconfig uses TS **project references** that resolve to the lib's built `dist/*.d.ts`, which is stale. Vite (runtime) uses `src` via the package `exports` field, so the app still runs. +- API list/detail endpoints 500 with Postgres `column "X" of relation "scans" does not exist`; tests fail on insert/select for the same reason. + +**Fix:** +- Rebuild the lib's declarations: `npx tsc -b lib/api-client-react/tsconfig.json` (or run the workspace typecheck) so `dist/*.d.ts` matches `src`. +- Apply the schema to dev+test DB: `pnpm --filter @workspace/db run push` (drizzle-kit push). Adding a nullable column is safe. Restart the api-server workflow afterward. + +**Why:** drizzle schema in `lib/db/src/schema` and the openapi-driven generated client are the source of truth; the dev DB and `dist` artifacts lag until explicitly pushed/rebuilt in a fresh environment. diff --git a/.replit b/.replit index 497a596..cf5c912 100644 --- a/.replit +++ b/.replit @@ -1,4 +1,4 @@ -modules = ["nodejs-24"] +modules = ["nodejs-24", "postgresql-16"] [deployment] router = "application" @@ -50,3 +50,6 @@ externalPort = 8081 [[ports]] localPort = 20892 externalPort = 3000 + +[nix] +channel = "stable-25_05" diff --git a/artifacts/skillguard/src/pages/dashboard.tsx b/artifacts/skillguard/src/pages/dashboard.tsx index 4bbe00c..a5a371e 100644 --- a/artifacts/skillguard/src/pages/dashboard.tsx +++ b/artifacts/skillguard/src/pages/dashboard.tsx @@ -93,10 +93,13 @@ export default function Dashboard() {

Keine Scans vorhanden.

) : ( data.recentScans.map((scan) => ( - -
+ +
{scan.name || `Scan #${scan.id}`} {formatDate(scan.createdAt)} · {scan.source} + {scan.description && ( + {scan.description} + )}
diff --git a/artifacts/skillguard/src/pages/scan-history.tsx b/artifacts/skillguard/src/pages/scan-history.tsx index 322b8b2..cd6ec5e 100644 --- a/artifacts/skillguard/src/pages/scan-history.tsx +++ b/artifacts/skillguard/src/pages/scan-history.tsx @@ -83,6 +83,9 @@ export default function ScanHistory() { )}
+ {scan.description && ( +

{scan.description}

+ )}