Skip to content

feat(tui): use primary bullet for NotifyUser updates in fullscreen mode - #4814

Merged
Grapedge merged 1 commit into
mainfrom
updates-ux
Nov 11, 2026
Merged

Grapedge merged 1 commit into
mainfrom
updates-ux

Conversation

@Grapedge

Copy link
Copy Markdown
Collaborator

Requirement or Bug

全屏模式启用工具调用自动折叠后,消息流里的思考和工具调用会合并为单行灰字摘要,原有的蓝底白字 Update 徽标在其中过于抢眼。普通滚屏模式下工具卡片默认展开、信息较密,仍需要该徽标辅助定位。本 PR 在全屏模式下将消息流中的 NotifyUser 进度更新前缀改为主题主色(primary)的小圆点 ● ,普通滚屏模式保持蓝底 Update 徽标不变。

Bug Reproduction Steps

N/A

Root Cause

N/A

Code Changes

ToolCallComponent 已持有 this.ui 实例,可通过 this.ui?.mode === 'fullscreen' 区分全屏模式与普通滚屏模式。notifyUserPrefix(fullscreen) 统一生成进度更新卡片的标题前缀,NotifyUserHeader 在展开态直接复用 content.head,保证首行与续行缩进和普通助手消息对齐。

 function notifyUserPrefix(fullscreen: boolean): string {
+  if (fullscreen) return currentTheme.fg('primary', STATUS_BULLET);
   return `${currentTheme.bg(
     'primary',
     chalk.hex(NOTIFY_USER_MARK_FOREGROUND)(NOTIFY_USER_MARK),
   )} `;
 }

 class NotifyUserHeader extends TruncatedHeaderLine {
   override setText(content: HeaderContent): void {
     if (isNotifyUserHeaderContent(content)) {
+      this.prefix = content.head;
       this.title = content.notifyUserTitle;
     }
   }
   override render(width: number): string[] {
-    const firstPrefix = `${notifyUserBadge()} `;
+    const firstPrefix = this.prefix;
     ...
   }
 }

Screenshots / Recordings

全屏模式下的 NotifyUser 进度更新前后对比(终端宽度 76 列,由 TranscriptContainer 真实渲染):

改动前(fullscreen) 改动后(fullscreen)
 ❯ 分析一下现在 kimi code cli footer 区域的 UX 设计?

Thought for 1s, searched 1 pattern, loaded 1 skill

Update 读取 CLI Footer 与底部区域实现代码

Thought for 41s, read 1 file, searched 1 pattern

● Kimi Code CLI 的底部状态栏(Footer)核心实现在
apps/kimi-code/src/tui/components/chrome/footer.ts。
 ❯ 分析一下现在 kimi code cli footer 区域的 UX 设计?

Thought for 1s, searched 1 pattern, loaded 1 skill

● 读取 CLI Footer 与底部区域实现代码

Thought for 41s, read 1 file, searched 1 pattern

● Kimi Code CLI 的底部状态栏(Footer)核心实现在
apps/kimi-code/src/tui/components/chrome/footer.ts。

Behavior Changes and Affected Users

行为 改动前 改动后 依赖旧行为的人群 退路
全屏模式下消息流中 NotifyUser 进度更新卡片的标题前缀(开启实验开关 notify_user 时) 显示蓝底白字的 Update 徽标 显示 primary 主题色的 ● 小圆点 开启 notify_user 实验开关且使用全屏模式(tui_mode = "fullscreen" 或 KIMI_CODE_TUI_FULL_SCREEN=1)的 TUI 用户 切换回普通滚屏模式(tui_mode = "regular" 或 KIMI_CODE_TUI_FULL_SCREEN=0)仍保留蓝底 Update 徽标
  • 受影响模块:apps/kimi-code/src/tui/components/messages/tool-call.ts
  • 测试覆盖:apps/kimi-code/test/tui/components/messages/tool-call.test.ts 覆盖了普通滚屏模式下的蓝底白字 Update 徽标,以及全屏模式下折叠态、展开态和长标题折行时的 primary 色 ● 圆点渲染。
验证详情
  • pnpm --filter @moonshot-ai/kimi-code exec vitest run test/tui/components/messages/tool-call.test.ts test/tui/components/messages/transcript-container.test.ts test/tui/chalk-named-color-guard.test.ts(295 项测试全部通过)
  • pnpm --filter @moonshot-ai/kimi-code run typecheck(通过)
  • pnpm run lint(0 error)

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 17:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T17:26:21.348798Z 194b99d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@changeset-bot

changeset-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 194b99d

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026

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

commit: 194b99d

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release note omits the notify_user requirement and the normal scrolling mode’s retained Update badge, leaving users unclear about applicability and how to preserve the old display.

1 open issue
What changed in this PR

本 PR 调整 TUI 消息流中 NotifyUser 进度更新的视觉呈现:全屏模式使用主题主色圆点,普通滚屏模式保留 Update 徽标。

Changes:

  • 统一生成标题前缀,并在展开态复用,保持折行缩进一致。
  • 增加全屏模式折叠、展开及长标题折行测试,保留普通模式徽标验证。
  • 添加 CLI patch changeset,记录显示变化。
File Description
apps/​kimi-code/​test/​tui/​components/​messages/​tool-call.test.ts 增加模式参数及圆点、徽标和折行渲染验证。
apps/​kimi-code/​src/​tui/​components/​messages/​tool-call.ts 根据 TUI 模式选择前缀,并在展开态复用。
.changeset/​fullscreen-update-bullet.md 记录全屏进度更新前缀的用户可见变化。

Review effort: Balanced

Comment thread .changeset/fullscreen-update-bullet.md Resolved
@Grapedge
Grapedge merged commit f2ce60f into main Nov 11, 2026
18 checks passed
@Grapedge
Grapedge deleted the updates-ux branch November 11, 2026 04:00
This was referenced Nov 11, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Nov 11, 2026
…mode

Port upstream MoonshotAI#4814. NotifyUser cards show a primary-colored bullet in
fullscreen mode and keep the Update badge in regular mode. The header
stores its prefix from the content head so the expanded view reuses it.
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.

3 participants