Optional predicate identifying tabs that belong to the MAIN layout. Tabs failing the predicate (e.g. record tabs under the records-style record-open model, which live in their own layout region) are excluded from ALL main-layout semantics: they never force the main tab bar to appear (shouldShowTabs), are never consumed as the replaceable "temporary tab" by OpenTab, and skip the keep-last-tab-alive rule in CloseTab. Null = every tab is a main-layout tab (classic behavior). Kept as a settable predicate (not an import) because this package sits below the package that owns the record-open style. NOTE: record tabs DOCKED to the workspace ("Move to Workspace") intentionally PASS this filter — they are main-layout tabs.
Optional predicate identifying members of the records REGION — the second
temp-tab pool. Requests carrying TempScope: 'records' consume and cascade
within this set only, which is what gives records preview-tab behavior
without letting a nav click touch a record (TempTabConsumptionFilter keeps
guarding that direction) or a record open touch the nav tab.
Settable predicate for the same layering reason as MainLayoutTabFilter.
NOTE: record tabs DOCKED to the workspace ("Move to Workspace") must FAIL
this filter — docking is an act of investment, and a docked record is a
main-layout tab that nothing in either pool may consume.
Optional predicate identifying tabs that may be CONSUMED as the replaceable "temporary tab" by OpenTab. Record tabs (docked or not) are deliberately unpinned yet must never be silently replaced by the next nav click — the shell sets this to exclude ALL record tabs under the records style. Null = every unpinned main-layout tab is consumable (classic behavior). Settable predicate for the same layering reason as MainLayoutTabFilter.
Observable of the current workspace configuration
Observable of loading state
Observable of tab bar visibility Returns false when only 1 tab exists and no tabs are pinned Returns true when 2+ tabs exist OR any tabs are pinned
Clear the saved layout structure. This is used to recover from corrupted layouts - tabs will be recreated fresh.
Close all tabs except the specified one
Close a tab
Close all tabs to the right of the specified tab
Get the ID of the currently active tab
Get current configuration synchronously
Initialize the workspace state for a user
Force creation of a new tab, never replacing temporary tabs Used for Shift+Click behavior - checks for existing tab first, only creates new if none exists
Reset workspace to a clean default configuration and persist immediately. Used for recovery when stale or corrupted workspace data prevents startup.
Set active tab
Toggle pin state of a tab
Update the RECORDS region layout (the separate Golden Layout hosting record tabs under the records-style record-open model).
Update the configuration of a specific tab. Merges the provided partial configuration with the existing tab configuration.
The ID of the tab to update
Partial configuration to merge with existing configuration
Update a tab's top-level resourceRecordId (and mirror it into configuration.recordId).
Used when a "new record" tab transitions to a saved record — the tab was opened with
an empty recordId, but once the user saves, the tab now represents an actual record.
Without this, the next "Create New Record" request would match this tab (both have
empty resourceRecordId) and focus the stale form instead of opening a fresh one.
Also clears configuration.isNew since the record now exists.
Update tab sequences after reorder
Update the title of a specific tab
Manages workspace state including tabs, layout, and persistence.
Uses a single Workspace.Configuration JSON blob for all state, with debounced saves to minimize database writes.