Skip to content

Fix MATLAB E-I shard: companion toolbar tests for Phase 1040 bell#182

Closed
HanSur94 wants to merge 1 commit into
mainfrom
claude/matlab-ei-companion-toolbar-fix
Closed

Fix MATLAB E-I shard: companion toolbar tests for Phase 1040 bell#182
HanSur94 wants to merge 1 commit into
mainfrom
claude/matlab-ei-companion-toolbar-fix

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

@HanSur94 HanSur94 commented Jun 2, 2026

Problem

PR #180 (Phase 1040: Companion Notification Center) landed on main and turned the MATLAB Tests (E-I) shard red — on main itself and on every PR that merges with it. (Sibling to #181, which fixes #180's Octave breakage.)

Confirmed it's a main regression, not PR-specific:

Root cause

#180 added the notification bell to the FastSenseCompanion toolbar, growing it from a 1×9 to a 1×10 grid (documented in FastSenseCompanion.m):

col … 7 = Wiki (70)
col   8 = Bell (70)      ← inserted by Phase 1040
col   9 = flex spacer '1x'   (was col 8)
col  10 = gear (36)          (was col 9 — "shifted 9 -> 10 to make room for the bell")

#180 updated TestFastSenseCompanion and TestCompanionEventViewer, but missed TestFastSenseCompanionPlantLogToolbar:

  • findToolbarGrid_ matched only a 9-column grid → grid never found → verifyNotEmpty failed in testToolbarGridIs1x5.
  • testSettingsButtonMovedToCol5 asserted the gear at col 9 → now col 10 → verifyEqual failed.

The implementation is intentional and self-consistent; only the test drifted.

Change

Test-only. Updates tests/suite/TestFastSenseCompanionPlantLogToolbar.m to the shipped 1×10 layout {110,110,110,130,70,90,70,70,'1x',36}:

  • findToolbarGrid_: 9→10 columns, match cw{8}==70 (bell) and cw{10}==36 (gear).
  • testToolbarGridIs1x5: assert cw{8}=70 (bell), cw{9}='1x' (spacer), cw{10}=36 (gear) + refreshed column map.
  • testSettingsButtonMovedToCol5: gear now at col 10.

Plant Log button assertions (col 4) are unaffected — the bell sits at col 8, after Plant Log.

Verification

🤖 Generated with Claude Code

PR #180 (Phase 1040: Companion Notification Center) added a notification
bell to the FastSenseCompanion toolbar, growing it from a 1x9 to a 1x10
grid: the bell was inserted at col 8, pushing the flex spacer 8->9 and the
gear 9->10 (all documented in FastSenseCompanion.m). #180 updated
TestFastSenseCompanion and TestCompanionEventViewer but missed
TestFastSenseCompanionPlantLogToolbar, whose findToolbarGrid_ still matched
a 9-column grid and whose assertions still expected the gear at col 9. The
grid was never found (verifyNotEmpty failed) and the gear-column check
failed, turning MATLAB Tests (E-I) red on main and on every PR that merges
with main.

Updates the test to the shipped 1x10 layout
{110,110,110,130,70,90,70,70,'1x',36}: col 8 = bell (70), col 9 = flex
spacer, col 10 = gear (36).

Test-only change matching the intentional, self-consistent implementation.
Verified 11/11 pass in MATLAB R2020b+ (the two previously-failing methods
testToolbarGridIs1x5 + testSettingsButtonMovedToCol5 now green); mlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

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

HanSur94 commented Jun 2, 2026

Superseded by #181, which now carries both this toolbar fix and the Octave-compat fix in one PR. Splitting them left each PR with the other half of #180's breakage still red (neither independently green), so consolidating into #181 for a clean, mergeable unblock-main PR. The toolbar commit (eca5251) was cherry-picked onto #181 unchanged.

@HanSur94 HanSur94 closed this Jun 2, 2026
@HanSur94 HanSur94 deleted the claude/matlab-ei-companion-toolbar-fix branch June 2, 2026 14:53
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