Skip to content

[codex] fix component load event target#13360

Draft
thomwolf wants to merge 1 commit intogradio-app:mainfrom
thomwolf:codex/fix-component-load-target
Draft

[codex] fix component load event target#13360
thomwolf wants to merge 1 commit intogradio-app:mainfrom
thomwolf:codex/fix-component-load-target

Conversation

@thomwolf
Copy link
Copy Markdown

@thomwolf thomwolf commented May 3, 2026

Summary

  • keep component-attached load events targeted at the root load event instead of serializing a null target
  • add regression coverage for component load-event targets

Root cause

BlocksConfig.attach_load_events() was passing no_target=not has_target for component-attached startup load events, producing targets=[(None, "load")]. The null-target load dependency can freeze the frontend renderer in Gradio 6.x for apps with a nonempty Dataframe and empty Row/Column layout; demo.load uses (0, "load") and does not freeze.

Fixes #13359

Validation

  • sfw uv run --with pytest --with pytest-asyncio python -m pytest test/test_blocks.py::TestComponentsInBlocks::test_component_load_events_target_root test/test_blocks.py::TestComponentsInBlocks::test_slider_random_value_config test/test_blocks.py::TestComponentsInBlocks::test_io_components_attach_load_events_when_value_is_fn test/test_blocks.py::TestComponentsInBlocks::test_get_load_events -q
  • git diff --check
  • LOGIN_KIND=login /tmp/check_min_login_dataframe.sh 7998 1 false false false false true 0 false false true
  • /tmp/check_gaia_variant.sh 7996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Component-attached load events with null load target can freeze the frontend

1 participant