Repository navigation
Remove Markdown parser patch and simplify preview processing - #24919
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — full initial review of PR #24919 (344bf7c4e6, 14 files) against main.
- Table parser upgrade + patch removal — bumps
micromark-extension-gfm-table2.1.1→2.1.2and deletes the local patch, itspnpm-workspace.yaml/pnpm-lock.yamlregistration, and theconfig/scripts/markdown-table-edit-map.test.mjsinternals test. The upstream2.1.2release contains only the sameEditMap.addindex-map fix the patch carried, so behavior is preserved. - Preview plugin refactor — names
MARKDOWN_REHYPE_NORMALIZATION_PLUGINS/MARKDOWN_REHYPE_EXPANSION_PLUGINSand replaces positional.slice(...)plugin selection inmarkdown-preview-document-tree.ts; order is identical to the old slices. - Redundant preview work removed — size-checks blocks before
structuredClone, drops the duplicatecache.clear(), removes unused foundation front-matter computations, the deadreadyRevisionscroll plumbing, and a localpendingHighlightref. - Tests — new public-pipeline table regressions and a clone-allocation regression for rejected blocks; the removed internals test is replaced rather than dropped.
Verification performed: confirmed the released 2.1.2 lib/edit-map.js ships the index-map fix and that the release note is limited to that perf fix; confirmed the removed foundation fields and readyRevision have no consumers/effect (document parsing is gated on large previews, where restorePixels is already false); scoped the plugin refactor as order-equivalent; ran the two changed test files (13 passed). No host RPC, SSH, folder-workspace, or wire surfaces are touched.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
💤 Files with no reviewable changes (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe preview pipeline now separates normalization and expansion, and rejects oversized blocks before cloning. Tests cover oversized blocks and Markdown table parsing. Preview search, cache handling, front matter exposure, and scroll restoration are also updated. The workspace patch for micromark’s EditMap and its associated tests are removed. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The preview and table-parser changes are mergeable after normal checks; no actionable behavior regression is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Sanitization, document isolation, and rendering limits remain in place, while oversized blocks are rejected before copying. No new security-boundary failure was identified. The remaining uncertainty concerns the replacement dependency and incomplete security coverage. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

ELI5
Large Markdown previews keep the same behavior, while using the released table-parser fix instead of a local library patch. This also removes redundant preview work and rejects oversized blocks before allocating a copy.
What Changed
Why
The released parser already fixes the repeated lookup that made table-heavy documents slow. Maintaining the same fix locally is unnecessary. Auditing #24880 also found dead plumbing and avoidable allocations. The worker lifecycle, bounded caches, viewport prioritization, export guards, and loaded-row measurements address reproduced failures and remain in place. The targeted worker aliases remain necessary: native worker-condition configuration still built DOM-dependent code.
Linked Issue
Follow-up to #24880.
Visual Proof
N/A — no intended appearance or interaction change. Hidden Electron checks and inspected screenshots confirm the existing large-preview flow remains intact.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/editor: 1,888 passed, 3 existing skips.Web typecheck, changed-code quality gates, localization catalog/extraction checks, frozen-lockfile install, Electron build, and web build pass.
Hidden Electron large-preview suite: all 3 scenarios passed, including 1920px/1280px layouts, Find, global references, annotations, TOC, tab restoration, resizing, refresh without collapse or scroll drift, and oversized fallbacks.
Review
Audited the entire original PR for dependency workarounds, duplicate state, parsing stages, worker ownership, cancellation, cache bounds, source annotations, virtual row measurement, navigation, and partial exports. Independent adversarial review covers the cleanup and behavior regressions.
Agent skill upstream boundary
Notes
No host RPC or file ownership changes. Existing SSH and folder-workspace routing remains intact. Linux, Windows, and live SSH rendering were not exercised locally; CI covers platform checks. No documentation files are included.
Checklist