JBrowser Source Docs

jbrowser.services.session

Generated from the source code of JBrowser 1.5.4.

jbrowser/services/session.py · 151 lines

Session persistence: spaces, card layout and full back/forward history per card.

Constants#

Name Value
DEFAULT_SPACES [('Home', '🏠', '#4c8dff'), ('Work', '💼', '#a66bff'), ('Other', '✨', '#2ecc71')]

SessionManager#

class SessionManager(QObject)source
SessionManager(state: BrowserState, settings: Settings, path: Path, history_provider: Callable[[Tab], bytes | None], parent: QObject | None=None)

Attributes

Name Value
AUTOSAVE_MS 15000
SESSION_FIELDS frozenset({'url', 'title', 'width', 'zoom', 'muted', 'pinned'})

SessionManager.mark_dirty#

mark_dirty(*_args) -> Nonesource

SessionManager.on_tabs_flushed#

on_tabs_flushed(summary: dict) -> Nonesource

Pipeline hook: only session-relevant tab changes schedule a save.

SessionManager.start#

start() -> Nonesource

SessionManager.snapshot#

snapshot() -> dictsource

SessionManager.save_now#

save_now() -> Nonesource

SessionManager.restore#

restore(restore_tabs: bool | None=None, migrate_from: int=2) -> boolsource

Populate the state from disk. Returns False when there was nothing to restore.