chore(web): upgrade markstream-vue to 1.0.7 - #2294
Conversation
Fix garbled code-block line numbers reported on 0.29.2: the async code-block loading fallback rendered unstyled (proportional font, code overlapping the line-number gutter) and with an over-estimated reserved height that clipped leading lines. markstream-vue 1.0.6 adds self-contained fallback styles and 1.0.7 fixes the height estimate.
🦋 Changeset detectedLatest commit: dc83015 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
|
❌ Nix build failed Hash mismatch in
Please update |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 415041446c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| '@tailwindcss/vite': | ||
| specifier: ^4.1.4 | ||
| version: 4.1.18(vite@6.4.2(@types/node@22.19.17)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.3)) | ||
| version: 4.1.18(vite@6.4.2(@types/node@22.19.17)(jiti@2.6.1)(lightningcss@1.33.0)(tsx@4.21.0)(yaml@2.8.3)) |
There was a problem hiding this comment.
Scope the lockfile update to markstream
When this patch is used to build or test non-web workspaces, the lockfile now also refreshes their toolchains—for example apps/kimi-inspect resolves Vite through lightningcss@1.33.0 despite no change to that workspace, and similar unrelated churn appears elsewhere in the lockfile. That makes a web renderer patch carry unverified dependency updates outside apps/kimi-web; please regenerate the lockfile so only the markstream-vue graph changes, or split the broader dependency refresh into its own verified change.
Useful? React with 👍 / 👎.
Regenerate pnpm-lock.yaml with a plain install so only markstream-vue and its transitive deps move (markdown-it-ts, stream-markdown-parser, etc.); unrelated toolchains (e.g. lightningcss in kimi-inspect) stay pinned as before. Addresses review feedback.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 063f082baf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "@moonshot-ai/kimi-code": patch | ||
| --- | ||
|
|
||
| web: Upgrade markstream-vue to 1.0.7 to fix garbled line numbers in code blocks. The async code-block loading fallback was unstyled in 1.0.4 (proportional font, code overlapping the line-number gutter) and used an over-estimated reserved height that clipped leading lines; 1.0.6 ships self-contained fallback styles and 1.0.7 fixes the height estimate. |
There was a problem hiding this comment.
Shorten the release-note entry
The repository's changeset workflow points these files to .agents/skills/gen-changesets/SKILL.md, whose wording rules require concise user-facing entries; this line will be copied into the CLI changelog and currently exposes upstream version-by-version implementation details rather than a short web-facing fix. Please condense it to a single web: sentence such as fixing garbled line numbers in code blocks.
Useful? React with 👍 / 👎.
问题
0.29.2 用户反馈 web 端代码块行号错乱(无 header、行号与代码错位、顶部行被裁切、尾部幻影行号)。
根因
markstream-vue 1.0.4 的异步代码块加载占位组件(
CodeBlockNodeLoading→ 裸PreCodeNode)落在样式盲区:pre.code-pre-fallback的样式是 CodeBlockNode 的 scoped:deep()规则,占位组件由 NodeRenderer 直接渲染、不在该 scope 内 → 规则不命中;该占位态在 chunk 加载慢/卡住时(如 plain HTTP 自托管)会持续可见。
修复
升级 markstream-vue 到 1.0.7:
.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]规则,占位态样式自包含(等宽字体、行号槽 padding、背景);estimatedContentHeightPx,并重做占位显示逻辑,修复预留高度错配。遗留(上游未修,不影响本 PR 结论)
幻影行号:
PreCodeNode.getDisplayCode只 strip 一个尾换行,代码块末尾多个空行时会多出行号(需 markstream upstream 修复,建议/(\r\n|\n|\r)+$/)。验证