Skip to content

fix: stabilize Interactive plot updates and execution timing - #1888

Merged
renkun-ken merged 6 commits into
mainfrom
codex/interactive-plot-updates
Oct 20, 2026
Merged

renkun-ken merged 6 commits into
mainfrom
codex/interactive-plot-updates

Conversation

@renkun-ken

@renkun-ken renkun-ken commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

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:

  • TypeScript compilation, repository formatting, lint, and 45 focused unit tests passed.
  • All 63 native Interactive integration tests passed locally, including delayed timing storage, final output failure and recovery, delayed output, console preservation, timing persistence, queued cells, resize, and plot galleries.
  • 130 browser assertions passed, including delayed/failed image loads; the new delayed-load regression fails against the original renderer.
  • The supplied eight-panel data.table example produced all eight panels.
  • Built a production VSIX and verified its bundled files and sess source identity.

Slow delivery was simulated locally; a live SSH connection was not exercised.

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.
@renkun-ken
renkun-ken requested a review from eitsupi October 20, 2026 13:50

@eitsupi eitsupi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.
@renkun-ken
renkun-ken merged commit 5ff5caf into main Oct 20, 2026
6 checks passed
@renkun-ken
renkun-ken deleted the codex/interactive-plot-updates branch October 20, 2026 23:00
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.

2 participants