WFDASH-WEBAPP/docs/superpowers
Claude 3f82b0784d docs(spec): order-item context block (sprint modal + orders page)
Replaces the AI Insights section in order-sprint-process-modal with a
deterministic PocketBase-derived context block (last quote, last order,
last invoiced, stock). Same backend exposed as a popover trigger on
the orders detail page, replacing the existing AI-history ⓘ there.

Backend: new src/lib/server/order-item-context-service.ts +
GET /api/v1/order-items/[id]/context. Reuses pure helpers from
item-history-service (normaliseSkuForHistory, findBestDescriptionMatch,
aggregateSuppliers, computeCheapest).

UI: new <OrderItemContextPanel/> (inline expandable for the sprint
modal) and <OrderItemContextPopoverTrigger/> (ⓘ popover for orders
page). Apply = cost + supplier only; selling stays locked to the order.

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
2026-08-07 02:16:31 +02:00
..
plans docs(plan): add implementation plan for Re-Send button on PO Sent tab 2026-08-06 17:34:28 +02:00
smoke-tests docs(item-history): add manual smoke-test checklist for 4 env-var modes 2026-07-29 15:16:40 +02:00
specs docs(spec): order-item context block (sprint modal + orders page) 2026-08-07 02:16:31 +02:00