Skip to content

Button "Fetch Runs" returns list of selected rows - #6

Merged
jmborr merged 8 commits into
nextfrom
fetch_runs
Sep 1, 2026
Merged

jmborr merged 8 commits into
nextfrom
fetch_runs

Conversation

@jmborr

@jmborr jmborr commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Description of the changes

This PR extends the RunsSelector NiceGUI widget to let users explicitly capture the currently selected runs via a Fetch Runs button (and reset selection via Clear Selection), making the selection available to downstream config-assembly steps.

Changes:

  • Add Fetch/Clear selection controls, selection-driven enable/disable behavior, and a fetched_runs/on_runs_fetched integration surface to RunsSelector.
  • Add comprehensive widget tests covering selection behavior, sorting, copying/immutability, callbacks, and grid rebuild behavior.
  • Update user-facing docs and landing-page instructions; consolidate build/publish docs into a single page.

References:

  • Links to IBM EWM items: 17328

Check all that apply:

  • Updated documentation
  • Source added/refactored
  • Added unit tests
  • Added widget/UI tests
  • Updated packaging, dependency, or Pixi configuration

Checklist for the author

  • pixi run test passes
  • pixi run build-docs passes, if documentation changed
  • Documentation is updated or not required
  • Versioning/package metadata changes were verified, if applicable

Checklist for the reviewer

  • Code follows project conventions and best software practices
  • Variables and public names are clear
  • Comments explain non-obvious intent, not mechanics
  • Tests cover the changed behavior
  • Documentation and packaging metadata are consistent with the change

@jmborr jmborr self-assigned this Sep 1, 2026
@codecov-commenter

This comment was marked as resolved.

@read-the-docs-community

This comment was marked as resolved.

Capture the runs highlighted in the IPTSTable as a list of row dicts,
ordered by increasing run number. AG Grid's getSelectedRows returns rows
in the order the selection was built, so the rows are sorted before being
stored.

The button stays disabled until the table reports a selection. Consumers
read the result through the fetched_runs property or subscribe with
on_runs_fetched, mirroring the on_connection_change pass-through.

Also document the table's selection gestures, which were previously
undescribed in the usage guide.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jmborr

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

jmborr and others added 2 commits September 1, 2026 14:52
Loading another IPTS replaces the table rows through NiceGUI's aggrid
update method, which destroys and recreates the grid. The selection is
dropped without a selectionChanged event, so the fetch button kept the
enabled state earned by the previous IPTS while its row numbers now
addressed different runs. Disable the button on the grid rebuild, which
gridReady signals, and correct the state in the empty-selection branch of
the fetch handler as well.

Hand out deep copies of the captured rows from the fetched_runs property
and to the callbacks. A row holds whatever the ONCat projection returned,
so a metadata path may yield a list or a nested dict that a shallow copy
would still share with later consumers.

Addresses review comments on PR #6.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each Fetch Runs click replaces the captured runs with the current
selection, and nothing else changes them: loading another IPTS or signing
out leaves the last capture in place for the later steps of the
config-assembly flow. The behavior was already in place but implicit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jmborr

This comment was marked as resolved.

This comment was marked as resolved.

jmborr and others added 3 commits September 1, 2026 15:40
Signed-off-by: Jose Borreguero <borreguerojm@ornl.gov>
The empty-selection branch of the fetch handler disabled only the fetch
button, so Clear Selection could stay enabled with nothing selected --
the state that branch exists to correct. Route every path that reacts to
the selection through one helper so the two buttons cannot disagree.

Also drop the RunTable reference from the fetched_runs docstring: the
widget exposes an IPTSTable and never surfaces RunTable, so the name gave
a public-API reader nothing to follow. The comparison stays in the
private copy helper, where it explains the convention being followed.

Addresses review comments on PR #6.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jmborr
jmborr merged commit 5b6fe29 into next Sep 1, 2026
6 checks passed
@jmborr
jmborr deleted the fetch_runs branch September 1, 2026 19:52
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.

3 participants