Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214
Open
HanSur94 wants to merge 4 commits into
Open
Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214HanSur94 wants to merge 4 commits into
HanSur94 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! |
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.
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