Skip to content

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

Merged
HanSur94 merged 6 commits into
mainfrom
claude/recursing-cray-0dbbac
Jul 8, 2026
Merged

Fix first-run onboarding: README/wiki quickstart + StatusWidget MonitorTag crash#214
HanSur94 merged 6 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!

@HanSur94

Copy link
Copy Markdown
Owner Author

CI analysis — both red checks are pre-existing / flaky, not from this PR

MATLAB Tests (Dashboard)TestDashboardTimeWindow/testPreviewStillFull
(getTimeRange tMax=739256 should reflect full extent end ~739261).
This fails identically on main (today's scheduled run 28314859799, same test, same numbers). The test exercises only FastSenseWidget('Tag', sensorTag) — it never constructs a StatusWidget or MonitorTag — so nothing in this PR can affect it. Pre-existing.

MATLAB Tests (Q-Z)TestTagPerfRegression/testConsumerMigrationTickGate
(errored in bench_consumer_migration_tick). This is a performance benchmark that passes on main and flakes under CI load; this PR touches no Tag-pipeline / perf code. Re-triggered the failed jobs to confirm.

This PR's own test passed: the Q-Z log shows Running TestStatusWidget … Done TestStatusWidget with no failures, and codecov reports all modified lines covered.

Net: this PR introduces no test regressions. The Dashboard red is a pre-existing main failure (out of scope here); the Q-Z red is a flaky perf gate.

🤖 Analysis by Claude Code

@HanSur94
HanSur94 marked this pull request as draft July 7, 2026 07:56
@HanSur94

HanSur94 commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

Parked as draft pending a maintainer decision — to stop the repeated CI-failure notifications, not because anything is wrong with the change.

Only failing check: MATLAB Tests (Q-Z)TestTagPerfRegression/testConsumerMigrationTickGate (bench_consumer_migration_tick:regression, a 10% tick-overhead budget). This is a flaky timing gate, not a regression from this PR:

  • The benchmark exercises only FastSenseWidget ('Sensor' vs 'Tag' halves) — no StatusWidget, so this PR's code cannot affect it. The getTimeRange fix takes the zero-cost path (no TimeWindow_ in the bench) and already passes the gate on main/fix(dashboard): getTimeRange returns full data extent under an active TimeWindow #284.
  • Same machine, back-to-back: origin/main measured −62% overhead (pass) while this branch measured +20% (fail), with legacy time swinging 1336→469 ms — i.e. the metric is dominated by runner load, and a 10% gate can't survive that.

All real tests are green: Dashboard (fixed by the merged #284 getTimeRange fix), A-D, E-I, J-P, Octave, TestStatusWidget, and codecov (all modified lines covered).

To proceed: mark ready + merge (the gate is a proven false-positive), or the perf gate can be made robust separately (warmup + best-of-N, realistic budget) to end the flakiness for good.

🤖 Status by Claude Code

@HanSur94
HanSur94 marked this pull request as ready for review July 8, 2026 19:45
@HanSur94
HanSur94 merged commit 853621c into main Jul 8, 2026
32 of 34 checks passed
@HanSur94
HanSur94 deleted the claude/recursing-cray-0dbbac branch July 8, 2026 19:46

HanSur94 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Wiki docs updated to reflect the StatusWidget MonitorTag-via-'Tag' fix from this PR: #368

(wiki/Installation.md and wiki/_Sidebar.md were already updated directly in this PR.)


Generated by Claude Code

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