Conversation
- 新增 src/markdown.css:markstream token 桥接、slot 边界块级节奏 (--ms-slot-gap/-section/-group/-title)、标题/行内码/表格/引用/脚注样式, 以及聊天每脚本(CJK/Latin)字重对——作用域扩为 :is([data-chat-content], .markstream-vue),文件预览等无 chat 外壳的 表面不再落回原始 600 字重 - 新增 components/markdown:md-text(CJK/Latin 切分)、md-checkbox、 md-footnote-*,registerSharedMarkdownComponents;script-runs 移入 src/lib - 新增 showcase Markdown body 页:四种正文形态 + 文件预览密度并排对照, 排版参数在此调,不再对着单条消息调 - PageShell 新增 wall 宽度档(104rem,容纳两列真实聊天宽度) - package.json 导出 ./markdown.css,新增 markstream-vue 依赖
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a28a5eed2e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "class-variance-authority": "^0.7.1", | ||
| "clsx": "^2.1.1", | ||
| "lucide-vue-next": "^0.562.0", | ||
| "markstream-vue": "2.0.0", |
There was a problem hiding this comment.
Update the lockfile with markstream-vue
Adding this dependency without updating pnpm-lock.yaml makes every frozen install fail before the project can build. Running pnpm install --frozen-lockfile reports ERR_PNPM_OUTDATED_LOCKFILE and identifies markstream-vue@2.0.0 as the missing specifier, while CI enables frozen lockfiles by default; regenerate and commit the lockfile with this package change.
Useful? React with 👍 / 👎.
| // code_block nodes) and renders nothing. Route by node type so the fence | ||
| // reaches the surface's code block component instead. | ||
| function textNodeRouter(codeBlock: Component | undefined): Component { | ||
| if (!codeBlock) return MdText |
There was a problem hiding this comment.
Route text fences without requiring a custom code block
When extra.code_block is omitted—as it is for both registrations on the new showcase page—this returns MdText directly, so a fenced block declared as text still resolves through the colliding text mapping. The resulting code_block node is passed to MdText, whose required node.content is absent, and the fence renders blank; the router needs to preserve or invoke markstream's default code-block renderer in this case.
Useful? React with 👍 / 👎.
| :root { | ||
| /* Chat reading LEADING — the single source for every chat line-height below. | ||
| * After tuning, Latin/base sits tighter; CJK paragraphs are the one place the | ||
| * two scripts still diverge, keeping a hair more vertical room. To restyle | ||
| * leading, change these two numbers only — every rule references them. */ |
There was a problem hiding this comment.
Keep Markdown token values in the central token source
Move these new Markdown token definitions—and the later raw oklch(), color-mix(), sizing, spacing, and radius values—into src/style.css, leaving markdown.css to consume named tokens. Defining a second raw-value source means theme and scale changes now have two independent homes and directly violates the repository's single-source token contract.
AGENTS.md reference: AGENTS.md:L27-L31
Useful? React with 👍 / 👎.
| <template> | ||
| <a | ||
| :href="`#fnref-${node.id}`" | ||
| class="ml-1 inline-flex items-center align-middle text-foreground hover:text-brand" |
There was a problem hiding this comment.
Move footnote hover chrome into style.css
Move this hover:text-brand state, together with the matching reference's hover:/group-hover: utilities, to a shared style.css rule keyed by a footnote data-slot. Keeping interaction color changes in the Vue templates creates a second chrome owner and bypasses the component-layer cascade that the repository requires for hover, press, focus, and open states.
AGENTS.md reference: AGENTS.md:L49-L53
Useful? React with 👍 / 👎.
|
关闭:排版层留在 apps/web 维护——该文件是全仓调整最频繁的表面,迁入组件库后每次微调都需走 ui PR → gitlink bump → 主仓 PR 三段式,长期摩擦大于单一事实源收益。本次修复(字重扩域、间距 token 化等)全部并入 memoh 主仓 PR #1211。 |
目的
Markdown/中文正文排版收敛的第一步:把 markstream 桥接层和聊天每脚本字重从 apps/web 收进组件库,单一事实源;showcase 新增对照页,排版参数对着四种正文形态调,不再对着单条消息调(避免修一条崩一条的 reward hacking)。
改动
src/markdown.css(导出@felinic/ui/markdown.css,须在 markstream-vue/index.css 之后加载):--ms-slot-gap(块间 16px)/-section(正文→标题 18px)/-group(标题→内容、相邻列表碎片粘连 4px)/-title(h1 下方 16px)——markstream 2.0 的 .node-slot 包装使元素 margin 失效,slot 边界是唯一可靠的间距层:is([data-chat-content], .markstream-vue):文件预览等无 chat 外壳的表面此前落回 markstream 原始 600,CJK 加粗/标题明显偏重。实测 MiSans @font-face 的 150..450 重量钳制在 Chrome 155 上不生效(600 请求墨迹量 24840 > 450 的 23288),不能依赖字体级钳制兜底components/markdown:md-text(CJK/Latin 切分,权重对的第一帧即正确)、md-checkbox、md-footnote-*,registerSharedMarkdownComponents;splitScriptRuns移入 src/lib。宿主经 extra 注入自己的 code_block / linkwall宽度档(104rem,容纳两列真实聊天宽度)./markdown.css,新增 markstream-vue 2.0.0 依赖验证
关联
QA