Skip to content

Bridge: sync ProgressBarWindow to NDI-matlab aa96851e (bar fills its row on R2026a) - #327

Merged
stevevanhooser merged 1 commit into
mainfrom
bridge-sync-progressbarwindow
Oct 14, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
bridge-sync-progressbarwindow

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

What

Clears the MATLAB/Python bridge completeness drift failure on ndi_gui_component_ProgressBarWindow:

src/ndi/gui/component/ndi_matlab_python_bridge.yaml: ndi_gui_component_ProgressBarWindow
(+ndi/+gui/+component/ProgressBarWindow.m) -- MATLAB has moved since 2b23dd30

This came from upstream NDI-matlab, so any PR opened against main now fails the check (it is red on #326 for this reason).

Following section 7 of docs/developer_notes/ndi_matlab_python_bridge.yaml (option 2: diff read, nothing for Python to follow):

  • matlab_last_sync_hash: 2b23dd30 → aa96851e (the file's last-touching commit, git log -1 --format=%h -- <path>).
  • A dated decision_log note naming the commits being accounted for, as TestAHashChangeIsJustified requires when a hash moves without a port.

The MATLAB diff (2b23dd30..aa96851e, ProgressBarWindow.m)

Three commits, on main via merge aa96851e:

  • 1e8fc581 ProgressBarWindow: the bar fills its row on R2026a
  • d367f621 the bar sits 5 px inside its row, on the window's background
  • 175b08af the bar's panel turns AutoResizeChildren off

Under R2026a, a uiaxes in a grid cell is placed by its outer box and keeps about 25 px for tick labels and a title, even when they're hidden. In a 28 px row that left a 2.7 px bar. The fix:

  • addBar parents the bar's axes to a borderless uipanel.
  • A new hidden constant, BarMargin = 5, sets the gap.
  • A new static method, fitBarAxes, pins the axes' InnerPosition 5 px inside the panel. It runs once, then as the panel's SizeChangedFcn.
  • removeBar deletes and re-rows the panel through Axes.Parent.

Why there is nothing to port

The Qt port draws each bar as a QProgressBar (min-height 18 px) stretched across its row's QHBoxLayout. There is no axes outer box to work around, and removeBar already removes the whole row frame. BarMargin and fitBarAxes are MATLAB uifigure plumbing, like setGraphics/tryDock already listed in the entry's decision_log as having no Qt counterpart. The bridge property gate does not flag the hidden constant.

Testing

Run locally against a full NDI-matlab checkout at 695e8d86 (current main), with NDI_BRIDGE_CHECK_STRICT=1 as CI sets:

  • test_matlab_bridge_hashes.py, _completeness.py, _properties.py, _status.py and _python_paths.py: 192 passed. Before this change, test_no_entry_has_drifted failed with the error above.
  • test_bridge_skip_backstop.py: 3 passed.
  • black --check src/ tests/ and ruff check src/ tests/: clean.
  • The full pytest tests/ suite was not run locally (only YAML changed, and ndi isn't installed in this sandbox). CI runs it.

Independent of #326 (vhlab archive URLs) and can merge in either order. Once this is on main, merging main into #326 clears the bridge failure there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UMLSmPQyLVBfBC52mCahmk


Generated by Claude Code

…row on R2026a)

NDI-matlab 1e8fc581, d367f621 and 175b08af wrap each bar's uiaxes in a
borderless uipanel and pin it BarMargin px inside via a new static
fitBarAxes, working around uiaxes' reserved label room under R2026a.
The Qt port draws a QProgressBar its layout already sizes to the row,
so nothing on the Python side follows; bump the hash and record why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UMLSmPQyLVBfBC52mCahmk
@stevevanhooser
stevevanhooser merged commit 03dbce2 into main Oct 14, 2026
9 checks passed
@stevevanhooser
stevevanhooser deleted the bridge-sync-progressbarwindow branch October 14, 2026 16:37
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.

2 participants