Repository navigation
fix(app): match assistant reply timestamp size with user messages - #5429
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
|
@codex review |
commit: |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
🦋 Changeset detectedLatest commit: 77637f6 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 |
`bun scripts/upstream-ledger.mjs --refresh` at upstream/main 4eb2919 added 126 rows, so every open upstream commit and every PR it references now has a ledger row: 0/596, down from 125 at 8bf8ba3 and 126 at the fetched tip. The refresh only reads `upstream/main ^ main`, so the three release-2.6.2 commits named by the mission (MoonshotAI#4875/MoonshotAI#4905/MoonshotAI#4922) gained rows with the refresh's row shape. Settled with live probes in this tree: - ported: MoonshotAI#5533 (docs 2.8.1 changelog), MoonshotAI#4875 (registry search_url and feedback_url plus the feedback service), MoonshotAI#4905 (Kimi upload status validation in packages/core), MoonshotAI#4922 (swarm task events in sessionTaskFeed), MoonshotAI#5438 (unload only declared dynamic tools), MoonshotAI#5592 (dynamic tool replacement order), MoonshotAI#5595 (append-log known length), MoonshotAI#5573 (skill roots for every work dir), MoonshotAI#5576 (date reminder cwd comparison), MoonshotAI#5618 (session titles for skill openers), MoonshotAI#5638 (frozen loop tool baseline), MoonshotAI#5626 (legacy turn-input origins) - partial: MoonshotAI#5505 (processLiveness source and consumers present; the upstream unit test file was never carried), MoonshotAI#5571 (program-resume and OSC 7577 present; the upstream test helper was never carried), MoonshotAI#5532 (gitService half present; fsService still leaks the environment lease at fsService.ts:1133 and :1267), MoonshotAI#5557 (app-client icon registry kept; the move to app-ui was never carried) - not-applicable: MoonshotAI#4655 (upstream reverted auto review in MoonshotAI#5649), MoonshotAI#5333 (PLAYBOOK:111 deliberate flat experimental flags) M39's "likely present" list was checked, not trusted: MoonshotAI#5438 is present (upstream test passes), MoonshotAI#5487 is not (nativeStartSettleMs/leg.nativeSettled absent), MoonshotAI#5635 is not (ToolsSettled absent), MoonshotAI#5429 needs a visual probe. The remaining 194 pending rows stay open with their reasons; no feature was ported and no upstream-drift allowlist entry was added. Verification: verify -> 332 closed rows, 332 carry every file of their PR; 317 probes pass, 2 foreign-runner skips, 0 fail; a second verify is byte-identical (ledger sha256 cbf53638...). Probe tests 29 pass; bun run lint and node scripts/checks/ratchet.mjs green.
Screenshots / Recordings
以下截图均来自真实桌面端 Electron 窗口(2 倍局部放大,上:修改前;下:修改后)。请看两处时间戳:修改前助手回复点赞 / 点踩按钮旁的时间比上方用户消息时间更小、更淡(12px);修改后两处时间戳字号、行高与颜色完全一致(14px / 20px)。
深色主题
浅色主题
原始比例截图(深色 / 浅色 · 修改前 / 修改后)
Requirement or Bug
桌面端与
kimi web会话中,当助手回复下方显示点赞 / 点踩反馈按钮时,按钮旁的消息时间戳字号(12px)比上方用户消息的时间戳(14px)更小,颜色也更淡,同一组对话里的两处时间显示不一致。本 PR 去掉反馈操作栏对助手时间戳的字号、行高与颜色覆盖,让助手回复时间戳与用户消息时间戳统一为
14px / 20px和--color-text-muted,同时保留原有的6px水平间距。Bug Reproduction Steps
kimi web会话中发送一条消息(如hi)。12px / 18px且颜色更淡,用户侧为14px / 20px。Root Cause
packages/app-components/src/chat/ChatPane.vue中.a-time的基础样式本就是font-size: var(--text-base)(14px)、line-height: 20px、color: var(--color-text-muted),与用户消息时间.u-meta :deep(.msg-time)一致。但回复反馈功能引入的.a-msg-meta:has(> .a-reply-actions > *) .a-time在渲染点赞 / 点踩按钮时额外覆盖了font-size: var(--ui-c1)(12px)、line-height: 1.5(18px)以及color: light-dark(rgb(0 0 0 / 45%), rgb(255 255 255 / 42%)),导致助手时间戳变小变淡。这是根本修复:删除这三条视觉覆盖,让时间戳自然回落到
.a-time基础样式,仅保留该规则原本用于分隔按钮与时间的margin-inline: 6px。Code Changes
.a-msg-meta:has(> .a-reply-actions > *) .a-time { margin-inline: 6px; - color: light-dark(rgb(0 0 0 / 45%), rgb(255 255 255 / 42%)); - font-size: var(--ui-c1); - line-height: 1.5; }改动只涉及
ChatPane.vue一处 CSS 规则:间距仍由.a-msg-meta:has(> .a-reply-actions > *)的gap: 2px和.a-time的margin-inline: 6px控制,所以按钮与时间之间的布局间距不变;因为字号、行高和颜色不再被覆盖,带反馈按钮的助手回复时间戳与用户消息、无反馈按钮的助手回复及会话内其他时间戳保持一致。Behavior Changes and Affected Users
12px字号、18px行高;浅色rgb(0 0 0 / 45%)、深色rgb(255 255 255 / 42%)14px字号(--text-base)、20px行高、--color-text-muted(浅色rgb(0 0 0 / 68%)、深色rgb(255 255 255 / 64%)),与用户消息时间戳一致kimi web中查看已完成助手回复的用户;无 API 或数据消费者依赖旧样式6px6px不变kimi web用户14px / 20px、--color-text-muted受影响模块与测试覆盖:
packages/app-components/src/chat/ChatPane.vue同时服务于桌面端(kimi-code-app)和 Web 端(@moonshot-ai/kimi-code的kimi web),两端样式一并修复。hi/Hi! What can I help you with today?)中分别截取修改前与修改后画面,并用getComputedStyle与文本 Range 实测两处时间戳。真实 Electron 实测计算样式与验证命令
深色主题实测:
.u-meta .msg-time14px / 20px / rgba(255, 255, 255, 0.64)14px / 20px / rgba(255, 255, 255, 0.64)29.78 × 1829.84 × 18.a-msg-meta .a-time12px / 18px / rgba(255, 255, 255, 0.42)14px / 20px / rgba(255, 255, 255, 0.64)25.53 × 1529.84 × 18浅色主题实测:用户消息时间为
14px / 20px / rgba(0, 0, 0, 0.68);助手回复时间由12px / 18px / rgba(0, 0, 0, 0.45)变为14px / 20px / rgba(0, 0, 0, 0.68),与用户消息完全一致。验证命令(串行执行,全部通过):
pnpm exec vitest run --reporter=agent packages/app-components:99 个测试文件、993 条既有用例全部通过。pnpm typecheck:全仓类型检查(含vue-tsc --noEmit -p tsconfig.renderer.json)通过。pnpm lint:通过,0 警告 0 错误。pnpm run check:duplication e105ef0d25feb346bfda0bd4ad4246805fc2009f:通过,无新增重复代码。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.