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 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.