intellicrack.ui.session_manager

Session manager dialog for Intellicrack.

This module provides the UI for managing analysis sessions, including listing, loading, saving, and deleting sessions.

class TagChipsWidget[source]

Bases: QWidget

Widget that renders session tags as click-to-remove chips.

Provides an inline editor for adding new tags and exposes signals so callers can react to tag changes (for example, to persist the session). Each tag renders as a horizontal pill containing the tag text and a small “x” button that removes the tag.

Variables:
  • tag_added (ClassVar[PyQt6.QtCore.pyqtSignal]) – Signal emitted with the new tag string after a tag has been added to the wired session.

  • tag_removed (ClassVar[PyQt6.QtCore.pyqtSignal]) – Signal emitted with the tag string after a tag has been removed from the wired session.

  • tags_changed (ClassVar[PyQt6.QtCore.pyqtSignal]) – Convenience signal emitted with the full list of current tags whenever a tag is added or removed.

__init__(session=None, parent=None)[source]

Initialize the tag chips widget.

Parameters:
  • session (Session | None) – Optional Session whose tags will be rendered and mutated. When None the widget renders an empty state until set_session() is called.

  • parent (QWidget | None) – Parent widget.

Return type:

None

set_session(session)[source]

Wire this widget to a different Session instance.

Parameters:

session (Session | None) – Session whose tags should be rendered, or None to clear the widget.

Return type:

None

session()[source]

Return the currently wired session.

Returns:

The session this widget mutates, or None when no session is wired.

Return type:

Session | None

refresh()[source]

Rebuild the chip layout from the wired session’s tags.

Return type:

None

class SessionManagerDialog[source]

Bases: QDialog

Dialog for managing analysis sessions.

Allows users to: - View list of saved sessions - Load previous sessions - Save current session - Delete old sessions - Export/import sessions

Variables:
  • session_loaded (ClassVar[PyQt6.QtCore.pyqtSignal]) – Signal emitted when a session is loaded.

  • session_deleted (ClassVar[PyQt6.QtCore.pyqtSignal]) – Signal emitted when a session is deleted.

  • SESSIONS_DIR (ClassVar[Path]) – Directory where serialized session files are stored.

SESSIONS_DIR: ClassVar[Path] = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/intellicrack/checkouts/latest/.intellicrack/sessions')
__init__(session_manager=None, current_session_id=None, parent=None, current_session=None)[source]

Initialize the SessionManagerDialog with session state.

Parameters:
  • session_manager (SessionManager | None) – Session manager for loading and saving sessions.

  • current_session_id (str | None) – ID of the currently active session. When omitted but current_session is supplied, this is derived from current_session.id so the active-session-protection guard and the bold row highlighting always agree with the session actually wired into the Tags panel.

  • parent (QWidget | None) – Parent widget.

  • current_session (Session | None) – Currently active in-memory Session instance, when known. When supplied, the tag chips widget is wired directly to this session so add/remove operations mutate the live session object.

Return type:

None

classmethod from_orchestrator(orchestrator, parent=None)[source]

Build a dialog wired to orchestrator’s live session manager and active session.

Reads the SessionManager and active Session off orchestrator so callers do not need to reach into orchestrator internals themselves. This keeps the dialog backed by the same SQLite-backed SessionStore the rest of the application uses instead of silently falling back to the on-disk sidecar store, and ensures the active-session-protection guard and the tags editor are wired to the true active session rather than being permanently disabled.

Parameters:
  • orchestrator (Orchestrator) – Orchestrator instance whose session manager and active session should be used to construct the dialog.

  • parent (QWidget | None) – Parent widget.

Returns:

Dialog instance wired to orchestrator’s live session manager and active session.

Return type:

SessionManagerDialog

get_selected_session_id()[source]

Get the ID of the currently selected session.

Returns:

Selected session ID or None.

Return type:

str | None

class NewSessionDialog[source]

Bases: QDialog

Dialog for creating a new session.

Allows users to specify session name and initial settings.

__init__(parent=None)[source]

Initialize the NewSessionDialog.

Parameters:

parent (QWidget | None) – Parent widget.

Return type:

None

get_session_name()[source]

Get the entered session name.

Returns:

Session name.

Return type:

str

get_description()[source]

Get the entered description.

Returns:

Session description.

Return type:

str