feat(F-176): completed feature
This commit is contained in:
3
work/artifacts/F-176/architect.md
Normal file
3
work/artifacts/F-176/architect.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# F-176 — Design
|
||||
|
||||
Use `p.name`, `p.state='active'`, `v.sku/ean`, `inventory_stock.available`, `pricing_variant_prices.net_unit_amount_cents`, and categories linked by `product_id`. Search EAN with `ILIKE` so scanner input and partial manual barcode searches both work. Keep all input parameterized.
|
||||
3
work/artifacts/F-176/documenter.md
Normal file
3
work/artifacts/F-176/documenter.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# POS product search
|
||||
|
||||
The POS search field accepts product names, SKU, full EAN and partial EAN text. Lookup failures now display an explicit API error instead of the misleading “Sin resultados”.
|
||||
19
work/artifacts/F-176/implementer.md
Normal file
19
work/artifacts/F-176/implementer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# F-176 — Implementer
|
||||
|
||||
## Cause
|
||||
POS lookup SQL was written for an obsolete schema and referenced nonexistent columns: `v.name`, `v.active`, `p.active`, `inventory_stock.quantity`, `pricing_variant_prices.price_cents`, plus category links by variant. PostgreSQL returned 500; the UI swallowed it and rendered “Sin resultados”.
|
||||
|
||||
## Changes
|
||||
- Search uses product name/state and current variant SKU/EAN.
|
||||
- Inventory uses summed `available`, scoped to the active store.
|
||||
- Price uses offer or current net amount.
|
||||
- Category lookup uses `catalog_product_categories.product_id`.
|
||||
- Manual partial EAN search uses parameterized `ILIKE`; exact EAN/SKU endpoints were repaired too.
|
||||
- UI now exposes API search errors rather than reporting false empty results.
|
||||
|
||||
## Evidence
|
||||
- Project TypeScript PASS.
|
||||
- POS Next build PASS.
|
||||
- `git diff --check` PASS.
|
||||
- Authenticated runtime search `q=590123412345`: HTTP 200, 12 existing products.
|
||||
- Exact EAN `59012341234501`: HTTP 200, Almendras Crudas Ecologicas, stock 25, price 895.
|
||||
1
work/artifacts/F-176/leader-close.json
Normal file
1
work/artifacts/F-176/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"leader","stage":"close","verdict":"APPROVED","checks":[{"item":"reviewer/security/qa approved","ok":true},{"item":"runtime partial and exact barcode acceptance","ok":true},{"item":"verify.sh green","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/qa.json
Normal file
1
work/artifacts/F-176/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"qa","stage":"qa_gate","verdict":"APPROVED","checks":[{"item":"partial barcode 590123412345 returns HTTP 200 and 12 products","ok":true},{"item":"exact EAN 59012341234501 returns correct product","ok":true},{"item":"stock and price returned","ok":true},{"item":"POS build and TypeScript","ok":true},{"item":"verify.sh","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/reviewer.json
Normal file
1
work/artifacts/F-176/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","checks":[{"item":"all lookup fields match current database schema","ok":true},{"item":"search UI no longer hides server errors","ok":true},{"item":"TypeScript and POS build","ok":true},{"item":"authenticated runtime search","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/security.json
Normal file
1
work/artifacts/F-176/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"security","stage":"security_gate","verdict":"APPROVED","checks":[{"item":"role authorization retained","ok":true},{"item":"query and limits remain parameterized","ok":true},{"item":"store scope supplied by active cash session","ok":true}],"issues":[]}
|
||||
@@ -1,3 +1,3 @@
|
||||
# F-174 — Fix missing almagro.ttf
|
||||
# F-176 — Fix POS existing product search
|
||||
|
||||
CSS solicita `/fonts/almagro.ttf`, pero archivo está como `Almagro.ttf`. Normalizar asset a minúsculas para filesystem case-sensitive.
|
||||
POS search currently executes stale SQL against nonexistent variant fields (`v.name`, `v.active`, `p.active`, `s.quantity`, `pp.price_cents`, category-by-variant), then hides HTTP 500 as an empty result. Align search/EAN/SKU queries with current catalog, pricing, inventory and category schemas. Barcode text must support exact and partial EAN lookup.
|
||||
|
||||
@@ -1,11 +1,68 @@
|
||||
{
|
||||
"feature_id": null,
|
||||
"stage": "idle",
|
||||
"feature_id": "F-176",
|
||||
"stage": "close",
|
||||
"agent": "leader",
|
||||
"action": "Sin ejecución activa",
|
||||
"state": "waiting",
|
||||
"action": "Close POS existing product search fix",
|
||||
"state": "running",
|
||||
"next_agent": "leader",
|
||||
"waiting_for": "Seleccionar una feature pending y actualizar este estado",
|
||||
"updated_at": "2026-08-22T16:39:53Z",
|
||||
"timeline": []
|
||||
"updated_at": "2026-08-22T16:49:23Z",
|
||||
"timeline": [
|
||||
{
|
||||
"ts": "2026-08-22T16:45:39Z",
|
||||
"agent": "leader",
|
||||
"stage": "intake",
|
||||
"state": "running",
|
||||
"message": "Diagnose POS product search for existing barcode"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:46:57Z",
|
||||
"agent": "architect",
|
||||
"stage": "design",
|
||||
"state": "running",
|
||||
"message": "Align POS lookup SQL with current catalog schema"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:47:05Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Repair POS product lookup queries and visible errors"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:48:42Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "Review current-schema POS search repair"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:48:51Z",
|
||||
"agent": "security",
|
||||
"stage": "security_gate",
|
||||
"state": "running",
|
||||
"message": "Audit POS search authorization and SQL parameters"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:49:02Z",
|
||||
"agent": "qa",
|
||||
"stage": "qa_gate",
|
||||
"state": "running",
|
||||
"message": "Validate partial barcode and exact EAN searches"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:49:12Z",
|
||||
"agent": "documenter",
|
||||
"stage": "document",
|
||||
"state": "running",
|
||||
"message": "Document repaired POS lookup behavior"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-22T16:49:23Z",
|
||||
"agent": "leader",
|
||||
"stage": "close",
|
||||
"state": "running",
|
||||
"message": "Close POS existing product search fix"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user