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:
QWidgetWidget 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
Sessionwhose tags will be rendered and mutated. WhenNonethe widget renders an empty state untilset_session()is called.parent (QWidget | None) – Parent widget.
- Return type:
None
- set_session(session)[source]
Wire this widget to a different
Sessioninstance.- Parameters:
session (Session | None) – Session whose tags should be rendered, or
Noneto clear the widget.- Return type:
None
- class SessionManagerDialog[source]
Bases:
QDialogDialog 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_sessionis supplied, this is derived fromcurrent_session.idso 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
Sessioninstance, 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
SessionManagerand activeSessionofforchestratorso callers do not need to reach into orchestrator internals themselves. This keeps the dialog backed by the same SQLite-backedSessionStorethe 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: