assessment-model/src/app
Khalim Conn-Kowlessar 6c479542a0 feat(modelling-runs): trigger journey — server module, routes, run page
Builds the bulk-trigger-modelling journey per ADR-0008 on the TDD'd core:

- Server module: triggerModellingRun (app-authored task + config subtask,
  BulkUpload trigger convention; dispatch to /v1/plan/trigger-run; failed
  dispatch marks the task failed), previewModellingRun (dry-run count proxy
  to /v1/plan/preview-run), listModellingRuns (one grouped portfolio-scoped
  query; config parsed back, progress from execution-subtask counts),
  scenarioIdsWithActiveRuns (third badge state).
- Routes: POST/GET /api/portfolio/[id]/modelling-runs, POST .../preview,
  GET /api/portfolio/[id]/postcodes (grouped distinct + counts).
- Page /portfolio/[slug]/modelling/run to the approved mockup in the
  scenarios-tab design language: scenario picker with the three badges and
  in-flight warning, three filter columns (postcodes from DB, canonical
  enums + Unknown), engine-counted summary tray with re-model callouts,
  large-run confirm (10k gate), done state with ETA, Recent runs table
  with live progress. TanStack Query v4; no useEffect/useMemo.
- "Run modelling" button beside Add properties in PropertyTable.

Backend contract (Model team): the distributor at /v1/plan/trigger-run
accepts {task_id, portfolio_id, scenario_ids, filters, ...} and attaches
execution subtasks to the given task; /v1/plan/preview-run returns
{matched_properties, per_scenario[]} through the same resolution code path.

Verified live against portfolio 814: postcodes, validation errors, unknown
scenarios, dispatch failure marks the task failed and history shows it;
simulated backend execution subtasks drove status to
{in_progress, ready 2, total 4} and the scenario badge to "Modelling in
progress" in the rendered page; portfolio page shows the button. tsc, lint
and all 365 vitest tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 17:08:57 +00:00
..
actions added missing files 2026-04-11 08:05:41 +00:00
api feat(modelling-runs): trigger journey — server module, routes, run page 2026-07-06 17:08:57 +00:00
auth Drop useEffect from VerifyCodeForm; replace tick-based countdown 2026-05-27 14:50:05 +00:00
components Merge pull request #353 from Hestia-Homes/feature/portfolio-scenarios 2026-07-06 16:21:21 +01:00
db feat(db): add os_places to override_source enum 2026-07-06 13:46:33 +00:00
domna updated loading state 2025-11-03 19:46:47 +00:00
email_templates Unify invitation flow: explicit accept/decline via profile-menu notifications 2026-05-28 09:43:13 +00:00
engineDb minor, created engineDB folder but not going to proceed for the moment 2023-08-10 10:56:39 +01:00
help added favicon 2026-01-26 12:45:42 +00:00
home Fixing auth options export issue 2025-10-28 11:49:19 +00:00
hooks hot fix of src -> app 2024-12-05 17:16:05 +00:00
lib Gate user-access page behind admin privilege; allow admin role assignment 2026-05-27 16:40:34 +00:00
onboarding changing name 2025-11-10 20:53:28 +00:00
portfolio/[slug] feat(modelling-runs): trigger journey — server module, routes, run page 2026-07-06 17:08:57 +00:00
shadcn_components/ui fix(building-passport): portal tooltip content so it isn't trapped by stacking context 2026-07-02 09:56:59 +00:00
types added delete 2026-01-07 15:15:21 +00:00
utils feat(epc): provenance signals + effective-baseline portfolio table 2026-06-23 22:21:33 +00:00
verify/[token] added acceptance based login to work around microsoft defender 2026-03-10 18:53:37 +00:00
globals.css doesn't mount straight away and reload data - keeps it stale with cache 2026-01-07 11:33:20 +00:00
layout.tsx re-vamping ara ui 2026-04-08 10:29:14 +00:00
page.tsx save new login screen 2025-12-08 10:03:40 +00:00
ReactQueryProvider.tsx Adding page layout, added react query 2023-05-30 11:41:08 +01:00
utils.test.ts moving the documents ui to the deal page view 2026-05-08 10:45:40 +00:00
utils.ts added tests for pre sap ui with removed duplication 2026-05-08 09:02:21 +00:00