Files
mercadodevida/work/artifacts/F-058/reviewer.json
2026-08-19 15:17:51 +02:00

18 lines
1.4 KiB
JSON

{
"feature_id": "F-058",
"agent": "reviewer",
"verdict": "APPROVED",
"summary": "Two-layer fix: backend list endpoints now fetch images in bulk and feed them to serializeProduct; admin frontend now reads images[0].url instead of the dead imageUrl field. Implementation is consistent with the pattern already used by /productos/:slug and /products/:id. New listByProductIds query uses ANY($1::uuid[]) so it stays O(1) DB roundtrips regardless of page size.",
"evidence": [
"git diff project/src/modules/catalog/api/catalog.routes.ts — /catalog/products and /products/search now call images.listByProductIds and group by productId",
"git diff project/src/modules/catalog/infrastructure/pg-product-image-repository.ts — new listByProductIds implemented with single query",
"git diff project/src/modules/catalog/domain/ports.ts — interface extended with listByProductIds",
"git diff project/src/modules/catalog/tests/image-use-cases.test.ts — FakeImageRepository implements the new method",
"git diff project/apps/admin/src/app/(dashboard)/products/page.tsx — uses p.images?.[0]?.url with /uploads/40/ prefix",
"curl /api/catalog/products (admin) — Proteina Guisante Ecologica now has images=1 with the correct url",
"curl /api/products/search — same product returns images=1",
"npm run typecheck / test / build — all green",
"./scripts/verify.sh — exit 0"
],
"timestamp": "2026-08-19T13:50:00Z"
}