I also observed this in Netpyne-UI when you start the application with console open.
My assumption is that the middleware that updates the layout widget also has to change current selection of tab, or misses some important updates to the layout.
Reproduction in example app:
(1) Add widget by using button, (2) Minimize widget by using button -> debugger call in Layout.tsx because selectedTab is undefined
edge case, two widgets were added in wrong direction, flexlayout was searching for the currently selected tab but that tab was not added yet to the layout.
I also observed this in Netpyne-UI when you start the application with console open.
My assumption is that the middleware that updates the layout widget also has to change current selection of tab, or misses some important updates to the layout.
Reproduction in example app: (1) Add widget by using button, (2) Minimize widget by using button -> debugger call in Layout.tsx because selectedTab is undefined