Skip to content

Install restart fix (#206), animal assignment (#215), launch shortcut (#216) - #214

Merged
gbradham merged 4 commits into
mainfrom
claude/open-issues-40c1c8
Oct 24, 2026
Merged

gbradham merged 4 commits into
mainfrom
claude/open-issues-40c1c8

Conversation

@gbradham

@gbradham gbradham commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #213: a fix to its Install button, plus the two new issues.

Closes #215
Closes #216

Install button restart hang (#206 follow-up)

Pressing Install on an Analyze card and then Restart logged RuntimeError: Cannot enter into task … while another task is being executed, and shutdown sat out its 10 s timeout.

  • Cause: the install coroutine opened its result dialogs itself. A modal dialog runs a nested Qt event loop, so qasync stepped other tasks while the install task was still executing. Restart then called close() from inside that task, so closeEvent's drain-and-shutdown task could not run.
  • Fix: the task only installs. The report, the restart prompt and close() run in _after_install_extra, scheduled with QTimer.singleShot(0, …) so they run outside any asyncio task.

#215 Animal assignment

A new AnimalPicker lists Experiment > Animals and is bound to the session's active_subject_id.

  • Run header (desktop and Pi): the picker sits beside the status pill and locks while a run is live. The data recorder and the tracking logger already write the active subject into their CSV headers, so the run carries the animal with no other change. On the Pi it is pill-height via touch.qss, because a 42 px touch combo pushed the run page past 800×480.
  • Multi-camera window: an Animal picker sits beside Name. These runs are video only, so the animal's ID joins the file prefix (retrieval_D07_…).

#216 Easier launching

New glider shortcut command:

Platform What it creates Found by
macOS ~/Applications/GLIDER.app Spotlight, Launchpad
Windows Start Menu GLIDER.lnk, run with pythonw so no console window opens Windows Search
Linux ~/.local/share/applications/glider.desktop the desktop's app menu
  • Each launcher starts the interpreter the command was run from, so it opens that install.
  • install.sh and install.ps1 run it (not on the Pi, whose image ships its own). Existing installs can run uv run glider shortcut once.
  • The installation docs have a new "Open GLIDER by searching for it" section.

Testing

  • Full suite: QT_QPA_PLATFORM=offscreen uv run --no-sync pytest -q -m "not slow" gives 6682 passed, 4 skipped, 7 deselected.
  • Lint: ruff check and black --check are clean on src tests plugins tools.
  • New tests:
    • install follow-up deferred out of the task
    • run-header animal picker, including its live lock
    • multi-camera animal file prefix
    • shortcut creation on all three platforms (Windows through the PowerShell call it makes)
  • Pi layout: the 800×480 layout test still passes.
  • Manual (macOS): opened a generated GLIDER.app with open; GLIDER started from it.
  • Not tested: the Windows shortcut was not run on a real Windows machine; CI's Windows job covers the unit test only.

…all task (#206)

Opened inside the asyncio task, the result dialogs' nested event loop made
qasync raise "Cannot enter into task", and Restart's close() left shutdown
waiting out its 10 s timeout. The task now only installs; the follow-up runs
on the next turn of the Qt loop.
An Animal picker in the run header (desktop and Pi) and the multi-camera
window sets the session's active subject, which the data recorder and the
tracking logger already write into their CSV headers. Multi-camera runs are
video only, so there the animal's ID also joins the file prefix.
…nu (#216)

Creates ~/Applications/GLIDER.app on macOS, a Start Menu shortcut on
Windows and a .desktop entry on Linux, each launching the interpreter it
was run from. install.sh and install.ps1 run it (not on the Pi, whose image
ships its own launcher).
@gbradham gbradham changed the title Fix the Install button's restart hanging shutdown (#206 follow-up) Install restart fix (#206), animal assignment (#215), launch shortcut (#216) Oct 24, 2026
Windows' wider fonts put the Pi window 3 px over 480 with the Animal
caption beside the picker; the Pi now shows the picker alone. The shortcut
test only checks the launcher's executable bit on POSIX.
@gbradham
gbradham merged commit e5fac47 into main Oct 24, 2026
4 checks passed
@gbradham
gbradham deleted the claude/open-issues-40c1c8 branch October 24, 2026 21:27
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.

Easier launching Animal assignment

1 participant