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
Reworks the shared Markdown preview render path so large-document updates stay atomic and do not replace the existing preview with a skeleton during normal edits.
Root Cause
Issue #143 came from treating every large-document render as a loading cycle. For documents over 15K characters, editor input could immediately replace the last good preview with the skeleton before the new render committed. If the render was skipped or superseded, the skeleton could remain visible indefinitely.
Changes
Adds preview render generations and pending-work cancellation so stale async work cannot commit over newer content.
Keeps the last committed preview visible during same-document edits.
Gates the article skeleton to initial large renders and document swaps instead of every edit.
Adds adaptive large-document render delays and idle/frame scheduling.
Patches top-level preview DOM nodes where possible to reduce churn and preserve scroll stability.
Mirrors the shared web fix into the packaged desktop runtime.
Bumps the service-worker cache key so PWA users receive the updated engine.
Validation
node --check script.js
node --check desktop-app/resources/js/script.js
node --check sw.js
Manual/browser validation previously run with generated 15K, 50K, 100K, and 250K character documents in Edge/Chromium.
Note: the local large-document test harness was intentionally not included in this PR, per request.
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.
Summary
Reworks the shared Markdown preview render path so large-document updates stay atomic and do not replace the existing preview with a skeleton during normal edits.
Root Cause
Issue #143 came from treating every large-document render as a loading cycle. For documents over 15K characters, editor input could immediately replace the last good preview with the skeleton before the new render committed. If the render was skipped or superseded, the skeleton could remain visible indefinitely.
Changes
Validation
node --check script.jsnode --check desktop-app/resources/js/script.jsnode --check sw.jsNote: the local large-document test harness was intentionally not included in this PR, per request.