Bug Description
When layout_switch is called to switch between saved layouts, the visual chart and data reading tools do not stay in sync.
Steps to Reproduce
- Start on
5MIN layout (has VWAP, SFI, NMI, EMAs, etc.)
- Call
layout_switch with name NEWDAILY — returns success: true
- Call
chart_get_state — returns indicators from the 5MIN layout, not NEWDAILY
- Call
data_get_study_values — returns VWAP, SFI and other indicators that do not exist on NEWDAILY — silently wrong with no error
- Switch back via
layout_switch to 5MIN — data context switches but visual chart on screen does not update
Expected Behavior
After layout_switch succeeds, both the visual chart and all data tools (chart_get_state, data_get_study_values, data_get_ohlcv) reflect the newly loaded layout.
Actual Behavior
layout_switch → NEWDAILY: Visual switched ✓, data context stayed on 5MIN ✗
layout_switch → 5MIN: Data context switched ✓, visual stayed on NEWDAILY ✗
The visual layer and data layer are completely decoupled. Indicator values reported after a layout switch may correspond to indicators that don't exist on the target layout — silently incorrect with no error signal.
Additional Notes
chart_ready: false was returned by a subsequent chart_set_symbol call, suggesting the layout hadn't fully initialized
capture_screenshot also lags after layout/symbol switches — related rendering issue
- Workaround: have user switch layouts manually; stay on original layout for data reads
Impact
High — silently returns wrong indicator data after a layout switch. Caller has no way to detect that values are from the wrong layout context.
Bug Description
When
layout_switchis called to switch between saved layouts, the visual chart and data reading tools do not stay in sync.Steps to Reproduce
5MINlayout (has VWAP, SFI, NMI, EMAs, etc.)layout_switchwith nameNEWDAILY— returnssuccess: truechart_get_state— returns indicators from the5MINlayout, notNEWDAILYdata_get_study_values— returns VWAP, SFI and other indicators that do not exist onNEWDAILY— silently wrong with no errorlayout_switchto5MIN— data context switches but visual chart on screen does not updateExpected Behavior
After
layout_switchsucceeds, both the visual chart and all data tools (chart_get_state,data_get_study_values,data_get_ohlcv) reflect the newly loaded layout.Actual Behavior
layout_switch → NEWDAILY: Visual switched ✓, data context stayed on 5MIN ✗layout_switch → 5MIN: Data context switched ✓, visual stayed on NEWDAILY ✗The visual layer and data layer are completely decoupled. Indicator values reported after a layout switch may correspond to indicators that don't exist on the target layout — silently incorrect with no error signal.
Additional Notes
chart_ready: falsewas returned by a subsequentchart_set_symbolcall, suggesting the layout hadn't fully initializedcapture_screenshotalso lags after layout/symbol switches — related rendering issueImpact
High — silently returns wrong indicator data after a layout switch. Caller has no way to detect that values are from the wrong layout context.