Skip to content

fix: Prevent race condition by enabling page events before navigation - #482

Merged
camdecoster merged 2 commits into
plotly:mainfrom
dennisjlee:fix/enablePageBeforeNavigate
Nov 1, 2026
Merged

camdecoster merged 2 commits into
plotly:mainfrom
dennisjlee:fix/enablePageBeforeNavigate

Conversation

@dennisjlee

Copy link
Copy Markdown
Contributor

Fixes #481

Note on why the fix works: Page.enable enables page notifications, but doesn’t promise to replay a previous Page.loadEventFired. Chromium’s implementation enables the agent without replaying that event.

@dennisjlee
dennisjlee force-pushed the fix/enablePageBeforeNavigate branch from 7c4ef58 to 9716368 Compare October 19, 2026 19:39
@camdecoster camdecoster self-assigned this Oct 19, 2026
@camdecoster

Copy link
Copy Markdown
Contributor

I'll review this and follow up.

@dennisjlee

Copy link
Copy Markdown
Contributor Author

@camdecoster just wanted to check in on this if you have some time!

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me (and might also fix #441). Could you please add an entry to the changelog? With that, I can approve.

@dennisjlee

Copy link
Copy Markdown
Contributor Author

@camdecoster thanks! I updated the changelog.

@camdecoster camdecoster changed the title Prevent race condition by enabling page events before navigation fix: Prevent race condition by enabling page events before navigation Nov 1, 2026
@camdecoster
camdecoster merged commit 561acda into plotly:main Nov 1, 2026
@dennisjlee
dennisjlee deleted the fix/enablePageBeforeNavigate branch November 1, 2026 02:23
t-0hmura added a commit to t-0hmura/pdb2reaction that referenced this pull request Nov 6, 2026
- PNG export: wrap Kaleido's tab navigation so that it sends Page.enable
  first, for every Kaleido 1.x; the version check is gone. With the
  upstream fix (plotly/kaleido#482) the extra Page.enable is harmless.
- Colab notebooks: install the latest plotly, Kaleido and choreographer
  instead of pinning Kaleido 1.2.0 and choreographer 1.2.1, and draw the
  setup check PNG with the package's PNG writer.
- Tests: drop the version-check test; the setup check test looks for the
  package's PNG writer.
- CHANGELOG: the PNG export entry no longer limits the fix to Kaleido
  1.5.0 and older; the Colab change is listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRWQuZ3S6rn5MmsNyA2Mpv
t-0hmura added a commit to t-0hmura/mlmm_toolkit that referenced this pull request Nov 6, 2026
- PNG export: wrap Kaleido's tab navigation so that it sends Page.enable
  first, for every Kaleido 1.x; the version check is gone. With the
  upstream fix (plotly/kaleido#482) the extra Page.enable is harmless.
- Colab notebooks: install the latest plotly, Kaleido and choreographer
  instead of pinning Kaleido 1.2.0 and choreographer 1.2.1, and draw the
  setup check PNG with the package's PNG writer.
- Tests: drop the version-check test; the setup check test looks for the
  package's PNG writer.
- CHANGELOG: the PNG export entry no longer limits the fix to Kaleido
  1.5.0 and older; the Colab change is listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRWQuZ3S6rn5MmsNyA2Mpv
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.

Startup can hang when Page.enable runs after navigation

2 participants