Skip to content

feat(dashboard): info button opens in-app modal instead of external browser#118

Merged
HanSur94 merged 3 commits intomainfrom
claude/fervent-wing-576a17
May 8, 2026
Merged

feat(dashboard): info button opens in-app modal instead of external browser#118
HanSur94 merged 3 commits intomainfrom
claude/fervent-wing-576a17

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

@HanSur94 HanSur94 commented May 8, 2026

Summary

  • Dashboard Info toolbar button now opens an in-app modal uifigure with a uihtml panel rendering the HTML inline, instead of handing off to the system browser via web().
  • Repeat clicks refocus the existing modal rather than stacking windows.
  • Octave / -batch / -nodisplay paths unchanged — keep the existing system('open' | 'xdg-open' | 'cmd /c start') fallback.
  • InfoTempFile is still written unconditionally, so existing TestDashboardInfo assertions and cleanupInfoTempFile() keep working.
  • Destructor closes the modal on delete() so the engine never leaves orphan uifigures behind.

Quick task: 260508-n8h — see .planning/quick/260508-n8h-dashboard-info-button-opens-modal-render/.

Test plan

  • Static check (mcp__matlab__check_matlab_code) — no errors on DashboardEngine.m or TestDashboardInfo.m.
  • Manual smoke test on macOS MATLAB R2024b — modal opens with rendered markdown, reuses handle on second click, cleans up via delete(d).
  • CI (GitHub Actions) runs full tests/run_all_tests.m — new testShowInfoOpensModalFigure and testShowInfoModalReusesFigure skip cleanly on headless runs via assumeTrue(usejava('desktop')); existing temp-file tests keep passing on both MATLAB and Octave.

🤖 Generated with Claude Code

HanSur94 added 3 commits May 8, 2026 16:51
…tead of system browser

- Replace web(InfoTempFile, '-new') with showInfoModal_() in interactive desktop MATLAB
- Add InfoModalFigure_ cache so repeat Info clicks refocus rather than stack windows
- New uifigure + uihtml panel sized 800x600 centered, modal WindowStyle, AutoResizeChildren=off
- SizeChangedFcn keeps uihtml filling the figure on resize
- CloseRequestFcn clears the cached handle and disposes the figure
- delete() also tears down the modal so engines never leave orphan uifigures
- Octave / -batch / -nodisplay paths unchanged (system('open ...') etc.)
- InfoTempFile still always written for backward compat with existing tests
- Wrap uifigure construction in try/catch so older releases without uihtml degrade silently with a warning
…odal

- testShowInfoOpensModalFigure: verifies InfoModalFigure_ is populated, is a valid handle, and has a uihtml child after showInfo()
- testShowInfoModalReusesFigure: verifies repeat clicks refocus the existing modal rather than stack new windows
- Both tests skip on headless runs via assumeTrue(usejava('desktop'))
- Reaffirms the InfoTempFile backward-compat contract (still populated, still on disk)
- Static helper tryCloseInfoModal centralises the modal teardown for addTeardown callbacks
@HanSur94 HanSur94 merged commit 81e819d into main May 8, 2026
4 checks passed
HanSur94 added a commit that referenced this pull request May 8, 2026
Move trailing `&&` to end of previous line in tryCloseInfoModal teardown
helper so MISS_HIT mh_style passes. CI MATLAB Lint job (run 25562812581)
flagged this as `operator_after_continuation` after PR #118 merged.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 6.06061% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libs/Dashboard/DashboardEngine.m 6.06% 31 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'FastSense Performance'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: ffe8f6f Previous: f0e5ab2 Ratio
Downsample mean std(1M) 0.133 ms 0.006 ms 22.17
Instantiation mean std(1M) 2.271 ms 1.055 ms 2.15
Render mean std(1M) 7.8 ms 1.093 ms 7.14
Zoom cycle mean (1M) 15.793 ms 13.949 ms 1.13
Instantiation mean std(5M) 2.007 ms 1.077 ms 1.86
Render mean std(5M) 4.867 ms 1.938 ms 2.51
Zoom cycle mean (5M) 16.35 ms 13.962 ms 1.17
Zoom cycle mean std(5M) 0.605 ms 0.499 ms 1.21
Downsample mean std10M) 0.12 ms 0.081 ms 1.48
Instantiation mean std10M) 1.125 ms 0.635 ms 1.77
Render mean std10M) 3.808 ms 1.988 ms 1.92
Zoom cycle mean (10M) 15.984 ms 13.714 ms 1.17
Zoom cycle mean std10M) 0.602 ms 0.519 ms 1.16
Instantiation mean std50M) 11.193 ms 6.836 ms 1.64
Zoom cycle mean (50M) 17.314 ms 13.782 ms 1.26
Render mean ( std00M) 2.926 ms 1.359 ms 2.15
Zoom cycle mean (100M) 16.084 ms 14.314 ms 1.12
Downsample mean ( std00M) 8.799 ms 0.659 ms 13.35
Instantiation mean (500M) 57796.486 ms 22287.148 ms 2.59
Instantiation mean ( std00M) 2299.56 ms 95.243 ms 24.14
Render mean ( std00M) 945.8 ms 1.359 ms 695.95
Zoom cycle mean (500M) 16.112 ms 13.8 ms 1.17
Zoom cycle mean ( std00M) 2.444 ms 0.7 ms 3.49
Dashboard create+render mean 300.398 ms 262.741 ms 1.14
Dashboard create+render stdmean 28.898 ms 12.153 ms 2.38
Dashboard page switch stdmean 0.926 ms 0.822 ms 1.13
Dashboard broadcastTimeRange stdmean 0.034 ms 0.029 ms 1.17

This comment was automatically generated by workflow using github-action-benchmark.

CC: @HanSur94

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