Skip to content

Migrate remaining matplotlib pop-ups to Panel - #401

Merged
pauladkisson merged 5 commits into
mainfrom
migrate-gui-to-panel-147
Jul 27, 2026
Merged

Migrate remaining matplotlib pop-ups to Panel#401
pauladkisson merged 5 commits into
mainfrom
migrate-gui-to-panel-147

Conversation

@pauladkisson

@pauladkisson pauladkisson commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Second step for #147

Follow-up: Optimize Artifact Removal Process #402

Replace the Step 3 (preprocessing/artifact-removal) and Step 4
(transient-peak) matplotlib/TkAgg pop-up windows with Panel pages served
in the browser, the last non-Panel GUI in GuPPy.

- New serve_blocking_page helper (frontend_utils) serves a page on a
  background Bokeh server and blocks the worker subprocess on a
  threading.Event until the user continues or closes the tab, preserving
  the existing block-then-continue flow (home.py unchanged).
- ArtifactRemovalWidget (keyboard-driven Tk figure) becomes
  ArtifactRemovalConfig: an editable per-recording-site (start, end)
  good-chunk table shaded live as hv.VSpans; save writes the same
  coordsForPreProcessing_<site>.npy format fetchCoords consumes.
- z-score/dF-F, artifact-removal review, and transient-peak plots become
  read-only HoloViews pages; visualization/* builders now return hv objects.
- All visualization stays behind is_headless(); matplotlib remains only for
  colormap names in the Step 5 dashboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

pauladkisson and others added 2 commits July 27, 2026 07:58
The step launcher ran the whole step synchronously on the Panel server's
IOLoop — a busy-wait progress poll plus thread.join — freezing the main app
for the entire step. With the pop-ups now served as in-browser Panel pages,
that block spans the interactive wait, so the main tab's websocket drops
("server connection lost") and never recovers.

Poll progress from a periodic callback on the IOLoop instead: the worker still
runs in a background thread, but the click handler returns immediately and the
app keeps answering heartbeats. Replaces the blocking readPBIncrementValues
with a non-blocking read_progress_snapshot + poll_progress_step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pauladkisson
pauladkisson marked this pull request as ready for review July 27, 2026 16:53
@pauladkisson
pauladkisson enabled auto-merge July 27, 2026 16:55
@pauladkisson
pauladkisson merged commit 46ea979 into main Jul 27, 2026
14 of 17 checks passed
@pauladkisson
pauladkisson deleted the migrate-gui-to-panel-147 branch July 27, 2026 17:08
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.

1 participant