Implements PRP-22 (PRPs/PRP-22-visualize-demand-planner.md).
Extends the Visualize menu from two flat, read-only job viewers into a business-facing demand surface — the successor to PRP-20/PRP-21 (Explorer interactivity), applied to the analytics slice and frontend/src/pages/visualize/.
Scope (additive only — no migration, no new slice, no app/main.py change)
Backend
GET /analytics/inventory-status — latest inventory_snapshot_daily row per (store, product) grain via Postgres DISTINCT ON; optional store_id / product_id filters; 200 + empty list on an empty table.
Frontend
- New page
Visualize → Demand Planner (/visualize/demand) — multi-SKU table built from completed predict jobs: tomorrow / next week / next month demand + inventory requirement, with a lead-time selector and a single-SKU drill-in.
- Interactive Forecast / Backtest pages — in-page job submission, prediction-interval band toggle, CSV export, run/job cross-links.
Acceptance
See the PRP's Success Criteria + Final Validation Checklist.
Scopes: analytics / ui / docs.
Implements PRP-22 (
PRPs/PRP-22-visualize-demand-planner.md).Extends the Visualize menu from two flat, read-only job viewers into a business-facing demand surface — the successor to PRP-20/PRP-21 (Explorer interactivity), applied to the
analyticsslice andfrontend/src/pages/visualize/.Scope (additive only — no migration, no new slice, no
app/main.pychange)Backend
GET /analytics/inventory-status— latestinventory_snapshot_dailyrow per(store, product)grain via PostgresDISTINCT ON; optionalstore_id/product_idfilters;200+ empty list on an empty table.Frontend
Visualize → Demand Planner(/visualize/demand) — multi-SKU table built from completedpredictjobs: tomorrow / next week / next month demand + inventory requirement, with a lead-time selector and a single-SKU drill-in.Acceptance
See the PRP's Success Criteria + Final Validation Checklist.
Scopes:
analytics/ui/docs.