You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit be20ce8
Browse filesBrowse the repository at this point in the historyBrowse files
Fix UI freeze when one event makes multiple components of the same type visible (#13521)
* Fix UI freeze when multiple components become visible
Visibility updates in update_state() rebuilt the entire component
tree with traverse() and reassigned this.root. When one event made
two or more components of the same type visible, the concurrent
rebuilds (handle_data applies outputs in parallel) trapped Svelte's
async reactivity in a non-terminating update cycle, freezing the
page and eventually crashing the tab.
Update the target node's visibility in place and load any missing
components in place via load_components(), mirroring what
render_previously_invisible_children() already does. Also make
load_components() store the loading component promise instead of
the whole get_component() return value so awaiting node.component
yields the module.
Regression introduced in #12839, which kept forms mounted (hidden
via CSS) instead of marking them invisible, so the racing rebuilds
started happening under an already-mounted parent.
* add changeset
* Propagate runtime when lazily mounting components
load_components now copies the loaded component's runtime alongside
its component, matching the node-creation path in create_node, so a
custom component that needs a separate Svelte runtime mounts
correctly when it is made visible after the initial load.
* Move slider repro into invisible_textbox demo
Per review feedback, drop the separate two_sliders testcase app and
add the sliders as a new tab in the existing run.py, so the E2E suite
does not need to spin up another Gradio app. Also extend the test to
hide the sliders again after showing them, confirming the page does
not freeze.
---------
Co-authored-by: gradio-pr-bot <[email protected]>
0 commit comments