Skip to content

feat(squidxplorer): trade the mosaic view for the run, and hand the result off - #635

Open
jsschwrz wants to merge 2 commits into
Cephla-Lab:masterfrom
jsschwrz:feat/squidxplorer-handoff
Open

feat(squidxplorer): trade the mosaic view for the run, and hand the result off#635
jsschwrz wants to merge 2 commits into
Cephla-Lab:masterfrom
jsschwrz:feat/squidxplorer-handoff

Conversation

@jsschwrz

@jsschwrz jsschwrz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Two commits, five files. Split out of a customer build branch; the branch is cut from current master and contains nothing else.

When a run will not fit in RAM alongside the napari mosaic view, the mosaic is traded away for the duration of the run instead of the run being refused outright — the operator gets the acquisition rather than a dialog. When it ends, the finished folder is offered to SquidXplorer.

3b7be3c6 follows up by giving the handoff its own GUI lock directory, so launching SquidXplorer cannot collide with the main application's single-instance lock.

Note for review: mosaic_ram_exceeds_available() is the old check_ram_available_with_error_dialog() renamed — it now reports whether the mosaic fits rather than showing a dialog, because the caller decides what to do about it.

Spencer Schwarz and others added 2 commits September 2, 2026 14:06
An acquisition whose mosaic view would not fit in available RAM used to be
blocked outright: a modal "Not Enough RAM" error, the Start button un-checked,
and no run. Only the live preview was unaffordable, though — the instrument
could perform the acquisition perfectly well. The operator's only recourse was
to read the hint at the bottom of the message, find the Performance Mode button
themselves, and press Start again.

Treat it as a resource-allocation decision instead. The operator is told
"Mosaic View will be disabled for this Run", Performance Mode is enabled on
their behalf, the run proceeds, and Performance Mode is restored when it ends.
A run that had Performance Mode on manually is left as it was.

Because the mosaic they gave up is exactly what SquidXplorer renders from disk,
the completed run then offers to open there — with a "don't ask again this
session" opt-out. SquidXplorer needs a newer Python than this software runs on
and lives in its own venv, so it is launched out of process via the new
squidxplorer_python setting ([GENERAL]), falling back to squidmip-view on PATH.
The launcher uses the list form of Popen deliberately: SquidXplorer reads its
dataset from a bare sys.argv[1], and a path split across argv makes it open
empty with no error at all. A launch that dies immediately — almost always its
single-window lock — is reported, with the run folder left on the clipboard so
it can be dropped onto the window that is already open.

check_ram_available_with_error_dialog becomes mosaic_ram_exceeds_available: it
reports the condition and no longer both decides and vetoes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
SquidXplorer allows one GUI per lock directory and that directory defaults to
~/.cache/squidmip, which every checkout on a machine shares. Pointing the
"Open in Xplorer" handoff at a viewer that also has a desktop shortcut meant
the second launch lost the race and silently no-opped.

squidxplorer_gui_lock_dir under [GENERAL] is now exported to the viewer process
as SQUIDMIP_GUI_LOCK_DIR, so the handoff gets its own slot. Set nothing and the
launch environment is inherited untouched, as before. Doing it this way rather
than shelling out to a .cmd wrapper keeps the list-form Popen: the viewer reads
a bare sys.argv[1], so a run folder with a space in it must not go via a shell.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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