spacr.qt.screens.run_history

Searchable run-history dashboard for every journalled spaCR job.

The screen is read-only. Enumerating hundreds of manifests and settings files runs in a worker thread; filtering and rendering the already-loaded records is instant and stays on the GUI thread.

Classes

RunHistoryScreen

Search and inspect all run-journal records.

Module Contents

class spacr.qt.screens.run_history.RunHistoryScreen(parent=None, threaded: bool = True)[source]

Bases: PySide6.QtWidgets.QWidget

Search and inspect all run-journal records.

Parameters:
  • parent – Qt parent.

  • threaded – enumerate the journal on a worker thread. Tests use False for deterministic execution.

Variables:
  • last_error – most recent refresh failure, or "".

  • records – all records loaded by the last successful refresh.

Build the run-history screen.

Parameters:
  • parent – parent widget, or None.

  • threaded – read the history on a worker thread. Set False in tests so a refresh finishes before it returns.

closeEvent(event) → None[source]

Drain the history worker before Qt destroys this screen.

Without this the screen could be destroyed with its refresh still running. The job survives — bridge.make_thread registers it process-wide — but it survives ownerless, and an ownerless job in the run registry is what MainWindow.closeEvent reads when it decides whether the application may quit.

Parameters:

event – the close event; passed to the base class once every history job has been cancelled and drained (up to three seconds each).

refresh() → None[source]

Reload every run record without blocking the GUI thread.

select_run(run_dir: Any) → bool[source]

Select run_dir when present in the loaded table.

Parameters:

run_dir – run folder path or folder name.

Returns:

whether a matching visible row was selected.

showEvent(event) → None[source]

Load history on first display, not during application startup.

Parameters:

event – the show event; passed to the base class and otherwise not read.

Nested helpers

RunHistoryScreen.refresh._load(_settings)

Read the run journal. Off the GUI thread.

spacr/qt/screens/run_history.py:383