Skip to content

Update button: package table with tick boxes; bridge catch-up with NDI-matlab main - #347

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/bridge-update-dialog
Oct 31, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
claude/bridge-update-dialog

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Why

The bridge checks on main fail on NDI-matlab's Update-button rework (19b8ab573, 3bc99bf85, 749b1a266):

  • updateDialog, packageStatus, pullRepo and findCalculators had no bridge entries;
  • check, install, checkOnStartup and ndiPane had drifted;
  • epochid2element, filename2epochid and setup had also drifted.

Bumping hashes without porting would have claimed parity Python didn't have, so this ports the change.

What

  • ndi.update.packageStatus (new): one row per package, with MATLAB's fields, notes, levels and tick rules.
    • A git install lists NDI-python plus each clone in ~/.ndi/tools.
    • An installer install is a single row for NDI-python.
  • ndi.update.install(Packages=[...]) updates only the named packages.
    • Unknown names raise ndi:update:install:unknownPackage.
    • Only changes in the named packages need consent.
    • The clone must be on main only if "NDI-python" is named.
    • Naming "NDI-python" alone pulls main and runs ndi_install.py without --update, so the dependency clones aren't touched.
    • A named dependency is pulled in ~/.ndi/tools, where the .pth file already points.
  • Pulling now goes through _pull_repo, MATLAB's pullRepo. It stashes edits (with a ref check, so an older stash is never popped), runs git pull --no-edit, then stash pop. Local commits are merged rather than refused by --ff-only.
  • ndi.update.check:
    • Dependencies gain CurrentVersion, LatestVersion and Url.
    • Calculators / CalculatorUpdateAvailable exist but are always empty / False. NDI-python has no NDIcalc clones; it gets ndicalc-vis-matlab from pip.
  • ndi.gui.nav.update_dialog (new): the modal Qt package table.
    • Pure helpers testable without Qt: table_data, note_text, update_button_state.
    • UpdateDialog carries MATLAB's property names; ask() opens it and returns the choice.
    • NdiPane.check_for_updates opens it and installs the ticked packages. The old confirm-box update_dialog() goes, as MATLAB's old dialogs did.
  • Bridge YAMLs:
    • New entries: packageStatus, pullRepo (ported_differently), findCalculators (matlab_only), updateDialog.
    • Ported and bumped: check, install, checkOnStartup, ndiPane.
    • Bumped with a reason, nothing to port:
      • epochid2element and filename2epochid: MATLAB's fixes for repeated ids/filenames are no-ops here, since Python already returns every match.
      • setup: every change since 03c79fa48 is in +conv/+vhlab, the Stacy legacy importer, which has no Python port.

Testing

  • New tests/test_update_package_status.py (18 tests):

    • packageStatus on real throwaway git clones: up to date; behind; your changes left unticked; changes in a package that isn't updating; an untracked file in the way; another branch. Also installer and pip installs.
    • install(Packages=...):
      • only the named dependency is pulled;
      • another branch and edits in NDI-python don't block a dependency update;
      • named changes still need consent, and survive the update;
      • NDI-python alone needs main and the installer, and runs it without --update;
      • unknown and up-to-date names.
    • The dialog helpers; the Qt window offscreen (ticks, snap-back, button text and default); NdiPane.check_for_updates installs only the ticked packages.
  • Existing update tests still pass (59 in the update group).

  • Full suite: 6477 passed. One failure each in bridge completeness and bridge drift remains:

    • completeness: no entry for +ndi/+daq/+fun/ingestEpochDocuments.m;
    • drift: daq.system and session have moved in NDI-matlab.

    Both are fixed by Ingest: progress bars and parallel per-epoch work (mirrors NDI-matlab#1079) #345, which ports those. With Ingest: progress bars and parallel per-epoch work (mirrors NDI-matlab#1079) #345 and this PR merged, the bridge checks pass against NDI-matlab main.


Generated by Claude Code

…49b1a266)

MATLAB rebuilt its Update button around a package table; the bridge
entries for check, install, checkOnStartup and ndiPane had drifted and
updateDialog, packageStatus, pullRepo and findCalculators had none.

- ndi.update.packageStatus: one row per package (NDI-python, each
  ~/.ndi/tools clone; one "installer" row for installer installs) with
  MATLAB's fields, notes, levels and Selectable/Selected rules.
- ndi.update.install(Packages=...): update only the named packages;
  unknown names raise ndi:update:install:unknownPackage; only changes in
  the named packages need consent; main is required only when
  NDI-python is named. Pulls go through _pull_repo (MATLAB's pullRepo):
  stash with a ref check, git pull --no-edit, stash pop.
- ndi.update.check: dependencies gain CurrentVersion, LatestVersion and
  Url; Calculators / CalculatorUpdateAvailable are present and empty
  (NDI-python has no calculator clones).
- ndi.gui.nav.update_dialog: the modal Qt package table (pure helpers
  table_data, note_text, update_button_state; UpdateDialog; ask), and
  NdiPane.check_for_updates uses it, installing the ticked packages.
- Bridge: new entries for packageStatus, pullRepo (ported_differently),
  findCalculators (matlab_only) and updateDialog; check, install,
  checkOnStartup and ndiPane bumped with what was ported; epochid2element
  and filename2epochid bumped (NDI-matlab's fixes are no-ops here);
  setup bumped to fd7ddbf06 (all changes are in the unported vhlab
  legacy importer).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011v7R5rnKYwncJkrNZRXhtw

Copy link
Copy Markdown
Contributor Author

MATLAB/Python bridge completeness now has 1 failure, down from the 2 that main has; the src/ndi/gui and src/ndi/update checks pass. The one left is +ndi/+daq/+fun/ingestEpochDocuments.m.

That function came in with NDI-matlab#1079, and its port and bridge entry are in #345. The daq.system / session drift in the hash check is the same story. No fix belongs here: once #345 merges, re-running this PR's CI should clear both.


Generated by Claude Code

@stevevanhooser
stevevanhooser merged commit 108c1d7 into main Oct 31, 2026
14 of 15 checks passed
@stevevanhooser
stevevanhooser deleted the claude/bridge-update-dialog branch October 31, 2026 17:23
stevevanhooser pushed a commit that referenced this pull request Oct 31, 2026
Resolves the CHANGELOG conflict with #347 by keeping both entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011v7R5rnKYwncJkrNZRXhtw
stevevanhooser pushed a commit that referenced this pull request Oct 31, 2026
…branch

#347 already re-examined the ndi.fun.epoch and ndi.setup bridge entries
against NDI-matlab main, so its versions of those two files are kept and
this branch's duplicate notes are dropped. CHANGELOG keeps every entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011v7R5rnKYwncJkrNZRXhtw
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