WFDASH-WEBAPP/docs/superpowers/specs
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
..
2026-07-07-collection-confirm-bulk-and-search-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-collection-confirm-enhancements-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-collection-confirm-fixes-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-collection-confirm-page-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-collection-confirm-selection-and-return-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-collection-pool-cluster-sort-design.md feat(collection-pool): add nearby supplier cluster sort mode 2026-07-07 21:56:29 +02:00
2026-07-07-collection-pool-redesign-design.md feat(collection-pool): add unified redesigned collection pool view 2026-07-07 20:49:31 +02:00
2026-07-07-invoicing-page-design.md feat(collection-confirm): add full collection confirm workflow 2026-07-08 01:35:00 +02:00
2026-07-07-invoicing-print-and-quickbooks-design.md feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
2026-07-07-invoicing-quickbooks-customer-modal-design.md feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
2026-07-08-invoicing-quickbooks-writeback-design.md feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
2026-07-08-invoicing-redesign-and-pdf-upload-design.md feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
2026-07-09-collection-confirm-rewrite-design.md Add collection confirm rewrite spec 2026-07-10 00:59:26 +02:00
2026-07-09-collection-map-date-filter-and-unassign-design.md Add collection map date filter and unassign spec 2026-07-10 00:47:42 +02:00
2026-07-09-collection-pool-mark-ready-notes-design.md Add collection pool mark-ready notes spec 2026-07-10 00:00:40 +02:00
2026-07-09-collection-pool-nearby-sort-design.md test(collection-pool): simplify operational sort test + correct spec reasoning 2026-07-10 00:38:31 +02:00
2026-07-09-customer-search-company-disambiguation-design.md Add customer search company-disambiguation spec 2026-07-09 21:31:45 +02:00
2026-07-09-invoice-bulk-print-tracking-design.md feat: add picking slips, bulk print tracking, supplier map 2026-07-10 10:47:11 +02:00
2026-07-09-invoice-print-bundle-design.md feat: add picking slips, bulk print tracking, supplier map 2026-07-10 10:47:11 +02:00
2026-07-09-new-quote-form-redesign-design.md Add new quote form redesign spec 2026-07-09 17:53:44 +02:00
2026-07-09-order-color-stripe-design.md Add order color stripe spec 2026-07-10 02:03:16 +02:00
2026-07-09-picking-slip-supplier-pickedby-design.md feat: add picking slips, bulk print tracking, supplier map 2026-07-10 10:47:11 +02:00
2026-07-09-po-additional-attachments-design.md Add PO additional attachments spec 2026-07-09 22:55:16 +02:00
2026-07-09-po-pdf-token-vs-filename-design.md Add PO PDF token-vs-filename spec 2026-07-09 22:13:53 +02:00
2026-07-10-collection-pool-supplier-groups-and-notes-design.md feat: add tangerine theme, new docs and plugin stubs 2026-07-14 11:48:10 +02:00
2026-07-11-collection-map-simplify-pins-design.md docs(collection-map): tighten Refresh-button open question wording 2026-07-11 23:31:41 +02:00
2026-07-12-collection-map-driver-cards-redesign-design.md feat: add tangerine theme, new docs and plugin stubs 2026-07-14 11:48:10 +02:00
2026-07-12-collection-map-drop-date-filter-and-ready-gate-design.md feat: add tangerine theme, new docs and plugin stubs 2026-07-14 11:48:10 +02:00
2026-07-29-buyer-tasks-design.md docs: buyer tasks page design spec 2026-07-29 19:35:44 +02:00
2026-07-29-order-sprint-item-history-design.md docs(spec): item history popover redesign — build both data sources, compare for 1 week 2026-07-29 13:51:25 +02:00
2026-07-29-orders-review-modal-design.md docs: clarify customer non-nullable, full-order scope, collision link, partial-fail UX 2026-07-29 13:54:21 +02:00
2026-07-30-stock-quick-draft-design.md docs(specs): stock quick-draft modal design 2026-07-30 21:26:47 +02:00
2026-08-02-collection-confirm-revamp-design.md docs(specs): add collection confirm revamp design 2026-08-02 23:23:11 +02:00
2026-08-03-buyer-tasks-mail-failed-recovery-design.md docs(buyer-tasks): design for mail-failed PO recovery in PO Draft tab 2026-08-03 10:25:51 +02:00
2026-08-03-stock-orders-total-value-design.md docs(stock-orders): design total-value columns on list table 2026-08-03 14:09:10 +02:00
2026-08-03-stock-orders-wrap-pdf-design.md docs(stock-orders): design spec for cell wrap + PDF downloads 2026-08-03 15:54:24 +02:00
2026-08-06-buyer-tasks-resend-button-design.md docs(spec): add Re-Send button on PO Sent tab of buyer-tasks 2026-08-06 17:33:25 +02:00
2026-08-06-supplier-po-pdf-vat-design.md docs(spec): clarify placement of vat computation 2026-08-06 11:45:11 +02:00
2026-08-07-order-item-context-block-design.md docs(spec): order-item context block (sprint modal + orders page) 2026-08-07 02:16:31 +02:00