Skip to content

Bug-find session 260526: info-icon survival + 1000-pt preview cap#163

Merged
HanSur94 merged 4 commits into
mainfrom
claude/bugfind-260526-info-icon-and-preview-cap
May 29, 2026
Merged

Bug-find session 260526: info-icon survival + 1000-pt preview cap#163
HanSur94 merged 4 commits into
mainfrom
claude/bugfind-260526-info-icon-and-preview-cap

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

Summary

Two small fixes surfaced during a live bug-hunt session on the industrial-plant demo:

  • fix(dashboard): preserve i icon after PlantLog L toggle cycle (d2bb50f) — DashboardLayout.addPlantLogToggle hardcoded the L button's x position for a 3-button right cluster, so on callback-driven L on→off rebuilds it landed on top of InfoIconButton, visually occluding the i icon. Fix: call reflowChrome_ at the end of addPlantLogToggle (try/catch'd) so the canonical 4-button-cluster layout re-applies after every rebuild. Includes regression tests in both the class-based suite and function-style test file.
  • feat(quick): raise per-signal slider-preview cap from 400 → 1000 (834b43c) — DashboardEngine.computePreviewEnvelopeReturning_ clamps nBuckets from a figure-pixel-derived value; the cap was 400 buckets/signal. Bumped to 1000 so the bottom slider preview can show more detail on wide screens. Doc comments updated. One stale [50, 400] comment in test_dashboard_preview_overlay.m also corrected.

GSD artifacts (committed alongside) document the quick task in .planning/quick/260526-pqz-…/.

Test plan

  • tests/test_dashboard_preview_envelope.m — 7/7 (MATLAB R2025a), 2/2 (Octave 11.1.0)
  • tests/test_dashboard_preview_overlay.m — 10/10 (MATLAB)
  • tests/suite/TestDashboardLayoutPlantLogToggle.m (new regression test testInfoIconSurvivesToggleOnOff) — passes
  • Function-style tests/test_dashboard_layout_plant_log_toggle.m (new sub-test) — passes
  • Wider regression sweep on related test files: 65/65 PASS
  • mh_lint + mh_style clean on both edited files
  • Live demo verification (user-confirmed): info icon survives ≥2 full ON/OFF cycles on the Reactor Pressure widget

🤖 Generated with Claude Code

HanSur94 and others added 4 commits May 26, 2026 18:37
… -> 1000

- DashboardEngine.computePreviewEnvelopeReturning_: change min(400, ...) -> min(1000, ...) so wide windows (>=2000 px) drive proportionally more preview detail in the bottom slider strip.
- Update doc-comment on computePreviewEnvelope and inline comment in computePreviewEnvelopeReturning_ to report new range [50, 1000].
- Update consistency comment in tests/test_dashboard_preview_overlay.m (no assertion change — the test only asserts numel(xd) >= 4).
- Intentionally NOT adding cache invalidation: PreviewNBuckets_ is cached on DashboardEngine, so a running demo must restart (or trigger the existing resize-invalidation at line 2241) to pick up the new cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add PLAN.md and SUMMARY.md for quick task 260526-pqz.
- Update STATE.md "Quick Tasks Completed" table with new row.

Task delivered: raised per-signal slider-preview cap from 400 -> 1000 buckets in DashboardEngine.computePreviewEnvelopeReturning_. Static analysis clean (mh_lint + mh_style); MATLAB tests pass (envelope 7/7, overlay 10/10); Octave runs as expected (preview_envelope 2/2 with pre-existing skips; preview_overlay skipped — pre-existing TimeRangeSelector guard).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
addPlantLogToggle hardcoded xPL for a 3-button right cluster, but
the FastSenseWidget chrome carries a 4-button cluster. Without a
reflowChrome_ pass after L rebuild, the recreated L button landed
on top of InfoIconButton, visually swallowing the i icon after
every toggle. The initial render was rescued by the reflowChrome_
at the end of realizeWidget; callback-driven rebuilds were not.

Fix: call DashboardLayout.reflowChrome_ at the end of
addPlantLogToggle (wrapped in try/catch so a reflow failure can
never break the toggle itself).

Adds regression tests covering one and multiple toggle cycles.
Fixes two pre-existing stale tests that pinned the 3-button-cluster
layout.

Closes debug session: .planning/debug/260526-info-icon-vanishes-after-plantlog-toggle.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HanSur94 HanSur94 merged commit c4c8969 into main May 29, 2026
3 of 4 checks passed
@HanSur94 HanSur94 deleted the claude/bugfind-260526-info-icon-and-preview-cap branch May 29, 2026 17:18
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libs/Dashboard/DashboardLayout.m 66.66% 1 Missing ⚠️

📢 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