Skip to content

fix(web): upgrade markstream-vue to 1.0.3 to fix blank nested code blocks - #1032

Merged
wbxl2000 merged 2 commits into
mainfrom
worktree-fix-nested-codeblock-blank
Jun 23, 2026
Merged

fix(web): upgrade markstream-vue to 1.0.3 to fix blank nested code blocks#1032
wbxl2000 merged 2 commits into
mainfrom
worktree-fix-nested-codeblock-blank

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No kimi-code issue was filed — this is a clear, reproducible rendering bug with a focused diff, so the problem is explained below. The underlying cause is upstream and tracked at Simon-He95/markstream-vue#498 (fixed by Simon-He95/markstream-vue#502).

Problem

In the web chat, a fenced code block nested inside a list item (e.g. a ```js block under a - bullet) renders blank — only the language header shows, with an empty body. It surfaces right when a turn finishes generating, and a full page reload temporarily "fixes" it.

Root cause is two compounding factors:

  1. markstream-vue's nested renderers did not forward the app's code-renderer="shiki", so code blocks inside list items fell through to the Monaco renderer. With the optional stream-monaco peer not installed, the production bundle stubs it to an empty module, the block hangs at data-markstream-pending, and never paints. (Top-level blocks use Shiki and are unaffected.)
  2. When the turn settles, smooth-streaming flips true → false; finalizing the still-pending nested block drops its fallback body, leaving it blank. A fresh reload mounts in the settled state directly, which is why reloading appears to fix it.

What changed

Upgrade markstream-vue 1.0.1-beta.5 → 1.0.3, which contains the upstream fix so nested renderers inherit the parent code renderer (Shiki) like top-level blocks. stream-markdown is bumped ^0.0.15 → ^0.0.16 to satisfy the new peer requirement. No application code changes.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. — N/A: the blank only reproduces in the production bundle (the empty stream-monaco stub), which the unit-test/jsdom environment can't exercise. Verified instead by building the production bundle and confirming in a real browser that nested list code blocks now render with Shiki highlighting and survive the streaming→settled transition; the existing 55 web tests still pass.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. — N/A: no user-facing docs affected.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8898309

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

❌ Nix build failed

Hash mismatch in pnpmDeps:

Hash
specified sha256-uE/g32Twhshb5BkROi0UiC8hTnrHxE+DMazPijZnCWo=
got sha256-l8RvHgEGwS1XX0VGWCNtF1EmE1SRQFyCCYGPCoPL3JY=

Please update flake.nix with the got hash.

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@8898309
npx https://pkg.pr.new/@moonshot-ai/kimi-code@8898309

commit: 8898309

@wbxl2000
wbxl2000 merged commit a753b05 into main Jun 23, 2026
8 checks passed
@wbxl2000
wbxl2000 deleted the worktree-fix-nested-codeblock-blank branch June 23, 2026 11:09
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
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.

1 participant