MoonshotAI / MoonshotAI/kimi-code

Web: markstream-vue 1.0.7 upgrade falls back to the basic code block renderer

Open
#2,411 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

The markstream-vue upgrade from 1.0.4 to 1.0.7 in #2294 unintentionally changed Kimi Web's fenced code blocks from their previous rendering path to markstream's basic fallback <pre> renderer.

markstream-vue@1.0.7 introduced stream-diffs as a new optional peer for enhanced code block rendering. The dependency bump updated markstream-vue but did not install that peer, so the enhanced runtime cannot load.

Regression range

  • Before: markstream-vue@1.0.4
  • After: markstream-vue@1.0.7 from #2294
  • Affected Kimi Code releases: 0.30.0 and 0.31.0

Reproduction

Open a session containing a fenced code block, for example:

```bash
# probe start
echo alpha
echo beta

echo gamma
echo delta
```

With Kimi Web's current dependencies, the rendered block reports data-markstream-enhanced="false" and uses the fallback renderer. Installing stream-diffs changes it to the enhanced path and restores the expected code block presentation.

Root cause

The 1.0.4 → 1.0.7 dependency bump added a package version whose enhanced code block implementation now depends on the new optional stream-diffs >=0.0.2 peer. Because Kimi Web did not add that peer alongside the bump, the upgrade was incomplete and silently selected the fallback renderer.

The fallback renderer had a separate upstream line-number layout bug, tracked in Simon-He95/markstream-vue#603 and fixed by Simon-He95/markstream-vue#602. Fixing fallback CSS is useful for genuine fallback scenarios, but it does not restore Kimi Web's pre-upgrade rendering path.

Expected behavior

The dependency upgrade should preserve Kimi Web's previous code block behavior instead of silently degrading every fenced code block to the fallback renderer.

Proposed fix

Add stream-diffs to apps/kimi-web dependencies to complete the markstream-vue@1.0.7 upgrade and restore enhanced code block rendering.

Patch branch:
https://github.com/nothankyouzzz/kimi-code/tree/fix/web-enhanced-code-blocks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the dependency manifest under apps/kimi-web and the current markstream-vue dependency setup first. Reproduce the fenced code block case from the issue, then verify that the completed dependency change restores enhanced rendering with data-markstream-enhanced="true" rather than the fallback path.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.