Skip to content

Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214

Open
HanSur94 wants to merge 4 commits into
mainfrom
claude/recursing-cray-0dbbac
Open

Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214
HanSur94 wants to merge 4 commits into
mainfrom
claude/recursing-cray-0dbbac

Conversation

@HanSur94

Copy link
Copy Markdown
Owner

Fixes the FastSense first-run experience, surfaced by simulating a brand-new user installing from a clean slate (git archive HEAD → fresh matlab -batch with restoredefaultpath) and copy-pasting the README / wiki snippets verbatim. Every primary onboarding path now works end-to-end.

What was broken

  • README "The core idea: Tags" threw on copy-paste: t/pressure_data were undefined, and TagRegistry.register(press) used the wrong arity (the real API is two-arg register(key, tag) — used by the class docstring and ~40 call sites; the README was the only one-arg user).
  • README "Build a dashboard" threw twice: widgets take 'Title', not the invalid 'Label' option; and binding a status widget to a MonitorTag via 'Tag' crashed at render with Unrecognized method, property, or field 'Y' for class 'MonitorTag'.
  • wiki/Installation.md pointed newcomers at libs/FastPlot (renamed to libs/FastSense; the optional cd libs/FastPlot step errored) and listed only 5 of the 9 libs install adds.
  • wiki/_Sidebar.md was still branded "FastPlot Wiki".
  • example_basic (the first example a newcomer runs) printed a spurious Negative limits ignored warning when switching to a log Y axis after render.

Changes

Area Fix
README.md Tags snippet made self-contained + correct two-arg register; dashboard widgets use 'Title'
libs/Dashboard/StatusWidget.m Constructor routes a 'Tag'-bound monitor-kind Tag to the Threshold/monitor path (deriveStatusFromMonitorTag_) instead of the SensorTag-only obj.Sensor.Y access. Backward compatible; brings StatusWidget to parity with MultiStatusWidget
tests/suite/TestStatusWidget.m New testRefreshWithMonitorTag (violation + ok cases)
examples/01-basics/example_basic.m Set log scale before render() so the axis autoscales in log space — no warning
wiki/Installation.md, wiki/_Sidebar.md libs/FastPlotlibs/FastSense, complete the added-paths list, fix wiki branding

Verification (fresh MATLAB process, restoredefaultpath)

  • README path end-to-end: "30 seconds in" + Tags + Dashboard + save/load round-trip (4 widgets) — clean.
  • Getting-Started tutorial: 13/13 snippet sections.
  • Sensor + dashboard examples: 10/10.
  • TestStatusWidget + TestMultiStatusWidget + TestMultiStatusWidgetTag: 23/23 (new test was RED before the fix, GREEN after).
  • Regression — TestDashboardSerializerRoundTrip + TestDashboardBugFixes + TestDashboardPreview + TestInfoTooltip: 68/68.
  • Octave first-run path: install + render verified.

Toolbox-free and backward-compatible throughout; pure-MATLAB MEX fallback untouched.

🤖 Generated with Claude Code

HanSur94 and others added 4 commits June 24, 2026 16:59
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

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

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