Skip to content

Fix deferred input batching (#4436) - #4438

Open
LeonidasZhak wants to merge 1 commit into
rstudio:mainfrom
LeonidasZhak:fix/deferred-input-batching-4436
Open

LeonidasZhak wants to merge 1 commit into
rstudio:mainfrom
LeonidasZhak:fix/deferred-input-batching-4436

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Summary

Batch deferred inputs into one queued WebSocket send.

Thanks to maintainers

Thanks for maintaining Shiny and for the focused reproduction and implementation clue in #4436.

Issue or motivation

Several deferred input updates currently enqueue separate tasks. The first sends all values and the remaining tasks send empty messages, adding unnecessary server input cycles.

Root cause

sendIsEnqueued was checked but remained false until the queued callback ran, so every call passed the guard.

Change

Set the flag before enqueueing the task, add a TypeScript regression test, rebuild the generated Shiny bundles, and record the fix in NEWS.

Tests

  • The regression test failed before the fix (five queued tasks) and passes after it.
  • npm run build passes, including TypeScript compilation, all six unit tests, 98.05% type coverage, dependency analysis, and bundle generation.
  • R CMD build --compact-vignettes=gs+qpdf passes.
  • _R_CHECK_CRAN_INCOMING_REMOTE_=false R CMD check --as-cran --no-manual passes with one NOTE for the development version number. The remote incoming probe stalled before package checks, so only that remote probe was disabled on rerun.
  • pkgdown::build_site() and the reference-index check pass.

Scope

This fixes client-side deferred batching only. Event-priority sends and server-side input processing are unchanged.

This branch has not been deployed

No deployments
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.

1 participant