Workspaces
Workspaces save the layout and state of the HyperionX trading environment.
A workspace should let a user close the platform and later return to the same trading setup: chart windows, instruments, timeframes, indicators, Chart Trader visibility, AI state, tool windows, and supporting panels.
What A Workspace Should Save
Workspace persistence should include:
- Main window placement and size.
- Open chart windows.
- Chart instrument.
- Chart connection/account context where applicable.
- Data series type and value.
- Loaded indicators and their parameters.
- Indicator panel layout and heights.
- Drawing objects where supported.
- Chart Trader visibility and panel width.
- Multi-chart layout mode and selected chart.
- AI avatar/chat visibility and placement.
- DOM/tool windows.
- Performance, optimizer, strategy, and validator windows where supported.
What A Workspace Should Not Save
Some state should not be persisted directly:
- API keys and private secrets.
- Wallet private keys.
- One-time session tokens.
- Temporary connection error state.
- Live order confirmation dialogs.
- Internal object references that cannot be restored safely.
Saved workspaces should store serializable user intent, not fragile runtime object references.
Restore Flow
A safe restore flow should happen in stages:
- Load global settings and theme.
- Load connection definitions.
- Load custom script metadata.
- Restore the main window.
- Restore chart windows.
- Attach chart data series.
- Request historical data.
- Apply indicators after chart data/source objects exist.
- Restore Chart Trader and AI overlays after layout is valid.
- Reconnect live providers if auto-connect is enabled.
This sequencing matters. If overlays or indicators are restored before the chart is ready, the platform can show no data, incorrect panel sizing, or layout exceptions.
Multi-Chart Workspace Behavior
When a workspace contains a multi-chart layout:
- The layout mode should restore.
- Each chart pane should restore its own instrument and timeframe.
- Source chart indicators should remain attached to the intended panes.
- The selected chart should be restored or default to chart 1.
- The top toolbar should reflect the selected chart.
- Chart Trader should not duplicate if it was already visible.
- AI avatar should remain visible and anchored to the active chart area.
Workspace Bugs To Watch For
Common workspace restore issues include:
- Chart opens with "No data" before historical loading starts.
- Indicators are listed but not plotted until removed and re-added.
- Chart Trader opens twice after toggling in multi-chart mode.
- AI avatar restores at the wrong size or wrong position.
- Saved chart layout does not match the restored layout.
- Tool windows inherit owner/minimize behavior when they should stay independent.
- Connection name missing from restored chart title.
- Theme resources load after windows are created, causing light title bars or white buttons.
Recommended Workspace Design
The production direction should be a modular layout model:
- Store layout as data.
- Store each chart pane as a chart model.
- Store indicators as serializable script descriptors.
- Store panel heights as ratios, not raw pixels when possible.
- Store active selected chart separately from chart collection.
- Restore visual overlays only after chart controls are loaded.
- Avoid saving UI objects directly.
This makes workspaces more stable across screen sizes, DPI changes, platform updates, and multi-chart layouts.