JBrowseDesktopRootModel
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. View source.
Holds JBrowse Desktop's top-level state: the loaded config, the session, internet accounts, undo history, the app menus and the text-indexing jobs.
Many properties of the root model are available through the session, and
we generally prefer using the session model (via e.g. getSession) over the
root model (via e.g. getRoot) in plugin code.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
jobsManagerjobsManager: types.optional(JobsManager, {}) |
6 inherited properties from 3 models
From HistoryManagementMixin: history
From InternetAccountsMixin: internetAccounts
From BaseRootModel: jbrowse, session, sessionPath, assemblyManager
Volatiles
| Member | Description |
|---|---|
versionstring | |
adminModeboolean | |
openNewSessionCallback(_path: string) => Promise<void> | |
openLinkCallback(_link: string) => Promise<void> | |
returnToStartScreenCallback() => void |
6 inherited volatiles from 2 models
From RootAppMenuMixin:
From BaseRootModel: rpcManager, error, textSearchManager, pluginManager, detachDisposers
Methods
| Member | Description |
|---|---|
() => Menu[] |
Actions
| Member | Description |
|---|---|
setOpenNewSessionCallback(cb: (arg: string) => Promise<void>) => void | |
setOpenLinkCallback(cb: (arg: string) => Promise<void>) => void | Wired by the Loader to open a JBrowse Web link as a new session (the Loader owns plugin-manager lifecycle, as with openNewSessionCallback). |
setReturnToStartScreenCallback(cb: () => void) => void | Wired by the Loader to tear down this plugin manager and show the start screen (the Loader owns plugin-manager lifecycle). |
saveSession(val: SessionSnap) => Promise<void> | |
| updateTrackBase | Replace a track's base config: its sessionTracks entry when the session owns the track, otherwise its jbrowse.tracks entry. |
setPluginsUpdated() => Promise<void> | Persist the session, then rebuild the plugin manager from disk so the changed plugin set takes effect (Loader wires openNewSessionCallback to reload from the session path). |
flushSession() => Promise<void> | Save now rather than waiting out the autosave's 1s debounce, so the last second of edits survives. Every path that tears the session down — quitting, returning to the start screen — has to call this first; Exit did not, and lost whatever was still inside the debounce window. |
16 inherited actions from 3 models
From RootAppMenuMixin: , , , , ,
From InternetAccountsMixin: initializeInternetAccount, createEphemeralInternetAccount, findAppropriateInternetAccount
From BaseRootModel: setError, addDetachDisposer, detach, setSession, setDefaultSession, setSessionPath, renameCurrentSession