fix(ui): 加回 agent 头像,范围带调深到看得见
产品真机走查: 1. agent 头像加回来(推翻 R3 的 D7)。R3 删它的理由是「一屏几十条时是重复度 最高的元素」,但没有它助手那一轮就没有视觉归属——生时校正面尤其明显, 旁白、题干、选项全是平铺文字。--assistant-content-inset 随之回到 「32px 头像 + 间隙」,追问 chip 与运行时间轴重新对齐正文。 2. 时间范围带用的是 --color-action-soft,那是给文字底色用的浅色调, 画在画布上几乎看不见——而它是整条轴上唯一必须一眼看到的标记。 改成 color-mix(--color-action-strong 32%, --color-canvas)。 测试 3369,fail 仍 31 且与基线逐条一致;四个路由标记不变。 未修:生时校正面顶部溢出。工作区在栅格里、没有脱离定位, chat-panel.is-rectification 仍是 46px + 1fr 两行,从代码上看不出 46px 顶栏为什么会消失,待产品确认截图是否裁切。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
co-authored by
Claude Opus 5
parent
524015cfc1
commit
071317f7ee
@@ -31,6 +31,14 @@ function motionPreferred() {
|
||||
|
||||
if (motionPreferred()) prefetchOnIdle(loadGsap);
|
||||
|
||||
/* Restored after real-device review: R3 removed it on the grounds that it was
|
||||
the most repeated element in a long transcript, but without it the assistant
|
||||
turn has no visual owner — in the rectification surface especially, where
|
||||
narration, a question and its options all stack as plain text. */
|
||||
export function AgentAvatar() {
|
||||
return <span className="agent-avatar" aria-hidden="true" />;
|
||||
}
|
||||
|
||||
export const ChatMessageRow = memo(function ChatMessageRow({
|
||||
message,
|
||||
showActivity = message.state !== "settled",
|
||||
@@ -123,6 +131,7 @@ export const ChatMessageRow = memo(function ChatMessageRow({
|
||||
className={`message message-${message.role}`}
|
||||
aria-label={message.role === "assistant" ? assistantLabel : "你"}
|
||||
>
|
||||
{message.role === "assistant" && <AgentAvatar />}
|
||||
<div className="message-content">
|
||||
<div className="message-bubble">
|
||||
{message.role === "assistant" ? (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { ChatMessageContent } from "@/components/chat-message-content";
|
||||
import { AgentAvatar } from "@/components/chat-message-row";
|
||||
import { protectOnboardingPhrases } from "@/lib/onboarding-copy";
|
||||
import type { Message } from "@/lib/home-types";
|
||||
|
||||
@@ -9,6 +10,7 @@ export function OnboardingChatMessage({ role, text, streaming = false, length =
|
||||
const protectedVisibleText = protectOnboardingPhrases(visibleText);
|
||||
return (
|
||||
<article className={`message message-${role} onboarding-message${phraseSafe ? " is-phrase-safe" : ""}`} aria-label={role === "assistant" ? "Jyotisha" : "你"}>
|
||||
{role === "assistant" && <AgentAvatar />}
|
||||
<div className="message-content">
|
||||
<div className="message-bubble">
|
||||
{role === "assistant" ? (
|
||||
|
||||
Reference in New Issue
Block a user