8000 Ensure discrete events are always scheduled after change events by philippjfr · Pull Request #8319 · holoviz/panel · GitHub 8000
[go: up one dir, main page]

Skip to content

Conversation

@philippjfr
Copy link
Member

Ensures that discrete events are always scheduled after change events have been processed. In certain scenarios this was not previously the case.

Fixes #8311

Copilot AI review requested due to automatic review settings December 2, 2025 10:29
Copy link
Contributor
Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures that discrete events (e.g., button clicks, table edits) are always scheduled and processed after change events (e.g., property updates) have completed, preventing race conditions where event handlers could execute before all property changes have been applied.

Key changes:

  • Modified _event_coroutine to preserve change callbacks in state._change_callbacks during processing instead of immediately removing them
  • Added cleanup logic in _change_coroutine to remove empty callback dictionaries after processing
  • Enhanced _server_event to check for pending change callbacks and defer discrete events when changes are still being processed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@codecov
Copy link
codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.01%. Comparing base (0341869) to head (fb06f09).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8319      +/-   ##
==========================================
+ Coverage   85.41%   86.01%   +0.59%     
==========================================
  Files         348      348              
  Lines       54592    54594       +2     
==========================================
+ Hits        46629    46958     +329     
+ Misses       7963     7636     -327     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philippjfr philippjfr merged commit ba5ce6f into main Dec 2, 2025
40 of 45 checks passed
@philippjfr philippjfr deleted the fix_event_scheduling branch December 2, 2025 11:17
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.

3 participants

0