FastSenseCompanion PerTag mode + industrial plant demo event markers#166
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related FastSenseCompanion / dashboard improvements, shipped as GSD quick tasks.
1. Industrial plant demo — show all tag events (
c475d2a)Every
FastSenseWidgetin the demo bound a SensorTag but never setShowEventMarkers/EventStore, so two guards (FastSenseWidget.m:159constructor forward,:1242live-tick refresh) silently suppressed event markers. Wired'ShowEventMarkers', true+'EventStore', ctx.storeinto all 9 widget call sites across the 5build*Page.mfiles. 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)— c475d2ademo/industrial_plant/private/build{Overview,FeedLine,Reactor,Cooling,Events}Page.m— 9 widgets gainShowEventMarkers+EventStore; dropped now-stale%#ok<INUSD>pragmas in 3 files.feat(companion)— abdc80blibs/FastSenseCompanion/AdHocPlotEventData.m—Modevalidator widened to accept'PerTag'.libs/FastSenseCompanion/InspectorPane.m— third "Per Tag" toggle button;applyModeToggleStyles_extended to a 3-branch styler.libs/FastSenseCompanion/FastSenseCompanion.m—onOpenAdHocPlotRequested_branches on'PerTag', loopsopenAdHocPlot({tag},'LinkedGrid',theme)per tag, tracks each figure, batches skipped tags into one alert. Overlay/LinkedGrid paths unchanged.tests/suite/TestFastSenseCompanion.m— newtestPerTagModeSpawnsNFigures.Verification
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.mandDashboardEngine.mbyte-identical to baseline (no core changes); no new event class.Notes
docs/superpowers/specs/2026-05-26-per-tag-dashboard-windows-design.md(gitignored, not in this PR).testToolbarHasWikiButton,testToolbarGearMovedToColumn8) are unrelated to this work (broken on baseline by mergee2ded77) and are queued as a separate fix.🤖 Generated with Claude Code