Skip to content

Prevent malformed Markdown fences from freezing the Webview - #12

Merged
SivanCola merged 1 commit into
mainfrom
codex/fix-long-chat-webview
Aug 3, 2026
Merged

Prevent malformed Markdown fences from freezing the Webview#12
SivanCola merged 1 commit into
mainfrom
codex/fix-long-chat-webview

Conversation

@SivanCola

@SivanCola SivanCola commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • make Markdown block parsing guarantee forward progress for extended, unusual, and unclosed code fences
  • preserve the long-chat synchronization, visibility, lightweight state, and bounded transcript implementation already merged in PR Fix VS Code freezes on long Reasonix chats #13
  • add focused parser coverage plus an Extension Host regression with approximately 330 KiB / 206 chat items and a formerly poisonous fence
  • handle the macOS VS Code 1.131 test executable rename in the Extension Host launcher

Root cause

The Webview Markdown loop did not advance when a line began with a fence marker but failed the strict opening-fence regular expression, such as a C# fence with attributes or a four-backtick fence. The paragraph branch rejected the same line, so the loop repeatedly appended empty paragraphs without advancing and could freeze the Webview.

Conflict resolution

This branch is rebased onto the overlapping long-chat fix in PR #13, the Windows launcher changes in PR #14, and the Webview theme adaptation in PR #11. Duplicate long-chat synchronization changes were removed. The combined test entry list retains the launcher, theme, and Markdown suites, while both Windows configured/PATH modes and the macOS VS Code executable fallback remain intact.

Validation

  • npm ci: 0 vulnerabilities
  • npm run lint
  • npm test: 73/73 passed
  • npm run test:vscode: VS Code 1.131.0 Extension Host passed in configured-binary mode
  • npm run smoke:acp
  • npm run package:vsix
  • npm run verify:vsix-contents
  • git diff --check

Closes #8

@SivanCola
SivanCola force-pushed the codex/fix-long-chat-webview branch from 39e0550 to fe2a248 Compare August 3, 2026 15:56
@SivanCola SivanCola changed the title Fix long chat Webview freezes Prevent malformed Markdown fences from freezing the Webview Aug 3, 2026
@SivanCola
SivanCola marked this pull request as ready for review August 3, 2026 16:04
@SivanCola
SivanCola force-pushed the codex/fix-long-chat-webview branch from fe2a248 to d1f188e Compare August 3, 2026 16:06
@SivanCola
SivanCola force-pushed the codex/fix-long-chat-webview branch from d1f188e to 517436f Compare August 3, 2026 16:10
@SivanCola
SivanCola merged commit 80a9595 into main Aug 3, 2026
3 of 4 checks passed
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.

聊天轮次过长会导致Reasonix插件窗口黑屏,并进一步导致VScode提示窗口无响应

1 participant