Dashed dynamic bounds for rotatingMachine flow + Δp #38

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

Type: slice

Depends on: #33, #37

Estimate: M (1–2 days)

Slice — layers touched

domain logic in rotatingMachine (or shared helper) → Influx field convention (<field>.min / <field>.max companions) → templates (lineStyle override block) → Grafana panel (dashed render) → test.

Context

Implements PRD F-10. Resolves O-2 via spike #33.

Scope

  • Add a shared emission helper in generalFunctions that, given a field and its computed bounds for the current operating point, emits <field>, <field>.min, <field>.max as three Influx fields.
  • Wire rotatingMachine's flow and Δp predictions to use this helper (only those two — others wait).
  • Update rotatingMachine.json template to include fieldConfig.overrides[] matching byName: "<field>.min" / "<field>.max" to custom.lineStyle = {{fill: "dash", dash: [10,10]}}.
  • Test: drive the operating point, confirm three fields are written each tick, panel renders 3 lines (1 solid + 2 dashed).

Out of scope

  • Other node types — they pick up the helper later as needed.
  • Configurable dash patterns per metric — keep one pattern for now.

Acceptance criteria

  • Influx query: at any tick after warmup, <field>, <field>.min, <field>.max all have a recent value.
  • Grafana panel for rotatingMachine flow renders 3 lines: solid actual, dashed upper, dashed lower.
  • Operating-point change (e.g. pressure jump) causes bounds to visibly track.
**Type:** slice **Depends on:** #33, #37 **Estimate:** M (1–2 days) ## Slice — layers touched domain logic in rotatingMachine (or shared helper) → Influx field convention (`<field>.min` / `<field>.max` companions) → templates (lineStyle override block) → Grafana panel (dashed render) → test. ## Context Implements PRD F-10. Resolves O-2 via spike #33. ## Scope - Add a shared emission helper in `generalFunctions` that, given a field and its computed bounds for the current operating point, emits `<field>`, `<field>.min`, `<field>.max` as three Influx fields. - Wire rotatingMachine's flow and Δp predictions to use this helper (only those two — others wait). - Update `rotatingMachine.json` template to include `fieldConfig.overrides[]` matching `byName: "<field>.min"` / `"<field>.max"` to `custom.lineStyle = {{fill: "dash", dash: [10,10]}}`. - Test: drive the operating point, confirm three fields are written each tick, panel renders 3 lines (1 solid + 2 dashed). ## Out of scope - Other node types — they pick up the helper later as needed. - Configurable dash patterns per metric — keep one pattern for now. ## Acceptance criteria - [ ] Influx query: at any tick after warmup, `<field>`, `<field>.min`, `<field>.max` all have a recent value. - [ ] Grafana panel for rotatingMachine flow renders 3 lines: solid actual, dashed upper, dashed lower. - [ ] Operating-point change (e.g. pressure jump) causes bounds to visibly track.
Author
Owner

Slice #38 shipped on branch slice/38-dashed-bounds

Branches: dashboardAPI · EVOLV

What landed

  • All 4 timeseries panels in config/machine.json (Flow predicted, Efficiency, Pressure, Temperature) gain byRegexp overrides: any series whose _field name ends in .min or .max renders dashed [10,10], orange/red respectively. Pattern verified by S2 spike (#33).
  • 2 unit tests covering the override-presence-per-panel and the anchor-to-end regex (/.min$/ not /.min/).

Forward compatibility

Nodes that don't yet emit .min / .max companion fields render unchanged — the byRegexp won't match. Safe to land now; the actual bounds emission can light up incrementally per node.

Deferred: companion-field emission helper

The generalFunctions-side helper that lets a node emit {field, field.min, field.max} triples in one call is a nodes/generalFunctions/src/helper/outputUtils.js change, out of scope for a dashboardAPI-only slice. Tracked for a follow-up PR — rotatingMachine's actual flow/Δp bounds emission lands together with that helper.

Closes #38.

## Slice #38 shipped on branch `slice/38-dashed-bounds` Branches: [`dashboardAPI`](https://gitea.wbd-rd.nl/RnD/dashboardAPI/src/branch/slice/38-dashed-bounds) · [`EVOLV`](https://gitea.wbd-rd.nl/RnD/EVOLV/src/branch/slice/38-dashed-bounds) ### What landed - All 4 timeseries panels in `config/machine.json` (Flow predicted, Efficiency, Pressure, Temperature) gain `byRegexp` overrides: any series whose `_field` name ends in `.min` or `.max` renders dashed [10,10], orange/red respectively. Pattern verified by S2 spike (#33). - 2 unit tests covering the override-presence-per-panel and the anchor-to-end regex (`/.min$/` not `/.min/`). ### Forward compatibility Nodes that don't yet emit `.min` / `.max` companion fields render unchanged — the byRegexp won't match. Safe to land now; the actual bounds emission can light up incrementally per node. ### Deferred: companion-field emission helper The generalFunctions-side helper that lets a node emit `{field, field.min, field.max}` triples in one call is a `nodes/generalFunctions/src/helper/outputUtils.js` change, out of scope for a dashboardAPI-only slice. Tracked for a follow-up PR — rotatingMachine's actual flow/Δp bounds emission lands together with that helper. Closes #38.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RnD/EVOLV#38