Skip to content

256 keep run selection constant#271

Merged
rodolakis merged 4 commits into
mainfrom
256-keep-run-selection-constant
Jan 7, 2026
Merged

256 keep run selection constant#271
rodolakis merged 4 commits into
mainfrom
256-keep-run-selection-constant

Conversation

@rodolakis

Copy link
Copy Markdown
Collaborator
  • close Keep run selection constant when new runs are added to catalog #256

    • Restore selection in updateModelData() based on selected_run_uid after model updates
    • Move selected_run_uid definition before try/except blocks in doRunSelectedSlot() and doRunDoubleClickSlot() to ensure it's set even when getDataDescription() fails (e.g., for runs without fields yet). This prevents selection from jumping back to the previous run when selecting runs that don't have plottable data yet (active run).
  • close Field selection table flashes empty during live plotting #269

    • check if any fields have readable (non-empty) shapes before rebuilding the table in setStream(); if all fields have empty shapes and an existing table exists, skip the rebuild to prevent the flash.
  • close Error when connection is refused #262

    • Catch httpx.ConnectError in stream_data and log as warning

When new runs are added to the catalog, the table view's selection was
staying on the same row index instead of tracking the selected run by
UID. This caused the visual selection to appear on the wrong run after
the table data shifted.

Changes:
- Restore selection in updateModelData() based on selected_run_uid
  after model updates, ensuring the correct run remains selected even
  when new runs are added and rows shift

- Move selected_run_uid assignment before try/except blocks in
  doRunSelectedSlot() and doRunDoubleClickSlot() to ensure it's set
  even when getDataDescription() fails (e.g., for runs without fields
  yet). This prevents selection from jumping back to the previous run
  when selecting runs that don't have plottable data yet.
During live plotting updates, refreshFieldData() was rebuilding the field
selection table even when fields weren't readable yet (Container objects
without .read() method), causing the table to flash empty. Fixed by
checking if any fields have readable (non-empty) shapes before rebuilding
the table in setStream(); if all fields have empty shapes and an existing
table exists, skip the rebuild to prevent the flash.

Also changed log level from WARNING to DEBUG for Container objects without
.read() method.
Prevents traceback flood when tiled server connection fails after
stamina retries.
@rodolakis rodolakis linked an issue Jan 6, 2026 that may be closed by this pull request
@rodolakis rodolakis requested a review from prjemian January 6, 2026 23:39
@rodolakis rodolakis self-assigned this Jan 6, 2026
@rodolakis rodolakis added the bug Something isn't working label Jan 6, 2026
@rodolakis rodolakis added this to the v1.0 milestone Jan 6, 2026
@rodolakis rodolakis moved this to Review in GemViz initial release Jan 6, 2026

@prjemian prjemian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

The selected_run_uid is already set before the try/except block (line 295),
so the duplicate assignment after setStatus() (line 306) was redundant.
@rodolakis rodolakis merged commit d31ee37 into main Jan 7, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in GemViz initial release Jan 7, 2026
@rodolakis rodolakis deleted the 256-keep-run-selection-constant branch January 7, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

2 participants