MEGAINFRA-WEBAPP/docs/superpowers/plans/2026-10-17-map2-progress.md
DEls 0a7138f60c fix: harden workforce, plant and financials
Improve workforce scanning, site transfers and timesheet exports.
Audit plant imports, duplicate identities, rates and dashboard totals.
Repair delivery PO selection, periodic rechecks and receiving guards.
Align financial ledgers, supplier periods and mobile layouts.
Add the site map preview, shared theme controls and audit evidence.

Verify 3,455 application tests, six fuel export tests, TypeScript and
an optimized production build. Clean up a leaked test timer and keep
local worktrees and generated reports out of ESLint traversal.

Changed-file lint passes; repository-wide lint retains 33 existing
errors in unchanged files.
2026-10-19 13:18:31 +02:00

3.2 KiB
Raw Blame History

Map 2 implementation ledger

Plan: docs/superpowers/plans/2026-10-17-map2.md

  • Read installed Next layouts/pages and client/server guides. Original-map hashes captured in /tmp/map2-original-hashes.json.
  • Pre-flight: all tasks consume scoped scenario state; baseline progress remains separate. Rain/quantities use copied model types. Research owns source documents; final records copied into V2.
  • Ruling: work in authorized shared checkout with bounded new namespaces; do not switch main or disturb concurrent dirty edits. No commits requested. Cost if wrong: changes require later selective staging.
  • RED: scenario/planning suite fails because new modules are absent.
  • Task 1: full component/calculation copy created. Server/save queue excluded; original read endpoints retained.

User feedback revision, 17 October

  • User found the first preview too complicated and requested a simpler interface, more map colour and working rain.
  • Replaced competing tool sets and ten visible inspector tabs with three main modes: Map, Section details and Rain. Advanced display controls, scenario management, drainage assumptions and exports use progressive disclosure. Existing section tools remain available through one details selector.
  • Added work-type tint to planned road/path/landscaping areas, a colour legend, a softer terrain background and camera fitting based on projected road geometry. Colour communicates work type, not completion.
  • Reproduced rain failure: new inspector displayed calculated geometry without enabling the hidden rain layer and omitted animation controls. Added explicit Rain mode visibility plus Play/Pause/Reset, selected intensity/duration, visible timer and pause on leaving Rain. Animation remains illustrative routing; finite-capacity volume accounting remains separate from potential depression geometry.
  • Regression test first failed on hidden rain geometry, then passed after the controller fix. Added mode visibility/restore coverage and short-duration animation completion coverage.
  • Completed two interrupted initial handoff fixes: missing build-up cost components produce partial totals/value progress unavailable; imported hold resolutions require source evidence. Removed duplicate inletNames declaration left during initial implementation.
  • Browser checks: signed-in Hills model loaded; sidebar preserves Site map and Map 2; desktop and 900×900 tablet inspected; road click opened chainage 480–500 details; Play displayed animated flow and advancing timer, Pause stopped it. Original map file hashes remain unchanged.
  • Browser-local scenarios remain scoped to user/site/model; no operational progress write endpoints exist in Map 2. Project-specific missing rates, survey surfaces and hydraulic inputs remain explicit inputs/limits.

Final verification

  • Map 2 + sidebar focused suite: 19 files, 83 tests passed, no unhandled errors.
  • npm run typecheck: passed.
  • npx eslint src/components/site-map-v2 src/lib/site-map-v2 --quiet: passed.
  • Broader original + Map 2 regression run: 153 assertions passed, but the unchanged original src/lib/site-map/save-queue.test.ts leaves an unhandled rejection (res undefined). Kept original code untouched and reported this separately.
  • Original-map baseline SHA256 comparison: zero changed files.