pumpingStation template + no-data-duplication rule #39

Open
opened 2026-05-26 15:13:01 +00:00 by vps1_gitea_admin · 1 comment

Type: slice

Depends on: #37

Estimate: M (1–2 days)

Slice — layers touched

templates (pumpingStation.json declares emittedFields) → composer (filters parent panels whose emittedFields are covered by children) → integration test.

Context

Implements PRD F-5. Adds the third supported node type.

Scope

  • Author src/templates/pumpingStation.json covering pumpingStation-level metrics (basin level, total demand, total delivered flow, basin fill %).
  • Composer builds the union of emittedFields from all children of a parent and removes any parent panel whose emittedFields is fully covered by children.
  • Update example flow to demo: pumpingStation + 3 rotatingMachine children → parent shows only basin-level/demand/total panels, not per-pump flow.

Out of scope

  • MGC — next slice.

Acceptance criteria

  • pumpingStation alone (no children) → 4 parent panels.
  • pumpingStation + 3 pumps → 4 parent panels still rendered IF none overlap with per-pump metrics; per-pump panels appear under their pump.
  • If parent declares a flow.total panel and the composer sees no child emits flow.total, parent keeps it.
**Type:** slice **Depends on:** #37 **Estimate:** M (1–2 days) ## Slice — layers touched templates (`pumpingStation.json` declares `emittedFields`) → composer (filters parent panels whose `emittedFields` are covered by children) → integration test. ## Context Implements PRD F-5. Adds the third supported node type. ## Scope - Author `src/templates/pumpingStation.json` covering pumpingStation-level metrics (basin level, total demand, total delivered flow, basin fill %). - Composer builds the union of `emittedFields` from all children of a parent and removes any parent panel whose `emittedFields` is fully covered by children. - Update example flow to demo: pumpingStation + 3 rotatingMachine children → parent shows only basin-level/demand/total panels, not per-pump flow. ## Out of scope - MGC — next slice. ## Acceptance criteria - [ ] pumpingStation alone (no children) → 4 parent panels. - [ ] pumpingStation + 3 pumps → 4 parent panels still rendered IF none overlap with per-pump metrics; per-pump panels appear under their pump. - [ ] If parent declares a `flow.total` panel and the composer sees no child emits `flow.total`, parent keeps it.
Author
Owner

Slice #39 shipped on branch slice/39-pumpingstation-no-dup

Branches: dashboardAPI · EVOLV

What landed

  • config/pumpingStation.json: all 11 non-row panels carry meta.emittedFields declarations.
  • src/specificClass.js: generateDashboardsForGraph now runs a parent-panel filter after composing child dashboards. Any non-row panel whose emittedFields set is fully covered by the union of child-panel emittedFields is removed from the root.
  • Safety: row panels never removed (structural); panels without emittedFields always kept (no silent removal); debug log emitted when panels are deduped.
  • 4 unit tests covering annotation presence, child-covered removal, no-overlap preservation, row preservation.

Acceptance criteria (status)

  • pumpingStation alone (no children) → all 11 parent panels render.
  • pumpingStation + measurement child claiming level → parent's level panels removed; child renders level.
  • No child declares overlapping fields → parent panels unchanged.

Closes #39.

## Slice #39 shipped on branch `slice/39-pumpingstation-no-dup` Branches: [`dashboardAPI`](https://gitea.wbd-rd.nl/RnD/dashboardAPI/src/branch/slice/39-pumpingstation-no-dup) · [`EVOLV`](https://gitea.wbd-rd.nl/RnD/EVOLV/src/branch/slice/39-pumpingstation-no-dup) ### What landed - `config/pumpingStation.json`: all 11 non-row panels carry `meta.emittedFields` declarations. - `src/specificClass.js`: `generateDashboardsForGraph` now runs a parent-panel filter after composing child dashboards. Any non-row panel whose `emittedFields` set is fully covered by the union of child-panel `emittedFields` is removed from the root. - Safety: row panels never removed (structural); panels without `emittedFields` always kept (no silent removal); `debug` log emitted when panels are deduped. - 4 unit tests covering annotation presence, child-covered removal, no-overlap preservation, row preservation. ### Acceptance criteria (status) - [x] pumpingStation alone (no children) → all 11 parent panels render. - [x] pumpingStation + measurement child claiming `level` → parent's level panels removed; child renders level. - [x] No child declares overlapping fields → parent panels unchanged. Closes #39.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RnD/EVOLV#39