Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214
Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214HanSur94 wants to merge 4 commits into
Conversation
Found via the first-run UX check (clean-slate install + copy-paste of the README/wiki snippets in a fresh MATLAB process). - README 'core idea: Tags': make self-contained (define t/pressure_data) and use the real two-arg TagRegistry.register(key, tag); the one-arg form threw 'Not enough input arguments'. - README 'Build a dashboard': widgets take 'Title', not the invalid 'Label' option. - wiki/Installation.md: libs/FastPlot -> libs/FastSense (directory was renamed; the old 'cd libs/FastPlot' step errored) and complete the added-paths list (9 libs + examples/benchmarks/tests). - wiki/_Sidebar.md: 'FastPlot Wiki' -> 'FastSense Wiki'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…or path
A status widget bound to a MonitorTag via addWidget('status','Tag',mon) crashed at render: StatusWidget.refresh's Sensor branch reads obj.Sensor.Y, but MonitorTag has no .Y (DashboardWidget.Sensor is a backward-compat alias for Tag). The README 'Build a dashboard' quickstart hit this.
StatusWidget already supports MonitorTags via the Threshold/monitor path (deriveStatusFromMonitorTag_), previously reachable only through the Threshold property. The constructor now reroutes a monitor-kind Tag to Threshold so refresh() uses that path. Backward compatible: SensorTag-bound and Threshold-bound widgets are unchanged; only the previously-crashing Tag-bound MonitorTag case changes.
Adds TestStatusWidget/testRefreshWithMonitorTag (violation + ok). Verified in a fresh process: TestStatusWidget+MultiStatus 23/23, dashboard suites 68/68, README dashboard repro renders 4 widgets.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
example_basic switched YScale to log AFTER render(), which warned 'Negative limits ignored' (the rendered axis had manual padded limits dipping <=0). Setting the scale before render() lets the axis autoscale directly in log space, so the first example a newcomer runs is now warning-free. The example's own comment already noted setScale can be called before or after render. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CI analysis — both red checks are pre-existing / flaky, not from this PRMATLAB Tests (Dashboard) — MATLAB Tests (Q-Z) — This PR's own test passed: the Q-Z log shows Net: this PR introduces no test regressions. The Dashboard red is a pre-existing 🤖 Analysis by Claude Code |
Fixes the FastSense first-run experience, surfaced by simulating a brand-new user installing from a clean slate (
git archive HEAD→ freshmatlab -batchwithrestoredefaultpath) and copy-pasting the README / wiki snippets verbatim. Every primary onboarding path now works end-to-end.What was broken
t/pressure_datawere undefined, andTagRegistry.register(press)used the wrong arity (the real API is two-argregister(key, tag)— used by the class docstring and ~40 call sites; the README was the only one-arg user).'Title', not the invalid'Label'option; and binding astatuswidget to a MonitorTag via'Tag'crashed at render withUnrecognized method, property, or field 'Y' for class 'MonitorTag'.libs/FastPlot(renamed tolibs/FastSense; the optionalcd libs/FastPlotstep errored) and listed only 5 of the 9 libsinstalladds.Negative limits ignoredwarning when switching to a log Y axis after render.Changes
README.mdregister; dashboard widgets use'Title'libs/Dashboard/StatusWidget.m'Tag'-bound monitor-kind Tag to theThreshold/monitor path (deriveStatusFromMonitorTag_) instead of the SensorTag-onlyobj.Sensor.Yaccess. Backward compatible; brings StatusWidget to parity with MultiStatusWidgettests/suite/TestStatusWidget.mtestRefreshWithMonitorTag(violation + ok cases)examples/01-basics/example_basic.mrender()so the axis autoscales in log space — no warningwiki/Installation.md,wiki/_Sidebar.mdlibs/FastPlot→libs/FastSense, complete the added-paths list, fix wiki brandingVerification (fresh MATLAB process,
restoredefaultpath)save/loadround-trip (4 widgets) — clean.TestStatusWidget+TestMultiStatusWidget+TestMultiStatusWidgetTag: 23/23 (new test was RED before the fix, GREEN after).TestDashboardSerializerRoundTrip+TestDashboardBugFixes+TestDashboardPreview+TestInfoTooltip: 68/68.Toolbox-free and backward-compatible throughout; pure-MATLAB MEX fallback untouched.
🤖 Generated with Claude Code