Skip to content

fix scan browser scroll - #139

Merged
Jakub Wlodek (jwlodek) merged 9 commits into
NSLS2:mainfrom
jwlodek:fix-scan-browser-scroll
Nov 9, 2026
Merged

Jakub Wlodek (jwlodek) merged 9 commits into
NSLS2:mainfrom
jwlodek:fix-scan-browser-scroll

Conversation

@jwlodek

Copy link
Copy Markdown
Contributor
  • Fixes to germ exporter, improve auto exporter, remove auto exporter from gui for now
  • Fix issue where scan browser with large search result would resize window height

Copilot AI 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.

🟡 Changes recommended

The scrolling fix lacks a regression test verifying that overflowing results enable the table’s vertical scrollbar without increasing the window height.

1 open issue
What changed in this PR

This PR addresses scan-browser window growth when searches return many results and moves the browser into its own top-level GUI tab.

Changes:

  • Adjusts table sizing and scrolling policies to keep large result sets within the available space.
  • Displays search errors on one line, with full details in a tooltip.
  • Makes the Scan Browser a separate tab and removes the local RunEngine requirement for creating it.
File Description
src/​hextools/​gui/​scan_browser.py Updates table sizing, scrolling, and error display to prevent window growth.
src/​hextools/​gui/​__main__.py Moves Scan Browser to a top-level tab and broadens its availability.

Review effort: Balanced

Comment thread src/hextools/gui/scan_browser.py Resolved
Comment thread src/hextools/gui/__main__.py Resolved
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:15

Copilot AI 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.

🟡 Changes recommended

Metadata retrieval failures can silently broaden searches across all accessible proposals, and the outdated browser tab selection breaks screenshot generation.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread src/hextools/gui/__main__.py Resolved
Comment thread src/hextools/gui/scan_browser.py Resolved
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:21

Copilot AI 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.

🔵 Needs a closer look

QueueServer users cannot access the new metadata-backed search because scan-browser creation is guarded by a plan monitor that is only constructed for a local RunEngine.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

High severity Create scan browser for QueueServer clients

src/​hextools/​gui/​__main__.py:572

The new QueueServer support is unreachable here: this block is inside if self._plan_monitor is not None, but the monitor is only constructed for a local RunEngine. With a RunEngineClient, scan_browser remains None even when a Tiled client is available. Move browser creation outside the plan-monitor guard so QueueServer users can access the new metadata-backed search.

Review effort: Balanced

Copilot AI 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.

🟡 Changes recommended

Searches using RunEngineClient fail with AttributeError because the locked bluesky-queueserver-api 0.0.13 does not provide re_metadata().

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread src/hextools/gui/scan_browser.py Resolved

Copilot AI 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.

🟡 Changes recommended

The plan-name change breaks alignment spec validation and its test, while appending six-column rows under an existing five-column CSV header silently corrupts column mappings.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread src/hextools/exporters/auto_exporter.py Resolved
Comment thread src/hextools/tomography/alignment.py Resolved
Copilot AI balanced review requested due to automatic review settings November 9, 2026 17:08

@sligara7 Anthony Sligar (sligara7) 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.

Reviewed and looks good. A few nits:

  • Default CSV location (low).
    • When the proposal directory is missing, as in CI, the write fails and is logged at error level with a traceback for every run. That's noisy, but nothing breaks.
    • If someone passes an existing --csv file, the new rows have a different column order from its old header.
  • Search scope (low, already known). With no data_session, the search quietly covers every proposal the user can see. Copilot flagged this; the old code did the same.

Copilot AI 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.

🟡 Changes recommended

The plan-name change invalidates historical alignment runs without a spec-version bump, while appending six-field CSV rows under existing five-column headers silently corrupts column mappings.

3 open issues

Review effort: Balanced

Comment thread src/hextools/specs.py Resolved
@jwlodek
Jakub Wlodek (jwlodek) merged commit 8600f17 into NSLS2:main Nov 9, 2026
6 checks passed
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.

4 participants