feat(F-063): completed feature

This commit is contained in:
chattie
2026-08-19 17:07:45 +02:00
parent 52e30c39d7
commit c34241134f
15 changed files with 227 additions and 22 deletions

View File

@@ -3188,6 +3188,69 @@
"close": true
},
"completed_at": "2026-08-19T15:02:14Z"
},
{
"id": "F-063",
"type": "fix",
"title": "Product editor infinite fetch and broken checkboxes",
"problem": "ProductEditor useEffect includes getSnap in deps which is rebuilt on every state change; on every re-render it calls productsApi.get again; setting array state with new references prevents React from bailing so the loop never stops. Clicks on featured/category/attribute controls appear to be ignored because the next fetch resets the state.",
"goal": "Featured category and attribute selectors respond immediately to clicks; no fetch loop; product loads once and stays put",
"scope_in": [
"Move getSnap out of the load useEffect deps using an empty-deps one-shot effect; use a ref-stable getter; ensure the dirty-check effect still works after the change. Then re-verify clicking featured and a category changes state and persists across renders."
],
"scope_out": [
"No API change",
"no schema change"
],
"priority": "high",
"risk": "low",
"description": "Problem: ProductEditor useEffect includes getSnap in deps which is rebuilt on every state change; on every re-render it calls productsApi.get again; setting array state with new references prevents React from bailing so the loop never stops. Clicks on featured/category/attribute controls appear to be ignored because the next fetch resets the state.. Goal: Featured category and attribute selectors respond immediately to clicks; no fetch loop; product loads once and stays put. Scope IN: Move getSnap out of the load useEffect deps using an empty-deps one-shot effect; use a ref-stable getter; ensure the dirty-check effect still works after the change. Then re-verify clicking featured and a category changes state and persists across renders.. Scope OUT: No API change, no schema change. Type: fix. Priority: high. Risk: low.",
"acceptance": [
"GET /api/products/:id fires exactly once on mount and again only on navigation",
"Clicking featured and a category updates state and persists after re-render",
"Loading spinner disappears after the first successful fetch and never reappears",
"verify.sh is green"
],
"status": "done",
"created_at": "2026-08-19",
"gates": {
"reviewer": true,
"security": true,
"qa": true,
"close": true
},
"completed_at": "2026-08-19T15:07:45Z"
},
{
"id": "F-064",
"type": "feature",
"title": "Product description uses WYSIWYG editor in admin",
"problem": "Admin product editor description field is a plain textarea forcing HTML by hand and product pages render it as plain text",
"goal": "Editing the product description is WYSIWYG using the Lexical editor; rendered HTML on public storefront and frontend",
"scope_in": [
"Core flow"
],
"scope_out": [
"Add the LexicalEditor component to the product description field in apps/admin/src/features/products/components/ProductEditor.tsx; switch the public renderers in frontend/src/app/products/[slug]/page.tsx and storefront/src/app/productos/[slug]/page.tsx to dangerouslySetInnerHTML; ensure existing plain-text descriptions still render"
],
"priority": "low",
"risk": "low",
"description": "Problem: Admin product editor description field is a plain textarea forcing HTML by hand and product pages render it as plain text. Goal: Editing the product description is WYSIWYG using the Lexical editor; rendered HTML on public storefront and frontend. Scope IN: Core flow. Scope OUT: Add the LexicalEditor component to the product description field in apps/admin/src/features/products/components/ProductEditor.tsx; switch the public renderers in frontend/src/app/products/[slug]/page.tsx and storefront/src/app/productos/[slug]/page.tsx to dangerouslySetInnerHTML; ensure existing plain-text descriptions still render. Type: feature. Priority: low. Risk: low.",
"acceptance": [
"med",
"Admin product editor description is the Lexical WYSIWYG with toolbar",
"Saving the product persists the HTML body produced by the editor",
"Public product pages render the description HTML safely",
"Existing plain text descriptions still display",
"verify.sh is green"
],
"status": "pending",
"created_at": "2026-08-19",
"gates": {
"reviewer": false,
"security": false,
"qa": false
}
}
]
}