RegionTooLargeMixin
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Built into JBrowse core. View source.
The region-too-large gate: a display opts in by overriding gateEnabled and
passing byteLimit: self.resolvedByteLimit() to its fetch RPC. The RPC
measures the index before it downloads and answers a refusal when a region
is over budget; the fetch runners commit what it measured, and
regionTooLarge is derived from that last measurement. While the banner is
up the fetch runs once per settled viewport and settings, which is the
re-measure.
Composed by MultiRegionDisplayMixin and GlobalFetchMixin. The rules and
the numbers behind them: agent-docs/reference/REGION_TOO_LARGE.md.
Volatiles
| Member | Description |
|---|---|
forceLoadTrackforceLoadTrack: false | The force-load button's track-wide approval. Volatile so it never reaches a saved session; the forceLoad config slot is the durable form. |
byteEstimatebyteEstimate: undefined as ByteEstimate | undefined | The last byte measurement: bytes, the span they were taken at, and whether zooming has been shown not to shrink them. Survives clearAllRpcData; dropped on chromosome navigation and on a tier swap. |
gateMeasuredViewportKeygateMeasuredViewportKey: undefined as string | undefined | The gateViewport key the gate last asked the adapter about, on either axis — the viewport AND the settings it asked under. Separate from byteEstimate because a density refusal measures no bytes. |
Getters
| Member | Description |
|---|---|
gateEnabledboolean | The opt-in. Overridden with a literal true by gated displays, and check-gated-adapter-budgets insists on a literal: this mixin returns early on it in an autorun and in commitFetchBytes. |
densityGateEnabledboolean | Whether the density axis applies. CanvasFeatureGateMixin contributes true beside its measurement; byte-only displays leave it. |
byteGateAdapterConfigRecord<string, unknown> | The adapter config the gate measures — the one at byteGateAdapterPath. Overridable for a display whose adapter config is synthesized rather than read off the track. |
configuredFetchSizeLimitnumber | undefined | The display's fetchSizeLimit slot, from regionTooLargeConfigSchemaFields. number | undefined, because getConf answers undefined for a slot a composing display's schema never declared and typing it number hid the whole failure — resolveByteLimit falls back closed, and says why. |
densityTooLargeboolean | The density axis's verdict; canvas overrides it. |
byteGateAdapterPathstring[] | Where on the track config the measured adapter sits. A tiered display overrides this one hook (MAF: ['adapter', 'summaryAdapter'] while showSummary), and both the measurement and the budget follow it. |
adapterFetchSizeLimitnumber | undefined | The measured adapter's own fetchSizeLimit slot, read off the live track config rather than the adapterConfig snapshot, which omits slots at their default. |
configForceLoadboolean | The declarative forceLoad slot. |
gateViewportGateViewport | undefined | What a measurement taken now would be about: the span on screen, and a key for the stretch of genome it covers and the settings it would be taken under. Undefined until the view is measured, and the mixin's only read of the view. Captured before the fetch's round trip, never at commit, so the stamp names the settings the worker actually counted under. The settings term is rpcPropsCacheKey, the axis both families already invalidate data on. It belongs in the measurement because the worker's density probe counts ADMITTED features (densityGate's admit), so a filter admitting almost nothing is a different measurement of the same viewport — and while staleness was viewport-only, the main thread never went back to ask. The byte axis is an index read no rpcProps field can move; the rule is one rule rather than one per axis. |
byteGateAdapterKeystring | Which tier the estimate is about, as a comparable string. |
aboveForceLoadFloorboolean | Whether the span on screen is at or above AUTO_FORCE_LOAD_BP, the one comparison against that constant. False on an unmeasured view. |
gateExemptboolean | Nothing may gate on either axis: the forceLoad slot or the button. |
estimatedFetchBytesnumber | undefined | The stored estimate's bytes; undefined when nothing has been measured. |
gateMeasurementStaleboolean | Whether the last measurement still describes what a fetch issued now would ask: the viewport on screen, under the settings on screen. True before any measurement. The triple's third term, the adapter tier, is not here — a tier swap drops the measurement outright (ClearByteEstimateOnNavOrTierSwap) rather than marking it stale. |
gateByteLimitnumber | The byte budget: the adapter's limit, else the display's, doubled below AUTO_FORCE_LOAD_BP. Read only through resolvedByteLimit(). |
gateActiveboolean | Whether the gate may act right now, on any axis: opted in, not exempt, view measured. The view is read last, so an ungated display never touches it. |
densityGateActiveboolean | gateActive plus the density axis's own terms: the axis is on, and the span is above the floor. |
tooLargeStatusRegionTooLargeStatus | The verdict and its banner text, from the stored estimate against resolvedByteLimit() and the density axis when it may act. |
regionTooLargeboolean | |
regionTooLargeReasonstring | Banner text for the axis that tripped; empty when not too large. |
zoomCanReleaseGateboolean | Whether "zoom in to see features" is honest advice. Density always releases on zoom; bytes only if the last zoom-in moved the estimate. |
gateSkipsMeasuredViewportboolean | The skip both fetch skeletons apply: the banner is up and its measurement already describes the viewport on screen. |
Methods
| Member | Description |
|---|---|
resolvedByteLimit() => number | undefined | The budget the worker enforces and the banner compares against — the one spelling of that pair. Undefined when the gate may not act. |
gateFetchState() => GateFetchState | The gate as it stands for a fetch about to be issued. Calling it is the capture, which is why it is a method. |
Actions
| Member | Description |
|---|---|
| setByteEstimate | The bytes half of a measurement alone, for a test staging a display. Production commits through commitFetchBytes. |
clearByteEstimate() => void | Drops the estimate and the viewport stamp. forceLoadTrack survives: it is a track-wide approval. |
setForceLoadTrack(flag: boolean) => void | |
reload() => void | Overridden by the composing display. |
| commitFetchBytes | The byte axis of a finished fetch, called by the fetch runners with the gateFetchState() they captured at issue. Commits the per-region max; an empty batch, or an ungated display, commits nothing. |
forceLoad() => void | The banner's button: exempt the track on both axes and refetch. |