Repository navigation
fix: stabilize Interactive plot updates and execution timing - #1888
Merged
Merged
Conversation
Process runtime events independently of coalesced notebook writes so slow output delivery cannot queue obsolete snapshots ahead of completion. Finish the visible execution timer after the final output update and retain that timing across reconnects.
eitsupi
approved these changes
Oct 20, 2026
eitsupi
left a comment
Member
There was a problem hiding this comment.
Reviewed with ChatGPT assistance.
The overall approach looks sound. Separating runtime event processing from notebook output updates, preserving output identities, and handling asynchronous image loading are all sensible improvements. The new abstractions are well scoped, and the regression tests cover the important scenarios.
ChatGPT noted two minor points worth considering in the future:
- Concurrent
workspaceState.update()calls for execution timings could potentially benefit from serialized or coalesced writes. - A failed final notebook output update currently still allows the execution to be marked as successful. This is not a regression, but an additional test could help clarify the intended behavior.
Neither appears to be a blocker for this PR.
Coalesce timing snapshots while storage is busy without blocking completed cells. Add native regressions for delayed persistence and for reporting final output failures while preserving the R evaluation result and releasing the execution handle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Incremental multi-panel plots could repeatedly clear the Interactive output. Slow output delivery could also keep a cell running after R had finished, then make its elapsed timer jump backwards when completion applied R's earlier finish timestamp.
Preserve notebook output and plot viewport identities, reuse embedded images and cached plot assets, and keep the displayed image until its replacement loads. Coalesce pending image and notebook updates while processing runtime events independently of slow output writes. The completed timer now includes output delivery and retains that duration across reconnects; the journal keeps the original R execution timing. Timing persistence uses serialized, coalesced writes without blocking completed cells. Output-delivery failures are reported separately from R's evaluation result and still release the execution handle. Changes are limited to Interactive functionality.
Validation:
data.tableexample produced all eight panels.sesssource identity.Slow delivery was simulated locally; a live SSH connection was not exercised.