feat(ui): add interactive forecast intelligence UI (PRP-37) (#305)#306
Conversation
PRP-37 — Forecast Intelligence Slice C. Operator-facing surface for the PRP-35 V2 feature contract and the PRP-36 model zoo, backtest buckets, and V-aware ops fields. Backend untouched (per PRP-37); every visible value is read from an existing backend response. Surfaces: - /visualize/forecast: family Tabs + model-type Select + V1/V2 Select + conditional feature-pack toggles + train submission. - /visualize/backtest: per-horizon-bucket table + chart, RMSE tile, baseline-vs-feature-aware comparison table. - /visualize/planner: scenario method badge. - /visualize/batch: 5 sweep presets + multi-model x V1/V2 matrix picker. - /explorer/run-detail: Feature frame panel (V1/V2 + per-group columns + per-column safety chips). - /explorer/run-compare: Champion compatibility badge + Feature frame version row. - /ops: stale-alias V mismatch chip, model-health explainer columns, safer Promote dialog (artifact verify + worse-WAPE ack + V-mismatch ack). Adds 11 components under components/forecast-intelligence/, 1 chart under components/charts/, 2 lib modules under lib/, with colocated vitest tests for every component and helper. api.ts extended with PRP-35/PRP-36 wire types (all Optional, additive). use-runs gains an optional feature_frame_version param (not forwarded to the backend list endpoint; no server-side filter exists). Validation: pnpm tsc --noEmit + pnpm lint + pnpm test --run all clean (202 frontend tests). Backend regression suite (forecasting + backtesting + registry + ops, non-integration) 518 passed.
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
PRP-37 — Forecast Intelligence Slice C. Operator-facing UI surface for the
PRP-35 V2 feature contract and the PRP-36 model zoo / per-horizon-bucket
metrics / V-aware ops fields. Backend untouched per PRP-37 — every
visible value reads an existing backend response.
Closes #305 · Parent epic #295 · Slice A #299 · Slice B #302
What lands
New surfaces
/visualize/forecast/visualize/backtest/visualize/plannermodel-driven re-forecastvsheuristic adjustment)./visualize/batch/explorer/run-detail/explorer/run-compare/opsV mismatchreason), Model Health table with Prev WAPE + Staleness columns, safer Promote dialog — artifact verify + worse-WAPE ack + V-mismatch ack gates.New files
frontend/src/lib/feature-frame-utils.ts+ testfrontend/src/lib/horizon-bucket-utils.ts+ testfrontend/src/components/forecast-intelligence/model-family-tabs.tsx+ testmodel-type-select.tsx(+model-type-utils.ts) + testfeature-frame-select.tsx+ testfeature-groups-toggle.tsx+ testhorizon-bucket-table.tsx+ testfeature-frame-panel.tsx+ testchampion-compatibility-badge.tsx(+champion-compatibility-utils.ts) + testpromote-confirmation-dialog.tsx+ testbatch-preset-select.tsx(+batch-preset-utils.ts) + testbatch-matrix-picker.tsx+ testfrontend/src/components/charts/backtest-horizon-buckets-chart.tsx+ testModified files
frontend/src/types/api.ts— additive PRP-35 / PRP-36 types(FeatureFrameVersion, FeatureGroup, FEATURE_GROUP_VALUES,
FeatureSafetyClass, TrainRequest, BacktestResponse, FoldResult,
ModelBacktestResult, StaleReason; ModelRun/FeatureMetadataResponse/
BatchModelConfig/AliasHealth/ModelHealthEntry extended)
frontend/src/hooks/use-runs.ts— optionalfeatureFrameVersionparam(cached in query key only; not forwarded to backend)
pages/visualize/{forecast,backtest,planner,batch}.tsx,pages/explorer/{run-detail,run-compare}.tsx,pages/ops.tsxdocs/user-guide/dashboard-guide.md— references new affordances onevery touched page
docs/user-guide/advanced-forecasting-guide.md— new RAG-indexableguide covering families, V1 vs V2, feature packs, horizon buckets,
champion compatibility, stale aliases, safer Promote, batch presets
Validation
pnpm tsc --noEmit— cleanpnpm lint— clean (1 pre-existing warning indata-table.tsx,unrelated to PRP-37)
pnpm test --run— 202 tests pass across 27 filesnot integration) — 518 passgit diff app/ alembic/— empty (backend untouched)grep -rn "from 'radix-ui'" src— empty (no barrel imports)Out of scope / deferred
report (no backend
is_known_futurefield exists on any assumptionschema)
stale-revision reset + at least one V2 SUCCESS run seeded, both noted
in the HANDOFF carry-forwards. The PR is mergeable on CI green; the
dogfood is a manual smoke-test the next maintainer can run.
Test plan
dev-target PR (Lint & Format, Type Check, Test, Migration Check)PRPs/PRP-37-forecast-intelligence-C-interactive-ui.md#Task-26(train a V2 run + open run-detail / run-compare / ops / batch in the browser)