# WebSessionConnectionsMixin

Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release —
see [pluggable elements](https://jbrowse.org/jb2-staging/docs/developer_guide/) for concepts. Built into
JBrowse core.
[View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/web-core/src/SessionConnections.ts).

Members a composed model contributes are listed here too, so these tables are
the whole surface.

## Properties

<!-- prettier-ignore -->
| Member | Description | Defined by |
| --- | --- | --- |
| <span id="property-sessionconnections">**sessionConnections**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>sessionConnections: types.stripDefault( types.array(pluginManag…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>sessionConnections: types.stripDefault(&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;types.array(pluginManager.pluggableConfigSchemaType('connection')),&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;[],&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;)</code></pre></dialog></span> |  | WebSessionConnectionsMixin |
| <span id="property-connectioninstances">**connectionInstances**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>connectionInstances: types.stripDefault( types.array(pluginMana…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>connectionInstances: types.stripDefault(&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;types.array(pluginManager.pluggableMstType('connection', 'stateModel')),&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;[],&#10;&#160;&#160;&#160;&#160;&#160;&#160;)</code></pre></dialog></span> |  | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#property-connectioninstances) |
| <span id="property-connectiontrackconfigs">**connectionTrackConfigs**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>connectionTrackConfigs: types.stripDefault( types.frozen&lt;Record…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>connectionTrackConfigs: types.stripDefault(&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;types.frozen&lt;Record&lt;string, ConnectionTrackConfigEntry&gt;&gt;(),&#10;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{},&#10;&#160;&#160;&#160;&#160;&#160;&#160;)</code></pre></dialog></span> | <span data-pagefind-ignore>Persisted configs of connection tracks the user has opened, keyed by trackId. Unlike `connectionInstances` (stripped from snapshots, holds the whole fetched hub), this holds only the tracks in use, so an open connection track resolves synchronously on session load without re-establishing the connection.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#property-connectiontrackconfigs) |

## Getters

<!-- prettier-ignore -->
| Member | Description | Defined by |
| --- | --- | --- |
| <span id="getter-connections">**connections**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slotName: string, d…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slotName: string, data: Record&lt;string, unknown&gt;): any; setSlot(slotName: string, value: unknown): void; } &amp; IStateTreeNode&lt;...&gt;)[]</code></pre></dialog></span> |  | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#getter-connections) |

## Actions

<!-- prettier-ignore -->
| Member | Description | Defined by |
| --- | --- | --- |
| <span id="action-addsessionconnectionconf">**addSessionConnectionConf**</span><br><code>(connectionConf: AnyConfiguration) =&gt; any</code> | Add a connection config to *this session*: it lands in `sessionConnections`, travels with the session when it is saved or shared, and never reaches the config.json the server hands every visitor. Idempotent on `connectionId`.<br><br>This is the one to call when the connection belongs to the session being built — a `&hubURL=` link, a session spec's `sessionConnections` — no matter who is looking. `addConnectionConf` below is the one whose destination depends on that. | WebSessionConnectionsMixin |
| <span id="action-addconnectionconf">**addConnectionConf**</span><br><code>(connectionConf: AnyConfiguration) =&gt; any</code> | Add a connection config wherever *this user's* edits belong: an admin's into the shared config (`jbrowse.connections`, which the admin server writes back into config.json for every visitor), everyone else's into the session. Two destinations behind one name, so call it only where that really is the intent — the "Open connection..." dialog, where an admin adding a hub means to add it for the whole site. Anything that means one destination should say which: `addSessionConnectionConf` above for the session, `jbrowse.addConnectionConf` for the config. | WebSessionConnectionsMixin |
| <span id="action-deleteconnection">**deleteConnection**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slot…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slotName: string, data: Record&lt;…&gt;): any; setSlot(slotName: string, value: unknown): void; } &amp; IStateTreeNode&lt;...&gt;) =&gt; any</code></pre></dialog></span> |  | WebSessionConnectionsMixin |
| <span id="action-makeconnection">**makeConnection**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; {…} &amp; IStateTreeNod…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; {…} &amp; IStateTreeNode&lt;…&gt;, initialSnapshot?: object) =&gt; any</code></pre></dialog></span> |  | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-makeconnection) |
| <span id="action-breakconnection">**breakConnection**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slot…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slotName: string, data: Record&lt;…&gt;): any; setSlot(slotName: string, value: unknown): void; } &amp; IStateTreeNode&lt;…&gt;) =&gt; void</code></pre></dialog></span> | <span data-pagefind-ignore>Remove a live connection instance. Tolerant of an already-dormant connection (its instance is stripped from the session on reload). Leaves persisted open-track configs alone — the connect() error path calls this and the user's already-open tracks must survive a transient failure. Full removal goes through `deleteConnection`.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-breakconnection) |
| <span id="action-teardownconnection">**teardownConnection**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slot…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(configuration: ModelInstanceTypeProps&lt;…&gt; &amp; { setSubschema(slotName: string, data: Record&lt;…&gt;): any; setSlot(slotName: string, value: unknown): void; } &amp; IStateTreeNode&lt;…&gt;) =&gt; void</code></pre></dialog></span> | <span data-pagefind-ignore>Close every track a connection contributed — the live instance's tracks plus any persisted open-track configs (a dormant connection, never expanded this session, still renders its opened tracks from `connectionTrackConfigs`) — from all views/widgets, drop the live instance, and drop the persisted configs. The session is left as if the connection had never loaded.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-teardownconnection) |
| <span id="action-clearconnections">**clearConnections**</span><br><code>() =&gt; void</code> |  | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-clearconnections) |
| <span id="action-captureconnectiontrack">**captureConnectionTrack**</span><br><code>(trackId: string) =&gt; void</code> | <span data-pagefind-ignore>Snapshot a just-opened connection track's config into `connectionTrackConfigs` so it survives session reload. No-op if the track isn't connection-provided or is already captured (edits go through `updateConnectionTrackConfig`).</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-captureconnectiontrack) |
| <span id="action-updateconnectiontrackconfig">**updateConnectionTrackConfig**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(trackConf: Record&lt;string, unknown&gt; &amp; { trackId: string; }) =&gt;…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(trackConf: Record&lt;string, unknown&gt; &amp; { trackId: string; }) =&gt; void</code></pre></dialog></span> | <span data-pagefind-ignore>Persist an edit to an opened connection track. The full config is stored (not a delta): the connection's fetched "base" isn't present at load, so only a complete config resolves synchronously.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-updateconnectiontrackconfig) |
| <span id="action-setconnectiontrackconfig">**setConnectionTrackConfig**</span><br><span class="cell-more"><button type="button" class="cell-more-trigger"><code>(trackId: string, connectionId: string, config: Record&lt;string,…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>(trackId: string, connectionId: string, config: Record&lt;string, unknown&gt;) =&gt; void</code></pre></dialog></span> | <span data-pagefind-ignore>Upsert one opened connection track's persisted config.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-setconnectiontrackconfig) |
| <span id="action-pruneconnectiontrackconfig">**pruneConnectionTrackConfig**</span><br><code>(trackId: string) =&gt; void</code> | <span data-pagefind-ignore>Drop a connection track's persisted config once no open view still references it, so the session doesn't accumulate closed tracks.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-pruneconnectiontrackconfig) |
| <span id="action-hydrateconnection">**hydrateConnection**</span><br><code>(connectionId: string) =&gt; void</code> | <span data-pagefind-ignore>Lazily establish a single connection by id if it isn't already live — used when its category is expanded in the track selector. Fetches silently (no view launch / success snackbar); already-open tracks keep rendering from `connectionTrackConfigs` meanwhile. Idempotent.</span> | [ConnectionManagementSessionMixin](../connectionmanagementsessionmixin#action-hydrateconnection) |

