You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: improve editor responsiveness and session reliability - #1921
Repeated document scans, fragmented IPC input, long Interactive histories, and synchronous compiler probes can stall extension commands. Unresolved terminal PIDs and failed startup attempts can leave session operations waiting indefinitely. This change removes those stalls and fixes related editor and viewer failures.
Cache chunk parsing by document version, avoid redundant decorations and hover lookups, and use indexed transcript and plot-history lookups.
Process fragmented IPC input incrementally and cancel obsolete connections. Keep language-server startup cancellable through executable lookup and initialization for TCP and stdio, cancel pending multi-server starts, and allow bounded cleanup after normal shutdown.
Discover terminal PIDs concurrently, return exact matches immediately, and bound unresolved attachment lookups to one second. Refresh other terminals' discovery files while one PID remains pending.
Use the requested document's selection, report save failures, handle escaped strings and paths, run compiler probes asynchronously, and wait for completed CSV exports with reliable cleanup.
Persist help favorites safely, deduplicate help-index loads, keep navigation usable without scroll acknowledgements, discard stale Help refreshes and page rendering after close or navigation, prioritize explicit navigation over background refreshes and commit Back/Forward history only after successful rendering, preserve httpgd HTTPS/authentication, and load initial standard plots without waiting for resize.
Validation on macOS with VS Code 1.144 and R 4.6.1:
All six GitHub Actions checks passed for 980b7a0, including the macOS, Linux, and Windows test jobs.
17 Help navigation/refresh regressions passed locally, including pending fetch/HTML preparation, refresh precedence, cancelled or failed navigation, and Back/Forward retries. The five new race regressions fail with the previous logic and pass with the fix.
Build, lint, formatting, typecheck, and production VSIX packaging passed.
A local parser microbenchmark of a 1.5 MB Unicode frame in 256-byte fragments improved from approximately 656 ms to 3.45 ms; this measures parsing rather than end-to-end editor latency.
R integration used temporary libraries with matching sess, renv, and a committed languageserver snapshot. Browser fixtures disable background throttling and release their mocks and viewers after timeouts.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Disposal can hang indefinitely during language-server initialization because startup is not cancellable, and a pending Help refresh can recreate a panel after it is closed.
This PR improves responsiveness and lifecycle reliability across the R extension’s editor commands, session connections, help panels, and plot viewers.
Changes:
Reduce repeated parsing and lookups, process fragmented input incrementally, and run compiler probes asynchronously.
Improve terminal discovery, connection cancellation, startup cleanup, document operations, and CSV export handling.
Fix help persistence and viewer behavior, with regression coverage and more reliable browser fixtures.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Overlapping refreshes can share a revision, allowing an older refresh to invalidate a newer one and leave stale Help HTML displayed after rapid preview updates.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved regressions can corrupt help-viewer history, let background refreshes cancel navigation, and remove R Markdown chunk highlighting when CodeLens is disabled.
Preserve R Markdown chunk highlighting when CodeLens is disabled
src/rmarkdown/index.ts:67
Excluding rmd editors here removes their chunk highlighting when VS Code's editor.codeLens is disabled: the remaining decoration update lives in provideCodeLenses, which VS Code does not invoke in that configuration. Previously cursor movement still applied the independently configured chunk background color. Keep a document-version-cached decoration update for R Markdown editors as well.
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
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.
Repeated document scans, fragmented IPC input, long Interactive histories, and synchronous compiler probes can stall extension commands. Unresolved terminal PIDs and failed startup attempts can leave session operations waiting indefinitely. This change removes those stalls and fixes related editor and viewer failures.
Validation on macOS with VS Code 1.144 and R 4.6.1:
980b7a0, including the macOS, Linux, and Windows test jobs.Remote SSH lifecycle checks have not been run.