Skip to content

FastSenseCompanion PerTag mode + industrial plant demo event markers#166

Merged
HanSur94 merged 4 commits into
mainfrom
claude/strange-herschel-be1255
May 29, 2026
Merged

FastSenseCompanion PerTag mode + industrial plant demo event markers#166
HanSur94 merged 4 commits into
mainfrom
claude/strange-herschel-be1255

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

Summary

Two related FastSenseCompanion / dashboard improvements, shipped as GSD quick tasks.

1. Industrial plant demo — show all tag events (c475d2a)
Every FastSenseWidget in the demo bound a SensorTag but never set ShowEventMarkers / EventStore, so two guards (FastSenseWidget.m:159 constructor forward, :1242 live-tick refresh) silently suppressed event markers. Wired 'ShowEventMarkers', true + 'EventStore', ctx.store into all 9 widget call sites across the 5 build*Page.m files. MonitorTag events now overlay on every per-tag plot.

2. PerTag composer mode (abdc80b)
New third mode "Per Tag" in the companion's ad-hoc plot composer (alongside Overlay / LinkedGrid). Selecting N tags + Plot spawns N independent DashboardEngine windows — one per tag, each identical to the existing single-tag "Open Detail" output. Every spawned window is tracked in OpenedFigures_ so the companion's Tile / Close-all toolbar sweeps them.

Changes

fix(industrial-plant-demo)c475d2a

  • demo/industrial_plant/private/build{Overview,FeedLine,Reactor,Cooling,Events}Page.m — 9 widgets gain ShowEventMarkers+EventStore; dropped now-stale %#ok<INUSD> pragmas in 3 files.

feat(companion)abdc80b

  • libs/FastSenseCompanion/AdHocPlotEventData.mMode validator widened to accept 'PerTag'.
  • libs/FastSenseCompanion/InspectorPane.m — third "Per Tag" toggle button; applyModeToggleStyles_ extended to a 3-branch styler.
  • libs/FastSenseCompanion/FastSenseCompanion.monOpenAdHocPlotRequested_ branches on 'PerTag', loops openAdHocPlot({tag},'LinkedGrid',theme) per tag, tracks each figure, batches skipped tags into one alert. Overlay/LinkedGrid paths unchanged.
  • tests/suite/TestFastSenseCompanion.m — new testPerTagModeSpawnsNFigures.

Verification

  • Quick task 260526-r9x verifier: passed, 6/6 must-haves.
  • checkcode: zero new findings on all touched files.
  • TestFastSenseCompanion: new test PASS; all 6 ADHOC regression tests PASS; spawn+close leaves no orphan timers.
  • openAdHocPlot.m and DashboardEngine.m byte-identical to baseline (no core changes); no new event class.
  • Live UAT on the running demo: one Plot click in PerTag mode spawned exactly 3 independent windows, tracked + tileable.

Notes

  • Design spec lives at docs/superpowers/specs/2026-05-26-per-tag-dashboard-windows-design.md (gitignored, not in this PR).
  • Two pre-existing toolbar-column test failures (testToolbarHasWikiButton, testToolbarGearMovedToColumn8) are unrelated to this work (broken on baseline by merge e2ded77) and are queued as a separate fix.

🤖 Generated with Claude Code

HanSur94 and others added 4 commits May 26, 2026 18:49
Wire 'ShowEventMarkers', true + 'EventStore', ctx.store into all 9
FastSenseWidget construction sites across the 5 build*Page.m files
(2 Overview, 2 FeedLine, 3 Reactor, 1 Cooling, 1 Events). Without
these NV-pairs FastSenseWidget defaults ShowEventMarkers=false and
EventStore=[], which silenced both the constructor-time forward
(FastSenseWidget.m:159) and the live-tick refreshEventMarkers_ guard
(FastSenseWidget.m:1242), so round event markers never painted on
demo plots even though the engine itself had an EventStore.

Also drops the now-incorrect %#ok<INUSD> pragma from
buildFeedLinePage.m, buildReactorPage.m, and buildCoolingPage.m,
since ctx.store is now referenced in each body.

No changes to FastSenseWidget defaults (preserves back-compat for
non-demo dashboards). No new tests; manual UAT via run_demo.m.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…TATE.md

Quick task 260526-pw3 wired ShowEventMarkers=true + EventStore=ctx.store
into all 9 FastSenseWidget call sites across the 5 industrial-plant demo
build*Page.m files (shipped in c475d2a). This commit records that work
in the STATE.md Quick Tasks Completed table and updates Last activity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a third composer mode "PerTag" to FastSenseCompanion. When the user
selects N tags and clicks Plot in PerTag mode, the companion spawns N
independent FastSense Companion figures — one per tag — each identical
to today's single-tag "Open Detail" output (one FastSenseWidget,
LinkedGrid layout). Every spawned figure is tracked in OpenedFigures_
so the existing Tile and Close-all toolbar buttons sweep them.

Four files modified, no new files created:

- libs/FastSenseCompanion/AdHocPlotEventData.m: widen Mode validator
  from {'Overlay','LinkedGrid'} to {'Overlay','LinkedGrid','PerTag'}.
  No new properties; no constructor signature change.

- libs/FastSenseCompanion/InspectorPane.m: add hModePerTag_ button next
  to hModeOverlay_ / hModeLinked_ in the composer panel, grow the
  toggle grid from [1 2] to [1 3], extend applyModeToggleStyles_ to a
  3-branch styler. The composer's onModeToggle_ and onPlot_ are
  untouched — mode-agnostic; they forward ComposerMode_ into
  AdHocPlotEventData directly.

- libs/FastSenseCompanion/FastSenseCompanion.m: branch
  onOpenAdHocPlotRequested_ on evt.Mode. Overlay / LinkedGrid paths
  are byte-equivalent to prior behaviour. New PerTag branch loops
  openAdHocPlot({tags{k}}, 'LinkedGrid', obj.Theme) per tag, tracks
  each figure via trackOpenedFigure_, and accumulates skipped names
  into a single end-of-loop uialert. Per-iteration try/catch so one
  failed tag does not abort the batch.

- tests/suite/TestFastSenseCompanion.m: extend driveSelectAndPlot_
  helper to a 3-way mode click, and add testPerTagModeSpawnsNFigures.
  The new test registers 3 MockPlottableTag entries, drives PerTag +
  Plot, then asserts (a) getOpenedFiguresForTest_ delta == 3, (b)
  ≥3 new figures on groot with Name starting "FastSense Companion",
  and (c) no orphan timers after tearing down (mirrors ADHOC-05).

Verification on MATLAB R2025b:
- checkcode: zero new findings on all 4 files.
- Constructor smoke: PerTag accepted; bogus modes rejected with
  FastSenseCompanion:invalidEventData; Overlay / LinkedGrid still work.
- Suite TestFastSenseCompanion: 73 tests total (72 baseline + 1 new),
  testPerTagModeSpawnsNFigures PASSES, all 6 ADHOC tests still PASS.
- Two pre-existing failures (testToolbarHasWikiButton actual=7
  expected=6; testToolbarGearMovedToColumn8 actual=9 expected=8) are
  unrelated to R9X — confirmed by re-running them against a stash of
  the unmodified HEAD: same actual-vs-expected mismatch. Root cause:
  incomplete merge cleanup in commit e2ded77 (1×9 toolbar tests fix
  updated TestFastSenseCompanionPlantLogToolbar.m but not the two
  matching tests in TestFastSenseCompanion.m). Out of scope.

Implements R9X-01 through R9X-05.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Quick task 260526-r9x shipped a 3rd composer mode "PerTag" in the
FastSenseCompanion ad-hoc plot composer that spawns one independent
DashboardEngine window per selected tag (shipped in abdc80b).
Verifier confirmed all 6 must-haves pass; goal-backward audit clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HanSur94 HanSur94 merged commit 99d138f into main May 29, 2026
9 of 12 checks passed
@HanSur94 HanSur94 deleted the claude/strange-herschel-be1255 branch May 29, 2026 17:36
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant