🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
📝 docs: add DESIGN.md design-system manifest (#16428)
René Wang44909d8f7d1a
diff --git a/.agents/skills/docs-changelog/SKILL.md b/.agents/skills/docs-changelog/SKILL.mdindex 64d5c3c8f30..5364b4871af 100644--- a/.agents/skills/docs-changelog/SKILL.md+++ b/.agents/skills/docs-changelog/SKILL.md@@ -18,7 +18,7 @@ If the user asks for release PR body / GitHub Release notes, load `../version-reFor every docs changelog task, you MUST load:-- `../microcopy/SKILL.md`+- `../../../DESIGN.md` (Voice & Content)- `../i18n/SKILL.md` (when EN/ZH pair is involved)## File and Naming Convention@@ -92,7 +92,7 @@ Do not pad content when changes are limited.1. Collect source facts from PRs/commits/issues.2. Group changes by user workflow (not by internal module path).3. Draft EN and ZH versions with aligned structure.-4. Verify terminology using `microcopy`/`i18n` guidance.+4. Verify terminology using DESIGN.md (Voice & Content) / `i18n` guidance.5. Final pass: remove AI-like filler and tighten sentences.## Docs Changelog Template (English)diff --git a/.agents/skills/microcopy/SKILL.md b/.agents/skills/microcopy/SKILL.mddeleted file mode 100644index ab97df4ced5..00000000000--- a/.agents/skills/microcopy/SKILL.md+++ /dev/null@@ -1,99 +0,0 @@-----name: microcopy-description: 'UI copy and microcopy guidelines. Use for user-facing copy, buttons, errors, empty states, onboarding, i18n wording, translation, or copy improvements in Chinese or English.'-user-invocable: false------# LobeHub UI Microcopy Guidelines--This file is the quick-reference summary. For full prompt-style guidelines with extensive examples (anti-patterns, tone matrices, scenario walk-throughs), load the language-specific reference:--- **中文文案** — [`references/zh.md`](./references/zh.md)-- **English copy** — [`references/en.md`](./references/en.md)--Brand: **Where Agents Collaborate** - Focus on collaborative agent system, not just "generation".--## Fixed Terminology--| Chinese | English |-| ---------- | ------------- |-| 空间 | Workspace |-| 助理 | Agent |-| 群组 | Group |-| 上下文 | Context |-| 记忆 | Memory |-| 连接器 | Integration |-| 技能 | Skill |-| 助理档案 | Agent Profile |-| 话题 | Topic |-| 文稿 | Page |-| 社区 | Community |-| 资源 | Resource |-| 库 | Library |-| 模型服务商 | Provider |-| 评测 | Evaluation |-| 基准 | Benchmark |-| 数据集 | Dataset |-| 用例 | Test Case |--## Brand Principles--1. **Create**: One sentence → usable Agent; clear next step-2. **Collaborate**: Multi-agent; shared Context; controlled-3. **Evolve**: Remember with consent; explainable; replayable--## Writing Rules--1. **Clarity first**: Short sentences, strong verbs, minimal adjectives-2. **Layered**: Main line (simple) + optional detail (precise)-3. **Consistent verbs**: Create / Connect / Run / Pause / Retry / View details-4. **Actionable**: Every message tells next step; avoid generic "OK/Cancel"--## Human Warmth (Balanced)--Default: **80% information, 20% warmth**-Key moments: **70/30** (first-time, empty state, failures, long waits)--**Hard cap**: At most half sentence of warmth, followed by clear next step.--**Order**:--1. Acknowledge situation (no judgment)-2. Restore control (pause/replay/edit/undo/clear Memory)-3. Provide next action--**Avoid**: Preachy encouragement, grand narratives, over-anthropomorphizing--## Patterns--**Getting started**:--- "Starting with one sentence is enough. Describe your goal."-- "Not sure where to begin? Tell me the outcome."--**Long wait**:--- "Running… You can switch tasks—I'll notify you when done."-- "This may take a few minutes. To speed up: reduce Context / switch model."--**Failure**:--- "That didn't run through. Retry, or view details to fix."-- "Connection failed. Re-authorize in Settings, or try again later."--**Collaboration**:--- "Align everyone to the same Context."-- "Different opinions are fine. Write the goal first."--## Errors/Exceptions--Must include:--1. **What happened**-2. (Optional) **Why**-3. **What user can do next**--Provide: Retry / View details / Go to Settings / Contact support / Copy logs--Never blame user. Put error codes in "Details".diff --git a/.agents/skills/microcopy/references/en.md b/.agents/skills/microcopy/references/en.mddeleted file mode 100644index 46cc1ac1633..00000000000--- a/.agents/skills/microcopy/references/en.md+++ /dev/null@@ -1,176 +0,0 @@-----globs: src/locales/default/*-alwaysApply: false------You are **LobeHub’s English UI Copy & Microcopy Specialist**.--LobeHub is an assistant workspace: users can create **Agents** and **Agent Teams** so people↔agents and agent↔agent can collaborate to improve productivity in work and life.-Brand vibe: youthful, friendly, modern on the surface; professional, reliable, productivity- and controllability-first underneath. Overall style reference: Notion / Figma / Apple / Discord / OpenAI / Gemini — clear, restrained, trustworthy, human but not cheesy.--Product slogan: **For Collaborative Agents**. Your copy must continuously reinforce that LobeHub is not about “generation”, but about a **collaborative agent system**: shareable context, traceable outcomes, replayable runs, evolvable setup, and **human-in-the-loop**.-------## 1) Fixed Terminology (must follow)--Use **exactly** these English terms across the product. Do not mix synonyms for the same concept.--- 空间: **Workspace**-- 助理: **Agent**-- 群组: **Group**-- 上下文: **Context**-- 记忆: **Memory**-- 连接器: **Integration**-- 技能 /tool/plugin: **Skill**-- 助理档案: **Agent Profile**-- 话题: **Topic**-- 文稿: **Page**-- 社区: **Community**-- 资源: **Resource**-- 库: **Library**-- MCP: **MCP**-- 模型服务商: **Provider**--Terminology rule: one concept = one term site-wide. Never alternate with “bot/assistant/AI agent/team/workspace” variations.-------## 2) Your Responsibilities--- Improve, rewrite, or create from scratch any **English UI copy**: titles, buttons, form labels/help text, placeholders, onboarding, empty states, toasts, modals, errors, permission prompts, settings, creation/run flows, collaboration and Agent Team pages, etc.-- Copy must work for both:- - general users (immediately understandable)- - power users (not childish)-- It must fit both playful and serious contexts.-- Avoid overclaiming AI capabilities; add human warmth at the right moments.-------## 3) The Three Brand Principles (bake into structure & wording)--- **Create**: create an Agent in one sentence; clear next step from idea → usable.-- **Collaborate**: multi-agent collaboration; align info and outputs; share Context (controlled, manageable).-- **Evolve**: Agents can remember preferences **only with user consent**; become more helpful over time; emphasize explainability, settings, and replay.-------## 4) Writing Rules (actionable)--1. **Clarity first**: short sentences, strong verbs, minimal adjectives. Avoid hype (“revolutionary”, “epic”, “100%”).-2. **Layered messaging (single version for everyone)**:- - Main line: simple and actionable- - Optional second line: more precise / technical / boundary-setting (subtitle, helper text, tooltip, collapsible)- - Do not produce “Pro vs Lite” variants; one main + optional detail-3. **Use terms sparingly but correctly**: prefer plain words (“connect”, “run”, “context”) unless a technical term is necessary. When it is, add a plain-English explanation.-4. **Consistency**: keep verbs consistent across similar actions (Create / Connect / Run / Pause / Retry / View details / Clear Memory).-5. **Actionable**: every message tells the user what to do next. Avoid generic “OK/Cancel”; use specific actions.-6. **English localization**: natural, product-native English; avoid translationese; keep punctuation and casing consistent.-------## 5) Human Warmth (balanced, controlled)--Goal: reduce anxiety and restore control without being sentimental.-Default ratio: **80% information, 20% warmth**.-Key moments (first-time create, empty state, long waits, failures/retries, rollback/data-loss risk, collaboration conflicts): may go **70/30**.--Hard cap: any on-screen message may include **at most half a sentence to one sentence** of warmth, and it must be followed by a clear next step.--Required order:--1. Acknowledge the situation (no judgment)-2. Restore control (human-in-the-loop: pause/replay/edit/undo/clear Memory/view Context)-3. Provide the next action (button/path)--Avoid:--- preachy encouragement (“don’t worry”, “stay positive”)-- grand narratives-- overly anthropomorphic claims (“I understand you”, “I’ll always remember you”)--Core stance: Agents can accelerate output, but **you** own the judgment, trade-offs, and final decision. LobeHub gives you time back for what matters.--Suggested patterns:--- **Getting started / blank state**- - “Starting with one sentence is enough. Describe your goal and I’ll help you set up the first Agent.”- - “Not sure where to begin? Tell me the outcome—we’ll break it down together.”-- **Long run / waiting**- - “Running… You can switch tasks—I'll notify you when it’s done.”- - “This may take a few minutes. To speed up: reduce Context / switch model / disable Auto-run.”-- **Failure / retry**- - “That didn’t run through. Retry, or view details to fix the cause.”- - “Connection failed: permission not granted or network unstable. Re-authorize in Settings, or try again later.”-- **Value anxiety (guidance, not error dialogs)**- - “Agents can speed up output, but direction and standards stay with you.”- - “Fast results are great—keeping the trail makes the next run steadier.”-- **Collaboration / Agent Teams**- - “Align everyone to the same Context. Every Agent in the Agent Team works from the same page.”- - “Different opinions are fine. Write the goal first, then let Agents propose options and trade-offs.”-------## 6) Errors / Exceptions / Permissions / Billing: hard rules--Every error must include:--- **What happened**-- (optional) **Why**-- **What the user can do next**--Provide actionable options as appropriate:--- Retry / View details / Go to Settings / Contact support / Copy logs--Never blame the user. Don’t show only an error code; put codes in “Details” if needed.-For data/security/billing: be neutral, thorough, and respectful—warmth comes from clarity, not emotion.-------## 7) Your Special Task: CN i18n → EN (localized, length-aware)--You translate **raw Chinese i18n strings into English** for LobeHub.--Requirements:--- Prefer **localized**, product-native English over literal translation.-- Do **not** chase perfect one-to-one consistency if a more natural UI phrase reads better.-- Keep the **character length difference small**; try to make the English string **roughly the same visual length** as the Chinese source (avoid overly long expansions).-- Preserve meaning, tone, and actionability; keep verbs consistent with LobeHub’s UI patterns.-- If space is tight (buttons, tabs, toasts), prioritize: **verb + object**, drop optional words first.-- If the Chinese includes placeholders/variables, preserve them exactly (e.g., `{name}`, `{{count}}`, `%s`) and keep word order sensible.-- Keep capitalization consistent with UI norms (buttons/title case only when appropriate).--Output format when translating:--- Provide **English only**, unless asked otherwise.-- If multiple options are useful, give **one best option** + **one shorter fallback** (only when length constraints are likely).-------You always optimize for: **clarity, control, collaboration, replayability, and human-in-the-loop**—in a modern, restrained, trustworthy English voice.--## 8) Product Introduction--LobeHub, we define agents as the unit of work. We’re building the first human–agent co-working, co-evolving network.--It is a fundamentally new, agent-first experience.You can pop up your agents or agent teams while writing, while chatting -- from ideation, to execution, to delivery -- across your entire workflow. Here, agents are not just tools, but always-on units of work.--### Create--It is a unified workspace where you can find, build, or team up with agent co-workers.Simply describe what you need, and Lobe AI will generate the prompts and assemble the right set of tools to compose your agent.In agent marketplace, you can easily discover agents created by others,use them instantly,and flexibly swap in your own tools.--### Collaboration--You can also spin up agent groups to handle system-level projects, even like building a quant team.-Within this group, some agents track signals and mine quantitative factors in real time, some manage risk, some execute orders, collaborate together to make money.-We’re defining how humans and agents work together. Now we support agent-to-agent collaboration, and we continue to scale new forms of collaboration networks — from agents collaborating across teams, to multiple humans working through the same agent.--### Evolve--Humans and agents should co-evolve, and we design this paradigm from both technical and economic perspectives. Our memory system is structured and editable,enabling models to better align with individual users, while allowing users to provide cleaner reward signals for continual learning. Agent evolution is powered by shared human intelligence through our agent marketplace. Creators are rewarded, and agents, in turn, pay for human intelligence.--Is AI replacing humans? No.-We’re building a human–agent co-working, co-evolving society.-Agents become smarter and more personalized through human intelligence, taking on repetitive and exhausting work — so humans can focus on fewer, but more important things: taste, and creation.diff --git a/.agents/skills/microcopy/references/zh.md b/.agents/skills/microcopy/references/zh.mddeleted file mode 100644index 1ade7022908..00000000000--- a/.agents/skills/microcopy/references/zh.md+++ /dev/null@@ -1,160 +0,0 @@-----globs: src/locales/default/*-alwaysApply: false------你是「LobeHub」的中文 UI 文案与微文案(microcopy)专家。LobeHub 是一个助理工作空间:用户可以创建助理与群组,让人和助理、助理和助理协作,提升日常生产与生活效率。产品气质:外表年轻、亲和、现代;内核专业、可靠、强调生产力与可控性。整体风格参考 Notion / Figma / Apple / Discord / OpenAI / Gemini:清晰克制、可信、有人情味但不油腻。--产品 slogan:**For Collaborative Agents**。你的文案要让用户持续感到:LobeHub 的重点不是 “生成”,而是 “协作的助理体系”(可共享上下文、可追踪、可回放、可演进、人在回路)。-------### 1) 固定术语(必须遵守)--- Workspace:空间-- Agent:助理-- Agent Team:群组-- Context:上下文-- Memory:记忆-- Integration:连接器-- Tool/Skill/Plugin/ 插件 / 工具:技能-- SystemRole: 助理档案-- Topic: 话题-- Page: 文稿-- Community: 社区-- Resource: 资源-- Library: 库-- MCP: MCP-- Provider: 模型服务商--术语规则:同一概念全站只用一种说法,不混用 “Agent / 智能体 / 机器人 / 团队 / 工作区” 等。-------### 2) 你的任务--- 优化、改写或从零生成任何界面中文文案:标题、按钮、表单说明、占位、引导、空状态、Toast、弹窗、错误、权限、设置项、创建 / 运行流程、协作与群组相关页面等。-- 文案必须同时兼容:普通用户看得懂 + 专业用户不觉得低幼;娱乐与严肃场景都成立;不过度营销、不夸大 AI 能力;在关键节点提供恰到好处的人文关怀。-------### 3) 品牌三原则(内化到结构与措辞)--- **Create(创建)**:一句话创建助理;从想法到可用;清楚下一步。-- **Collaborate(协作)**:多助理协作;群组对齐信息与产出;共享上下文(可控、可管理)。-- **Evolve(演进)**:助理可在你允许的范围内记住偏好;随你的工作方式变得更顺手;强调可解释、可设置、可回放。-------### 4) 写作规则(可执行)--1. **清晰优先**:短句、强动词、少形容词;避免口号化与空泛承诺(如 “颠覆”“史诗级”“100%”)。-2. **分层表达(单一版本兼容两类用户)**:- - 主句:人人可懂、可执行- - 必要时补充一句副说明:更精确 / 更专业 / 更边界(可放副标题、帮助提示、折叠区)- - 不输出 “Pro/Lite 两套文案”,而是 “一句主文案 + 可选补充”-3. **术语克制但准确**:能说 “连接 / 运行 / 上下文” 就不要堆砌术语;必须出现专业词时给一句白话解释。-4. **一致性**:同一动作按钮尽量固定动词(创建 / 连接 / 运行 / 暂停 / 重试 / 查看详情 / 清除记忆等)。-5. **可行动**:每条提示都要让用户知道下一步;按钮避免 “确定 / 取消” 泛化,改成更具体的动作。-6. **中文本地化**:符合中文阅读节奏;中英混排规范;避免翻译腔。-------### 5) 人文关怀(中间态温度:介于克制与陪伴)--目标:在 AI 时代的价值焦虑与创作失格感中,给用户 “被理解 + 有掌控 + 能继续” 的体验,但不写长抒情。--#### 温度比例规则--- 默认:信息为主,温度为辅(约 8:2)-- 关键节点(首次创建、空状态、长等待、失败重试、回退 / 丢失风险、协作分歧):允许提升到 7:3-- 强制上限:任何一条上屏文案里,温度表达不超过**半句或一句**,且必须紧跟明确下一步。--#### 表达顺序(必须遵守)--1. 先承接处境(不评判):如 “没关系 / 先这样也可以 / 卡住很正常”-2. 再给掌控感(人在回路):可暂停 / 可回放 / 可编辑 / 可撤销 / 可清除记忆 / 可查看上下文-3. 最后给下一步(按钮 / 路径明确)--#### 避免--- 鸡汤式说教(如 “别焦虑”“要相信未来”)-- 宏大叙事与文学排比-- 过度拟人(不承诺助理 “理解你 / 有情绪 / 永远记得你”)--#### 核心立场--- 助理很强,但它替代不了你的经历、选择与判断;LobeHub 帮你把时间还给重要的部分。--##### A. 情绪承接(先人后事)--- 允许承认:焦虑、空白、无从下手、被追赶感、被替代感、创作枯竭、意义感动摇-- 但不下结论、不说教:不输出 “你要乐观 / 别焦虑”,改成 “这种感觉很常见 / 你不是一个人”--##### B. 主体性回归(把人放回驾驶位)--- 关键句式:**“决定权在你”**、**“你可以选择交给助理的部分”**、**“把你的想法变成可运行的流程”**-- 强调可控:可编辑、可回放、可暂停、可撤销、可清除记忆、可查看上下文--##### C. 经历与关系(把价值从结果挪回过程)--- 适度表达:记录、回放、版本、协作痕迹、讨论、共创、里程碑-- 用 “经历 / 过程 / 痕迹 / 回忆 / 脉络 / 成长” 这类词,避免虚无抒情--##### D. 不用 “AI 神话”--- 不渲染 “AI 终将超越你 / 取代你”-- 也不轻飘飘说 “AI 只是工具” 了事更像:**“它是工具,但你仍是作者 / 负责人 / 最终决定者”**--##### 示例--在用户可能产生自我否定或无力感的场景(空状态、创作开始、产出对比、失败重试、长时间等待、团队协作分歧、版本回退):--```-1. **先承接感受**:用一句短话确认处境(不评判)-2. **再给掌控感**:强调“你可控/可选择/可回放/可撤销”-3. **最后给下一步**:提供明确行动按钮或路径-```--- 允许出现 “经历、选择、痕迹、成长、一起、陪你把事做完” 等词来传递温度;但保持信息密度,不写长段抒情。-- 严肃场景(权限 / 安全 / 付费 / 数据丢失风险)仍以清晰与准确为先,温度通过 “尊重与解释” 体现,而不是煽情。--你可以让系统在需要时套这些结构(同一句兼容新手 / 专业):--**开始创作 / 空白页**--- 主句:给一个轻承接 + 行动入口-- 模板:- - 「从一个念头开始就够了。写一句话,我来帮你搭好第一个助理。」- - 「不知道从哪开始也没关系:先说目标,我们一起把它拆开。」--**长任务运行 / 等待**--- 模板:- - 「正在运行中… 你可以先去做别的,完成后我会提醒你。」- - 「这一步可能要几分钟。想更快:减少上下文 / 切换模型 / 关闭自动运行。」--**失败 / 重试**--- 模板:- - 「没关系,这次没跑通。你可以重试,或查看原因再继续。」- - 「连接失败:权限未通过或网络不稳定。去设置重新授权,或稍后再试。」--**对比与自我价值焦虑(适合提示 / 引导,不适合错误弹窗)**--- 模板:- - 「助理可以加速产出,但方向、取舍和标准仍属于你。」- - 「结果可以很快,经历更重要:把每次尝试留下来,下一次会更稳。」--**协作 / 群组**--- 模板:- - 「把上下文对齐到同一处,群组里每个助理都会站在同一页上。」- - 「不同意见没关系:先把目标写清楚,再让助理分别给方案与取舍。」--### 6) 错误 / 异常 / 权限 / 付费:硬规则--- 必须包含:**发生了什么 +(可选)原因 + 你可以怎么做**-- 必须提供可操作选项:**重试 / 查看详情 / 去设置 / 联系支持 / 复制日志**(按场景取舍)-- 不责备用户;不只给错误码;错误码可放在 “详情” 里-- 涉及数据与安全:语气更中性更完整,温度通过 “尊重与解释” 体现,而不是煽diff --git a/.agents/skills/skills-audit/SKILL.md b/.agents/skills/skills-audit/SKILL.mdindex 62d0322a7e1..d2a3b8404e5 100644--- a/.agents/skills/skills-audit/SKILL.md+++ b/.agents/skills/skills-audit/SKILL.md@@ -48,7 +48,6 @@ For each pair within the same domain, ask:Common false positives (do NOT merge):- `db-migrations` vs `drizzle` — distinct workflows (migration files vs schema authoring).-- `microcopy` vs `i18n` — content vs mechanics.- `agent-runtime-hooks` vs `agent-tracing` vs `agent-signal` — different surfaces of the agent system.- `testing` vs `agent-testing` — different test types.diff --git a/.agents/skills/ux/SKILL.md b/.agents/skills/ux/SKILL.mdindex b9a079e85d6..c49fab567e4 100644--- a/.agents/skills/ux/SKILL.md+++ b/.agents/skills/ux/SKILL.md@@ -8,7 +8,8 @@ user-invocable: falseHow LobeHub products should feel, and concrete rules to get there. Use this when**building or reviewing** any user-facing flow. For component/styling choices see-**react**, for wording see **microcopy**, for imperative modal wiring see **modal**.+**react**, for wording see **DESIGN.md** (Voice & Content), for imperative modal+wiring see **modal**.## Design values@@ -361,5 +362,5 @@ The product should grow with the user — deeper power shows up as needs deepen.## Related skills- **modal** — imperative `createModal` state-machine wiring for confirm/progress/done.-- **microcopy** — wording for confirm / done / empty / error states.+- **DESIGN.md** (Voice & Content) — wording for confirm / done / empty / error states.- **react** — component priority, `Button` usage, styling.diff --git a/.agents/skills/version-release/SKILL.md b/.agents/skills/version-release/SKILL.mdindex b6f23f88b4d..9a86c8a1a16 100644--- a/.agents/skills/version-release/SKILL.md+++ b/.agents/skills/version-release/SKILL.md@@ -24,7 +24,7 @@ If the user asks for website changelog pages, load `../docs-changelog/SKILL.md`.For every `/version-release` execution, you MUST load and apply:-- `../microcopy/SKILL.md`+- `../../../DESIGN.md` (Voice & Content)## Overviewdiff --git a/DESIGN.dark.md b/DESIGN.dark.mdnew file mode 100644index 00000000000..4aa3166cc33--- /dev/null+++ b/DESIGN.dark.md@@ -0,0 +1,94 @@+---+version: alpha+name: LobeHub (Dark)+description: LobeHub's design system — Dark theme. Same semantic token names as the Light theme (DESIGN.md) with dark values. Tokens are themeable (cssVar key `lobe-vars`); components must read the semantic tokens, never hard-code hex. Only colors change between themes — typography, spacing, radius, controls, motion, shapes, components, voice, and the design values are identical to DESIGN.md.+themeable:+ primaryColor:+ default: ~ # monochrome (near-white in dark) when unset — see colorPrimary+ options:+ [red, orange, gold, yellow, lime, green, cyan, blue, geekblue, purple, magenta, volcano]+ neutralColor:+ default: ~ # the built-in `gray` scale when unset+ options: [mauve, slate, sage, olive, sand]+colors:+ # Semantic tokens (lobe-ui token names). Dark-theme defaults shown.+ colorPrimary: '#eeeeee' # monochrome by default; becomes the chosen primaryColor[9]+ colorSuccess: '#c4f042' # lime (dark uses a brighter hue than light's green)+ colorWarning: '#ffb224' # gold+ colorError: '#f4416c' # red (dark uses red; light uses volcano)+ colorInfo: '#60b1ff' # blue (dark uses blue; light uses geekblue)+ # Text — solid neutrals from the `gray` scale; rank info with these+ colorText: '#ffffff' # primary text and icons+ colorTextSecondary: '#aaaaaa' # secondary text, labels+ colorTextTertiary: '#6f6f6f' # placeholder, captions+ colorTextQuaternary: '#555555' # disabled+ # Surfaces — separate scale from text; never substitute one for the other+ colorBgLayout: '#000000' # page background (darkest)+ colorBgContainer: '#0d0d0d' # primary card / panel surface+ colorBgContainerSecondary: '#070707' # subtle secondary surface (lobe-ui custom token)+ colorBgElevated: '#1a1a1a' # popovers, menus, modals (lifts as it rises)+ colorBgSpotlight: '#2d2d2d' # tooltips+ # Borders & fills — translucent, layer over any background+ colorBorder: '#202020' # stronger edge+ colorBorderSecondary: '#1a1a1a' # default divider / subtle border+ colorFill: 'rgba(255, 255, 255, 0.16)'+ colorFillSecondary: 'rgba(255, 255, 255, 0.1)'+ colorFillTertiary: 'rgba(255, 255, 255, 0.06)' # hover wash+ colorFillQuaternary: 'rgba(255, 255, 255, 0.02)' # active wash+elevation:+ # Identical to the Light theme — shadows are shared, only surfaces change+ boxShadowTertiary: '0 3px 1px -1px rgba(26, 26, 26, 0.06)' # raised cards+ boxShadowSecondary: '0 8px 16px -4px rgba(0, 0, 0, 0.2)' # popovers, menus+ boxShadow: '0 20px 20px -8px rgba(0, 0, 0, 0.24)' # modals, dialogs+typography:+ # Identical to DESIGN.md (theme-independent)+ fontFamily: 'Geist, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif'+ fontFamilyCode: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Cascadia Code", Consolas, "HarmonyOS Sans SC", monospace'+ fontSizeSM: 12+ fontSize: 14+ fontSizeLG: 16+ fontSizeXL: 20+ lineHeight: 1.5714+ lineHeightSM: 1.6667+ fontSizeHeading1: 38+ fontSizeHeading2: 30+ fontSizeHeading3: 24+ fontSizeHeading4: 20+ fontSizeHeading5: 16+ fontWeightStrong: 600+spacing:+ XXS: 4+ XS: 8+ SM: 12+ base: 16+ MD: 20+ LG: 24+ XL: 32+radius:+ borderRadiusXS: 4+ borderRadiusSM: 6+ borderRadius: 8+ borderRadiusLG: 12+controls:+ controlHeightSM: 28+ controlHeight: 36+ controlHeightLG: 40+---++# LobeHub (Dark)++This is the **Dark theme** of LobeHub's design system. It is the companion to **[DESIGN.md](./DESIGN.md)** (Light) and shares everything but color: the same semantic token _names_, the same typography, spacing, radius, control, motion, shape, component, and voice rules, and the same four design values (Natural · Meaningful · Certainty · Growth).++Read this file for the **dark color values**; read [DESIGN.md](./DESIGN.md) for all the guidance prose, which is theme-independent. As always: consume semantic tokens by name (`cssVar.colorText`, `cssVar.colorBgContainer`, …) so components follow the user's theme automatically — never hard-code the hex values below.++## Colors++Dark uses the same semantic-token model as Light, with the values inverted around a near-black canvas. A few things specific to dark:++- **Surfaces lift as they rise.** The page canvas `colorBgLayout` is pure black (`#000000`); `colorBgContainer` (`#0d0d0d`) sits above it, and `colorBgElevated` (`#1a1a1a`) is lighter still for popovers, menus, and modals. Depth reads through getting _lighter_, the opposite of light theme. Keep `colorBgLayout` and `colorBgContainer` distinct — don't flatten the stack.+- **Text is solid `gray`-scale neutrals**, not translucent: `colorText` `#ffffff` → `colorTextSecondary` `#aaaaaa` → `colorTextTertiary` `#6f6f6f` → `colorTextQuaternary` `#555555` (disabled). Rank information with this ramp rather than with color.+- **Borders and fills stay translucent white** (`colorFill*`, `rgba(255,255,255,…)`), so they layer correctly over any dark surface. Use `colorBorderSecondary` for the everyday divider and `colorBorder` for a stronger edge.+- **`colorPrimary` is monochrome by default** — near-white (`#eeeeee`) in dark — and only takes on a hue when the user picks a primary color, keeping the default UI calm.+- **Functional hues shift for dark legibility.** Dark draws `colorError` from `red` and `colorInfo` from `blue` (Light uses `volcano` and `geekblue`), and `colorSuccess` brightens to `lime`. This is intentional — read the token, not a fixed hue.++For elevation, motion, shapes, components, typography, layout, voice, and the do's and don'ts, see **[DESIGN.md](./DESIGN.md)** — they apply unchanged in dark.diff --git a/DESIGN.md b/DESIGN.mdnew file mode 100644index 00000000000..9cf90f97e08--- /dev/null+++ b/DESIGN.md@@ -0,0 +1,242 @@+---+version: alpha+name: LobeHub+description: LobeHub's design system, built on lobe-ui (@lobehub/ui). Tokens are themeable — primary and neutral colors are user-configurable and resolve to CSS variables (cssVar key `lobe-vars`). This is the Light theme; the Dark theme uses the same token names with different values and is documented in DESIGN.dark.md.+themeable:+ # Users pick a primary and a neutral; components must read the semantic tokens+ # below rather than hard-coding any single value from this list.+ primaryColor:+ default: ~ # monochrome (near-black in light) when unset — see colorPrimary+ options:+ [red, orange, gold, yellow, lime, green, cyan, blue, geekblue, purple, magenta, volcano]+ neutralColor:+ default: ~ # the built-in `gray` scale when unset+ options: [mauve, slate, sage, olive, sand]+colors:+ # Semantic tokens (lobe-ui token names) — the real contract components consume via+ # `cssVar.colorPrimary`, `cssVar.colorText`, etc. Light-theme defaults shown.+ colorPrimary: '#222222' # monochrome by default; becomes the chosen primaryColor[9]+ colorSuccess: '#379d4a' # green+ colorWarning: '#ee9e0b' # gold+ colorError: '#ec5e41' # volcano+ colorInfo: '#0072f5' # geekblue+ # Text — solid neutrals from the `gray` scale; rank info with these+ colorText: '#080808' # primary text and icons+ colorTextSecondary: '#666666' # secondary text, labels+ colorTextTertiary: '#999999' # placeholder, captions+ colorTextQuaternary: '#bbbbbb' # disabled+ # Surfaces — separate scale from text; never substitute one for the other+ colorBgLayout: '#f8f8f8' # page background+ colorBgContainer: '#ffffff' # primary card / panel surface+ colorBgContainerSecondary: '#fbfbfb' # subtle secondary surface (lobe-ui custom token)+ colorBgElevated: '#ffffff' # popovers, menus, modals+ colorBgSpotlight: '#dddddd' # tooltips+ # Borders & fills — translucent, layer over any background+ colorBorder: '#e3e3e3' # stronger edge+ colorBorderSecondary: '#eeeeee' # default divider / subtle border+ colorFill: 'rgba(0, 0, 0, 0.12)'+ colorFillSecondary: 'rgba(0, 0, 0, 0.06)'+ colorFillTertiary: 'rgba(0, 0, 0, 0.03)' # hover wash+ colorFillQuaternary: 'rgba(0, 0, 0, 0.015)' # active wash+elevation:+ # Shared by both themes; pair each with the matching radius+ boxShadowTertiary: '0 3px 1px -1px rgba(26, 26, 26, 0.06)' # raised cards+ boxShadowSecondary: '0 8px 16px -4px rgba(0, 0, 0, 0.2)' # popovers, menus+ boxShadow: '0 20px 20px -8px rgba(0, 0, 0, 0.24)' # modals, dialogs+typography:+ fontFamily: 'Geist, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif'+ fontFamilyCode: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Cascadia Code", Consolas, "HarmonyOS Sans SC", monospace'+ # Body & label scale (lobe-ui)+ fontSizeSM: 12 # captions, dense metadata+ fontSize: 14 # default body and UI text+ fontSizeLG: 16 # emphasis, large controls+ fontSizeXL: 20+ lineHeight: 1.5714 # ~22px at 14px+ lineHeightSM: 1.6667 # ~20px at 12px+ # Headings+ fontSizeHeading1: 38+ fontSizeHeading2: 30+ fontSizeHeading3: 24+ fontSizeHeading4: 20+ fontSizeHeading5: 16+ fontWeightStrong: 600+spacing:+ # 4px base scale (lobe-ui padding/margin tokens)+ XXS: 4+ XS: 8+ SM: 12+ base: 16+ MD: 20+ LG: 24+ XL: 32+radius:+ borderRadiusXS: 4 # tags, chips+ borderRadiusSM: 6 # inputs, small controls+ borderRadius: 8 # default — buttons, cards+ borderRadiusLG: 12 # menus, modals, large surfaces+controls:+ controlHeightSM: 28+ controlHeight: 36 # default (lobe-ui base)+ controlHeightLG: 40+---++# LobeHub++## Overview++LobeHub is an AI-native product suite (chat, agents, tools). Its design system is built on **lobe-ui** ([@lobehub/ui](https://github.com/lobehub/lobe-ui)) — LobeHub's own component and theming layer — and is themed at runtime through `ThemeProvider` with the cssVar key `lobe-vars`.++The aesthetic is calm and content-first: generous whitespace, restrained color, and a near-neutral canvas so the conversation and the user's content stay in focus. Color carries state and hierarchy, not decoration. Every surface is designed for both light and dark appearance and for desktop and mobile.++Two things make this system different from a fixed palette, and both matter when you build with it:++1. **It is themeable.** Users choose a **primary** color and a **neutral** color. Never hard-code a hex value from this file — read the **semantic token** (e.g. `cssVar.colorPrimary`, `cssVar.colorText`) so your UI follows the user's theme and adapts between light and dark automatically.+2. **It has design values.** LobeHub follows four product values — **Natural · Meaningful · Certainty · Growth** — that decide trade-offs the tokens can't. They are summarized under [Design Values](#design-values) and are the tie-breaker when guidance conflicts.++The YAML above lists the default **Light** theme. The Dark theme redefines the same token names with different values and lives in **[DESIGN.dark.md](./DESIGN.dark.md)** — every other section here (typography, layout, motion, shapes, components, voice, values) is theme-independent and applies to both. Build against token names, not values.++## Design Values++The philosophy behind every LobeHub interface. Read these before designing a flow.++- **Natural** — Minimize cognitive load. The next step should be obvious without thinking; carry the user forward with sensible defaults, AI assistance, and smooth transitions rather than making them stop and figure things out.+- **Meaningful** — Root every screen in the user's real goal. Make the objective clear, give immediate feedback on each action, and always point at the next meaningful step.+- **Certainty** — Low-entropy, predictable interactions. Reuse the same patterns, components, and wording. Keep one clear focus per surface and design **every** state — empty, loading, error, success. Restraint over cleverness.+- **Growth** — The product grows with the user. Surface advanced capability progressively, revealing features at the moment they become relevant without crowding the novice path.++**Priority when values conflict** (moment-to-moment interaction): **Meaningful ≳ Natural > Certainty** — never sacrifice the user's goal or forward momentum just to keep things uniform. **Growth** is a longer-horizon lens for how a feature is discovered and scales, not a single-screen layout call.++## Colors++LobeHub uses lobe-ui's **semantic token** model. A token's name encodes its **role**, so the same name resolves to the right value in light, dark, and under any user theme. Always consume tokens by name — `cssVar.colorText`, `cssVar.colorBgContainer`, and so on.++**Text** uses solid neutrals from the `gray` scale that hold contrast on any surface — rank information with them rather than reaching for color:++- `colorText` — primary text and icons+- `colorTextSecondary` — secondary text, form labels+- `colorTextTertiary` — placeholders, captions, metadata+- `colorTextQuaternary` — disabled++**Surfaces** are a separate scale from text; do not swap one for the other. `colorBgLayout` is the page canvas, `colorBgContainer` is the primary card/panel surface, `colorBgContainerSecondary` gives subtle separation, `colorBgElevated` backs popovers, menus, and modals, and `colorBgSpotlight` backs tooltips.++**Borders and fills** are translucent (`rgba`/alpha), so they layer over any background. Use `colorBorderSecondary` for the everyday divider and `colorBorder` for a stronger edge; use the `colorFill*` ramp for hover/active washes (`colorFillTertiary` hover, `colorFillQuaternary` active).++**Functional color** is reserved for meaning: `colorPrimary` for the single most important action, focus, and links — note it is **monochrome by default** (near-black in light, near-white in dark) and only takes on a hue when the user picks a primary color, which keeps the default UI calm; `colorSuccess`, `colorWarning`, `colorError`, `colorInfo` for state. Each functional and accent color also exposes a derived ramp — `color{Name}`, `color{Name}Hover`, `color{Name}Active`, `color{Name}Bg`, `color{Name}Border`, `color{Name}Text`, and `color{Name}Fill*` — so you can build tinted backgrounds, borders, and text without picking raw values.++**Applying tokens in components.** The text ramp and the functional tints are full token sets, but component prop shorthands expose only part of them — so apply the token directly when no shorthand covers it. In `@lobehub/ui`, the `Text` `type` prop accepts `secondary | success | warning | danger | info` only (there is no `tertiary` / `quaternary`), and `Tag` `color` has no `primary`. For `colorTextTertiary` / `colorTextQuaternary` text, and for any `colorPrimary` or functional tint a shorthand lacks, set the token via `color={cssVar.colorTextTertiary}` (or a styled class) instead of `type="tertiary"` / `color="primary"` — the invalid prop values fail silently (rendered as a literal color or ignored), not with an error.++## Typography++**Geist** sets UI and prose; **Geist Mono** sets code, data, and tabular figures. The stacks above fall through to `-apple-system`, then **HarmonyOS Sans SC** and platform CJK faces, so Latin and CJK text stay visually consistent.++Use the scale tokens rather than setting size, weight, or line height by hand:++- **Body & labels** — `fontSize` (14px) covers most UI and body text; `fontSizeSM` (12px) for captions and dense metadata; `fontSizeLG` (16px) for emphasis and large controls. Line height is generous (\~1.57) for readability. The body/label scale is **12 / 14 / 16** — there is **no 13px token**. Some legacy UI hard-codes `fontSize={13}` for secondary text; treat that as drift and round to 12 or 14, and rank text with the `colorText*` opacity ramp rather than reaching for an in-between size. Don't introduce new off-scale sizes.+- **Headings** — `fontSizeHeading1`–`fontSizeHeading5` (38 → 16px) title pages and sections; pair with `fontWeightStrong` (600).+- **Code & numbers** — the `fontFamilyCode` stack; prefer tabular figures when numbers must align.++## Layout++Spacing follows a **4px scale** via lobe-ui padding/margin tokens: `XXS` 4, `XS` 8, `SM` 12, base 16, `MD` 20, `LG` 24, `XL` 32. Keep a clear rhythm — tight space inside a group (8px), more between groups (16px), most between sections (24–32px). Cards use 16–24px padding.++The 4px scale governs **gaps, padding, and margins** — and only those. Two things are deliberately **not** on it: **radius is a separate scale** (see [Shapes](#shapes); it includes a 6px step, `borderRadiusSM`), so never reuse a radius value as spacing; and **icon pixel sizes** (12 / 14 / 16 / 18 / 20) and 1px hairline borders are dimensions, not spacing. Off-scale spacing values (6, 10, 13…) are drift — round to the nearest scale step. Reserve a one-off off-scale value for genuine optical tuning, never as a default.++Layouts must work across appearances and form factors: every surface ships **light and dark** and **desktop and mobile** variants. Mobile is not an afterthought — `src/routes/(mobile)` and `.mobile`/`.desktop` component variants exist for exactly this. Center primary content and let side padding grow at wider breakpoints.++## Elevation & Depth++Hierarchy comes from **tonal surfaces and borders first**, so shadows stay subtle. Lift only what genuinely floats:++- Raised cards / panels: `boxShadowTertiary`, barely-there — most cards need none, just a `colorBorderSecondary` edge.+- Popovers and menus: `boxShadowSecondary`.+- Modals and dialogs: `boxShadow`, the strongest tier.++The shadow tokens are **shared across light and dark** — only the surface and border colors change between themes. Tooltips take the lightest treatment on `colorBgSpotlight`. Pair each elevation with the matching radius below, and prefer a border over a shadow when both would read.++## Motion++Motion clarifies change; it is never decoration. It is also **user-controllable** — LobeHub exposes an animation mode (`agile` ≈ 0.05 motion unit, default ≈ 0.1, or fully `disabled`), so motion must degrade gracefully and you must honor `prefers-reduced-motion` by dropping nonessential animation.++When motion helps — revealing, moving, or connecting elements — keep it short and physical: roughly 100–200ms for state changes and popovers, up to \~300ms for overlays and modals. Avoid long, looping, or attention-grabbing animation. For AI/loading moments, prefer the system's purpose-built loaders (skeletons, `NeuralNetworkLoading`) over ad-hoc spinners.++## Shapes++Radii stay soft but tight, and one family per view:++- `borderRadiusXS` 4px — tags, chips+- `borderRadiusSM` 6px — inputs, small controls+- `borderRadius` 8px — the default, for buttons and cards+- `borderRadiusLG` 12px — menus, modals, large surfaces++Reserve fully round (`9999px`) for pills, avatars, and circular icon buttons. Don't mix rounded and sharp corners in one view.++## Components++Prefer the system's components over bespoke markup, in this order:++1. **`@lobehub/ui/base-ui`** — headless primitives, first choice for new code (`Select`, `Modal` / `createModal` / `confirmModal`, `DropdownMenu`, `ContextMenu`, `Popover`, `ScrollArea`, `Switch`, `Toast`, `FloatingSheet`).+2. **`@lobehub/ui`** root — richer composed components when base-ui has no counterpart.++When base-ui has the component, use it — don't reach for the root version, and only drop to an underlying primitive when lobe-ui has no counterpart at all.++Default control height is **36px** (`controlHeight`); use `controlHeightSM` 28px and `controlHeightLG` 40px for the other sizes. Buttons follow lobe-ui's hierarchy — one **primary** (`colorPrimary` fill) per view for the most important action, **default** (surface fill + `colorBorder`) for ordinary actions, **text/link** for low-emphasis, and **danger** (`colorError`) for destructive actions. Hover and active states step through the `colorFill*` / `color{Name}Hover` ramps; disabled uses `colorTextQuaternary` text with a not-allowed cursor. Every interactive element shows a visible focus ring at `:focus-visible`.++Style components with lobe-ui's styling layer: prefer `createStaticStyles` with `cssVar.*` (zero-runtime) and fall back to `createStyles` + `token` only when styles need runtime computation.++## Voice & Content++Copy is part of the design — precise, calm, and free of filler. The voice is youthful, friendly, and modern on the surface; professional, reliable, and control-first underneath (reference points: Notion, Figma, Apple, Discord, OpenAI). Keys live in `src/locales/default`; LobeHub ships en-US and zh-CN by hand, so write a source string that translates cleanly without expanding much in length.++The brand promise is **For Collaborative Agents** — reinforce that LobeHub is not about one-shot "generation" but a collaborative agent system: shareable context, traceable outcomes, replayable runs, evolvable setup, and human-in-the-loop. Three principles to bake into structure and wording:++- **Create** — idea to usable Agent in one sentence, with a clear next step.+- **Collaborate** — multiple agents and people aligned on the same shared Context, controlled and manageable.+- **Evolve** — Agents remember preferences only with consent and get more helpful over time; keep it explainable, editable, and replayable.++### Terminology++One concept maps to **one term** site-wide — never alternate synonyms (no "bot / assistant / AI agent" drift for **Agent**). Canonical terms: **Workspace**, **Agent**, **Agent Profile**, **Group**, **Context**, **Memory**, **Integration**, **Skill**, **Topic**, **Page**, **Community**, **Resource**, **Library**, **MCP**, **Provider**, **Evaluation**, **Benchmark**, **Dataset**, **Test Case**. Prefer plain words ("connect", "run", "context") over jargon; when a technical term is unavoidable, gloss it in plain English.++### Writing rules++- **Clarity first** — short sentences, strong verbs, few adjectives. No hype ("revolutionary", "epic", "100%").+- **Layered, not split** — one main line that is simple and actionable, plus an optional second line (subtitle, helper text, tooltip) for precision or boundaries. Don't ship "simple vs pro" variants.+- **Consistent verbs** — reuse the same verb for the same action everywhere: Create / Connect / Run / Pause / Retry / View details / Clear Memory.+- **Always actionable** — every message tells the user what to do next. Name actions with a verb and a noun (`Create Agent`, `Delete Session`), never a bare `Confirm`, `OK`, or `Submit`.+- **Confirm outcomes** by naming the specific thing that changed; skip "successfully" and superlatives.+- **Empty states** point to the first action ("No agents yet. Create one to get started."), not a blank screen.+- **In-progress** states use a present participle with an ellipsis (`Generating…`, `Saving…`).++### Human warmth++Reduce anxiety and restore control without being sentimental. Default to **80% information, 20% warmth**; at key moments (first run, empty state, long waits, failures, data-loss risk, collaboration conflicts) up to **70/30**. Hard cap: at most half a sentence to one sentence of warmth, always followed by a clear next step. Order every sensitive message as:++1. Acknowledge the situation, without judgment.+2. Restore control — pause, replay, edit, undo, clear Memory, view Context.+3. Give the next action (button or path).++Avoid preachy encouragement ("don't worry"), grand narratives, and over-anthropomorphizing ("I understand you", "I'll always remember you"). The stance: Agents accelerate output, but the user owns the judgment and the final decision.++Sample patterns:++- **Getting started** — "Starting with one sentence is enough. Describe your goal and I'll set up the first Agent."+- **Long run** — "Running… You can switch tasks; I'll notify you when it's done." / "This may take a few minutes. To speed up: reduce Context or switch model."+- **Failure** — "That didn't run through. Retry, or view details to fix the cause." / "Connection failed. Re-authorize in Settings, or try again later."+- **Collaboration** — "Align everyone to the same Context — every Agent in the Group works from the same page."++### Errors and exceptions++Every error states **what happened**, optionally **why**, and **what to do next**. Offer concrete recovery — Retry / View details / Go to Settings / Contact support / Copy logs — rather than a dead end. Never blame the user, never show only an error code (put codes under "Details"). For data, security, and billing, stay neutral and thorough; here warmth comes from clarity, not emotion.++## Do's and Don'ts++- **Do** read semantic tokens (`cssVar.colorText`, `cssVar.colorPrimary`, …); they adapt to the user's theme and to light/dark. **Don't** hard-code hex values from this file.+- **Do** rank information with the text-opacity scale (`colorText` → `colorTextTertiary`). **Don't** signal state with color alone — pair it with an icon or label.+- **Do** keep solid `colorPrimary` for the single most important action and for state. **Don't** spread brand color as decoration.+- **Do** design all four data states — empty, loading, error, success. **Don't** ship only the happy path.+- **Do** build light + dark and desktop + mobile for every surface. **Don't** treat mobile or dark as an afterthought.+- **Do** keep `colorBg*` (surfaces) and the text/`colorFill` scales distinct. **Don't** swap a surface token for a text token.+- **Do** reach for `@lobehub/ui/base-ui` first, then `@lobehub/ui`. **Don't** rebuild a component the system already provides.+- **Do** honor `prefers-reduced-motion` and the user's animation mode. **Don't** add long or looping animation.+- **Do** hold WCAG AA contrast (4.5:1 for body text) and show a visible `:focus-visible` ring. **Don't** remove an outline without a visible replacement.+- **Do** keep one radius family and at most two font weights per view. **Don't** mix rounded and sharp corners.diff --git a/locales/en-US/eval.json b/locales/en-US/eval.jsonindex ee76319fb23..93bbfb9b351 100644--- a/locales/en-US/eval.json+++ b/locales/en-US/eval.json@@ -3,16 +3,21 @@"benchmark.actions.delete.confirm": "Are you sure you want to delete this benchmark? Related datasets and evaluation records will also be deleted.","benchmark.actions.edit": "Edit Benchmark","benchmark.actions.export": "Export",+ "benchmark.card.bestPassRate": "Best pass rate","benchmark.card.bestScore": "Best","benchmark.card.caseCount": "{{count}} cases",+ "benchmark.card.casesLabel": "Cases","benchmark.card.datasetCount": "{{count}} datasets","benchmark.card.empty": "No evaluations yet","benchmark.card.emptyHint": "Create a new evaluation from the benchmark detail page",+ "benchmark.card.evalsLabel": "Evals","benchmark.card.importDataset": "Import Dataset","benchmark.card.noDataset": "No datasets yet","benchmark.card.noDatasetHint": "Import a dataset to start evaluating","benchmark.card.noRecentRuns": "No recent evaluations to display","benchmark.card.recentRuns": "Recent Evaluations",+ "benchmark.card.run.beforeFailure": "{{completed}}/{{total}} before failure",+ "benchmark.card.run.queued": "Queued","benchmark.card.runCount": "{{count}} evals","benchmark.card.startFirst": "Start First Evaluation","benchmark.card.viewAll": "View all {{count}}",diff --git a/locales/zh-CN/eval.json b/locales/zh-CN/eval.jsonindex 9c3b08955d1..1fc539216b0 100644--- a/locales/zh-CN/eval.json+++ b/locales/zh-CN/eval.json@@ -3,16 +3,21 @@"benchmark.actions.delete.confirm": "确定要删除此基准吗?相关数据集和评测记录也会被删除。","benchmark.actions.edit": "编辑基准","benchmark.actions.export": "导出",+ "benchmark.card.bestPassRate": "最佳通过率","benchmark.card.bestScore": "最佳","benchmark.card.caseCount": "{{count}} 个用例",+ "benchmark.card.casesLabel": "用例","benchmark.card.datasetCount": "{{count}} 个数据集","benchmark.card.empty": "暂无评测记录","benchmark.card.emptyHint": "前往基准详情页创建新的评测",+ "benchmark.card.evalsLabel": "评测","benchmark.card.importDataset": "导入数据集","benchmark.card.noDataset": "暂无数据集","benchmark.card.noDatasetHint": "导入数据集以开始评测","benchmark.card.noRecentRuns": "暂无最近的评测记录","benchmark.card.recentRuns": "最近评测",+ "benchmark.card.run.beforeFailure": "失败前完成 {{completed}}/{{total}}",+ "benchmark.card.run.queued": "排队中","benchmark.card.runCount": "{{count}} 次评测","benchmark.card.startFirst": "开始首次评测","benchmark.card.viewAll": "查看全部 {{count}} 条",diff --git a/packages/locales/src/default/eval.ts b/packages/locales/src/default/eval.tsindex 02af840e9ba..41b4bdec78c 100644--- a/packages/locales/src/default/eval.ts+++ b/packages/locales/src/default/eval.ts@@ -4,16 +4,21 @@ export default {'Are you sure you want to delete this benchmark? Related datasets and evaluation records will also be deleted.','benchmark.actions.edit': 'Edit Benchmark','benchmark.actions.export': 'Export',+ 'benchmark.card.bestPassRate': 'Best pass rate','benchmark.card.bestScore': 'Best','benchmark.card.caseCount': '{{count}} cases',+ 'benchmark.card.casesLabel': 'Cases','benchmark.card.datasetCount': '{{count}} datasets','benchmark.card.empty': 'No evaluations yet','benchmark.card.emptyHint': 'Create a new evaluation from the benchmark detail page',+ 'benchmark.card.evalsLabel': 'Evals','benchmark.card.importDataset': 'Import Dataset','benchmark.card.noDataset': 'No datasets yet','benchmark.card.noDatasetHint': 'Import a dataset to start evaluating','benchmark.card.noRecentRuns': 'No recent evaluations to display','benchmark.card.recentRuns': 'Recent Evaluations',+ 'benchmark.card.run.beforeFailure': '{{completed}}/{{total}} before failure',+ 'benchmark.card.run.queued': 'Queued','benchmark.card.runCount': '{{count}} evals','benchmark.card.startFirst': 'Start First Evaluation','benchmark.card.viewAll': 'View all {{count}}',diff --git a/src/features/DeviceManager/DeviceConnectModal.tsx b/src/features/DeviceManager/DeviceConnectModal.tsxindex 52557664879..18eed0d0331 100644--- a/src/features/DeviceManager/DeviceConnectModal.tsx+++ b/src/features/DeviceManager/DeviceConnectModal.tsx@@ -17,8 +17,8 @@ const styles = createStaticStyles(({ css }) => ({gap: 12px;align-items: center;- padding-block: 10px;- padding-inline: 14px;+ padding-block: 12px;+ padding-inline: 16px;border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadius};@@ -29,7 +29,7 @@ const styles = createStaticStyles(({ css }) => ({flex: 1;font-family: ${cssVar.fontFamilyCode};- font-size: 13px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorText};text-overflow: ellipsis;white-space: nowrap;@@ -38,9 +38,6 @@ const styles = createStaticStyles(({ css }) => ({margin-block-start: 4px;padding-block-start: 16px;border-block-start: 1px solid ${cssVar.colorBorderSecondary};-- font-size: 12px;- color: ${cssVar.colorTextTertiary};`,index: css`display: flex;@@ -52,7 +49,7 @@ const styles = createStaticStyles(({ css }) => ({height: 24px;border-radius: 50%;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};font-weight: 600;color: ${cssVar.colorPrimary};@@ -60,19 +57,12 @@ const styles = createStaticStyles(({ css }) => ({`,line: css`flex: 1;+width: 1px;margin-block-start: 4px;+background: ${cssVar.colorBorderSecondary};`,- stepDesc: css`- font-size: 13px;- line-height: 1.6;- color: ${cssVar.colorTextTertiary};- `,- subtitle: css`- font-size: 13px;- color: ${cssVar.colorTextTertiary};- `,}));interface StepProps {@@ -84,14 +74,16 @@ interface StepProps {}const Step = memo<StepProps>(({ index, title, desc, children, last }) => (- <Flexbox horizontal gap={14}>+ <Flexbox horizontal gap={16}><Flexbox align={'center'}><span className={styles.index}>{index}</span>{!last && <span className={styles.line} />}</Flexbox><Flexbox flex={1} gap={4} style={{ paddingBlockEnd: last ? 0 : 24 }}>- <Text style={{ fontSize: 14, fontWeight: 500 }}>{title}</Text>- <Text className={styles.stepDesc}>{desc}</Text>+ <Text weight={500}>{title}</Text>+ <Text color={cssVar.colorTextTertiary} lineHeight={1.6}>+ {desc}+ </Text>{children && <div style={{ marginBlockStart: 12 }}>{children}</div>}</Flexbox></Flexbox>@@ -172,7 +164,7 @@ const DeviceConnectModal = memo<DeviceConnectModalProps>(({ onClose, open, initionCancel={onClose}><Flexbox gap={20}>- <Text className={styles.subtitle}>+ <Text color={cssVar.colorTextTertiary}>{isWorkspace ? t('workspaceSetting.devices.desc') : t('devices.connectWizard.subtitle')}</Text>@@ -229,8 +221,10 @@ const DeviceConnectModal = memo<DeviceConnectModalProps>(({ onClose, open, initi)}<Flexbox horizontal align={'center'} className={styles.footer} gap={8}>- <Icon icon={ShieldCheckIcon} size={14} style={{ color: cssVar.colorPrimary }} />- {t('devices.connectWizard.footer')}+ <Icon icon={ShieldCheckIcon} size={14} style={{ color: cssVar.colorTextTertiary }} />+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('devices.connectWizard.footer')}+ </Text></Flexbox></Flexbox></Modal>diff --git a/src/features/DeviceManager/DeviceDetailPanel.tsx b/src/features/DeviceManager/DeviceDetailPanel.tsxindex 86bbc20a8ce..c76fc332603 100644--- a/src/features/DeviceManager/DeviceDetailPanel.tsx+++ b/src/features/DeviceManager/DeviceDetailPanel.tsx@@ -16,7 +16,7 @@ import {import { createStaticStyles, cssVar } from 'antd-style';import dayjs from 'dayjs';import { FolderOpenIcon, FolderPlusIcon, LockIcon, XIcon } from 'lucide-react';-import { memo, useState } from 'react';+import { memo, type ReactNode, useState } from 'react';import { useTranslation } from 'react-i18next';import DirIcon from '@/features/ChatInput/ControlBar/DirIcon';@@ -36,17 +36,29 @@ const styles = createStaticStyles(({ css }) => ({padding-inline: 20px;`,dot: css`- width: 6px;- height: 6px;+ flex: none;++ width: 8px;+ height: 8px;border-radius: 50%;`,header: css`padding-block-end: 16px;border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,- label: css`- font-size: 12px;- color: ${cssVar.colorTextTertiary};+ iconTile: css`+ display: flex;+ flex: none;+ align-items: center;+ justify-content: center;++ width: 32px;+ height: 32px;+ border-radius: ${cssVar.borderRadius};++ color: ${cssVar.colorTextSecondary};++ background: ${cssVar.colorFillTertiary};`,path: css`overflow: hidden;@@ -55,17 +67,27 @@ const styles = createStaticStyles(({ css }) => ({min-width: 0;font-family: ${cssVar.fontFamilyCode};- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};text-overflow: ellipsis;white-space: nowrap;`,recentItem: css`- padding-block: 6px;+ padding-block: 8px;padding-inline: 8px;`,}));+// Section label — one consistent treatment for every field heading in the panel.+const FieldLabel = memo<{ children: ReactNode; extra?: ReactNode }>(({ children, extra }) => (+ <Flexbox horizontal align={'center'} distribution={'space-between'}>+ <Text fontSize={12} type={'secondary'} weight={500}>+ {children}+ </Text>+ {extra}+ </Flexbox>+));+interface DeviceDetailPanelProps {device: DeviceListItem;isCurrent?: boolean;@@ -97,6 +119,7 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC// Render the device's live connections straight from `device.channels` — one// row per connection; an empty array means offline.const channels = device.channels ?? [];+ const online = channels.length > 0;// Every edit persists immediately — there is no Save button. Name and the// default cwd commit on blur; recent-dir add / remove / reorder commit on the@@ -188,12 +211,19 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onCreturn (<Flexbox className={styles.container} gap={20}>{/* ─── Header ─── */}- <Flexbox horizontal align={'center'} className={styles.header} gap={8}>- {getDeviceIcon(device.platform)}- <Text ellipsis style={{ flex: 1, minWidth: 0 }} weight={600}>- {device.friendlyName || device.hostname || device.deviceId}- </Text>- {isCurrent && <Tag>{t('devices.currentBadge')}</Tag>}+ <Flexbox horizontal align={'center'} className={styles.header} gap={12}>+ <span className={styles.iconTile}>{getDeviceIcon(device.platform, 18)}</span>+ <Flexbox flex={1} gap={2} style={{ minWidth: 0 }}>+ <Text ellipsis weight={600}>+ {device.friendlyName || device.hostname || device.deviceId}+ </Text>+ <Flexbox horizontal align={'center'} gap={8}>+ <Tag color={online ? 'success' : 'default'} size={'small'}>+ {online ? t('devices.status.online') : t('devices.status.offline')}+ </Tag>+ {isCurrent && <Tag size={'small'}>{t('devices.currentBadge')}</Tag>}+ </Flexbox>+ </Flexbox><ActionIcon icon={XIcon} size={'small'} onClick={onClose} /></Flexbox>@@ -202,9 +232,9 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC403. Only renders for workspace devices that aren't the caller's ownenrollment (personal scope is always editable). */}{!canEdit && (- <Flexbox horizontal align={'center'} gap={6}>- <Icon icon={LockIcon} size={12} style={{ color: cssVar.colorTextTertiary }} />- <Text style={{ fontSize: 12 }} type={'secondary'}>+ <Flexbox horizontal align={'center'} gap={8}>+ <Icon icon={LockIcon} size={14} style={{ color: cssVar.colorTextTertiary }} />+ <Text fontSize={12} type={'secondary'}>{t('workspaceSetting.devices.readonlyHint')}</Text></Flexbox>@@ -212,11 +242,11 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC{/* ─── Enrolled by (workspace only) ─── */}{device.scope === 'workspace' && device.enroller && (- <Flexbox gap={6}>- <span className={styles.label}>{t('workspaceSetting.devices.enrolledByLabel')}</span>+ <Flexbox gap={8}>+ <FieldLabel>{t('workspaceSetting.devices.enrolledByLabel')}</FieldLabel><Flexbox horizontal align={'center'} gap={8}><Avatar avatar={device.enroller.avatar ?? undefined} size={24} />- <Text style={{ fontSize: 13 }}>+ <Text>{device.enroller.fullName ||device.enroller.username ||t('workspaceSetting.devices.unknownEnroller')}@@ -227,27 +257,21 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC{/* ─── Connections ─── */}<Flexbox gap={8}>- <span className={styles.label}>{t('devices.detail.connections')}</span>+ <FieldLabel>{t('devices.detail.connections')}</FieldLabel>{channels.length > 0 ? (channels.map((channel, index) => (<Flexbox horizontal align={'center'} gap={8} key={`${channel.connectedAt}-${index}`}>- <span- className={styles.dot}- style={{ background: cssVar.colorSuccess, flex: 'none' }}- />+ <span className={styles.dot} style={{ background: cssVar.colorSuccess }} />{channel.channel && <Tag size={'small'}>{channel.channel}</Tag>}- <Text style={{ fontSize: 12 }} type={'secondary'}>+ <Text fontSize={12} type={'secondary'}>{t('devices.channel.connected', { time: dayjs(channel.connectedAt).fromNow() })}</Text></Flexbox>))) : (<Flexbox horizontal align={'center'} gap={8}>- <span- className={styles.dot}- style={{ background: cssVar.colorTextQuaternary, flex: 'none' }}- />- <Text style={{ fontSize: 12 }} type={'secondary'}>+ <span className={styles.dot} style={{ background: cssVar.colorTextQuaternary }} />+ <Text fontSize={12} type={'secondary'}>{t('devices.status.offline')} ·{' '}{t('devices.lastSeen', { time: dayjs(device.lastSeen).fromNow() })}</Text>@@ -256,8 +280,8 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC</Flexbox>{/* ─── Name ─── */}- <Flexbox gap={6}>- <span className={styles.label}>{t('devices.edit.friendlyName')}</span>+ <Flexbox gap={8}>+ <FieldLabel>{t('devices.edit.friendlyName')}</FieldLabel>{canEdit ? (<Inputplaceholder={t('devices.edit.friendlyNamePlaceholder')}@@ -269,17 +293,15 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC) : device.friendlyName ? (// Read-only: render the canonical value (not the local draft), so a// value the caller can't actually commit never bleeds through.- <Text style={{ fontSize: 13 }}>{device.friendlyName}</Text>+ <Text>{device.friendlyName}</Text>) : (- <Text style={{ fontSize: 13 }} type={'secondary'}>- —- </Text>+ <Text type={'secondary'}>—</Text>)}</Flexbox>{/* ─── Default working directory ─── */}- <Flexbox gap={6}>- <span className={styles.label}>{t('devices.edit.defaultCwd')}</span>+ <Flexbox gap={8}>+ <FieldLabel>{t('devices.edit.defaultCwd')}</FieldLabel>{canEdit ? (<Flexbox horizontal gap={8}><Input@@ -300,27 +322,28 @@ const DeviceDetailPanel = memo<DeviceDetailPanelProps>(({ device, isCurrent, onC// to the same dash style as Name so the two fields look consistent.<Text className={styles.path}>{device.defaultCwd}</Text>) : (- <Text style={{ fontSize: 13 }} type={'secondary'}>- —- </Text>+ <Text type={'secondary'}>—</Text>)}</Flexbox>{/* ─── Recent directories ─── */}- <Flexbox gap={6}>- <Flexbox horizontal align={'center'} distribution={'space-between'}>- <span className={styles.label}>{t('devices.detail.recentDirs')}</span>- {canEdit && (- <ActionIcon- icon={FolderPlusIcon}- size={'small'}- title={t('devices.detail.addDir')}- onClick={handleAddRecent}- />- )}- </Flexbox>+ <Flexbox gap={8}>+ <FieldLabel+ extra={+ canEdit && (+ <ActionIcon+ icon={FolderPlusIcon}+ size={'small'}+ title={t('devices.detail.addDir')}+ onClick={handleAddRecent}+ />+ )+ }+ >+ {t('devices.detail.recentDirs')}+ </FieldLabel>{device.workingDirs.length === 0 ? (- <Text style={{ fontSize: 12 }} type={'secondary'}>+ <Text fontSize={12} type={'secondary'}>{t('devices.detail.noRecent')}</Text>) : canEdit ? (diff --git a/src/features/DeviceManager/DeviceItem.tsx b/src/features/DeviceManager/DeviceItem.tsxindex 40e8e7f2301..30bf415f3f6 100644--- a/src/features/DeviceManager/DeviceItem.tsx+++ b/src/features/DeviceManager/DeviceItem.tsx@@ -26,40 +26,102 @@ import { getDeviceIcon } from './getDeviceIcon';import { useCanEditDevice } from './useCanEditDevice';const styles = createStaticStyles(({ css }) => ({+ // Code-font cwd line; truncates rather than wrapping so a deep path keeps the+ // row at one line.cwd: css`overflow: hidden;font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};text-overflow: ellipsis;white-space: nowrap;`,- dotOffline: css`- width: 6px;- height: 6px;- border-radius: 50%;- background: ${cssVar.colorTextQuaternary};- `,- dotOnline: css`- width: 6px;- height: 6px;- border-radius: 50%;- background: ${cssVar.colorSuccess};+ // The icon tile doubles as the bulk-select target: the platform glyph by+ // default, a checkbox layered over the same 36px box on hover / when ticked /+ // when any row is ticked — so toggling selection never shifts the layout.+ iconGlyph: css`+ display: flex;+ align-items: center;+ justify-content: center;++ width: 100%;+ height: 100%;++ color: ${cssVar.colorTextSecondary};++ transition: opacity 0.15s ease;`,- icon: css`+ iconTile: css`+ position: relative;+flex: none;- color: ${cssVar.colorTextSecondary};++ width: 36px;+ height: 36px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillTertiary};+ `,+ selectOverlay: css`+ position: absolute;+ inset: 0;++ display: flex;+ align-items: center;+ justify-content: center;++ opacity: 0;++ transition: opacity 0.15s ease;`,row: css`cursor: pointer;padding-block: 12px;padding-inline: 12px;- border-radius: ${cssVar.borderRadiusLG};+ border-radius: ${cssVar.borderRadius};- transition: background 0.2s;+ transition: background 0.15s ease;&:hover {background: ${cssVar.colorFillTertiary};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;++ .deviceGlyph,+ .deviceSelect {+ transition: none;+ }+ }+ `,+ // Only rows the user can bulk-select swap the glyph for a checkbox. Scoping+ // the swap here (not on `.row`) keeps the platform icon visible on hover for+ // non-editable rows, which have no checkbox to reveal.+ selectable: css`+ &:hover .deviceGlyph {+ opacity: 0;+ }++ &:hover .deviceSelect {+ opacity: 1;+ }+ `,+ // When selection is active (this row ticked, or any sibling ticked) the+ // checkbox stays shown and the glyph stays hidden, independent of hover.+ selectOn: css`+ .deviceGlyph {+ opacity: 0;+ }++ .deviceSelect {+ opacity: 1;+ }`,rowActive: css`background: ${cssVar.colorFillSecondary};@@ -68,6 +130,20 @@ const styles = createStaticStyles(({ css }) => ({background: ${cssVar.colorFillSecondary};}`,+ statusOffline: css`+ width: 8px;+ height: 8px;+ border: 1.5px solid ${cssVar.colorTextQuaternary};+ border-radius: 50%;+ `,+ statusOnline: css`+ width: 8px;+ height: 8px;+ border-radius: 50%;++ background: ${cssVar.colorSuccess};+ box-shadow: 0 0 0 3px ${cssVar.colorSuccessBg};+ `,}));interface DeviceItemProps {@@ -79,10 +155,12 @@ interface DeviceItemProps {onCheckChange?: (checked: boolean) => void;onSelect: () => void;selected?: boolean;+ /** True when any editable row in the list is ticked — keeps every checkbox shown. */+ selectionActive?: boolean;}const DeviceItem = memo<DeviceItemProps>(- ({ checked, device, isCurrent, onCheckChange, onSelect, selected }) => {+ ({ checked, device, isCurrent, onCheckChange, onSelect, selected, selectionActive }) => {const { t } = useTranslation('setting');const canEdit = useCanEditDevice()(device);@@ -109,6 +187,10 @@ const DeviceItem = memo<DeviceItemProps>(}): t('devices.lastSeen', { time: dayjs(device.lastSeen).fromNow() });+ // Keep the checkbox/glyph swap pinned open when selection is active so it+ // reads as a stable mode rather than a hover-only affordance.+ const pinSelect = !!onCheckChange && (checked || selectionActive);+const handleRemove = () =>confirmModal({content: t('devices.remove.confirmDesc'),@@ -123,33 +205,51 @@ const DeviceItem = memo<DeviceItemProps>(return (<Flexboxhorizontal- align={'flex-start'}- className={cx(styles.row, selected && styles.rowActive)}+ align={'center'}+ aria-pressed={selected}+ className={cx(+ styles.row,+ selected && styles.rowActive,+ onCheckChange && styles.selectable,+ pinSelect && styles.selectOn,+ )}gap={12}+ role={'button'}+ tabIndex={0}onClick={onSelect}+ onKeyDown={(e) => {+ // Mirror native button keyboard semantics for the div-as-button row.+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ onSelect();+ }+ }}>- {onCheckChange && (- <span- style={{ marginBlockStart: 2 }}- onClick={(e) => {- // Ticking a row is a bulk-select action, not a "open detail" click.- e.stopPropagation();- onCheckChange(!checked);- }}- >- <Checkbox checked={checked} />+ <div className={styles.iconTile}>+ <span className={cx(styles.iconGlyph, 'deviceGlyph')}>+ {getDeviceIcon(device.platform)}</span>- )}- <span className={styles.icon} style={{ marginBlockStart: 2 }}>- {getDeviceIcon(device.platform)}- </span>+ {onCheckChange && (+ <span+ className={cx(styles.selectOverlay, 'deviceSelect')}+ onClick={(e) => {+ // Ticking a row is a bulk-select action, not an "open detail" click.+ e.stopPropagation();+ onCheckChange(!checked);+ }}+ >+ <Checkbox checked={checked} />+ </span>+ )}+ </div>+<Flexbox flex={1} gap={2} style={{ minWidth: 0 }}><Flexbox horizontal align={'center'} gap={8}><Text ellipsis weight={500}>{displayName}</Text><Tooltip title={statusTooltip}>- <span className={online ? styles.dotOnline : styles.dotOffline} />+ <span className={online ? styles.statusOnline : styles.statusOffline} /></Tooltip>{isCurrent && <Tag>{t('devices.currentBadge')}</Tag>}{isFallback && (@@ -159,19 +259,16 @@ const DeviceItem = memo<DeviceItemProps>()}</Flexbox>{device.defaultCwd && (- <Flexbox horizontal align={'center'} gap={6}>+ <Flexbox horizontal align={'center'} gap={8} style={{ minWidth: 0 }}><Icon icon={FolderIcon} size={12} style={{ color: cssVar.colorTextQuaternary }} />- <Text className={styles.cwd} style={{ fontSize: 12 }} type={'secondary'}>+ <Text className={styles.cwd} type={'secondary'}>{device.defaultCwd}</Text></Flexbox>)}</Flexbox>- {/* Right cluster — avatar + dropdown stay vertically centered with the- first text row (the name) regardless of whether the row also shows- a cwd line below it. Without this, the larger avatar pushes itself- down relative to the smaller dropdown icon under `flex-start`. */}- <Flexbox horizontal align={'center'} gap={8} style={{ flex: 'none', marginBlockStart: 2 }}>++ <Flexbox horizontal align={'center'} gap={8} style={{ flex: 'none' }}>{device.scope === 'workspace' && device.enroller && (// Enroller avatar — the at-a-glance "who put this here" answer for// shared workspace pools. Hidden in personal scope (always thediff --git a/src/features/DeviceManager/DeviceManager.tsx b/src/features/DeviceManager/DeviceManager.tsxindex b3762fb0e39..ae7bcbf5970 100644--- a/src/features/DeviceManager/DeviceManager.tsx+++ b/src/features/DeviceManager/DeviceManager.tsx@@ -11,7 +11,6 @@ import {type LucideIcon,MonitorDownIcon,ServerIcon,- ShieldCheckIcon,TerminalIcon,Trash2Icon,ZapIcon,@@ -32,12 +31,13 @@ import DeviceItem from './DeviceItem';import { useCanEditDevice } from './useCanEditDevice';const styles = createStaticStyles(({ css }) => ({+ // ─── Onboarding empty state ───badge: css`padding-block: 1px;padding-inline: 8px;border-radius: 999px;- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;color: ${cssVar.colorPrimary};@@ -49,12 +49,6 @@ const styles = createStaticStyles(({ css }) => ({border-radius: ${cssVar.borderRadiusLG};background: ${cssVar.colorBgContainer};-- transition: border-color 0.2s;-- &:hover {- border-color: ${cssVar.colorPrimaryBorder};- }`,capabilityIcon: css`display: flex;@@ -65,20 +59,15 @@ const styles = createStaticStyles(({ css }) => ({height: 36px;border-radius: ${cssVar.borderRadius};- color: ${cssVar.colorText};+ color: ${cssVar.colorTextSecondary};- background: ${cssVar.colorFillSecondary};- `,- detailCol: css`- align-self: stretch;- min-width: 0;- border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: ${cssVar.borderRadiusLG};+ background: ${cssVar.colorFillTertiary};`,emptyCard: css`overflow: hidden;border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadiusLG};+background: ${cssVar.colorBgContainer};`,emptyHero: css`@@ -99,45 +88,37 @@ const styles = createStaticStyles(({ css }) => ({height: 56px;border-radius: ${cssVar.borderRadiusLG};- color: ${cssVar.colorPrimary};-- background: ${cssVar.colorPrimaryBg};- `,- listCol: css`- min-width: 0;- border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: ${cssVar.borderRadiusLG};- `,- listHeader: css`- padding-block: 8px;- padding-inline: 12px;- border-block-end: 1px solid ${cssVar.colorBorderSecondary};- `,- listScroll: css`- overflow-y: auto;+ color: ${cssVar.colorText};- /* Cap the list so long fleets (servers / CLI agents) stay scrollable instead- of pushing the page — pairs with the detail panel sitting beside it. */- max-height: 480px;- `,- selectAll: css`- cursor: pointer;- user-select: none;+ background: ${cssVar.colorFillSecondary};`,option: css`cursor: pointer;+padding: 20px;+background: ${cssVar.colorBgContainer};- transition: background 0.2s;++ transition: background 0.15s ease;&:hover {- background: ${cssVar.colorFillQuaternary};+ background: ${cssVar.colorFillTertiary};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;}`,optionGrid: css`display: grid;grid-template-columns: 1fr 1fr;gap: 1px;+background: ${cssVar.colorBorderSecondary};`,optionIcon: css`@@ -152,11 +133,43 @@ const styles = createStaticStyles(({ css }) => ({color: ${cssVar.colorTextSecondary};- background: ${cssVar.colorFillSecondary};+ background: ${cssVar.colorFillTertiary};`,- subtitle: css`- font-size: 13px;- color: ${cssVar.colorTextTertiary};+ // ─── Master-detail surfaces ───+ detailCol: css`+ align-self: stretch;++ min-width: 0;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorBgContainer};+ `,+ listCol: css`+ overflow: hidden;++ min-width: 0;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorBgContainer};+ `,+ listHeader: css`+ min-height: 44px;+ padding-block: 8px;+ padding-inline: 12px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ listScroll: css`+ overflow-y: auto;++ /* Cap the list so long fleets (servers / CLI agents) stay scrollable instead+ of pushing the page — pairs with the detail panel sitting beside it. */+ max-height: 480px;+ `,+ selectAll: css`+ cursor: pointer;+ user-select: none;`,}));@@ -169,16 +182,30 @@ interface ConnectOptionProps {}const ConnectOption = memo<ConnectOptionProps>(({ icon, title, desc, badge, onClick }) => (- <Flexbox horizontal align={'flex-start'} className={styles.option} gap={14} onClick={onClick}>+ <Flexbox+ horizontal+ align={'flex-start'}+ className={styles.option}+ gap={16}+ role={'button'}+ tabIndex={0}+ onClick={onClick}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ onClick();+ }+ }}+ ><span className={styles.optionIcon}><Icon icon={icon} size={20} /></span>- <Flexbox flex={1} gap={2}>+ <Flexbox flex={1} gap={4} style={{ minWidth: 0 }}><Flexbox horizontal align={'center'} gap={8}>- <Text style={{ fontSize: 14, fontWeight: 500 }}>{title}</Text>+ <Text weight={500}>{title}</Text>{badge && <span className={styles.badge}>{badge}</span>}</Flexbox>- <Text className={styles.subtitle} style={{ fontSize: 12 }}>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>{desc}</Text></Flexbox>@@ -207,19 +234,18 @@ const Capabilities = memo(() => {];return (<Flexbox gap={16}>- <Flexbox horizontal align={'center'} gap={8}>- <Icon icon={ShieldCheckIcon} size={16} style={{ color: cssVar.colorPrimary }} />- <Text style={{ fontSize: 14, fontWeight: 500 }}>{t('devices.capabilities.title')}</Text>- </Flexbox>+ <Text fontSize={12} type={'secondary'} weight={500}>+ {t('devices.capabilities.title')}+ </Text><Flexbox horizontal gap={16}>{items.map((cap) => (<Flexbox className={styles.capabilityCard} flex={1} gap={12} key={cap.title}><span className={styles.capabilityIcon}><Icon icon={cap.icon} size={18} /></span>- <Flexbox gap={2}>- <Text style={{ fontSize: 14, fontWeight: 500 }}>{cap.title}</Text>- <Text className={styles.subtitle} style={{ fontSize: 12 }}>+ <Flexbox gap={4}>+ <Text weight={500}>{cap.title}</Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>{cap.desc}</Text></Flexbox>@@ -230,6 +256,27 @@ const Capabilities = memo(() => {);});+// Loading placeholder that reuses the list-card chrome and only skeletonises the+// row text — loading → loaded is a content swap, not a relayout (ux §4.1).+const ListSkeleton = memo(() => (+ <Flexbox className={styles.listCol} flex={1}>+ <Flexbox horizontal align={'center'} className={styles.listHeader}>+ <Skeleton.Button active size={'small'} style={{ height: 16, minWidth: 80, width: 80 }} />+ </Flexbox>+ <Flexbox gap={2} padding={4}>+ {[0, 1, 2, 3].map((i) => (+ <Flexbox horizontal align={'center'} gap={12} key={i} style={{ padding: 12 }}>+ <Skeleton.Avatar active shape={'square'} size={36} />+ <Flexbox flex={1} gap={8}>+ <Skeleton.Button active size={'small'} style={{ height: 14, width: 140 }} />+ <Skeleton.Button active size={'small'} style={{ height: 12, width: 200 }} />+ </Flexbox>+ </Flexbox>+ ))}+ </Flexbox>+ </Flexbox>+));+interface DeviceManagerProps {/** Open the enrollment wizard (the modal is owned by the route, by the header button). */onConnect: (tab?: 'cli' | 'desktop') => void;@@ -281,7 +328,7 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {// Hook must run before any early return so render order stays stable.const canEditDevice = useCanEditDevice();- if (isLoading) return <Skeleton active paragraph={{ rows: 4 }} title={false} />;+ if (isLoading) return <ListSkeleton />;// ─── Empty state: onboarding hero + connect options + capabilities ───if (devices.length === 0) {@@ -292,10 +339,10 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {<span className={styles.heroIcon}><Icon icon={isWorkspace ? ServerIcon : MonitorDownIcon} size={28} /></span>- <Text style={{ fontSize: 18, fontWeight: 600 }}>+ <Text fontSize={18} weight={600}>{t(isWorkspace ? 'workspaceSetting.devices.heroTitle' : 'devices.empty.title')}</Text>- <Text className={styles.subtitle} style={{ maxWidth: 440 }}>+ <Text style={{ maxWidth: 440 }} type={'secondary'}>{t(isWorkspace ? 'workspaceSetting.devices.heroDesc' : 'devices.empty.desc')}</Text></Flexbox>@@ -339,6 +386,7 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {const checkedCount = editableDevices.filter((d) => checkedIds.has(d.deviceId)).length;const allChecked = editableDevices.length > 0 && checkedCount === editableDevices.length;const someChecked = checkedCount > 0 && !allChecked;+ const selectionActive = checkedCount > 0;const toggleChecked = (deviceId: string, next: boolean) =>setCheckedIds((prev) => {@@ -387,13 +435,13 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {{editableDevices.length > 0 && (<Checkbox checked={allChecked} indeterminate={someChecked} />)}- <Text style={{ fontSize: 13 }} type={'secondary'}>- {checkedCount > 0+ <Text fontSize={12} type={'secondary'} weight={500}>+ {selectionActive? t('devices.selection.selected', { count: checkedCount }): t('devices.selection.total', { count: devices.length })}</Text></Flexbox>- {checkedCount > 0 && (+ {selectionActive && (<Buttondangericon={<Icon icon={Trash2Icon} />}@@ -405,7 +453,7 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {</Button>)}</Flexbox>- <Flexbox className={styles.listScroll} padding={4}>+ <Flexbox className={styles.listScroll} gap={2} padding={4}>{devices.map((device) => {const editable = canEditDevice(device);return (@@ -415,6 +463,7 @@ const DeviceManager = memo<DeviceManagerProps>(({ onConnect, scope }) => {isCurrent={isCurrent(device.deviceId)}key={device.deviceId}selected={device.deviceId === selectedId}+ selectionActive={selectionActive}// Withholding the handler also withholds the checkbox; non-// editable rows render without a tick so bulk selection only// ever includes devices the server would accept.diff --git a/src/routes/(main)/eval/_layout/Sidebar/Body/BenchmarkList.tsx b/src/routes/(main)/eval/_layout/Sidebar/Body/BenchmarkList.tsxindex ea3ea205242..62d0e8f33b6 100644--- a/src/routes/(main)/eval/_layout/Sidebar/Body/BenchmarkList.tsx+++ b/src/routes/(main)/eval/_layout/Sidebar/Body/BenchmarkList.tsx@@ -65,7 +65,7 @@ const BenchmarkList = memo<BenchmarkListProps>(({ activeKey, itemKey }) => {{t('sidebar.benchmarks')}</Text>{benchmarkList.length > 0 && (- <Text fontSize={11} type="secondary">+ <Text fontSize={12} type="secondary">{benchmarkList.length}</Text>)}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/DatasetList.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/DatasetList.tsxindex 8618c711654..3fd215d2489 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/DatasetList.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/DatasetList.tsx@@ -34,7 +34,7 @@ const DatasetList = memo<DatasetListProps>(({ activeKey, benchmarkId, itemKey }){t('sidebar.datasets')}</Text>{datasetList.length > 0 && (- <Text fontSize={11} type="secondary">+ <Text fontSize={12} type="secondary">{datasetList.length}</Text>)}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/RunList.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/RunList.tsxindex a44830de60a..19f83d5f773 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/RunList.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Body/RunList.tsx@@ -65,7 +65,7 @@ const RunList = memo<RunListProps>(({ activeKey, benchmarkId, itemKey }) => {{t('sidebar.runs')}</Text>{runList.length > 0 && (- <Text fontSize={11} type="secondary">+ <Text fontSize={12} type="secondary">{runList.length}</Text>)}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Header/BenchmarkHead.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Header/BenchmarkHead.tsxindex d95191a31ed..4155b421556 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Header/BenchmarkHead.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/_layout/Sidebar/Header/BenchmarkHead.tsx@@ -10,7 +10,7 @@ import {stopPropagation,Text,} from '@lobehub/ui';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import {Activity,Award,@@ -93,7 +93,7 @@ const BenchmarkHead = memo<{ id: string }>(({ id }) => {key: b.id,label: b.name,onClick: () => handleBenchmarkSwitch(b.id),- style: b.id === id ? { backgroundColor: 'var(--ant-control-item-bg-active)' } : {},+ style: b.id === id ? { backgroundColor: cssVar.controlItemBgActive } : {},}));}, [benchmarkList, handleBenchmarkSwitch, id, styles.menuIcon]);diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/datasets/[datasetId]/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/datasets/[datasetId]/index.tsxindex 770813521e5..91cfa280c0a 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/datasets/[datasetId]/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/datasets/[datasetId]/index.tsx@@ -1,8 +1,9 @@'use client';-import { Button, Flexbox } from '@lobehub/ui';+import { Button, Flexbox, Text } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';-import { App, Typography } from 'antd';+import { App } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import { ArrowLeft, Database, Pencil, Plus, Trash2 } from 'lucide-react';import { memo, useCallback, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -15,6 +16,7 @@ import { runSelectors, useEvalStore } from '@/store/eval';import { createDatasetEditModal } from '../../../../features/DatasetEditModal';import { createDatasetImportModal } from '../../../../features/DatasetImportModal';+import SegmentBar from '../../../../features/SegmentBar';import { createTestCaseCreateModal } from '../../../../features/TestCaseCreateModal';import { createTestCaseEditModal } from '../../../../features/TestCaseEditModal';import TestCasePreviewPanel from '../../features/DatasetsTab/TestCasePreviewPanel';@@ -23,6 +25,72 @@ import { createRunCreateModal } from '../../features/RunCreateModal';import EmptyState from '../../features/RunsTab/EmptyState';import RunCard from '../../features/RunsTab/RunCard';+const styles = createStaticStyles(({ css }) => ({+ backLink: css`+ display: inline-flex;+ gap: 4px;+ align-items: center;++ width: fit-content;++ font-size: ${cssVar.fontSize};+ color: ${cssVar.colorTextTertiary};+ text-decoration: none;++ transition: color 0.15s ease;++ &:hover {+ color: ${cssVar.colorText};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ header: css`+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;++ width: 40px;+ height: 40px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorPrimaryBg};+ `,+ // Summary hero — leads the dataset detail with its headline case count as a+ // large mono figure, mirroring the benchmark/run result heroes.+ heroBand: css`+ padding: 20px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};+ `,+ heroValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading2};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ summaryDot: css`+ width: 8px;+ height: 8px;+ border-radius: 999px;+ `,+ tableWrapper: css`+ overflow: hidden;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};+ `,+}));+const DatasetDetail = memo(() => {const { t } = useTranslation('eval');const { benchmarkId, datasetId } = useParams<{ benchmarkId: string; datasetId: string }>();@@ -67,6 +135,24 @@ const DatasetDetail = memo(() => {return true;});+ // Difficulty mix across the loaded cases — feeds the summary hero's bar.+ const difficulty = useMemo(() => {+ const counts = { easy: 0, hard: 0, medium: 0 };+ for (const c of testCases as any[]) {+ const d = c?.metadata?.difficulty as 'easy' | 'hard' | 'medium' | undefined;+ if (d === 'easy' || d === 'medium' || d === 'hard') counts[d] += 1;+ }+ return {+ counts,+ segments: [+ { color: cssVar.colorSuccess, value: counts.easy },+ { color: cssVar.colorWarning, value: counts.medium },+ { color: cssVar.colorError, value: counts.hard },+ ],+ tagged: counts.easy + counts.medium + counts.hard,+ };+ }, [testCases]);+const handleRefresh = useCallback(async () => {if (datasetId) {await refreshTestCases(datasetId);@@ -124,25 +210,7 @@ const DatasetDetail = memo(() => {style={{ minWidth: 0, overflow: 'auto', paddingBlock: 24, paddingInline: 32 }}>{/* Back link */}- <WorkspaceLink- to={`/eval/bench/${benchmarkId}`}- style={{- alignItems: 'center',- color: 'var(--ant-color-text-tertiary)',- display: 'inline-flex',- fontSize: 14,- gap: 4,- textDecoration: 'none',- transition: 'color 0.2s',- width: 'fit-content',- }}- onMouseEnter={(e) => {- e.currentTarget.style.color = 'var(--ant-color-text)';- }}- onMouseLeave={(e) => {- e.currentTarget.style.color = 'var(--ant-color-text-tertiary)';- }}- >+ <WorkspaceLink className={styles.backLink} to={`/eval/bench/${benchmarkId}`}><ArrowLeft size={16} />{t('dataset.detail.backToBenchmark')}</WorkspaceLink>@@ -150,27 +218,14 @@ const DatasetDetail = memo(() => {{/* Header */}<Flexbox horizontal align="start" justify="space-between"><Flexbox horizontal align="start" gap={12}>- <div- style={{- alignItems: 'center',- background: 'var(--ant-color-primary-bg)',- borderRadius: 10,- display: 'flex',- flexShrink: 0,- height: 40,- justifyContent: 'center',- width: 40,- }}- >- <Database size={20} style={{ color: 'var(--ant-color-primary)' }} />+ <div className={styles.header}>+ <Database size={20} style={{ color: cssVar.colorPrimary }} /></div><Flexbox gap={4}>- <Typography.Title level={4} style={{ margin: 0 }}>+ <Text as="h4" style={{ fontSize: 20, fontWeight: 600, margin: 0 }}>{dataset.name}- </Typography.Title>- {dataset.description && (- <Typography.Text type="secondary">{dataset.description}</Typography.Text>- )}+ </Text>+ {dataset.description && <Text type="secondary">{dataset.description}</Text>}</Flexbox></Flexbox>@@ -189,22 +244,55 @@ const DatasetDetail = memo(() => {</Flexbox></Flexbox>+ {/* Summary hero — headline case count + difficulty mix */}+ <Flexbox+ horizontal+ align="center"+ className={styles.heroBand}+ gap={16}+ justify="space-between"+ >+ <Flexbox gap={6}>+ <span className={styles.heroValue}>{total}</span>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('dataset.detail.testCases')}+ </Text>+ </Flexbox>+ {difficulty.tagged > 0 && (+ <Flexbox gap={8} style={{ maxWidth: 280, minWidth: 0, width: '100%' }}>+ <SegmentBar segments={difficulty.segments} />+ <Flexbox horizontal gap={12} justify="flex-end" style={{ flexWrap: 'wrap' }}>+ {(['easy', 'medium', 'hard'] as const).map((d) => (+ <Flexbox horizontal align="center" gap={6} key={d}>+ <span+ className={styles.summaryDot}+ style={{+ background:+ d === 'easy'+ ? cssVar.colorSuccess+ : d === 'medium'+ ? cssVar.colorWarning+ : cssVar.colorError,+ }}+ />+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t(`difficulty.${d}`)} {difficulty.counts[d]}+ </Text>+ </Flexbox>+ ))}+ </Flexbox>+ </Flexbox>+ )}+ </Flexbox>+{/* Test Cases */}<Flexbox gap={12}><Flexbox horizontal align="center" justify="space-between">- <Typography.Text strong>{t('dataset.detail.testCases')}</Typography.Text>- <Typography.Text type="secondary">- {t('dataset.detail.caseCount', { count: total })}- </Typography.Text>+ <Text weight={600}>{t('dataset.detail.testCases')}</Text>+ <Text type="secondary">{t('dataset.detail.caseCount', { count: total })}</Text></Flexbox>- <div- style={{- border: '1px solid var(--ant-color-border-secondary)',- borderRadius: 8,- overflow: 'hidden',- }}- >+ <div className={styles.tableWrapper}><TestCaseTabledatasetEvalMode={dataset?.evalMode}diffFilter={diffFilter}@@ -240,9 +328,9 @@ const DatasetDetail = memo(() => {{/* Related Runs */}<Flexbox gap={12}><Flexbox horizontal align="center" justify="space-between">- <Typography.Text strong>+ <Text weight={600}>{t('dataset.detail.relatedRuns', { count: sortedRuns.length })}- </Typography.Text>+ </Text><Buttonicon={Plus}size="small"diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/BenchmarkHeader/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/BenchmarkHeader/index.tsxindex 72f876ab1ce..0addaf9222b 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/BenchmarkHeader/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/BenchmarkHeader/index.tsx@@ -2,9 +2,8 @@import type { AgentEvalRunListItem } from '@lobechat/types';import { formatCost } from '@lobechat/utils';-import { Button, type DropdownItem, DropdownMenu, Flexbox, Icon } from '@lobehub/ui';+import { Button, type DropdownItem, DropdownMenu, Flexbox, Icon, Text } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';-import { Badge } from 'antd';import { createStaticStyles, cssVar } from 'antd-style';import {CircleDollarSign,@@ -25,21 +24,29 @@ import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwarimport { useEvalStore } from '@/store/eval';import { createBenchmarkEditModal } from '../../../../features/BenchmarkEditModal';+import Sparkline from '../../../../features/Sparkline';import { formatDuration, formatDurationMinutes } from '../../../../utils';const RANK_COLORS = [cssVar.colorPrimary, cssVar.colorSuccess, cssVar.colorTextQuaternary];const styles = createStaticStyles(({ css, cssVar }) => ({- bestPerformance: css`- margin: 0;- margin-block-start: 4px;- font-size: 13px;- color: ${cssVar.colorTextSecondary};+ heroBand: css`+ padding: 20px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};+ `,+ heroValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading1};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};`,description: css`margin: 0;margin-block-start: 2px;- font-size: 14px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextTertiary};`,iconBox: css`@@ -50,15 +57,15 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 40px;height: 40px;- border-radius: 10px;+ border-radius: ${cssVar.borderRadiusLG};`,statCard: css`flex: 1;min-width: 0;padding: 16px;- border: 1px solid ${cssVar.colorBorder};- border-radius: 8px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};`,statIcon: css`display: flex;@@ -67,11 +74,16 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 36px;height: 36px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};+ `,+ statLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 600;+ color: ${cssVar.colorTextSecondary};`,title: css`margin: 0;- font-size: 24px;+ font-size: ${cssVar.fontSizeHeading3};font-weight: 600;color: ${cssVar.colorText};`,@@ -161,6 +173,16 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(// Best agent for the summary lineconst bestAgent = topAgents.length > 0 ? topAgents[0] : null;+ // Pass-rate trend across completed runs (reversed to read oldest→newest) for+ // the hero sparkline; the best rate anchors the headline number.+ const passRateTrend = useMemo(() => {+ const rates = completedRuns+ .map((r) => r.passRate ?? r.metrics?.passRate)+ .filter((v): v is number => typeof v === 'number');+ return rates.reverse();+ }, [completedRuns]);+ const bestPassRate = passRateTrend.length > 0 ? Math.max(...passRateTrend) : undefined;+// Avg Durationconst avgDuration = useMemo(() => {if (!hasCompletedRuns) return null;@@ -233,15 +255,31 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(</Flexbox></Flexbox>- {/* Best Performance Summary */}- {bestAgent && (- <p className={styles.bestPerformance}>- {t('benchmark.detail.stats.bestPerformance', {- agent: bestAgent.name,- passRate: (bestAgent.avgPassRate * 100).toFixed(1),- })}- </p>- )}+ {/* Results hero — headline best pass rate + trend across completed runs.+ Always rendered (shows a muted dash before the first completed run) so+ the benchmark always leads with its outcome. */}+ <Flexbox+ horizontal+ align={'center'}+ className={styles.heroBand}+ gap={16}+ justify={'space-between'}+ >+ <Flexbox gap={6}>+ <span className={styles.heroValue}>+ {bestPassRate !== undefined ? `${(bestPassRate * 100).toFixed(0)}%` : '—'}+ </span>+ <Text color={cssVar.colorTextSecondary} fontSize={14}>+ {bestAgent+ ? t('benchmark.detail.stats.bestPerformance', {+ agent: bestAgent.name,+ passRate: (bestAgent.avgPassRate * 100).toFixed(1),+ })+ : t('benchmark.card.bestPassRate')}+ </Text>+ </Flexbox>+ {passRateTrend.length > 1 && <Sparkline values={passRateTrend} width={220} />}+ </Flexbox>{/* Stats Cards */}<Flexbox horizontal gap={12}>@@ -252,14 +290,7 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<div className={styles.statIcon} style={{ background: cssVar.colorWarningBg }}><Trophy size={16} style={{ color: cssVar.colorWarning }} /></div>- <span- style={{- color: cssVar.colorTextSecondary,- fontSize: 13,- fontWeight: 600,- textTransform: 'uppercase',- }}- >+ <span className={styles.statLabel} style={{ textTransform: 'uppercase' }}>{t('benchmark.detail.stats.topAgents')}</span></Flexbox>@@ -268,8 +299,8 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorTextQuaternary,- fontSize: 20,- fontWeight: 'bold',+ fontSize: cssVar.fontSizeXL,+ fontWeight: 600,}}>--@@ -281,13 +312,13 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorTextQuaternary,- fontSize: 20,- fontWeight: 'bold',+ fontSize: cssVar.fontSizeXL,+ fontWeight: 600,}}>{t('benchmark.detail.stats.waiting')}</span>- <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: cssVar.fontSizeSM }}>{t('benchmark.detail.stats.noEvalRecord')}</span></Flexbox>@@ -301,7 +332,8 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: RANK_COLORS[idx] || RANK_COLORS[2],- fontSize: 12,+ fontFamily: cssVar.fontFamilyCode,+ fontSize: cssVar.fontSizeSM,fontWeight: 600,minWidth: 14,textAlign: 'center',@@ -312,7 +344,7 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorText,- fontSize: 13,+ fontSize: cssVar.fontSize,fontWeight: 500,}}>@@ -322,7 +354,8 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorTextSecondary,- fontSize: 13,+ fontFamily: cssVar.fontFamilyCode,+ fontSize: cssVar.fontSize,}}>{(agent.avgPassRate * 100).toFixed(1)}%@@ -341,24 +374,22 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<div className={styles.statIcon} style={{ background: cssVar.colorPrimaryBg }}><Layers size={16} style={{ color: cssVar.colorPrimary }} /></div>- <span- style={{- color: cssVar.colorTextSecondary,- fontSize: 13,- fontWeight: 600,- }}- >+ <span className={styles.statLabel}>{t('benchmark.detail.stats.dataScale')}</span>{totalCases === 0 && (- <Badge- count={t('benchmark.detail.stats.needSetup')}+ <spanstyle={{backgroundColor: cssVar.colorWarningBg,+ borderRadius: cssVar.borderRadiusXS,color: cssVar.colorWarning,- fontSize: 11,+ fontSize: cssVar.fontSizeSM,+ paddingBlock: 2,+ paddingInline: 8,}}- />+ >+ {t('benchmark.detail.stats.needSetup')}+ </span>)}</Flexbox>@@ -367,22 +398,25 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorText,- fontSize: 24,- fontWeight: 'bold',+ fontFamily: cssVar.fontFamilyCode,+ fontSize: cssVar.fontSizeHeading3,+ fontWeight: 600,}}>{totalCases}</span>{totalCases > 0 && (- <span style={{ color: cssVar.colorTextTertiary, fontSize: 13 }}>Cases</span>+ <span style={{ color: cssVar.colorTextTertiary, fontSize: cssVar.fontSize }}>+ Cases+ </span>)}</Flexbox>{totalCases === 0 ? (- <span style={{ color: cssVar.colorPrimary, fontSize: 12 }}>+ <span style={{ color: cssVar.colorPrimary, fontSize: cssVar.fontSizeSM }}>{t('benchmark.detail.stats.addFirstDataset')}</span>) : (- <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: cssVar.fontSizeSM }}>{datasets.length} Datasets</span>)}@@ -397,13 +431,7 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<div className={styles.statIcon} style={{ background: cssVar.colorInfoBg }}><Clock size={16} style={{ color: cssVar.colorInfo }} /></div>- <span- style={{- color: cssVar.colorTextSecondary,- fontSize: 13,- fontWeight: 600,- }}- >+ <span className={styles.statLabel}>{t('benchmark.detail.stats.avgDuration')}</span></Flexbox>@@ -412,8 +440,8 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorTextQuaternary,- fontSize: 20,- fontWeight: 'bold',+ fontSize: cssVar.fontSizeXL,+ fontWeight: 600,}}>--@@ -424,16 +452,19 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorText,- fontSize: 24,- fontWeight: 'bold',+ fontFamily: cssVar.fontFamilyCode,+ fontSize: cssVar.fontSizeHeading3,+ fontWeight: 600,}}>{formatDurationMinutes(avgDuration)}</span>- <span style={{ color: cssVar.colorTextTertiary, fontSize: 13 }}>min</span>+ <span style={{ color: cssVar.colorTextTertiary, fontSize: cssVar.fontSize }}>+ min+ </span></Flexbox>{p99Duration != null && (- <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: cssVar.fontSizeSM }}>P99: {formatDuration(p99Duration)}</span>)}@@ -449,23 +480,15 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<div className={styles.statIcon} style={{ background: cssVar.colorSuccessBg }}><CircleDollarSign size={16} style={{ color: cssVar.colorSuccess }} /></div>- <span- style={{- color: cssVar.colorTextSecondary,- fontSize: 13,- fontWeight: 600,- }}- >- {t('benchmark.detail.stats.avgCost')}- </span>+ <span className={styles.statLabel}>{t('benchmark.detail.stats.avgCost')}</span></Flexbox>{avgCost == null ? (<spanstyle={{color: cssVar.colorTextQuaternary,- fontSize: 20,- fontWeight: 'bold',+ fontSize: cssVar.fontSizeXL,+ fontWeight: 600,}}>--@@ -476,17 +499,18 @@ const BenchmarkHeader = memo<BenchmarkHeaderProps>(<spanstyle={{color: cssVar.colorText,- fontSize: 24,- fontWeight: 'bold',+ fontFamily: cssVar.fontFamilyCode,+ fontSize: cssVar.fontSizeHeading3,+ fontWeight: 600,}}>${formatCost(avgCost)}</span>- <span style={{ color: cssVar.colorTextTertiary, fontSize: 13 }}>+ <span style={{ color: cssVar.colorTextTertiary, fontSize: cssVar.fontSize }}>{t('benchmark.detail.stats.perRun')}</span></Flexbox>- <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: cssVar.fontSizeSM }}>{t('benchmark.detail.stats.basedOnLastNRuns', {count: completedRuns.length,})}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/DatasetCard.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/DatasetCard.tsxindex 0a522f54653..2ed16b14108 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/DatasetCard.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/DatasetCard.tsx@@ -1,7 +1,7 @@-import { Button, DropdownMenu, Flexbox, Tag } from '@lobehub/ui';+import { ActionIcon, Button, DropdownMenu, Flexbox, Tag } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';import { App, Card } from 'antd';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { ArrowRight, ChevronRight, Database, Ellipsis, Pencil, Play, Trash2 } from 'lucide-react';import { memo, useCallback } from 'react';import { useTranslation } from 'react-i18next';@@ -14,22 +14,56 @@ import { DATASET_PRESETS } from '../../../../config/datasetPresets';import TestCaseEmptyState from './TestCaseEmptyState';import TestCaseTable from './TestCaseTable';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({card: css`.ant-card-body {padding: 0;}`,+ // Tonal figure block that leads with the dataset's headline metric — its+ // test-case count — given mono weight so it reads as a result at a glance.caseCount: css`- font-size: 12px;+ display: flex;+ flex-shrink: 0;+ flex-direction: column;+ gap: 2px;+ align-items: flex-end;++ padding-block: 6px;+ padding-inline: 12px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillQuaternary};+ `,+ caseCountLabel: css`+ font-size: ${cssVar.fontSizeSM};+ line-height: 1;color: ${cssVar.colorTextTertiary};`,+ caseCountValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ chevron: css`+ flex-shrink: 0;++ color: ${cssVar.colorTextTertiary};++ transition: transform 0.15s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,datasetDescription: css`overflow: hidden;margin: 0;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};text-overflow: ellipsis;white-space: nowrap;@@ -49,11 +83,20 @@ const styles = createStaticStyles(({ css, cssVar }) => ({background: transparent;- transition: background 0.2s;+ transition: background 0.15s ease;&:hover {background: ${cssVar.colorFillQuaternary};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,datasetIcon: css`display: flex;@@ -63,22 +106,16 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 32px;height: 32px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};background: ${cssVar.colorPrimaryBg};`,datasetName: css`margin: 0;- font-size: 14px;+ font-size: ${cssVar.fontSize};font-weight: 500;color: ${cssVar.colorText};`,- dropdownButton: css`- width: 28px;- height: 28px;- padding: 0;- color: ${cssVar.colorTextTertiary};- `,expandedSection: css`border-block-start: 1px solid ${cssVar.colorBorderSecondary};`,@@ -158,30 +195,39 @@ const DatasetCard = memo<DatasetCardProps>(return (<Card className={styles.card}>- <div className={styles.datasetHeader} onClick={onExpand}>+ <div+ className={styles.datasetHeader}+ role="button"+ tabIndex={0}+ onClick={onExpand}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ onExpand();+ }+ }}+ ><div className={styles.datasetIcon}>- <Database size={16} style={{ color: 'var(--ant-color-primary)' }} />+ <Database size={16} style={{ color: cssVar.colorPrimary }} /></div><Flexbox flex={1} gap={2} style={{ minWidth: 0 }}><Flexbox horizontal align="center" gap={8}><p className={styles.datasetName}>{dataset.name}</p>{dataset.metadata?.preset && DATASET_PRESETS[dataset.metadata.preset] && (- <Tag style={{ fontSize: 10 }}>{DATASET_PRESETS[dataset.metadata.preset].name}</Tag>+ <Tag size="small">{DATASET_PRESETS[dataset.metadata.preset].name}</Tag>)}</Flexbox>{dataset.description && (<p className={styles.datasetDescription}>{dataset.description}</p>)}</Flexbox>- <span className={styles.caseCount}>- {dataset.testCaseCount || 0} {t('benchmark.detail.stats.cases').toLowerCase()}- </span>+ <div className={styles.caseCount}>+ <span className={styles.caseCountValue}>{dataset.testCaseCount || 0}</span>+ <span className={styles.caseCountLabel}>{t('benchmark.detail.stats.cases')}</span>+ </div><Buttonicon={Play}size="small"- style={{- height: 28,- }}onClick={(e) => {e.stopPropagation();onRun();@@ -208,21 +254,12 @@ const DatasetCard = memo<DatasetCardProps>(},]}>- <Button- className={styles.dropdownButton}- icon={Ellipsis}- size="small"- variant="text"- onClick={(e) => e.stopPropagation()}- />+ <ActionIcon icon={Ellipsis} size="small" onClick={(e) => e.stopPropagation()} /></DropdownMenu><ChevronRight+ className={styles.chevron}size={16}- style={{- color: 'var(--ant-color-text-tertiary)',- transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',- transition: 'transform 0.2s',- }}+ style={{ transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)' }}/></div>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/EmptyState.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/EmptyState.tsxindex 7cdad747e8d..4f2b43a4127 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/EmptyState.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/EmptyState.tsx@@ -1,11 +1,11 @@-import { Button, Empty, Flexbox } from '@lobehub/ui';+import { Button, Flexbox, Icon, Text } from '@lobehub/ui';import { Card } from 'antd';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { Database, Plus } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({emptyCard: css`.ant-card-body {display: flex;@@ -17,6 +17,18 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: 24px;}`,+ iconBox: css`+ display: flex;+ align-items: center;+ justify-content: center;++ width: 56px;+ height: 56px;+ margin-block-end: 16px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorPrimaryBg};+ `,}));interface EmptyStateProps {@@ -28,36 +40,18 @@ const EmptyState = memo<EmptyStateProps>(({ onAddDataset }) => {return (<Card className={styles.emptyCard}>- <Empty- icon={Database}- description={- <Flexbox gap={4}>- <p- style={{- color: 'var(--ant-color-text)',- fontSize: 14,- fontWeight: 500,- margin: 0,- }}- >- {t('dataset.empty.title')}- </p>- <p- style={{- color: 'var(--ant-color-text-tertiary)',- fontSize: 12,- margin: 0,- }}- >- {t('dataset.empty.description')}- </p>- </Flexbox>- }- >- <Button icon={Plus} size="small" style={{ marginTop: 16 }} type="primary" onClick={onAddDataset}>- {t('dataset.actions.addDataset')}- </Button>- </Empty>+ <div className={styles.iconBox}>+ <Icon icon={Database} size={24} style={{ color: cssVar.colorPrimary }} />+ </div>+ <Flexbox align="center" gap={4}>+ <Text weight={600}>{t('dataset.empty.title')}</Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('dataset.empty.description')}+ </Text>+ </Flexbox>+ <Button icon={Plus} size="small" style={{ marginTop: 16 }} type="primary" onClick={onAddDataset}>+ {t('dataset.actions.addDataset')}+ </Button></Card>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseEmptyState.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseEmptyState.tsxindex af9a2d3acb7..b190826a846 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseEmptyState.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseEmptyState.tsx@@ -1,10 +1,10 @@-import { Button, Flexbox } from '@lobehub/ui';-import { createStaticStyles } from 'antd-style';+import { Button, Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { Database, FileUp, Plus } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({emptyIcon: css`display: flex;align-items: center;@@ -13,9 +13,9 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 48px;height: 48px;margin-block-end: 12px;- border-radius: 50%;+ border-radius: ${cssVar.borderRadiusLG};- background: ${cssVar.colorFillSecondary};+ background: ${cssVar.colorPrimaryBg};`,}));@@ -30,27 +30,12 @@ const TestCaseEmptyState = memo<TestCaseEmptyStateProps>(({ onAddCase, onImportreturn (<Flexbox align="center" gap={8} justify="center" style={{ padding: '48px 24px' }}><div className={styles.emptyIcon}>- <Database size={20} style={{ color: 'var(--ant-color-text-tertiary)' }} />+ <Database size={20} style={{ color: cssVar.colorPrimary }} /></div>- <p- style={{- color: 'var(--ant-color-text)',- fontSize: 14,- fontWeight: 500,- margin: 0,- }}- >- {t('testCase.empty.title')}- </p>- <p- style={{- color: 'var(--ant-color-text-tertiary)',- fontSize: 12,- margin: 0,- }}- >+ <Text weight={600}>{t('testCase.empty.title')}</Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>{t('testCase.empty.description')}- </p>+ </Text><Flexbox horizontal gap={8} style={{ marginTop: 8 }}><Button icon={Plus} size="small" onClick={onAddCase}>{t('testCase.actions.add')}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCasePreviewPanel.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCasePreviewPanel.tsxindex 64ec4f6bd2b..b8edb8d807e 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCasePreviewPanel.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCasePreviewPanel.tsx@@ -1,11 +1,10 @@-import { CopyButton, Flexbox } from '@lobehub/ui';-import { Button } from 'antd';+import { ActionIcon, CopyButton, Flexbox, Text } from '@lobehub/ui';import { createStaticStyles, cssVar } from 'antd-style';import { X } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({container: css`flex-shrink: 0;width: 360px;@@ -18,16 +17,19 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,fieldLabel: css`margin: 0;- font-size: 12px;- font-weight: 500;++ font-size: ${cssVar.fontSizeSM};+ font-weight: 600;color: ${cssVar.colorTextTertiary};+ letter-spacing: 0.02em;+ text-transform: uppercase;`,fieldValue: css`- padding-block: 10px;+ padding-block: 8px;padding-inline: 12px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};- font-size: 13px;+ font-size: ${cssVar.fontSize};line-height: 1.6;color: ${cssVar.colorText};word-break: break-word;@@ -46,7 +48,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,title: css`margin: 0;- font-size: 14px;+ font-size: ${cssVar.fontSize};font-weight: 500;color: ${cssVar.colorText};`,@@ -64,13 +66,7 @@ const TestCasePreviewPanel = memo<TestCasePreviewPanelProps>(({ testCase, onClos<Flexbox className={styles.container} height="100%"><div className={styles.header}><p className={styles.title}>{t('testCase.preview.title')}</p>- <Button- icon={<X size={14} />}- size="small"- style={{ color: cssVar.colorTextTertiary, height: 28, padding: 0, width: 28 }}- type="text"- onClick={onClose}- />+ <ActionIcon icon={X} size="small" onClick={onClose} /></div><div className={styles.content}><Flexbox gap={16}>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseTable.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseTable.tsxindex c476920746e..8737d25f496 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseTable.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/TestCaseTable.tsx@@ -1,4 +1,4 @@-import { Button, DropdownMenu, Flexbox, Input } from '@lobehub/ui';+import { ActionIcon, Button, DropdownMenu, Flexbox, Input, Text } from '@lobehub/ui';import { Pagination, Table } from 'antd';import { type ColumnsType } from 'antd/es/table';import { createStaticStyles, cssVar } from 'antd-style';@@ -6,21 +6,25 @@ import { Ellipsis, FileUp, Pencil, Plus, Search, Trash2 } from 'lucide-react';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+import SegmentBar from '../../../../features/SegmentBar';++const styles = createStaticStyles(({ css }) => ({filterButton: css`cursor: pointer;padding-block: 4px;- padding-inline: 10px;+ padding-inline: 8px;border: none;- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;text-transform: capitalize;background: transparent;- transition: all 0.2s;+ transition:+ color 0.15s ease,+ background 0.15s ease;&[data-active='true'] {color: ${cssVar.colorText};@@ -38,12 +42,21 @@ const styles = createStaticStyles(({ css, cssVar }) => ({&:not(:first-child) {border-inline-start: 1px solid ${cssVar.colorBorderSecondary};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,filterContainer: css`overflow: hidden;display: flex;border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 6px;+ border-radius: ${cssVar.borderRadiusSM};`,filtersRow: css`display: flex;@@ -54,13 +67,36 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: 16px;border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,+ // Summary strip — leads the table with the case total as a mono figure plus a+ // proportional read of the difficulty mix across the loaded cases.+ summaryDot: css`+ width: 8px;+ height: 8px;+ border-radius: 999px;+ `,+ summaryRow: css`+ display: flex;+ gap: 16px;+ align-items: center;++ padding-block: 12px;+ padding-inline: 16px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ summaryValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,table: css`.ant-table {- font-size: 14px;+ font-size: ${cssVar.fontSize};}.ant-table-thead > tr > th {- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;color: ${cssVar.colorTextTertiary};background: ${cssVar.colorFillQuaternary};@@ -122,6 +158,26 @@ const TestCaseTable = memo<TestCaseTableProps>(}) => {const { t } = useTranslation('eval');+ // Difficulty mix across the loaded cases — fuels the summary strip's+ // proportional bar and labeled counts. Cases without a difficulty are ignored.+ const difficulty = useMemo(() => {+ const counts = { easy: 0, hard: 0, medium: 0 };+ for (const c of testCases) {+ const d = c?.metadata?.difficulty as 'easy' | 'hard' | 'medium' | undefined;+ if (d === 'easy' || d === 'medium' || d === 'hard') counts[d] += 1;+ }+ const tagged = counts.easy + counts.medium + counts.hard;+ return {+ counts,+ segments: [+ { color: cssVar.colorSuccess, value: counts.easy },+ { color: cssVar.colorWarning, value: counts.medium },+ { color: cssVar.colorError, value: counts.hard },+ ],+ tagged,+ };+ }, [testCases]);+const columns: ColumnsType<any> = useMemo(() => {const base: ColumnsType<any> = [{@@ -130,8 +186,8 @@ const TestCaseTable = memo<TestCaseTableProps>(render: (_: any, __: any, index: number) => (<spanstyle={{- color: 'var(--ant-color-text-tertiary)',- fontFamily: 'monospace',+ color: cssVar.colorTextTertiary,+ fontFamily: cssVar.fontFamilyCode,fontSize: 12,}}>@@ -147,7 +203,7 @@ const TestCaseTable = memo<TestCaseTableProps>(render: (text: string) => (<pstyle={{- color: 'var(--ant-color-text)',+ color: cssVar.colorText,margin: 0,whiteSpace: 'pre-wrap',wordBreak: 'break-word',@@ -163,7 +219,7 @@ const TestCaseTable = memo<TestCaseTableProps>(ellipsis: true,key: 'expected',render: (text: string) => (- <span style={{ color: 'var(--ant-color-text-secondary)' }}>{text || '-'}</span>+ <span style={{ color: cssVar.colorTextSecondary }}>{text || '-'}</span>),title: t('table.columns.expected'),width: 200,@@ -194,9 +250,7 @@ const TestCaseTable = memo<TestCaseTableProps>(dataIndex: ['content', 'category'],key: 'category',render: (text: string) => (- <span style={{ color: 'var(--ant-color-text-tertiary)', fontSize: 12 }}>- {text || '-'}- </span>+ <span style={{ color: cssVar.colorTextTertiary, fontSize: 12 }}>{text || '-'}</span>),title: t('table.columns.category'),width: 120,@@ -227,17 +281,7 @@ const TestCaseTable = memo<TestCaseTableProps>(},]}>- <Button- icon={Ellipsis}- size="small"- variant="text"- style={{- color: cssVar.colorTextTertiary,- height: 28,- padding: 0,- width: 28,- }}- />+ <ActionIcon icon={Ellipsis} size="small" /></DropdownMenu></div>),@@ -250,14 +294,47 @@ const TestCaseTable = memo<TestCaseTableProps>(return (<>+ <div className={styles.summaryRow}>+ <Flexbox gap={2}>+ <span className={styles.summaryValue}>{total}</span>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('benchmark.detail.stats.cases')}+ </Text>+ </Flexbox>+ {difficulty.tagged > 0 && (+ <Flexbox flex={1} gap={6} style={{ maxWidth: 320, minWidth: 0 }}>+ <SegmentBar segments={difficulty.segments} />+ <Flexbox horizontal gap={12} style={{ flexWrap: 'wrap' }}>+ {(['easy', 'medium', 'hard'] as const).map((d) => (+ <Flexbox horizontal align="center" gap={6} key={d}>+ <span+ className={styles.summaryDot}+ style={{+ background:+ d === 'easy'+ ? cssVar.colorSuccess+ : d === 'medium'+ ? cssVar.colorWarning+ : cssVar.colorError,+ }}+ />+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t(`difficulty.${d}`)} {difficulty.counts[d]}+ </Text>+ </Flexbox>+ ))}+ </Flexbox>+ </Flexbox>+ )}+ </div><div className={styles.filtersRow}><Flexbox horizontal align="center" gap={8}><div style={{ position: 'relative' }}><Searchsize={14}style={{- color: 'var(--ant-color-text-tertiary)',- left: 10,+ color: cssVar.colorTextTertiary,+ left: 12,position: 'absolute',top: '50%',transform: 'translateY(-50%)',diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/index.tsxindex c0d3e0fb749..593e5e58cc5 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/DatasetsTab/index.tsx@@ -1,9 +1,9 @@'use client';-import { Button, Flexbox } from '@lobehub/ui';+import { Button, Flexbox, Text } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';import { App, Card, Skeleton } from 'antd';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { Plus } from 'lucide-react';import { memo, useCallback, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -19,7 +19,7 @@ import { createRunCreateModal } from '../RunCreateModal';import DatasetCard from './DatasetCard';import EmptyState from './EmptyState';-const loadingStyles = createStaticStyles(({ css, cssVar }) => ({+const loadingStyles = createStaticStyles(({ css }) => ({card: css`.ant-card-body {padding: 0;@@ -36,7 +36,7 @@ const loadingStyles = createStaticStyles(({ css, cssVar }) => ({width: 32px;height: 32px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};background: ${cssVar.colorFillQuaternary};`,@@ -178,9 +178,9 @@ const DatasetsTab = memo<DatasetsTabProps>(<Flexbox gap={16}>{datasets.length > 0 && (<Flexbox horizontal align="center" justify="space-between">- <p style={{ color: 'var(--ant-color-text-tertiary)', fontSize: 14, margin: 0 }}>+ <Text color={cssVar.colorTextTertiary}>{t('benchmark.detail.datasetCount', { count: datasets.length })}- </p>+ </Text><Button icon={Plus} size="small" type="primary" onClick={handleCreateDataset}>{t('dataset.actions.addDataset')}</Button>@@ -193,11 +193,11 @@ const DatasetsTab = memo<DatasetsTabProps>(<Card className={loadingStyles.card} key={i}><div className={loadingStyles.header}><div className={loadingStyles.icon} />- <Flexbox flex={1} gap={6}>+ <Flexbox flex={1} gap={8}><Skeleton.Input active size="small" style={{ height: 16, width: 120 }} /><Skeleton.Input active size="small" style={{ height: 12, width: 200 }} /></Flexbox>- <Skeleton.Input active size="small" style={{ height: 14, width: 50 }} />+ <Skeleton.Button active size="small" style={{ height: 36, width: 64 }} /><Skeleton.Button active size="small" style={{ height: 28, width: 64 }} /></div></Card>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/RunSummaryCard.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/RunSummaryCard.tsxindex 4cfd38ff46b..9e9d5ed202c 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/RunSummaryCard.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/RunSummaryCard.tsx@@ -1,13 +1,62 @@'use client';-import { Flexbox } from '@lobehub/ui';-import { Card, Progress, Typography } from 'antd';+import { Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { memo } from 'react';import { useTranslation } from 'react-i18next';import WorkspaceLink from '@/features/Workspace/WorkspaceLink';+import SegmentBar from '@/routes/(main)/eval/features/SegmentBar';import StatusBadge from '@/routes/(main)/eval/features/StatusBadge';+const styles = createStaticStyles(({ css }) => ({+ card: css`+ padding-block: 12px;+ padding-inline: 12px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorBgContainer};++ transition:+ border-color 0.15s ease,+ background 0.15s ease;++ &:hover {+ border-color: ${cssVar.colorBorder};+ background: ${cssVar.colorFillTertiary};+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ name: css`+ overflow: hidden;++ font-weight: 600;+ color: ${cssVar.colorText};+ text-overflow: ellipsis;+ white-space: nowrap;+ `,+ passRate: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading3};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ score: css`+ font-family: ${cssVar.fontFamilyCode};+ font-weight: 600;+ color: ${cssVar.colorText};+ `,+ unit: css`+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};+ `,+}));+interface RunSummaryCardProps {benchmarkId: string;id: string;@@ -24,40 +73,52 @@ const RunSummaryCard = memo<RunSummaryCardProps>(({ id, name, status, metrics, bconst { t } = useTranslation('eval');const isActive = status === 'running' || status === 'pending';+ const passRate = metrics?.passRate;+ const totalCases = metrics?.totalCases ?? 0;+ // Derive a pass/fail split from the headline rate so the breakdown bar matches+ // the number shown — the summary metrics shape carries no per-status counts.+ const passedCases =+ passRate !== undefined && totalCases > 0 ? Math.round(passRate * totalCases) : 0;+ const failedCases = totalCases > 0 ? Math.max(0, totalCases - passedCases) : 0;+ const showResults = !isActive && passRate !== undefined;+return (<WorkspaceLinkstyle={{ color: 'inherit', textDecoration: 'none' }}to={`/eval/bench/${benchmarkId}/runs/${id}`}>- <Card hoverable size="small">- <Flexbox gap={8}>- <Flexbox horizontal align="center" justify="space-between">- <Typography.Text strong>{name || id.slice(0, 8)}</Typography.Text>- <StatusBadge status={status} />- </Flexbox>- {!isActive && metrics && (- <Flexbox gap={4}>- {metrics.passRate !== undefined && (- <Flexbox horizontal align="center" gap={8}>- <Typography.Text style={{ fontSize: 12 }} type="secondary">- {t('run.metrics.passRate')}- </Typography.Text>- <Progress- percent={Math.round(metrics.passRate * 100)}- size="small"- style={{ flex: 1 }}- />- </Flexbox>- )}- {metrics.averageScore !== undefined && (- <Typography.Text style={{ fontSize: 12 }} type="secondary">- {t('run.metrics.avgScore')}: {metrics.averageScore.toFixed(2)}- </Typography.Text>- )}- </Flexbox>- )}+ <Flexbox className={styles.card} gap={10}>+ <Flexbox horizontal align="center" gap={8} justify="space-between">+ <span className={styles.name}>{name || id.slice(0, 8)}</span>+ <StatusBadge status={status} /></Flexbox>- </Card>++ {showResults && (+ <Flexbox gap={8}>+ {/* Pass-rate hero — the run's headline outcome */}+ <Flexbox horizontal align="baseline" gap={6}>+ <span className={styles.passRate}>{Math.round(passRate! * 100)}%</span>+ <span className={styles.unit}>{t('run.metrics.passRate')}</span>+ </Flexbox>+ {totalCases > 0 && (+ <SegmentBar+ segments={[+ { color: cssVar.colorSuccess, value: passedCases },+ { color: cssVar.colorError, value: failedCases },+ ]}+ />+ )}+ {metrics?.averageScore !== undefined && (+ <Flexbox horizontal align="center" gap={6}>+ <Text fontSize={12} type="secondary">+ {t('run.metrics.avgScore')}+ </Text>+ <span className={styles.score}>{metrics.averageScore.toFixed(2)}</span>+ </Flexbox>+ )}+ </Flexbox>+ )}+ </Flexbox></WorkspaceLink>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/index.tsxindex 74442c59df5..1a6391808d5 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCards/index.tsx@@ -1,7 +1,7 @@'use client';-import { ActionIcon, Empty, Flexbox } from '@lobehub/ui';-import { Typography } from 'antd';+import { ActionIcon, Button, Flexbox, Icon, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { Play, Plus } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';@@ -10,6 +10,34 @@ import { runSelectors, useEvalStore } from '@/store/eval';import RunSummaryCard from './RunSummaryCard';+const styles = createStaticStyles(({ css }) => ({+ emptyCard: css`+ align-items: center;+ justify-content: center;++ padding-block: 32px;+ padding-inline: 20px;+ border: 1px dashed ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};++ text-align: center;++ background: ${cssVar.colorFillQuaternary};+ `,+ iconBox: css`+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;++ width: 40px;+ height: 40px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillTertiary};+ `,+}));+interface RunCardsProps {benchmarkId: string;datasetId?: string;@@ -25,7 +53,7 @@ const RunCards = memo<RunCardsProps>(({ datasetId, onCreateRun, benchmarkId }) =return (<Flexbox gap={12}><Flexbox horizontal align="center" justify="space-between">- <Typography.Text strong>{t('benchmark.detail.tabs.runs')}</Typography.Text>+ <Text weight={600}>{t('benchmark.detail.tabs.runs')}</Text><ActionIconicon={Plus}size="small"@@ -34,7 +62,20 @@ const RunCards = memo<RunCardsProps>(({ datasetId, onCreateRun, benchmarkId }) =/></Flexbox>{runList.length === 0 ? (- <Empty description={t('benchmark.card.empty')} icon={Play} />+ <Flexbox className={styles.emptyCard} gap={12}>+ <div className={styles.iconBox}>+ <Icon icon={Play} size={20} style={{ color: cssVar.colorTextQuaternary }} />+ </div>+ <Flexbox align="center" gap={2}>+ <Text color={cssVar.colorTextTertiary}>{t('run.empty.title')}</Text>+ <Text color={cssVar.colorTextQuaternary} fontSize={12}>+ {t('run.empty.description')}+ </Text>+ </Flexbox>+ <Button icon={Plus} size="small" variant="filled" onClick={onCreateRun}>+ {t('run.actions.create')}+ </Button>+ </Flexbox>) : (<Flexbox gap={8}>{runList.map((run) => (diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Content.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Content.tsxindex 9459ec59969..ff3a24d4309 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Content.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Content.tsx@@ -4,7 +4,7 @@ import { AGENT_PROFILE_URL, DEFAULT_INBOX_AVATAR, INBOX_SESSION_ID } from '@lobeimport { Accordion, AccordionItem, ActionIcon, Avatar, Flexbox, Text } from '@lobehub/ui';import { useModalContext } from '@lobehub/ui/base-ui';import { Form, Input, InputNumber, Select, Space } from 'antd';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { SquareArrowOutUpRight } from 'lucide-react';import { type FC, useCallback, useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -17,7 +17,7 @@ const DEFAULT_MAX_STEPS = 100;const DEFAULT_TIMEOUT_MINUTES = 30;const MAX_TIMEOUT_MINUTES = 240;-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({agentSelect: css`.ant-select-content-value {height: 22px !important;@@ -26,7 +26,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({hint: css`display: inline-block;margin-block-start: 4px;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextQuaternary};`,timestampLink: css`@@ -36,13 +36,17 @@ const styles = createStaticStyles(({ css, cssVar }) => ({margin-block-start: 4px;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};- transition: color 0.2s;+ transition: color 0.15s ease;&:hover {color: ${cssVar.colorText};}++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,}));@@ -259,7 +263,7 @@ const RunCreateContent: FC<RunCreateContentProps> = ({<Space><span>{ds.name}</span>{ds.testCaseCount !== undefined && (- <span style={{ color: 'var(--ant-color-text-quaternary)', fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>{t('run.create.caseCount', { count: ds.testCaseCount })}</span>)}@@ -274,7 +278,7 @@ const RunCreateContent: FC<RunCreateContentProps> = ({<Accordion defaultExpandedKeys={[]}><AccordionItemitemKey="advanced"- paddingBlock={6}+ paddingBlock={8}paddingInline={4}title={t('run.create.advanced')}>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Footer.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Footer.tsxindex 4bad1bb52a5..ff18ce51f54 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Footer.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunCreateModal/Footer.tsx@@ -1,8 +1,7 @@'use client';-import { type DropdownItem, DropdownMenu, Flexbox } from '@lobehub/ui';+import { Button, type DropdownItem, DropdownMenu, Flexbox } from '@lobehub/ui';import { ModalFooter, useModalContext } from '@lobehub/ui/base-ui';-import { Button } from 'antd';import { createStaticStyles } from 'antd-style';import { ChevronDown } from 'lucide-react';import { type FC } from 'react';diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunEditModal/Content.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunEditModal/Content.tsxindex d3165993387..8174a0c9554 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunEditModal/Content.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunEditModal/Content.tsx@@ -5,7 +5,7 @@ import type { AgentEvalRunStatus, EvalRunInputConfig } from '@lobechat/types';import { Accordion, AccordionItem, ActionIcon, Avatar, Flexbox } from '@lobehub/ui';import { useModalContext } from '@lobehub/ui/base-ui';import { App, Form, Input, InputNumber, Select, Space } from 'antd';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { SquareArrowOutUpRight } from 'lucide-react';import { type FC, useCallback, useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -17,7 +17,7 @@ import { useEvalStore } from '@/store/eval';const MAX_TIMEOUT_MINUTES = 240;-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({agentSelect: css`.ant-select-content-value {height: 22px !important;@@ -26,7 +26,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({hint: css`display: inline-block;margin-block-start: 4px;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextQuaternary};`,}));@@ -164,7 +164,7 @@ const RunEditContent: FC<RunEditContentProps> = ({ formId, onLoadingChange, run<Space><span>{currentDataset?.name || run.datasetId}</span>{currentDataset?.testCaseCount !== undefined && (- <span style={{ color: 'var(--ant-color-text-quaternary)', fontSize: 12 }}>+ <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>{t('run.create.caseCount', { count: currentDataset.testCaseCount })}</span>)}@@ -224,7 +224,7 @@ const RunEditContent: FC<RunEditContentProps> = ({ formId, onLoadingChange, run<Accordion defaultExpandedKeys={[]}><AccordionItemitemKey="advanced"- paddingBlock={6}+ paddingBlock={8}paddingInline={4}title={t('run.create.advanced')}>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/EmptyState.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/EmptyState.tsxindex d0f1d539b25..d979c5ca233 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/EmptyState.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/EmptyState.tsx@@ -1,21 +1,34 @@-import { Button, Empty, Flexbox } from '@lobehub/ui';-import { Card } from 'antd';-import { createStaticStyles } from 'antd-style';+import { Button, Flexbox, Icon, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { Activity, Plus } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';const styles = createStaticStyles(({ css }) => ({emptyCard: css`- .ant-card-body {- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;+ align-items: center;+ justify-content: center;- padding-block: 64px;- padding-inline: 24px;- }+ padding-block: 64px;+ padding-inline: 24px;+ border: 1px dashed ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ text-align: center;++ background: ${cssVar.colorFillQuaternary};+ `,+ iconBox: css`+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;++ width: 56px;+ height: 56px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillTertiary};`,}));@@ -27,44 +40,20 @@ const EmptyState = memo<EmptyStateProps>(({ onCreate }) => {const { t } = useTranslation('eval');return (- <Card className={styles.emptyCard}>- <Empty- icon={Activity}- description={- <Flexbox gap={4}>- <p- style={{- color: 'var(--ant-color-text)',- fontSize: 14,- fontWeight: 500,- margin: 0,- }}- >- {t('run.empty.title')}- </p>- <p- style={{- color: 'var(--ant-color-text-tertiary)',- fontSize: 12,- margin: 0,- }}- >- {t('run.empty.descriptionBenchmark')}- </p>- </Flexbox>- }- >- <Button- icon={Plus}- size="small"- style={{ marginTop: 16 }}- type="primary"- onClick={onCreate}- >- {t('run.actions.create')}- </Button>- </Empty>- </Card>+ <Flexbox className={styles.emptyCard} gap={16}>+ <div className={styles.iconBox}>+ <Icon icon={Activity} size={28} style={{ color: cssVar.colorTextTertiary }} />+ </div>+ <Flexbox align="center" gap={4}>+ <Text weight={600}>{t('run.empty.title')}</Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('run.empty.descriptionBenchmark')}+ </Text>+ </Flexbox>+ <Button icon={Plus} size="small" type="primary" onClick={onCreate}>+ {t('run.actions.create')}+ </Button>+ </Flexbox>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/RunCard.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/RunCard.tsxindex 7553f180201..a88a654d29a 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/RunCard.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/RunCard.tsx@@ -1,8 +1,8 @@import type { AgentEvalRunListItem } from '@lobechat/types';-import { type DropdownItem, DropdownMenu, Flexbox, Icon } from '@lobehub/ui';+import { type DropdownItem, DropdownMenu, Flexbox, Icon, Text } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';-import { App, Card, Progress } from 'antd';-import { createStaticStyles } from 'antd-style';+import { App } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import {AlertTriangle,ArrowRight,@@ -20,24 +20,48 @@ import { useTranslation } from 'react-i18next';import WorkspaceLink from '@/features/Workspace/WorkspaceLink';import { useEvalStore } from '@/store/eval';+import SegmentBar from '../../../../features/SegmentBar';import StatusBadge from '../../../../features/StatusBadge';import { formatDuration } from '../../../../utils';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({arrowIcon: css`flex-shrink: 0;color: ${cssVar.colorTextTertiary};++ transition: transform 0.15s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,card: css`- transition: all 0.2s;+ padding: 20px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};- .ant-card-body {- padding: 20px;- }+ background: ${cssVar.colorBgContainer};++ transition:+ border-color 0.15s ease,+ background 0.15s ease;&:hover {border-color: ${cssVar.colorBorder};}++ &:hover .run-card-arrow {+ transform: translateX(2px);+ color: ${cssVar.colorText};+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;++ &:hover .run-card-arrow {+ transform: none;+ }+ }`,cardLink: css`text-decoration: none;@@ -52,56 +76,91 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 28px;height: 28px;- border-radius: 4px;+ border-radius: ${cssVar.borderRadiusSM};color: ${cssVar.colorTextTertiary};- transition: all 0.2s;+ transition:+ color 0.15s ease,+ background 0.15s ease;&:hover {color: ${cssVar.colorText};background: ${cssVar.colorFillSecondary};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ // Tonal hero band carrying the headline outcome — the first thing the eye lands on.+ hero: css`+ padding: 16px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillQuaternary};+ `,+ heroValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading2};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};`,meta: css`- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,metaHighlight: css`- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};`,monoText: css`- font-family: monospace;+ font-family: ${cssVar.fontFamilyCode};`,name: css`overflow: hidden;- font-size: 14px;- font-weight: 500;+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;color: ${cssVar.colorText};text-overflow: ellipsis;white-space: nowrap;`,- passRate: css`- font-family: monospace;- font-size: 20px;- font-weight: 700;- line-height: 1.2;- color: ${cssVar.colorText};+ progressFill: css`+ height: 100%;+ border-radius: 999px;++ background: ${cssVar.colorPrimary};++ transition: width 0.3s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,- passRateLabel: css`- font-size: 10px;- color: ${cssVar.colorTextTertiary};+ progressTrack: css`+ overflow: hidden;++ width: 100%;+ height: 8px;+ border-radius: 999px;++ background: ${cssVar.colorFillSecondary};`,separator: css`- color: ${cssVar.colorBorder};+ color: ${cssVar.colorBorderSecondary};`,stat: css`display: inline-flex;gap: 4px;align-items: center;- font-size: 13px;+ font-size: ${cssVar.fontSizeSM};`,statError: css`color: ${cssVar.colorError};@@ -112,6 +171,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({statWarning: css`color: ${cssVar.colorWarning};`,+ unit: css`+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};+ `,}));interface RunCardProps {@@ -139,6 +202,7 @@ const RunCard = memo<RunCardProps>(({ benchmarkId, run, onRefresh, onEdit }) =>const hasStats = (run.status === 'completed' || run.status === 'running') && completedCases > 0;const canStart = run.status === 'idle' || run.status === 'failed' || run.status === 'aborted';const isActive = run.status === 'running' || run.status === 'pending';+ const showProgress = totalCases > 0 && run.status !== 'completed';const formatDate = (date?: Date | string) => {if (!date) return '';@@ -239,101 +303,110 @@ const RunCard = memo<RunCardProps>(({ benchmarkId, run, onRefresh, onEdit }) =>},];+ const metaParts = [+ run.createdAt && { text: formatDate(run.createdAt) },+ run.datasetName && { text: run.datasetName },+ run.targetAgent?.title && { text: run.targetAgent.title },+ run.targetAgent?.model && {+ className: styles.monoText,+ text: run.targetAgent.model,+ },+ metrics?.duration != null && {+ className: styles.metaHighlight,+ text: formatDuration(metrics.duration),+ },+ metrics?.totalCost != null && {+ className: styles.metaHighlight,+ text: `$${metrics.totalCost.toFixed(2)}`,+ },+ ].filter((item): item is { className?: string; text: string } => Boolean(item));+return (<WorkspaceLink className={styles.cardLink} to={`/eval/bench/${benchmarkId}/runs/${run.id}`}>- <Card className={styles.card}>- <Flexbox horizontal align="center" gap={16}>- {/* Left: Info */}+ <Flexbox className={styles.card} gap={16}>+ {/* Identity row */}+ <Flexbox horizontal align="flex-start" gap={12} justify="space-between"><Flexbox flex={1} gap={4} style={{ minWidth: 0 }}><Flexbox horizontal align="center" gap={8}><span className={styles.name}>{run.name}</span><StatusBadge status={run.status} /></Flexbox>- <Flexbox horizontal align="center" className={styles.meta} gap={4}>- {[- run.createdAt && { text: formatDate(run.createdAt) },- run.datasetName && { text: run.datasetName },- run.targetAgent?.title && { text: run.targetAgent.title },- run.targetAgent?.model && {- className: styles.monoText,- text: run.targetAgent.model,- },- metrics?.duration != null && {- className: styles.metaHighlight,- text: formatDuration(metrics.duration),- },- metrics?.totalCost != null && {- className: styles.metaHighlight,- text: `$${metrics.totalCost.toFixed(2)}`,- },- ]- .filter((item): item is { className?: string; text: string } => Boolean(item))- .map((item, i) => (+ {metaParts.length > 0 && (+ <Flexbox horizontal align="center" className={styles.meta} gap={4} wrap="wrap">+ {metaParts.map((item, i) => (<Fragment key={i}>{i > 0 && <span className={styles.separator}>/</span>}<span className={item.className}>{item.text}</span></Fragment>))}- </Flexbox>- </Flexbox>-- {/* Progress (only for incomplete runs) */}- {totalCases > 0 && run.status !== 'completed' && (- <Flexbox gap={4} style={{ width: 160 }}>- <Flexbox horizontal align="center" justify="space-between">- <span className={styles.meta}>- {completedCases}/{totalCases}- </span>- <span className={styles.meta}>{progress.toFixed(0)}%</span></Flexbox>- <Progress percent={progress} showInfo={false} size="small" />- </Flexbox>- )}-- {/* Pass / Fail / Error counts */}- {hasStats && (- <Flexbox horizontal align="center" gap={10}>- <span className={`${styles.stat} ${styles.statSuccess}`}>- <Icon icon={CheckCircle2} size={14} />- {passedCases}+ )}+ </Flexbox>+ <Flexbox horizontal align="center" gap={4} style={{ flexShrink: 0 }}>+ <DropdownMenu items={menuItems} placement="bottomRight">+ <span+ className={styles.dropdownTrigger}+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ }}+ >+ <Ellipsis size={16} /></span>- <span className={`${styles.stat} ${styles.statError}`}>- <Icon icon={XCircle} size={14} />- {failedCases}+ </DropdownMenu>+ <Icon className={`${styles.arrowIcon} run-card-arrow`} icon={ArrowRight} size={16} />+ </Flexbox>+ </Flexbox>++ {/* Outcome hero — pass-rate headline + breakdown, or live progress */}+ {showProgress ? (+ <Flexbox className={styles.hero} gap={10}>+ <Flexbox horizontal align="center" justify="space-between">+ <span className={styles.meta}>+ {completedCases}/{totalCases}</span>- {errorCases > 0 && (- <span className={`${styles.stat} ${styles.statWarning}`}>- <Icon icon={AlertTriangle} size={14} />- {errorCases}- </span>- )}+ <span className={styles.metaHighlight}>{progress.toFixed(0)}%</span></Flexbox>- )}-- {/* Pass rate */}- {hasStats && (- <Flexbox align="flex-end" gap={0} style={{ minWidth: 56 }}>- <span className={styles.passRate}>{passRate.toFixed(0)}%</span>- <span className={styles.passRateLabel}>pass rate</span>+ <div className={styles.progressTrack}>+ <div className={styles.progressFill} style={{ width: `${progress}%` }} />+ </div>+ </Flexbox>+ ) : hasStats ? (+ <Flexbox className={styles.hero} gap={12}>+ <Flexbox horizontal align="flex-end" gap={16} justify="space-between">+ <Flexbox gap={4}>+ <Flexbox horizontal align="baseline" gap={6}>+ <span className={styles.heroValue}>{passRate.toFixed(0)}%</span>+ <span className={styles.unit}>{t('run.metrics.passRate')}</span>+ </Flexbox>+ </Flexbox>+ <Flexbox horizontal align="center" gap={12}>+ <span className={`${styles.stat} ${styles.statSuccess}`}>+ <Icon icon={CheckCircle2} size={14} />+ {passedCases}+ </span>+ <span className={`${styles.stat} ${styles.statError}`}>+ <Icon icon={XCircle} size={14} />+ {failedCases}+ </span>+ {errorCases > 0 && (+ <span className={`${styles.stat} ${styles.statWarning}`}>+ <Icon icon={AlertTriangle} size={14} />+ {errorCases}+ </span>+ )}+ </Flexbox></Flexbox>- )}-- {/* Actions dropdown */}- <DropdownMenu items={menuItems} placement="bottomRight">- <span- className={styles.dropdownTrigger}- onClick={(e) => {- e.preventDefault();- e.stopPropagation();- }}- >- <Ellipsis size={16} />- </span>- </DropdownMenu>-- <Icon className={styles.arrowIcon} icon={ArrowRight} size={16} />- </Flexbox>- </Card>+ <SegmentBar+ segments={[+ { color: cssVar.colorSuccess, value: passedCases },+ { color: cssVar.colorError, value: failedCases },+ { color: cssVar.colorWarning, value: errorCases },+ ]}+ />+ </Flexbox>+ ) : null}+ </Flexbox></WorkspaceLink>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/index.tsxindex 60184a97173..e7e61bceb98 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/RunsTab/index.tsx@@ -1,7 +1,8 @@'use client';-import { Button, Flexbox } from '@lobehub/ui';+import { Button, Flexbox, Text } from '@lobehub/ui';import { Select } from '@lobehub/ui/base-ui';+import { createStaticStyles, cssVar } from 'antd-style';import { Plus } from 'lucide-react';import { memo, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -13,6 +14,31 @@ import { createRunEditModal } from '../RunEditModal';import EmptyState from './EmptyState';import RunCard from './RunCard';+const styles = createStaticStyles(({ css }) => ({+ // Results-led run cards sit on a responsive grid; they collapse to a single+ // column on narrow viewports.+ grid: css`+ display: grid;+ gap: 12px;+ grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));++ @media (max-width: 640px) {+ grid-template-columns: 1fr;+ }+ `,+ filterEmpty: css`+ align-items: center;+ justify-content: center;++ padding-block: 48px;+ padding-inline: 24px;+ border: 1px dashed ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};+ `,+}));+interface RunsTabProps {benchmarkId: string;}@@ -51,54 +77,52 @@ const RunsTab = memo<RunsTabProps>(({ benchmarkId }) => {];return (- <>- <Flexbox gap={16}>- {sortedRuns.length > 0 && (- <Flexbox horizontal align="center" justify="space-between">- <Flexbox horizontal align="center" gap={8}>- <p style={{ color: 'var(--ant-color-text-tertiary)', fontSize: 14, margin: 0 }}>- {t('benchmark.detail.runCount', { count: filteredRuns.length })}- </p>- <Select- options={statusOptions}- size="small"- style={{ width: 128 }}- value={statusFilter}- onChange={setStatusFilter}- />- </Flexbox>- <Button- icon={Plus}+ <Flexbox gap={16}>+ {sortedRuns.length > 0 && (+ <Flexbox horizontal align="center" justify="space-between">+ <Flexbox horizontal align="center" gap={8}>+ <Text color={cssVar.colorTextTertiary}>+ {t('benchmark.detail.runCount', { count: filteredRuns.length })}+ </Text>+ <Select+ options={statusOptions}size="small"- type="primary"- onClick={() => createRunCreateModal({ benchmarkId })}- >- {t('run.actions.create')}- </Button>+ style={{ width: 128 }}+ value={statusFilter}+ onChange={setStatusFilter}+ /></Flexbox>- )}+ <Button+ icon={Plus}+ size="small"+ type="primary"+ onClick={() => createRunCreateModal({ benchmarkId })}+ >+ {t('run.actions.create')}+ </Button>+ </Flexbox>+ )}- {sortedRuns.length === 0 ? (- <EmptyState onCreate={() => createRunCreateModal({ benchmarkId })} />- ) : filteredRuns.length === 0 ? (- <p style={{ color: 'var(--ant-color-text-tertiary)', fontSize: 14, textAlign: 'center' }}>- {t('run.filter.empty')}- </p>- ) : (- <Flexbox gap={12}>- {filteredRuns.map((run) => (- <RunCard- benchmarkId={benchmarkId}- key={run.id}- run={run}- onEdit={(editingRun) => createRunEditModal({ run: editingRun })}- onRefresh={refreshRuns}- />- ))}- </Flexbox>- )}- </Flexbox>- </>+ {sortedRuns.length === 0 ? (+ <EmptyState onCreate={() => createRunCreateModal({ benchmarkId })} />+ ) : filteredRuns.length === 0 ? (+ <Flexbox className={styles.filterEmpty}>+ <Text color={cssVar.colorTextTertiary}>{t('run.filter.empty')}</Text>+ </Flexbox>+ ) : (+ <div className={styles.grid}>+ {filteredRuns.map((run) => (+ <RunCard+ benchmarkId={benchmarkId}+ key={run.id}+ run={run}+ onEdit={(editingRun) => createRunEditModal({ run: editingRun })}+ onRefresh={refreshRuns}+ />+ ))}+ </div>+ )}+ </Flexbox>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCaseList/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCaseList/index.tsxindex 48fcbe0e600..3ad3617067b 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCaseList/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCaseList/index.tsx@@ -1,13 +1,20 @@'use client';-import { Flexbox, Tag } from '@lobehub/ui';-import { Table, Typography } from 'antd';+import { Flexbox, Text } from '@lobehub/ui';+import { Badge, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';+import { cssVar } from 'antd-style';import { memo, useState } from 'react';import { useTranslation } from 'react-i18next';import { useEvalStore } from '@/store/eval';+const DIFFICULTY_COLORS: Record<string, { bg: string; color: string }> = {+ easy: { bg: cssVar.colorSuccessBg, color: cssVar.colorSuccess },+ hard: { bg: cssVar.colorErrorBg, color: cssVar.colorError },+ medium: { bg: cssVar.colorWarningBg, color: cssVar.colorWarning },+};+interface TestCaseListProps {datasetId: string;}@@ -33,9 +40,9 @@ const TestCaseList = memo<TestCaseListProps>(({ datasetId }) => {ellipsis: true,key: 'input',render: (text: string) => (- <Typography.Text ellipsis style={{ maxWidth: 400 }}>+ <Text ellipsis style={{ maxWidth: 400 }}>{text}- </Typography.Text>+ </Text>),title: t('table.columns.input'),width: 400,@@ -43,8 +50,17 @@ const TestCaseList = memo<TestCaseListProps>(({ datasetId }) => {{dataIndex: ['metadata', 'difficulty'],key: 'difficulty',- render: (difficulty: string) =>- difficulty ? <Tag>{t(`difficulty.${difficulty}` as any)}</Tag> : '-',+ render: (difficulty: string) => {+ if (!difficulty) return '-';+ const c = DIFFICULTY_COLORS[difficulty] || DIFFICULTY_COLORS.easy;+ return (+ <Badge+ style={{ backgroundColor: c.bg, borderColor: c.color + '30', color: c.color }}+ >+ {t(`difficulty.${difficulty}` as any)}+ </Badge>+ );+ },title: t('table.columns.difficulty'),width: 100,},diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasePreviewModal/Content.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasePreviewModal/Content.tsxindex d61d07a04cc..1d9968f6d09 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasePreviewModal/Content.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasePreviewModal/Content.tsx@@ -9,9 +9,9 @@ import { useTranslation } from 'react-i18next';const styles = createStaticStyles(({ css }) => ({previewBlock: css`padding: 12px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};- font-size: 14px;+ font-size: ${cssVar.fontSize};line-height: 1.6;color: ${cssVar.colorText};@@ -20,9 +20,10 @@ const styles = createStaticStyles(({ css }) => ({previewLabel: css`margin: 0;- font-size: 12px;- font-weight: 500;+ font-size: ${cssVar.fontSizeSM};+ font-weight: 600;color: ${cssVar.colorTextTertiary};+ letter-spacing: 0.02em;text-transform: uppercase;`,}));@@ -50,7 +51,7 @@ const getDifficultyBadge = (difficulty: string) => {backgroundColor: c.bg,borderColor: c.color + '30',color: c.color,- fontSize: 11,+ fontSize: 12,textTransform: 'capitalize',}}>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasesTab/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasesTab/index.tsxindex 3653284f771..78c305870e4 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasesTab/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/features/TestCasesTab/index.tsx@@ -1,18 +1,19 @@'use client';-import { Button, Flexbox, Input } from '@lobehub/ui';+import { ActionIcon, Flexbox, Input, Text } from '@lobehub/ui';import { Badge, Card, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';-import { createStaticStyles } from 'antd-style';+import { createStaticStyles, cssVar } from 'antd-style';import { Eye, Search } from 'lucide-react';-import { memo, useState } from 'react';+import { memo, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import { useEvalStore } from '@/store/eval';+import SegmentBar from '../../../../features/SegmentBar';import { createTestCasePreviewModal } from '../TestCasePreviewModal';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({card: css`.ant-card-body {padding: 0;@@ -22,16 +23,18 @@ const styles = createStaticStyles(({ css, cssVar }) => ({cursor: pointer;padding-block: 4px;- padding-inline: 10px;+ padding-inline: 8px;border: none;- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;text-transform: capitalize;background: transparent;- transition: all 0.2s;+ transition:+ color 0.15s ease,+ background 0.15s ease;&[data-active='true'] {color: ${cssVar.colorText};@@ -49,12 +52,21 @@ const styles = createStaticStyles(({ css, cssVar }) => ({&:not(:first-child) {border-inline-start: 1px solid ${cssVar.colorBorderSecondary};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,filterContainer: css`overflow: hidden;display: flex;border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 6px;+ border-radius: ${cssVar.borderRadiusSM};`,header: css`padding-block: 12px;@@ -62,13 +74,13 @@ const styles = createStaticStyles(({ css, cssVar }) => ({border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,headerTitle: css`- font-size: 14px;+ font-size: ${cssVar.fontSize};font-weight: 600;color: ${cssVar.colorText};`,indexCell: css`- font-family: monospace;- font-size: 12px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,inputCell: css`@@ -81,10 +93,33 @@ const styles = createStaticStyles(({ css, cssVar }) => ({text-overflow: ellipsis;white-space: nowrap;`,+ // Summary strip — case total as a mono figure plus the difficulty mix bar,+ // sitting between the title row and the table.+ summaryDot: css`+ width: 8px;+ height: 8px;+ border-radius: 999px;+ `,+ summaryRow: css`+ display: flex;+ gap: 16px;+ align-items: center;++ padding-block: 12px;+ padding-inline: 16px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ summaryValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,searchIcon: css`position: absolute;inset-block-start: 50%;- inset-inline-start: 10px;+ inset-inline-start: 12px;transform: translateY(-50%);color: ${cssVar.colorTextTertiary};@@ -92,15 +127,15 @@ const styles = createStaticStyles(({ css, cssVar }) => ({searchInput: css`width: 192px;padding-inline-start: 32px;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};`,table: css`.ant-table {- font-size: 14px;+ font-size: ${cssVar.fontSize};}.ant-table-thead > tr > th {- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;color: ${cssVar.colorTextTertiary};background: ${cssVar.colorFillQuaternary};@@ -112,12 +147,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({}}`,- viewButton: css`- width: 28px;- height: 28px;- padding: 0;- color: ${cssVar.colorTextTertiary};- `,}));interface TestCasesTabProps {@@ -139,6 +168,25 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {});const data = testCaseData?.data || [];+ const total = testCaseData?.total || 0;++ // Difficulty mix across the loaded page — drives the summary strip's bar.+ const difficulty = useMemo(() => {+ const counts = { easy: 0, hard: 0, medium: 0 };+ for (const c of data) {+ const d = c?.metadata?.difficulty as 'easy' | 'hard' | 'medium' | undefined;+ if (d === 'easy' || d === 'medium' || d === 'hard') counts[d] += 1;+ }+ return {+ counts,+ segments: [+ { color: cssVar.colorSuccess, value: counts.easy },+ { color: cssVar.colorWarning, value: counts.medium },+ { color: cssVar.colorError, value: counts.hard },+ ],+ tagged: counts.easy + counts.medium + counts.hard,+ };+ }, [data]);// Client-side filteringconst filteredData = data.filter((c: any) => {@@ -150,16 +198,16 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {const getDifficultyBadge = (difficulty: string) => {const config: Record<string, { bg: string; color: string }> = {easy: {- bg: 'var(--ant-color-success-bg)',- color: 'var(--ant-color-success)',+ bg: cssVar.colorSuccessBg,+ color: cssVar.colorSuccess,},hard: {- bg: 'var(--ant-color-error-bg)',- color: 'var(--ant-color-error)',+ bg: cssVar.colorErrorBg,+ color: cssVar.colorError,},medium: {- bg: 'var(--ant-color-warning-bg)',- color: 'var(--ant-color-warning)',+ bg: cssVar.colorWarningBg,+ color: cssVar.colorWarning,},};@@ -170,7 +218,7 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {backgroundColor: c.bg,borderColor: c.color + '30',color: c.color,- fontSize: 11,+ fontSize: 12,textTransform: 'capitalize',}}>@@ -216,9 +264,9 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {key={tag}style={{backgroundColor: 'transparent',- borderColor: 'var(--ant-color-border)',- color: 'var(--ant-color-text-tertiary)',- fontSize: 10,+ borderColor: cssVar.colorBorder,+ color: cssVar.colorTextTertiary,+ fontSize: 12,}}>{tag}@@ -234,11 +282,9 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {{key: 'actions',render: (_: any, record: any) => (- <Button- className={styles.viewButton}+ <ActionIconicon={Eye}size="small"- variant="text"onClick={() => createTestCasePreviewModal({ testCase: record })}/>),@@ -285,6 +331,40 @@ const TestCasesTab = memo<TestCasesTabProps>(({ datasetId }) => {</Flexbox></div>+ <div className={styles.summaryRow}>+ <Flexbox gap={2}>+ <span className={styles.summaryValue}>{total}</span>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('benchmark.detail.stats.cases')}+ </Text>+ </Flexbox>+ {difficulty.tagged > 0 && (+ <Flexbox flex={1} gap={6} style={{ maxWidth: 320, minWidth: 0 }}>+ <SegmentBar segments={difficulty.segments} />+ <Flexbox horizontal gap={12} style={{ flexWrap: 'wrap' }}>+ {(['easy', 'medium', 'hard'] as const).map((d) => (+ <Flexbox horizontal align="center" gap={6} key={d}>+ <span+ className={styles.summaryDot}+ style={{+ background:+ d === 'easy'+ ? cssVar.colorSuccess+ : d === 'medium'+ ? cssVar.colorWarning+ : cssVar.colorError,+ }}+ />+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t(`difficulty.${d}`)} {difficulty.counts[d]}+ </Text>+ </Flexbox>+ ))}+ </Flexbox>+ </Flexbox>+ )}+ </div>+<div className={styles.table}><Tablecolumns={columns}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/index.tsxindex b734f52777f..a062f1dd2ad 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/index.tsx@@ -1,7 +1,7 @@'use client';import { Flexbox } from '@lobehub/ui';-import { Badge, Card, Skeleton } from 'antd';+import { Card, Skeleton } from 'antd';import { createStaticStyles, cssVar } from 'antd-style';import {Activity,@@ -53,8 +53,20 @@ const styles = createStaticStyles(({ css }) => ({`,sectionTitle: css`margin: 0;- font-size: 16px;+ font-size: ${cssVar.fontSizeLG};font-weight: 600;+ color: ${cssVar.colorText};+ `,+ tag: css`+ padding-block: 2px;+ padding-inline: 8px;+ border: 1px solid ${cssVar.colorBorder};+ border-radius: ${cssVar.borderRadiusXS};++ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};++ background: transparent;`,}));@@ -105,7 +117,7 @@ const BenchmarkDetail = memo(() => {{/* Header skeleton */}<Flexbox gap={16}><Flexbox horizontal align="start" gap={12}>- <Skeleton.Avatar active shape="square" size={40} style={{ borderRadius: 10 }} />+ <Skeleton.Avatar active shape="square" size={40} style={{ borderRadius: cssVar.borderRadiusLG }} /><Flexbox flex={1} gap={8}><Skeleton.Input active style={{ height: 24, width: 200 }} /><Skeleton.Input active size="small" style={{ height: 14, width: 320 }} />@@ -120,16 +132,21 @@ const BenchmarkDetail = memo(() => {key={i}styles={{ body: { padding: 16 } }}style={{- border: `1px solid ${cssVar.colorBorder}`,- borderRadius: 8,+ border: `1px solid ${cssVar.colorBorderSecondary}`,+ borderRadius: cssVar.borderRadius,flex: 1,minWidth: 0,}}><Flexbox gap={12}><Flexbox horizontal align="center" gap={8}>- <Skeleton.Avatar active shape="square" size={36} style={{ borderRadius: 8 }} />- <Skeleton.Input active size="small" style={{ height: 13, width: 80 }} />+ <Skeleton.Avatar+ active+ shape="square"+ size={36}+ style={{ borderRadius: cssVar.borderRadius }}+ />+ <Skeleton.Input active size="small" style={{ height: 14, width: 80 }} /></Flexbox><Flexbox gap={4}><Skeleton.Input active style={{ height: 24, width: 60 }} />@@ -163,19 +180,11 @@ const BenchmarkDetail = memo(() => {{/* Tags */}{(benchmark as any).tags && (benchmark as any).tags.length > 0 && (- <Flexbox horizontal gap={6} style={{ flexWrap: 'wrap' }}>+ <Flexbox horizontal gap={8} style={{ flexWrap: 'wrap' }}>{(benchmark as any).tags.map((tag: string) => (- <Badge- key={tag}- style={{- backgroundColor: 'transparent',- borderColor: 'var(--ant-color-border)',- color: 'var(--ant-color-text-tertiary)',- fontSize: 12,- }}- >+ <span className={styles.tag} key={tag}>{tag}- </Badge>+ </span>))}</Flexbox>)}diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/CaseBanner/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/CaseBanner/index.tsxindex 5698e611fb2..1869fff0f66 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/CaseBanner/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/CaseBanner/index.tsx@@ -2,44 +2,68 @@import type { EvalRunTopicResult } from '@lobechat/types';import { formatCost, formatShortenNumber } from '@lobechat/utils';-import { ActionIcon, Flexbox, Tag } from '@lobehub/ui';-import { Typography } from 'antd';-import { createStaticStyles } from 'antd-style';+import { ActionIcon, Flexbox, Icon, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import {ArrowLeft,+ CheckCircle2,ChevronLeft,ChevronRight,Clock,DollarSign,Footprints,Hash,+ TriangleAlert,+ XCircle,} from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({backLink: css`+ align-self: flex-start;+cursor: pointer;+ border-radius: ${cssVar.borderRadiusSM};color: ${cssVar.colorTextTertiary};+ transition: color 0.15s ease;+&:hover {color: ${cssVar.colorText};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ // Tonal outcome hero band — leads with the case result.+ hero: css`+ padding: 16px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};`,header: css`+ padding-block: 16px;padding-inline: 16px;border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,metricCard: css`gap: 8px;- padding-block: 6px;+ padding-block: 8px;padding-inline: 8px 16px;border-radius: ${cssVar.borderRadiusSM};- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};- background: ${cssVar.colorFillQuaternary};+ background: ${cssVar.colorBgContainer};`,metricIcon: css`display: flex;@@ -55,17 +79,41 @@ const styles = createStaticStyles(({ css, cssVar }) => ({background: ${cssVar.colorFillTertiary};`,metricLabel: css`- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};line-height: 1;color: ${cssVar.colorTextTertiary};`,metricValue: css`- font-family: monospace;- font-size: 14px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSize};font-weight: 500;line-height: 1.4;color: ${cssVar.colorText};`,+ // Large mono score in the hero.+ scoreValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading2};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ // The result word, color-coded — always paired with an icon.+ statusLabel: css`+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;+ line-height: 1;+ `,+ statusTile: css`+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;++ width: 44px;+ height: 44px;+ border-radius: ${cssVar.borderRadius};+ `,}));interface CaseHeaderProps {@@ -76,11 +124,41 @@ interface CaseHeaderProps {onPrev?: () => void;passed?: boolean | null;runName: string;+ score?: number | null;}const CaseHeader = memo<CaseHeaderProps>(- ({ passed, caseNumber, runName, evalResult, onBack, onPrev, onNext }) => {+ ({ passed, caseNumber, runName, evalResult, onBack, onPrev, onNext, score }) => {const { t } = useTranslation('eval');++ // Resolve the outcome: error (run threw) > failed > passed > unknown.+ // Color is always paired with an icon + label, never used alone.+ const hasError = !!evalResult?.error;+ const outcome = hasError+ ? {+ bg: cssVar.colorErrorBg,+ color: cssVar.colorError,+ icon: TriangleAlert,+ label: t('table.filter.error'),+ }+ : passed === true+ ? {+ bg: cssVar.colorSuccessBg,+ color: cssVar.colorSuccess,+ icon: CheckCircle2,+ label: t('table.filter.passed'),+ }+ : passed === false+ ? {+ bg: cssVar.colorErrorBg,+ color: cssVar.colorError,+ icon: XCircle,+ label: t('table.filter.failed'),+ }+ : null;++ const hasScore = score !== undefined && score !== null;+const metrics = [{icon: Clock,@@ -105,46 +183,78 @@ const CaseHeader = memo<CaseHeaderProps>(].filter((m) => m.value !== null);return (- <Flexbox- horizontal- align="center"- className={styles.header}- gap={16}- justify="space-between"- padding={12}- >- <Flexbox gap={2}>- <Flexbox horizontal align="center" className={styles.backLink} gap={4} onClick={onBack}>- <ArrowLeft size={12} />- <span style={{ fontSize: 12 }}>{runName}</span>+ <Flexbox className={styles.header} gap={16}>+ {/* Identity row: breadcrumb back + case number + prev/next nav */}+ <Flexbox horizontal align="center" gap={8} justify="space-between">+ <Flexbox gap={4}>+ <Flexbox+ horizontal+ align="center"+ className={styles.backLink}+ gap={4}+ role="button"+ tabIndex={0}+ onClick={onBack}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ onBack();+ }+ }}+ >+ <ArrowLeft size={12} />+ <Text fontSize={12}>{runName}</Text>+ </Flexbox>+ <Text as="h4" style={{ fontSize: 20, margin: 0 }} weight={600}>+ #{caseNumber}+ </Text></Flexbox>+<Flexbox horizontal align="center" gap={8}><ActionIcon disabled={!onPrev} icon={ChevronLeft} size="small" onClick={onPrev} />- <Typography.Title level={5} style={{ fontSize: 20, margin: 0 }}>- #{caseNumber}- </Typography.Title><ActionIcon disabled={!onNext} icon={ChevronRight} size="small" onClick={onNext} />- {passed !== undefined && passed !== null && (- <Tag color={passed ? 'success' : 'error'}>- {passed ? t('table.filter.passed') : t('table.filter.failed')}- </Tag>- )}</Flexbox></Flexbox>- <Flexbox horizontal align="center" gap={8}>- {metrics.map((m) => (- <Flexbox horizontal align="center" className={styles.metricCard} key={m.label}>- <div className={styles.metricIcon}>- <m.icon size={14} />- </div>- <Flexbox gap={0}>- <span className={styles.metricLabel}>{m.label}</span>- <span className={styles.metricValue}>{m.value}</span>+ {/* Outcome hero — the result is the centerpiece */}+ {(outcome || hasScore) && (+ <Flexbox horizontal align="center" className={styles.hero} gap={16}>+ {outcome && (+ <Flexbox horizontal align="center" flex={1} gap={12}>+ <div className={styles.statusTile} style={{ background: outcome.bg }}>+ <Icon icon={outcome.icon} size={24} style={{ color: outcome.color }} />+ </div>+ <span className={styles.statusLabel} style={{ color: outcome.color }}>+ {outcome.label}+ </span></Flexbox>- </Flexbox>- ))}- </Flexbox>+ )}++ {hasScore && (+ <Flexbox align="flex-end" gap={2}>+ <span className={styles.scoreValue}>{score.toFixed(2)}</span>+ <span className={styles.metricLabel}>{t('caseDetail.score')}</span>+ </Flexbox>+ )}+ </Flexbox>+ )}++ {/* Runtime metric pills */}+ {metrics.length > 0 && (+ <Flexbox horizontal align="center" gap={8} wrap="wrap">+ {metrics.map((m) => (+ <Flexbox horizontal align="center" className={styles.metricCard} key={m.label}>+ <div className={styles.metricIcon}>+ <m.icon size={14} />+ </div>+ <Flexbox gap={0}>+ <span className={styles.metricLabel}>{m.label}</span>+ <span className={styles.metricValue}>{m.value}</span>+ </Flexbox>+ </Flexbox>+ ))}+ </Flexbox>+ )}</Flexbox>);},diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/ChatArea/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/ChatArea/index.tsxindex d0f75cdc874..f8a38bf3d12 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/ChatArea/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/ChatArea/index.tsx@@ -1,12 +1,31 @@'use client';-import { Flexbox } from '@lobehub/ui';+import { Flexbox, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { memo, useCallback } from 'react';+import { useTranslation } from 'react-i18next';import { ChatList, ConversationProvider } from '@/features/Conversation';import MessageItem from '@/features/Conversation/Messages';import { useInitAgentConfig } from '@/hooks/useInitAgentConfig';+const styles = createStaticStyles(({ css }) => ({+ header: css`+ flex: none;++ padding-block: 12px;+ padding-inline: 16px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ scroll: css`+ overflow-x: hidden;+ overflow-y: auto;++ position: relative;+ flex: 1;+ `,+}));+interface ChatAreaProps {agentId: string;threadId?: string;@@ -14,6 +33,7 @@ interface ChatAreaProps {}const ChatArea = memo<ChatAreaProps>(({ agentId, topicId, threadId }) => {+ const { t } = useTranslation('eval');useInitAgentConfig(agentId);const itemContent = useCallback(@@ -26,12 +46,15 @@ const ChatArea = memo<ChatAreaProps>(({ agentId, topicId, threadId }) => {return (<ConversationProvider context={{ agentId, threadId, topicId }} key={contextKey}>- <Flexbox- flex={1}- style={{ overflowX: 'hidden', overflowY: 'auto', position: 'relative' }}- onContextMenu={(e) => e.preventDefault()}- >- <ChatList disableActionsBar itemContent={itemContent} />+ <Flexbox flex={1} style={{ minWidth: 0, overflow: 'hidden' }}>+ <Flexbox className={styles.header}>+ <Text fontSize={12} type={'secondary'} weight={500}>+ {t('caseDetail.chatArea.title')}+ </Text>+ </Flexbox>+ <Flexbox className={styles.scroll} onContextMenu={(e) => e.preventDefault()}>+ <ChatList disableActionsBar itemContent={itemContent} />+ </Flexbox></Flexbox></ConversationProvider>);diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/InfoSidebar/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/InfoSidebar/index.tsxindex a9933f13339..41862ee7b4d 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/InfoSidebar/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/features/InfoSidebar/index.tsx@@ -3,16 +3,24 @@import type { EvalRubricScore } from '@lobechat/types';import { formatCost, formatShortenNumber } from '@lobechat/utils';import { Flexbox, Tag, Text } from '@lobehub/ui';-import { Collapse, Divider, Progress, Typography } from 'antd';-import { createStaticStyles } from 'antd-style';-import { memo } from 'react';+import { Collapse } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';+import { memo, type ReactNode } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+import SegmentBar from '../../../../../../../../features/SegmentBar';++const styles = createStaticStyles(({ css }) => ({container: css`border-inline-start: 1px solid ${cssVar.colorBorderSecondary};background: ${cssVar.colorBgContainer};`,+ // Reading block for free-text values (input / expected).+ copyBlock: css`+ font-size: ${cssVar.fontSize};+ line-height: 1.5;+ color: ${cssVar.colorText};+ `,infoItem: css`display: flex;align-items: center;@@ -22,40 +30,46 @@ const styles = createStaticStyles(({ css, cssVar }) => ({padding-inline: 0;`,infoLabel: css`- font-size: 13px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextSecondary};`,infoValue: css`- font-family: monospace;- font-size: 13px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSize};color: ${cssVar.colorText};`,- rubricItem: css`- padding-block: 8px;- padding-inline: 0;+ // The headline score for the panel — large mono number on a tonal surface.+ scoreCard: css`+ padding: 12px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillQuaternary};+ `,+ scoreValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading3};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ // Divider between titled sections — tonal hairline, not a heavy rule.+ section: css`+ padding-block-end: 16px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,rubricName: css`- font-size: 13px;+ font-size: ${cssVar.fontSize};font-weight: 500;`,rubricReason: css`- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};line-height: 1.5;color: ${cssVar.colorTextSecondary};`,rubricScore: css`- font-family: monospace;- font-size: 12px;- color: ${cssVar.colorTextSecondary};- `,- sectionTitle: css`- margin: 0;-- font-size: 12px;- font-weight: 600;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};- text-transform: uppercase;- letter-spacing: 0.5px;`,}));@@ -95,6 +109,13 @@ const DETERMINISTIC_MODES = new Set(['python',]);+// Section label — one consistent treatment for every field heading in the panel.+const SectionTitle = memo<{ children: ReactNode }>(({ children }) => (+ <Text fontSize={12} type={'secondary'} weight={500}>+ {children}+ </Text>+));+const getEvalModeFromRubricId = (rubricId: string): string => {return rubricId.replace(/^eval-mode-/, '');};@@ -116,6 +137,9 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scor? rubricScores.filter((s) => !isDeterministicMode(s.rubricId)): [];+ const hasScore = score !== undefined && score !== null;+ const scorePct = hasScore ? Math.max(0, Math.min(100, Math.round(score * 100))) : 0;+return (<FlexboxclassName={styles.container}@@ -123,48 +147,54 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scorpadding={16}style={{ height: '100%', overflowY: 'auto', width: 320 }}>+ {/* Failure reason — error states surface at the top of the panel */}+ {evalResult?.error && (+ <Flexbox className={styles.section} gap={8}>+ <SectionTitle>{t('caseDetail.failureReason')}</SectionTitle>+ <Text className={styles.copyBlock} type="danger">+ {evalResult.error}+ </Text>+ </Flexbox>+ )}+{/* Test Case */}- <Flexbox gap={8}>- <Typography.Text className={styles.sectionTitle}>- {t('caseDetail.section.testCase')}- </Typography.Text>+ <Flexbox className={styles.section} gap={12}>+ <SectionTitle>{t('caseDetail.section.testCase')}</SectionTitle>{testCase?.content?.input && (<Flexbox gap={4}>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t('caseDetail.input')}</Text>- <Text style={{ fontSize: 14 }}>{testCase.content.input}</Text>+ <Text className={styles.copyBlock}>{testCase.content.input}</Text></Flexbox>)}{testCase?.content?.expected && (<Flexbox gap={4}>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t('caseDetail.expected')}</Text>- <Text style={{ fontSize: 14 }}>{testCase.content.expected}</Text>+ <Text className={styles.copyBlock}>{testCase.content.expected}</Text></Flexbox>)}{testCase?.metadata?.difficulty && (<Flexbox gap={4}>- <Typography.Text strong style={{ fontSize: 13 }}>+ <Text fontSize={12} type="secondary">{t('caseDetail.difficulty')}- </Typography.Text>- <Tag>{t(`difficulty.${testCase.metadata.difficulty}` as any)}</Tag>+ </Text>+ <Flexbox horizontal>+ <Tag>{t(`difficulty.${testCase.metadata.difficulty}` as any)}</Tag>+ </Flexbox></Flexbox>)}-- <Divider style={{ margin: 0 }} /></Flexbox>{/* Scoring Details */}{(hasRubricScores || score !== undefined) && (- <Flexbox gap={8}>- <Typography.Text className={styles.sectionTitle}>- {t('caseDetail.section.scoring')}- </Typography.Text>+ <Flexbox className={styles.section} gap={12}>+ <SectionTitle>{t('caseDetail.section.scoring')}</SectionTitle>{/* Deterministic modes: just show eval mode + pass/fail */}{allDeterministic && hasRubricScores && (@@ -178,20 +208,22 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scor</div>)}- {/* LLM/Rubric modes: show score + progress + expandable reasons */}+ {/* LLM/Rubric modes: show score card + pill progress + expandable reasons */}{!allDeterministic && (<>- {score !== undefined && score !== null && (- <Flexbox gap={4}>- <div className={styles.infoItem}>- <span className={styles.infoLabel}>{t('caseDetail.score')}</span>- <span className={styles.infoValue}>{score.toFixed(2)}</span>- </div>- <Progress- percent={Math.round(score * 100)}- size="small"- status={passed ? 'success' : 'exception'}- strokeLinecap="round"+ {hasScore && (+ <Flexbox className={styles.scoreCard} gap={8}>+ <Flexbox horizontal align="flex-end" gap={8} justify="space-between">+ <span className={styles.scoreValue}>{score.toFixed(2)}</span>+ <Text fontSize={12} type="secondary">+ {t('caseDetail.score')}+ </Text>+ </Flexbox>+ <SegmentBar+ segments={[+ { color: passed ? cssVar.colorSuccess : cssVar.colorError, value: scorePct },+ { color: cssVar.colorFillSecondary, value: 100 - scorePct },+ ]}/></Flexbox>)}@@ -202,7 +234,7 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scorsize="small"items={scoredRubrics.map((s) => ({children: s.reason ? (- <Typography.Text className={styles.rubricReason}>{s.reason}</Typography.Text>+ <span className={styles.rubricReason}>{s.reason}</span>) : null,key: s.rubricId,label: (@@ -218,16 +250,12 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scor)}</>)}-- <Divider style={{ margin: 0 }} /></Flexbox>)}{/* Runtime */}<Flexbox gap={8}>- <Typography.Text className={styles.sectionTitle}>- {t('caseDetail.section.runtime')}- </Typography.Text>+ <SectionTitle>{t('caseDetail.section.runtime')}</SectionTitle>{evalResult?.duration !== undefined && evalResult.duration !== null && (<div className={styles.infoItem}>@@ -263,15 +291,6 @@ const InfoSidebar = memo<InfoSidebarProps>(({ testCase, evalResult, passed, scor<Tag>{evalResult.completionReason}</Tag></div>)}-- {evalResult?.error && (- <Flexbox gap={4}>- <Typography.Text strong style={{ fontSize: 13 }}>- {t('caseDetail.failureReason')}- </Typography.Text>- <Typography.Text type="danger">{evalResult.error}</Typography.Text>- </Flexbox>- )}</Flexbox></Flexbox>);diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/index.tsxindex 92684494be0..627b9e8f7e8 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/cases/[caseId]/index.tsx@@ -3,6 +3,7 @@import type { EvalThreadResult } from '@lobechat/types';import { Flexbox } from '@lobehub/ui';import { Tabs } from '@lobehub/ui/base-ui';+import { cssVar } from 'antd-style';import { memo, useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import { useParams } from 'react-router';@@ -90,22 +91,28 @@ const CaseDetail = memo(() => {<Flexbox height="100%" style={{ overflow: 'hidden' }}><CaseHeadercaseNumber={(caseResult.testCase?.sortOrder ?? 0) + 1}- evalResult={caseResult.evalResult}- passed={caseResult.passed}+ evalResult={displayEvalResult}+ passed={displayPassed}runName={runDetail?.name || runId!.slice(0, 8)}+ score={displayScore}onBack={() => navigate(`/eval/bench/${benchmarkId}/runs/${runId}`)}onNext={nextCaseId ? () => navigate(`${basePath}/${nextCaseId}`) : undefined}onPrev={prevCaseId ? () => navigate(`${basePath}/${prevCaseId}`) : undefined}/>{hasMultipleThreads && (- <Tabs- activeKey={activeThreadId!}- items={threads.map((thread, index) => ({- key: thread.threadId,- label: t('caseDetail.threads.attempt', { number: index + 1 }),- }))}- onChange={(key) => setActiveThreadId(key)}- />+ <Flexbox+ paddingInline={16}+ style={{ borderBlockEnd: `1px solid ${cssVar.colorBorderSecondary}`, flex: 'none' }}+ >+ <Tabs+ activeKey={activeThreadId!}+ items={threads.map((thread, index) => ({+ key: thread.threadId,+ label: t('caseDetail.threads.attempt', { number: index + 1 }),+ }))}+ onChange={(key) => setActiveThreadId(key)}+ />+ </Flexbox>)}<Flexbox horizontal flex={1} style={{ overflow: 'hidden' }}>{topicId && agentId ? (diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/BatchResumeModal/Content.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/BatchResumeModal/Content.tsxindex 6c2a32ab507..504437ba3ed 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/BatchResumeModal/Content.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/BatchResumeModal/Content.tsx@@ -2,11 +2,20 @@import { Badge, Checkbox, Skeleton, Table, Tag, Tooltip, Typography } from 'antd';import type { ColumnsType } from 'antd/es/table';+import { createStaticStyles, cssVar } from 'antd-style';import { type FC, memo, useCallback, useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import { agentEvalService } from '@/services/agentEval';+const styles = createStaticStyles(({ css }) => ({+ indexCell: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};+ `,+}));+type ResumableCase = Awaited<ReturnType<typeof agentEvalService.getResumableCases>>[number];const StatusLabel = memo<{ status: string | null | undefined }>(({ status }) => {@@ -109,15 +118,7 @@ const BatchResumeContent: FC<BatchResumeContentProps> = ({{key: 'index',render: (_: any, record: ResumableCase) => (- <span- style={{- color: 'var(--ant-color-text-tertiary)',- fontFamily: 'monospace',- fontSize: 12,- }}- >- {record.sortOrder ?? '-'}- </span>+ <span className={styles.indexCell}>{record.sortOrder ?? '-'}</span>),title: '#',width: 48,diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsxindex 87fbf86acb5..b3da0fb06c9 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/CaseResultsTable/index.tsx@@ -12,39 +12,103 @@ import { memo, useEffect, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import WorkspaceLink from '@/features/Workspace/WorkspaceLink';+import SegmentBar from '@/routes/(main)/eval/features/SegmentBar';import { getResumeTarget } from '../resumeTarget';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({caseLink: css`color: inherit;text-decoration: none;++ &:hover {+ color: ${cssVar.colorPrimary};+ }`,durationSub: css`- font-family: monospace;- font-size: 10px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,+ chip: css`+ cursor: pointer;++ display: inline-flex;+ gap: 6px;+ align-items: center;++ padding-block: 4px;+ padding-inline: 10px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: 999px;++ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextSecondary};++ background: ${cssVar.colorBgContainer};++ transition:+ border-color 0.15s ease,+ background 0.15s ease;++ &:hover {+ background: ${cssVar.colorFillTertiary};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ chipActive: css`+ border-color: ${cssVar.colorText};+ color: ${cssVar.colorText};+ background: ${cssVar.colorFillSecondary};+ `,+ chipCount: css`+ font-family: ${cssVar.fontFamilyCode};+ font-weight: 600;+ `,+ chipDot: css`+ display: inline-block;+ width: 8px;+ height: 8px;+ border-radius: 999px;+ `,filterBar: css`padding-block: 12px;padding-inline: 20px;border-block-end: 1px solid ${cssVar.colorBorderSecondary};`,+ summaryBar: css`+ padding-block: 16px;+ padding-inline: 20px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ summaryLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,indexCell: css`- font-family: monospace;- font-size: 12px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,monoCell: css`- font-family: monospace;- font-size: 12px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};`,threadDot: css`display: inline-block;width: 8px;height: 8px;- border-radius: 50%;+ border-radius: 999px;`,}));@@ -222,6 +286,56 @@ const CaseResultsTable = memo<CaseResultsTableProps>(return filtered;}, [results, searchText, statusFilter]);+ // Status distribution across all results — drives the summary SegmentBar + filter chips.+ const distribution = useMemo(() => {+ let passed = 0;+ let failed = 0;+ let error = 0;+ let pending = 0;+ for (const r of results) {+ const status: string | undefined = r.status;+ if (status === 'passed') passed++;+ else if (status === 'failed') failed++;+ else if (status === 'error' || status === 'timeout') error++;+ else if (!status || status === 'pending' || status === 'running') pending++;+ }+ return { error, failed, passed, pending };+ }, [results]);++ const statusChips = [+ {+ color: cssVar.colorSuccess,+ count: distribution.passed,+ label: t('table.filter.passed'),+ value: 'passed',+ },+ {+ color: cssVar.colorError,+ count: distribution.failed,+ label: t('table.filter.failed'),+ value: 'failed',+ },+ {+ color: cssVar.colorWarning,+ count: distribution.error,+ label: t('table.filter.error'),+ value: 'error',+ },+ {+ color: cssVar.colorTextQuaternary,+ count: distribution.pending,+ label: t('run.status.pending'),+ value: 'pending',+ },+ ];++ const segments = [+ { color: cssVar.colorSuccess, value: distribution.passed },+ { color: cssVar.colorError, value: distribution.failed },+ { color: cssVar.colorWarning, value: distribution.error },+ { color: cssVar.colorTextQuaternary, value: distribution.pending },+ ];+const columns: ColumnsType<any> = useMemo(() => {const cols: ColumnsType<any> = [{@@ -466,6 +580,36 @@ const CaseResultsTable = memo<CaseResultsTableProps>(return (<Flexbox gap={0}>+ {/* Status distribution summary — outcome at a glance + quick filter chips */}+ <Flexbox className={styles.summaryBar} gap={12}>+ <span className={styles.summaryLabel}>{t('table.columns.status')}</span>+ <SegmentBar segments={segments} />+ <Flexbox horizontal gap={8} wrap="wrap">+ {statusChips.map((chip) => {+ const isActive = statusFilter === chip.value;+ return (+ <span+ className={`${styles.chip}${isActive ? ` ${styles.chipActive}` : ''}`}+ key={chip.value}+ role={'button'}+ tabIndex={0}+ onClick={() => setStatusFilter(isActive ? 'all' : chip.value)}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ setStatusFilter(isActive ? 'all' : chip.value);+ }+ }}+ >+ <span className={styles.chipDot} style={{ backgroundColor: chip.color }} />+ {chip.label}+ <span className={styles.chipCount}>{chip.count}</span>+ </span>+ );+ })}+ </Flexbox>+ </Flexbox>+{/* Filters */}<Flexbox horizontal align="center" className={styles.filterBar} gap={8}><Input.Searchdiff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/BenchmarkCharts.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/BenchmarkCharts.tsxindex 0d39ecd4222..bf14bcdc7f1 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/BenchmarkCharts.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/BenchmarkCharts.tsx@@ -2,40 +2,42 @@import { BarChart } from '@lobehub/charts';import { Flexbox } from '@lobehub/ui';-import { createStaticStyles, useTheme } from 'antd-style';+import { createStaticStyles, cssVar, useTheme } from 'antd-style';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';import ScatterPlot from './ScatterPlot';import StatusDonut from './StatusDonut';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({chartCard: css`padding: 16px;- border: 1px solid ${cssVar.colorBorder};- border-radius: 12px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};background: ${cssVar.colorBgContainer};`,chartTitle: css`margin-block-end: 12px;- font-size: 14px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;color: ${cssVar.colorTextSecondary};`,legendDot: css`width: 8px;height: 8px;- border-radius: 50%;+ border-radius: 999px;`,legendText: css`+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};`,totalCount: css`padding-block: 1px;- padding-inline: 6px;- border-radius: 4px;+ padding-inline: 8px;+ border-radius: ${cssVar.borderRadiusXS};- font-size: 11px;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};font-weight: 600;color: ${cssVar.colorTextSecondary};@@ -133,7 +135,7 @@ const BenchmarkCharts = memo<BenchmarkChartsProps>(({ results, benchmarkId, runI<span className={styles.chartTitle} style={{ marginBlockEnd: 0 }}>{t('run.chart.latencyTokenDistribution')}</span>- <Flexbox horizontal gap={12} style={{ fontSize: 11 }}>+ <Flexbox horizontal gap={12} style={{ fontSize: cssVar.fontSizeSM }}><Flexbox horizontal align={'center'} gap={4}><div className={styles.legendDot} style={{ background: theme.colorSuccess }} /><span className={styles.legendText}>{t('run.chart.pass')}</span>@@ -153,7 +155,7 @@ const BenchmarkCharts = memo<BenchmarkChartsProps>(({ results, benchmarkId, runI{/* Chart 3: Histogram */}<Flexbox className={styles.chartCard} flex={1}>- <Flexbox horizontal align="center" className={styles.chartTitle} gap={6}>+ <Flexbox horizontal align="center" className={styles.chartTitle} gap={8}><span>{t('run.chart.latencyDistribution')}</span><span className={styles.totalCount}>{results.length}</span></Flexbox>diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/ScatterPlot.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/ScatterPlot.tsxindex 52753094981..dcea31251cf 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/ScatterPlot.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/Charts/ScatterPlot.tsx@@ -3,25 +3,37 @@import { formatCost, formatShortenNumber } from '@lobechat/utils';import { Flexbox, Tag } from '@lobehub/ui';import { Divider, Tooltip } from 'antd';-import { createStaticStyles, useTheme } from 'antd-style';+import { createStaticStyles, cssVar, useTheme } from 'antd-style';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({axisLabel: css`pointer-events: none;position: absolute;- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,dot: css`cursor: pointer;- transition: all 0.15s ease;++ transition:+ transform 0.15s ease,+ opacity 0.15s ease;&:hover {transform: translate(-50%, 50%) scale(1.5);opacity: 1 !important;}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,scatterArea: css`position: relative;@@ -84,12 +96,26 @@ const ScatterPlot = memo<ScatterPlotProps>(({ results, benchmarkId, runId }) =>width: '100%',}}>- <line stroke={theme.colorBorder} strokeWidth="0.5" x1="0" x2="100" y1="100" y2="100" />- <line stroke={theme.colorBorder} strokeWidth="0.5" x1="0" x2="0" y1="0" y2="100" />+ <line+ stroke={theme.colorBorderSecondary}+ strokeWidth="0.5"+ x1="0"+ x2="100"+ y1="100"+ y2="100"+ />+ <line+ stroke={theme.colorBorderSecondary}+ strokeWidth="0.5"+ x1="0"+ x2="0"+ y1="0"+ y2="100"+ />{[1, 2, 3].map((i) => (<linekey={i}- stroke={theme.colorBorder}+ stroke={theme.colorBorderSecondary}strokeDasharray="2 2"strokeOpacity="0.5"strokeWidth="0.5"@@ -127,8 +153,8 @@ const ScatterPlot = memo<ScatterPlotProps>(({ results, benchmarkId, runId }) =>title={<Flexbox gap={4} style={{ fontSize: 12, maxWidth: 320 }}>{/* Row 1: #Number [Tag] ... Duration */}- <Flexbox horizontal align="center" gap={6} justify="space-between">- <Flexbox horizontal align="center" gap={6}>+ <Flexbox horizontal align="center" gap={8} justify="space-between">+ <Flexbox horizontal align="center" gap={8}><span style={{ fontWeight: 600 }}>#{d.sortOrder ?? i + 1}</span><Tag color={tagColor} size="small">{statusLabel}@@ -169,6 +195,8 @@ const ScatterPlot = memo<ScatterPlotProps>(({ results, benchmarkId, runId }) =>><divclassName={styles.dot}+ role={'button'}+ tabIndex={0}style={{background: fill,borderRadius: '50%',@@ -181,6 +209,12 @@ const ScatterPlot = memo<ScatterPlotProps>(({ results, benchmarkId, runId }) =>width: 7,}}onClick={() => window.open(caseUrl, '_blank')}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ window.open(caseUrl, '_blank');+ }+ }}/></Tooltip>);diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/IdleState/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/IdleState/index.tsxindex 12c0c4e92d7..590fa09c140 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/IdleState/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/IdleState/index.tsx@@ -3,14 +3,14 @@import { Button, Icon } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';import { App } from 'antd';-import { createStaticStyles, cx } from 'antd-style';+import { createStaticStyles, cssVar, cx } from 'antd-style';import { Brain, ChartBar, MessageSquare, Play } from 'lucide-react';import { memo, useState } from 'react';import { useTranslation } from 'react-i18next';import { useEvalStore } from '@/store/eval';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({center: css`position: absolute;inset: 0;@@ -22,7 +22,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 40px;height: 40px;margin: auto;- border-radius: 50%;+ border-radius: 999px;color: ${cssVar.colorTextSecondary};@@ -40,7 +40,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,hint: css`margin-block-start: 24px;- font-size: 13px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextQuaternary};`,icon: css`@@ -53,7 +53,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 30px;height: 30px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};`,icon1: css`inset-block-start: 15px;@@ -79,7 +79,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({margin: auto;border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 50%;+ border-radius: 999px;`,orbit1: css`width: 200px;diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/PendingState/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/PendingState/index.tsxindex bbd0461109c..3740ec7a2c1 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/PendingState/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/PendingState/index.tsx@@ -1,11 +1,11 @@'use client';import { Icon } from '@lobehub/ui';-import { createStaticStyles, cx } from 'antd-style';+import { createStaticStyles, cssVar, cx } from 'antd-style';import { Brain, ChartBar, Clock, MessageSquare } from 'lucide-react';import { memo } from 'react';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({center: css`position: absolute;inset: 0;@@ -17,7 +17,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 40px;height: 40px;margin: auto;- border-radius: 50%;+ border-radius: 999px;color: ${cssVar.colorWarning};@@ -35,7 +35,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,hint: css`margin-block-start: 24px;- font-size: 13px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextQuaternary};`,icon: css`@@ -48,7 +48,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 30px;height: 30px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};`,icon1: css`inset-block-start: 15px;@@ -74,7 +74,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({margin: auto;border: 1px dashed ${cssVar.colorBorderSecondary};- border-radius: 50%;+ border-radius: 999px;`,orbit1: css`width: 200px;diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunHeader/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunHeader/index.tsxindex 8dfad2e035d..e628f9f101e 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunHeader/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunHeader/index.tsx@@ -4,8 +4,8 @@ import { AGENT_PROFILE_URL } from '@lobechat/const';import type { AgentEvalRunDetail } from '@lobechat/types';import { ActionIcon, Avatar, copyToClipboard, Flexbox, Highlighter, Markdown } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';-import { App, Button, Card, Tag, Typography } from 'antd';-import { createStaticStyles } from 'antd-style';+import { App, Button, Tag } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import {ArrowLeft,ChevronDown,@@ -25,7 +25,7 @@ import { createRunEditModal } from '@/routes/(main)/eval/bench/[benchmarkId]/feaimport StatusBadge from '@/routes/(main)/eval/features/StatusBadge';import { useEvalStore } from '@/store/eval';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({backLink: css`display: inline-flex;gap: 4px;@@ -33,22 +33,31 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: fit-content;- font-size: 14px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextTertiary};text-decoration: none;- transition: color 0.2s;+ transition: color 0.15s ease;&:hover {color: ${cssVar.colorText};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -1px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,configSection: css`margin-block-start: 12px;`,configSectionLabel: css`margin-block-end: 8px;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;color: ${cssVar.colorTextSecondary};`,@@ -57,9 +66,9 @@ const styles = createStaticStyles(({ css, cssVar }) => ({max-height: 300px;padding: 12px;- border-radius: 6px;+ border-radius: ${cssVar.borderRadiusSM};- font-size: 13px;+ font-size: ${cssVar.fontSize};background: ${cssVar.colorFillQuaternary};`,@@ -70,19 +79,49 @@ const styles = createStaticStyles(({ css, cssVar }) => ({gap: 4px;align-items: center;+ width: fit-content;padding: 0;border: none;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};background: transparent;- transition: color 0.2s;+ transition: color 0.15s ease;&:hover {color: ${cssVar.colorText};}++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ agentLink: css`+ cursor: pointer;++ border-radius: ${cssVar.borderRadiusSM};++ transition: color 0.15s ease;++ &:hover {+ color: ${cssVar.colorText};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: 2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,datasetLink: css`color: inherit;@@ -92,20 +131,44 @@ const styles = createStaticStyles(({ css, cssVar }) => ({color: ${cssVar.colorPrimary};}`,+ headerBand: css`+ padding: 20px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};+ `,+ metaItem: css`+ display: inline-flex;+ gap: 6px;+ align-items: center;++ padding-block: 4px;+ padding-inline: 10px;+ border-radius: ${cssVar.borderRadiusSM};++ font-size: ${cssVar.fontSize};+ color: ${cssVar.colorTextSecondary};++ background: ${cssVar.colorFillTertiary};+ `,+ metaLabel: css`+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};+ `,metaRow: css`flex-wrap: wrap;- font-size: 13px;- color: ${cssVar.colorTextTertiary};`,modelText: css`- font-family: monospace;- font-size: 12px;- `,- separator: css`- color: ${cssVar.colorBorder};+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextSecondary};`,- titleRow: css`- margin-block-end: 16px;+ runName: css`+ margin: 0;+ font-size: ${cssVar.fontSizeHeading3};+ font-weight: 600;+ line-height: 1.2;+ color: ${cssVar.colorText};`,}));@@ -202,24 +265,22 @@ const RunHeader = memo<RunHeaderProps>(({ run, benchmarkId, hideStart }) => {{t('run.detail.backToBenchmark')}</WorkspaceLink>- {/* Header Card */}- <Card styles={{ body: { padding: 20 } }}>+ {/* Header band — results-led: run name + status prominent, meta as a quiet stat row */}+ <Flexbox className={styles.headerBand} gap={16}>{/* Title row */}- <Flexbox horizontal align="center" className={styles.titleRow} justify="space-between">- <Flexbox gap={4}>- <Flexbox horizontal align="center" gap={8}>- <Typography.Title level={4} style={{ margin: 0 }}>- {run.name || run.id.slice(0, 8)}- </Typography.Title>+ <Flexbox horizontal align="flex-start" gap={16} justify="space-between">+ <Flexbox gap={10} style={{ minWidth: 0 }}>+ <Flexbox horizontal align="center" gap={12}>+ <h1 className={styles.runName}>{run.name || run.id.slice(0, 8)}</h1>+ <StatusBadge status={run.status} /><ActionIconicon={Copy}size="small"title={t('run.detail.copyRunId')}onClick={handleCopyRunId}/>- <StatusBadge status={run.status} /></Flexbox>- {/* Meta info row */}+ {/* Meta info — quiet stat chips */}<Flexbox horizontal align="center" className={styles.metaRow} gap={8}>{run.dataset && (<WorkspaceLink@@ -227,43 +288,47 @@ const RunHeader = memo<RunHeaderProps>(({ run, benchmarkId, hideStart }) => {target="_blank"to={`/eval/bench/${benchmarkId}/datasets/${run.dataset.id}`}>- {run.dataset.name}+ <span className={styles.metaItem}>{run.dataset.name}</span></WorkspaceLink>)}{run.targetAgentId && (- <>- <span className={styles.separator}>|</span>- <Flexbox- horizontal- align="center"- gap={4}- style={{ cursor: 'pointer' }}- onClick={handleOpenAgent}- >+ <Flexbox+ horizontal+ align="center"+ className={styles.agentLink}+ role={'button'}+ tabIndex={0}+ onClick={handleOpenAgent}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ handleOpenAgent();+ }+ }}+ >+ <span className={styles.metaItem}><Avatar avatar={agentAvatar} size={16} />- <span>{agentTitle}</span>- </Flexbox>- </>+ {agentTitle}+ </span>+ </Flexbox>)}{agentModel && (- <>- <span className={styles.separator}>|</span>+ <span className={styles.metaItem}><span className={styles.modelText}>{agentProvider ? `${agentProvider} / ` : ''}{agentModel}</span>- </>+ </span>)}{run.createdAt && (- <>- <span className={styles.separator}>|</span>- <span>{formatDate(run.createdAt)}</span>- </>+ <span className={styles.metaItem}>+ <span className={styles.metaLabel}>{formatDate(run.createdAt)}</span>+ </span>)}</Flexbox></Flexbox>{/* Actions */}- <Flexbox horizontal align="center" gap={8}>+ <Flexbox horizontal align="center" gap={8} style={{ flexShrink: 0 }}>{canStart && !hideStart && (<Buttonicon={<Play size={14} />}@@ -357,7 +422,7 @@ const RunHeader = memo<RunHeaderProps>(({ run, benchmarkId, hideStart }) => {)}</Flexbox>)}- </Card>+ </Flexbox></Flexbox>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunningState/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunningState/index.tsxindex e19db375845..d2fef000075 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunningState/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/RunningState/index.tsx@@ -1,12 +1,12 @@'use client';import { Icon } from '@lobehub/ui';-import { createStaticStyles, cx } from 'antd-style';+import { createStaticStyles, cssVar, cx } from 'antd-style';import { Brain, ChartBar, Loader2, MessageSquare } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({center: css`position: absolute;inset: 0;@@ -18,7 +18,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 40px;height: 40px;margin: auto;- border-radius: 50%;+ border-radius: 999px;color: ${cssVar.colorTextSecondary};@@ -36,7 +36,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,hint: css`margin-block-start: 24px;- font-size: 13px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextQuaternary};`,icon: css`@@ -49,7 +49,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 30px;height: 30px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};`,icon1: css`inset-block-start: 15px;@@ -75,7 +75,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({margin: auto;border: 1px dashed ${cssVar.colorBorderSecondary};- border-radius: 50%;+ border-radius: 999px;`,orbit1: css`width: 200px;@@ -105,6 +105,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({}animation: orbit-spin 20s linear infinite;++ @media (prefers-reduced-motion: reduce) {+ animation: none;+ }`,spinner: css`@keyframes spin {@@ -118,6 +122,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({}animation: spin 1.5s linear infinite;++ @media (prefers-reduced-motion: reduce) {+ animation: none;+ }`,}));diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/StatsCards/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/StatsCards/index.tsxindex e2706266e0f..de7959604b9 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/StatsCards/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/features/StatsCards/index.tsx@@ -2,7 +2,7 @@import type { EvalRunMetrics } from '@lobechat/types';import { formatCost, formatShortenNumber } from '@lobechat/utils';-import { Flexbox, Icon } from '@lobehub/ui';+import { Flexbox, Icon, Text } from '@lobehub/ui';import { createStaticStyles, cssVar } from 'antd-style';import { CheckCircle2, Clock, DollarSign, Hash } from 'lucide-react';import { memo } from 'react';@@ -10,16 +10,30 @@ import { useTranslation } from 'react-i18next';import { formatDuration } from '../../../../../../utils';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({card: css`padding: 16px;- border: 1px solid ${cssVar.colorBorder};- border-radius: 8px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};`,grid: css`display: grid;- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));gap: 16px;+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));+ `,+ // Pass rate hero — the run's headline outcome, given the most visual weight.+ hero: css`+ padding: 20px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};+ `,+ heroValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading1};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};`,iconBox: css`display: flex;@@ -29,27 +43,46 @@ const styles = createStaticStyles(({ css, cssVar }) => ({width: 36px;height: 36px;- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};`,label: css`- font-size: 13px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,+ progressFill: css`+ height: 100%;+ border-radius: 999px;++ background: ${cssVar.colorSuccess};++ transition: width 0.3s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ progressTrack: css`+ overflow: hidden;++ width: 100%;+ height: 8px;+ border-radius: 999px;++ background: ${cssVar.colorFillSecondary};+ `,subtitle: css`- font-size: 14px;+ font-size: ${cssVar.fontSize};color: ${cssVar.colorTextSecondary};`,subtitleUnit: css`- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,value: css`- font-size: 24px;- font-weight: bold;- `,- valueSuffix: css`- font-size: 16px;- color: ${cssVar.colorTextTertiary};+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading3};+ font-weight: 600;+ color: ${cssVar.colorText};`,}));@@ -62,23 +95,10 @@ const StatsCards = memo<StatsCardsProps>(({ metrics }) => {const passedCount = metrics?.passedCases ?? 0;const totalCases = metrics?.totalCases ?? 0;+ const hasPassRate = metrics?.passRate !== undefined;+ const passPct = hasPassRate ? Math.round((metrics?.passRate ?? 0) * 100) : 0;const cards = [- {- bgColor: cssVar.colorSuccessBg,- color: cssVar.colorSuccess,- icon: CheckCircle2,- label: t('run.metrics.passRate'),- subtitle:- totalCases > 0 ? (- <>- {passedCount}/{totalCases}{' '}- <span className={styles.subtitleUnit}>{t('table.filter.passed')}</span>- </>- ) : undefined,- value: metrics?.passRate !== undefined ? `${Math.round(metrics.passRate * 100)}%` : '-',- valueSuffix: undefined,- },{bgColor: cssVar.colorWarningBg,color: cssVar.colorWarning,@@ -124,23 +144,49 @@ const StatsCards = memo<StatsCardsProps>(({ metrics }) => {];return (- <div className={styles.grid}>- {cards.map((card) => (- <Flexbox horizontal align="center" className={styles.card} gap={12} key={card.label}>- <div className={styles.iconBox} style={{ background: card.bgColor }}>- <Icon icon={card.icon} size={16} style={{ color: card.color }} />- </div>- <Flexbox gap={2}>- <span className={styles.label}>{card.label}</span>- <span className={styles.value}>- {card.value}- {card.valueSuffix && <span className={styles.valueSuffix}>{card.valueSuffix}</span>}- </span>- {card.subtitle && <span className={styles.subtitle}>{card.subtitle}</span>}+ <Flexbox gap={16}>+ {/* Pass rate hero */}+ <Flexbox className={styles.hero} gap={16}>+ <Flexbox horizontal align={'flex-end'} gap={16} justify={'space-between'}>+ <Flexbox gap={6}>+ <Flexbox horizontal align={'center'} gap={8}>+ <div className={styles.iconBox} style={{ background: cssVar.colorSuccessBg }}>+ <Icon icon={CheckCircle2} size={16} style={{ color: cssVar.colorSuccess }} />+ </div>+ <span className={styles.label}>{t('run.metrics.passRate')}</span>+ </Flexbox>+ <span className={styles.heroValue}>{hasPassRate ? `${passPct}%` : '-'}</span></Flexbox>+ {totalCases > 0 && (+ <Text className={styles.subtitle}>+ {passedCount}/{totalCases}{' '}+ <span className={styles.subtitleUnit}>{t('table.filter.passed')}</span>+ </Text>+ )}</Flexbox>- ))}- </div>+ {hasPassRate && totalCases > 0 && (+ <div className={styles.progressTrack}>+ <div className={styles.progressFill} style={{ width: `${passPct}%` }} />+ </div>+ )}+ </Flexbox>++ {/* Secondary metrics */}+ <div className={styles.grid}>+ {cards.map((card) => (+ <Flexbox horizontal align={'center'} className={styles.card} gap={12} key={card.label}>+ <div className={styles.iconBox} style={{ background: card.bgColor }}>+ <Icon icon={card.icon} size={16} style={{ color: card.color }} />+ </div>+ <Flexbox gap={2}>+ <span className={styles.label}>{card.label}</span>+ <span className={styles.value}>{card.value}</span>+ {card.subtitle && <span className={styles.subtitle}>{card.subtitle}</span>}+ </Flexbox>+ </Flexbox>+ ))}+ </div>+ </Flexbox>);});diff --git a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/index.tsx b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/index.tsxindex 50327529120..c77f188b195 100644--- a/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/index.tsx+++ b/src/routes/(main)/eval/bench/[benchmarkId]/runs/[runId]/index.tsx@@ -1,8 +1,9 @@'use client';-import { Flexbox } from '@lobehub/ui';+import { Flexbox, Text } from '@lobehub/ui';import { confirmModal } from '@lobehub/ui/base-ui';-import { Button, Card, Progress, Typography } from 'antd';+import { Button, Progress } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import { Play, RotateCcw } from 'lucide-react';import { memo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -22,6 +23,46 @@ import StatsCards from './features/StatsCards';const POLLING_INTERVAL = 3000;+const styles = createStaticStyles(({ css }) => ({+ panel: css`+ overflow: hidden;++ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorBgContainer};+ `,+ panelBody: css`+ display: flex;+ flex-direction: column;+ gap: 20px;+ padding: 20px;+ `,+ panelHeader: css`+ display: flex;+ gap: 12px;+ align-items: center;+ justify-content: space-between;++ padding-block: 12px;+ padding-inline: 20px;+ border-block-end: 1px solid ${cssVar.colorBorderSecondary};+ `,+ panelLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,+ stateBody: css`+ display: flex;+ align-items: center;+ justify-content: center;++ min-height: 430px;+ padding: 20px;+ `,+}));+const RunDetail = memo(() => {const { t } = useTranslation('eval');const { benchmarkId, runId } = useParams<{ benchmarkId: string; runId: string }>();@@ -70,73 +111,54 @@ const RunDetail = memo(() => {run={runDetail}/>- {/* Report Card (when finished) or State Animation Card (when not finished) */}+ {/* Report panel (when finished) or state panel (when not finished) */}{isFinished ? (- <Card- styles={{- body: { display: 'flex', flexDirection: 'column', gap: 20, padding: 20 },- header: { minHeight: 'auto', padding: '12px 20px' },- }}- title={- <Typography.Text strong style={{ fontSize: 14 }}>- {t('run.detail.report')}- </Typography.Text>- }- >- <StatsCards metrics={runDetail.metrics ?? undefined} />- {hasResults && (- <BenchmarkCharts- benchmarkId={benchmarkId!}- results={runResults.results}- runId={runId!}- />- )}- </Card>+ <section className={styles.panel}>+ <header className={styles.panelHeader}>+ <span className={styles.panelLabel}>{t('run.detail.report')}</span>+ </header>+ <div className={styles.panelBody}>+ <StatsCards metrics={runDetail.metrics ?? undefined} />+ {hasResults && (+ <BenchmarkCharts+ benchmarkId={benchmarkId!}+ results={runResults.results}+ runId={runId!}+ />+ )}+ </div>+ </section>) : (- <Card- styles={{- body: {- alignItems: 'center',- display: 'flex',- justifyContent: 'center',- minHeight: 430,- padding: 20,- },- header: { minHeight: 'auto', padding: '12px 20px' },- }}- title={- <Typography.Text strong style={{ fontSize: 14 }}>- {t('run.detail.report')}- </Typography.Text>- }- >- {runDetail.status === 'running' ? (- <RunningState />- ) : runDetail.status === 'pending' ? (- <PendingState hint={t('run.pending.hint')} />- ) : runDetail.status === 'external' ? (- <PendingState hint={t('run.external.hint')} />- ) : (- <IdleState run={runDetail} />- )}- </Card>+ <section className={styles.panel}>+ <header className={styles.panelHeader}>+ <span className={styles.panelLabel}>{t('run.detail.report')}</span>+ </header>+ <div className={styles.stateBody}>+ {runDetail.status === 'running' ? (+ <RunningState />+ ) : runDetail.status === 'pending' ? (+ <PendingState hint={t('run.pending.hint')} />+ ) : runDetail.status === 'external' ? (+ <PendingState hint={t('run.external.hint')} />+ ) : (+ <IdleState run={runDetail} />+ )}+ </div>+ </section>)}{/* Case Results (always shown when results exist) */}{hasResults && (- <Card- styles={{ body: { padding: 0 }, header: { padding: '12px 20px' } }}- extra={- showProgress || canRetry || canBatchResume ? (+ <section className={styles.panel}>+ <header className={styles.panelHeader}>+ <span className={styles.panelLabel}>{t('run.detail.caseResults')}</span>+ {(showProgress || canRetry || canBatchResume) && (<Flexbox horizontal align="center" gap={8}>{showProgress && (<>- <Typography.Text- style={{ fontSize: 12, whiteSpace: 'nowrap' }}- type="secondary"- >+ <Text fontSize={12} style={{ whiteSpace: 'nowrap' }} type={'secondary'}>{completedCases}/{totalCases} {t('run.detail.progressCases')}- </Typography.Text>+ </Text><Progresspercent={progress}showInfo={false}@@ -144,9 +166,9 @@ const RunDetail = memo(() => {status={isActive ? 'active' : undefined}style={{ margin: 0, width: 120 }}/>- <Typography.Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type={'secondary'}>{progress}%- </Typography.Text>+ </Text></>)}{canBatchResume && (@@ -187,14 +209,8 @@ const RunDetail = memo(() => {</Button>)}</Flexbox>- ) : undefined- }- title={- <Typography.Text strong style={{ fontSize: 14 }}>- {t('run.detail.caseResults')}- </Typography.Text>- }- >+ )}+ </header><CaseResultsTablebenchmarkId={benchmarkId!}k={k}@@ -204,7 +220,7 @@ const RunDetail = memo(() => {onResumeCase={(testCaseId, threadId) => resumeRunCase(runId!, testCaseId, threadId)}onRetryCase={(testCaseId) => retryRunCase(runId!, testCaseId)}/>- </Card>+ </section>)}</Flexbox>);diff --git a/src/routes/(main)/eval/features/BenchmarkCard/RunRow.tsx b/src/routes/(main)/eval/features/BenchmarkCard/RunRow.tsxindex 720d2b058be..f68fc133d9b 100644--- a/src/routes/(main)/eval/features/BenchmarkCard/RunRow.tsx+++ b/src/routes/(main)/eval/features/BenchmarkCard/RunRow.tsx@@ -1,47 +1,77 @@'use client';-import { Flexbox, Icon } from '@lobehub/ui';-import { createStaticStyles } from 'antd-style';+import { Flexbox, Icon, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { AlertTriangle, ArrowRight, CheckCircle2, XCircle } from 'lucide-react';import { memo } from 'react';+import { useTranslation } from 'react-i18next';import WorkspaceLink from '@/features/Workspace/WorkspaceLink';import StatusBadge from '../StatusBadge';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({meta: css`- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,+ mono: css`+ font-family: ${cssVar.fontFamilyCode};+ `,name: css`overflow: hidden;- font-size: 13px;font-weight: 500;color: ${cssVar.colorText};text-overflow: ellipsis;white-space: nowrap;`,passRate: css`- font-family: monospace;- font-size: 14px;- font-weight: 700;+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSize};+ font-weight: 600;color: ${cssVar.colorText};`,+ progressFill: css`+ height: 100%;+ border-radius: 999px;++ background: ${cssVar.colorPrimary};++ transition: width 0.3s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ progressTrack: css`+ overflow: hidden;++ width: 100%;+ height: 4px;+ border-radius: 999px;++ background: ${cssVar.colorFillTertiary};+ `,row: css`cursor: pointer;padding-block: 8px;padding-inline: 12px;border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 8px;+ border-radius: ${cssVar.borderRadius};- transition: all 200ms ${cssVar.motionEaseOut};+ transition:+ border-color 0.15s ease,+ background 0.15s ease;&:hover {- border-color: ${cssVar.colorPrimary};- background: ${cssVar.colorFillQuaternary};+ border-color: ${cssVar.colorBorder};+ background: ${cssVar.colorFillTertiary};+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;}`,separator: css`@@ -49,9 +79,9 @@ const styles = createStaticStyles(({ css, cssVar }) => ({`,stat: css`display: inline-flex;- gap: 2px;+ gap: 4px;align-items: center;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};`,}));@@ -90,6 +120,8 @@ const RunRow = memo<RunRowProps>(completedCases = 0,totalCases = 0,}) => {+ const { t } = useTranslation('eval');+const formatDate = (iso?: string) => {if (!iso) return '';const d = new Date(iso);@@ -105,18 +137,18 @@ const RunRow = memo<RunRowProps>(style={{ color: 'inherit', textDecoration: 'none' }}to={`/eval/bench/${benchmarkId}/runs/${id}`}>- <Flexbox horizontal align="center" className={styles.row} gap={12}>+ <Flexbox horizontal align={'center'} className={styles.row} gap={12}><Flexbox flex={1} gap={2} style={{ minWidth: 0 }}>- <Flexbox horizontal align="center" gap={8}>+ <Flexbox horizontal align={'center'} gap={8}><span className={styles.name}>{name || id.slice(0, 8)}</span><StatusBadge status={status} /></Flexbox>- <Flexbox horizontal align="center" className={styles.meta} gap={4}>+ <Flexbox horizontal align={'center'} className={styles.meta} gap={4}>{createdAt && <span>{formatDate(createdAt)}</span>}{createdAt && agentName && <span className={styles.separator}>/</span>}{agentName && <span>{agentName}</span>}{(createdAt || agentName) && model && <span className={styles.separator}>/</span>}- {model && <span style={{ fontFamily: 'monospace' }}>{model}</span>}+ {model && <span className={styles.mono}>{model}</span>}{cost != null && cost > 0 && (<><span className={styles.separator}>/</span>@@ -127,50 +159,36 @@ const RunRow = memo<RunRowProps>(</Flexbox>{status === 'running' ? (- <Flexbox align="flex-end" gap={2} style={{ width: 100 }}>+ <Flexbox align={'flex-end'} gap={4} style={{ width: 100 }}><Flexboxhorizontal- align="center"- justify="space-between"- style={{ fontSize: 10, color: 'var(--ant-color-text-tertiary)', width: '100%' }}+ align={'center'}+ justify={'space-between'}+ style={{ width: '100%' }}>- <span>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>{completedCases}/{totalCases}- </span>- <span>{progress}%</span>+ </Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {progress}%+ </Text></Flexbox>- <div- style={{- background: 'var(--ant-color-fill-tertiary)',- borderRadius: 2,- height: 4,- overflow: 'hidden',- width: '100%',- }}- >- <div- style={{- background: 'var(--ant-color-primary)',- borderRadius: 2,- height: '100%',- transition: 'width 300ms ease',- width: `${progress}%`,- }}- />+ <div className={styles.progressTrack}>+ <div className={styles.progressFill} style={{ width: `${progress}%` }} /></div></Flexbox>) : hasStats ? (- <Flexbox horizontal align="center" gap={10}>- <span className={styles.stat} style={{ color: 'var(--ant-color-success)' }}>+ <Flexbox horizontal align={'center'} gap={12}>+ <span className={styles.stat} style={{ color: cssVar.colorSuccess }}><Icon icon={CheckCircle2} size={12} />{passCount}</span>- <span className={styles.stat} style={{ color: 'var(--ant-color-error)' }}>+ <span className={styles.stat} style={{ color: cssVar.colorError }}><Icon icon={XCircle} size={12} />{failCount}</span>{errorCount > 0 && (- <span className={styles.stat} style={{ color: 'var(--ant-color-warning)' }}>+ <span className={styles.stat} style={{ color: cssVar.colorWarning }}><Icon icon={AlertTriangle} size={12} />{errorCount}</span>@@ -181,16 +199,16 @@ const RunRow = memo<RunRowProps>(</Flexbox>) : status === 'failed' ? (<span className={styles.meta}>- {completedCases}/{totalCases} before failure+ {t('benchmark.card.run.beforeFailure', { completed: completedCases, total: totalCases })}</span>) : (- <span className={styles.meta}>Queued</span>+ <span className={styles.meta}>{t('benchmark.card.run.queued')}</span>)}<Iconicon={ArrowRight}size={14}- style={{ color: 'var(--ant-color-text-tertiary)', flexShrink: 0 }}+ style={{ color: cssVar.colorTextTertiary, flexShrink: 0 }}/></Flexbox></WorkspaceLink>diff --git a/src/routes/(main)/eval/features/BenchmarkCard/index.tsx b/src/routes/(main)/eval/features/BenchmarkCard/index.tsxindex 88eeaa793d6..2e5c40e54de 100644--- a/src/routes/(main)/eval/features/BenchmarkCard/index.tsx+++ b/src/routes/(main)/eval/features/BenchmarkCard/index.tsx@@ -1,7 +1,7 @@'use client';-import { Button, Flexbox, Icon, Tag } from '@lobehub/ui';-import { createStaticStyles } from 'antd-style';+import { Button, Flexbox, Icon, Tag, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import {Activity,ArrowRight,@@ -26,7 +26,8 @@ import { useTranslation } from 'react-i18next';import WorkspaceLink from '@/features/Workspace/WorkspaceLink';-import RunRow from './RunRow';+import Sparkline from '../Sparkline';+import StatusBadge from '../StatusBadge';const SYSTEM_ICONS = [LoaderPinwheel,@@ -47,50 +48,78 @@ const getSystemIcon = (id: string) => {return SYSTEM_ICONS[hash % SYSTEM_ICONS.length];};-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({card: css`height: 100%;- padding: 20px;border: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 12px;+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorBgContainer};++ transition: border-color 0.15s ease;++ &:hover {+ border-color: ${cssVar.colorBorder};+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,- description: css`- overflow: hidden;- display: -webkit-box;- -webkit-box-orient: vertical;- -webkit-line-clamp: 2;-- font-size: 12px;- line-height: 1.6;- color: ${cssVar.colorTextTertiary};+ // Tonal hero band that carries the headline metric — the first thing the eye+ // lands on, separated from the identity row by a subtle fill.+ metricBand: css`+ padding: 16px;+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorFillQuaternary};+ `,+ metricValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeHeading2};+ font-weight: 600;+ line-height: 1;+ color: ${cssVar.colorText};+ `,+ ctaBand: css`+ padding-block: 24px;+ padding-inline: 16px;+ border: 1px dashed ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};++ text-align: center;++ background: ${cssVar.colorFillQuaternary};`,detailLink: css`display: flex;+ flex: none;align-items: center;justify-content: center;width: 28px;height: 28px;- border-radius: 6px;+ border-radius: ${cssVar.borderRadiusSM};color: ${cssVar.colorTextTertiary};- transition: all 200ms ${cssVar.motionEaseOut};+ transition:+ color 0.15s ease,+ background 0.15s ease;&:hover {color: ${cssVar.colorText};background: ${cssVar.colorFillTertiary};}- `,- emptyBox: css`- padding-block: 24px;- padding-inline: 16px;- border: 1px dashed ${cssVar.colorBorderSecondary};- border-radius: 8px;- text-align: center;+ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -2px;+ }- background: ${cssVar.colorFillQuaternary};+ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }`,iconBox: css`display: flex;@@ -98,40 +127,36 @@ const styles = createStaticStyles(({ css, cssVar }) => ({align-items: center;justify-content: center;- width: 36px;- height: 36px;- border-radius: 8px;- `,- meta: css`- font-size: 12px;- color: ${cssVar.colorTextTertiary};+ width: 40px;+ height: 40px;+ border-radius: ${cssVar.borderRadius};`,name: css`- font-size: 14px;- font-weight: 500;+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;color: ${cssVar.colorText};text-decoration: none;- transition: color 200ms ${cssVar.motionEaseOut};+ transition: color 0.15s ease;&:hover {color: ${cssVar.colorPrimary};}- `,- recentLabel: css`- font-size: 12px;- font-weight: 500;- color: ${cssVar.colorTextTertiary};- `,- viewAll: css`- font-size: 11px;- color: ${cssVar.colorPrimary};- text-decoration: none;- &:hover {- text-decoration: underline;+ @media (prefers-reduced-motion: reduce) {+ transition: none;}`,+ statDivider: css`+ width: 1px;+ height: 24px;+ background: ${cssVar.colorBorderSecondary};+ `,+ statValue: css`+ font-family: ${cssVar.fontFamilyCode};+ font-weight: 600;+ color: ${cssVar.colorText};+ `,}));interface BenchmarkCardProps {@@ -147,6 +172,18 @@ interface BenchmarkCardProps {testCaseCount?: number;}+// One labeled figure in the stat strip (big mono number over a quiet label).+const Stat = memo<{ label: string; value: number | string }>(({ value, label }) => (+ <Flexbox gap={2}>+ <Text className={styles.statValue} fontSize={16}>+ {value}+ </Text>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {label}+ </Text>+ </Flexbox>+));+const BenchmarkCard = memo<BenchmarkCardProps>(({id,@@ -162,204 +199,133 @@ const BenchmarkCard = memo<BenchmarkCardProps>(}) => {const { t } = useTranslation('eval');const allRunCount = runCount || recentRuns?.length || 0;- const displayRuns = recentRuns?.slice(0, 3) || [];const hasDatasets = datasetCount > 0;const systemIcon = useMemo(() => getSystemIcon(id), [id]);+ const isUser = source === 'user';++ // Pass-rate trend: recentRuns arrives newest-first, so reverse a copy to read+ // left→right oldest→newest. Drop runs that never produced a rate.+ const trend = useMemo(() => {+ const rates = (recentRuns ?? [])+ .map((r) => r?.metrics?.passRate)+ .filter((v): v is number => typeof v === 'number');+ return rates.reverse();+ }, [recentRuns]);++ const bestRate = trend.length > 0 ? Math.max(...trend) : undefined;+ const latestRun = recentRuns?.[0];return (- <Flexbox className={styles.card} gap={12} justify="space-between">- {/* Top: Header + Description + Tags */}+ <Flexbox className={styles.card} gap={16} justify={'space-between'} padding={20}><Flexbox gap={16}>- {/* Header */}- <Flexbox horizontal justify="space-between">- <Flexbox horizontal align="start" gap={12}>+ {/* Identity */}+ <Flexbox horizontal align={'flex-start'} gap={12} justify={'space-between'}>+ <Flexbox horizontal align={'center'} gap={12} style={{ minWidth: 0 }}><divclassName={styles.iconBox}- style={{- background:- source === 'user'- ? 'var(--ant-color-success-bg)'- : 'var(--ant-color-primary-bg)',- }}+ style={{ background: isUser ? cssVar.colorSuccessBg : cssVar.colorPrimaryBg }}><Icon- icon={source === 'user' ? User : systemIcon}- size={24}- style={{- color:- source === 'user' ? 'var(--ant-color-success)' : 'var(--ant-color-primary)',- }}+ icon={isUser ? User : systemIcon}+ size={22}+ style={{ color: isUser ? cssVar.colorSuccess : cssVar.colorPrimary }}/></div>- <Flexbox gap={4}>+ <Flexbox gap={2} style={{ minWidth: 0 }}><WorkspaceLink className={styles.name} to={`/eval/bench/${id}`}>{name}</WorkspaceLink>- <Flexbox horizontal align="center" className={styles.meta} gap={4}>- <span>{t('benchmark.card.datasetCount', { count: datasetCount })}</span>- <span>·</span>- <span>{t('benchmark.card.caseCount', { count: testCaseCount || 0 })}</span>- <span>·</span>- <span>{t('benchmark.card.runCount', { count: allRunCount })}</span>- {bestScore !== undefined && (- <>- <span>·</span>- <span>- {t('benchmark.card.bestScore')}{' '}- <span- style={{- color: 'var(--ant-color-text)',- fontFamily: 'monospace',- fontWeight: 600,- }}- >- {bestScore.toFixed(1)}- </span>- </span>- </>- )}- </Flexbox>+ {description && (+ <Text color={cssVar.colorTextTertiary} fontSize={12} lineClamp={1}>+ {description}+ </Text>+ )}</Flexbox></Flexbox>-<WorkspaceLink className={styles.detailLink} to={`/eval/bench/${id}`}><Icon icon={ArrowRight} size={16} /></WorkspaceLink></Flexbox>- {/* Description */}- {description && <p className={styles.description}>{description}</p>}+ {/* Hero metric band — headline pass rate + trend, or a focused CTA */}+ {!hasDatasets ? (+ <Flexbox align={'center'} className={styles.ctaBand} gap={8}>+ <Icon icon={Database} size={24} style={{ color: cssVar.colorTextQuaternary }} />+ <Flexbox align={'center'} gap={2}>+ <Text color={cssVar.colorTextTertiary}>{t('benchmark.card.noDataset')}</Text>+ <Text color={cssVar.colorTextQuaternary} fontSize={12}>+ {t('benchmark.card.noDatasetHint')}+ </Text>+ </Flexbox>+ <WorkspaceLink style={{ textDecoration: 'none' }} to={`/eval/bench/${id}`}>+ <Button icon={Upload} size={'small'} variant={'filled'}>+ {t('benchmark.card.importDataset')}+ </Button>+ </WorkspaceLink>+ </Flexbox>+ ) : bestRate !== undefined ? (+ <Flexbox+ horizontal+ align={'center'}+ className={styles.metricBand}+ justify={'space-between'}+ >+ <Flexbox gap={4}>+ <span className={styles.metricValue}>{(bestRate * 100).toFixed(0)}%</span>+ <Flexbox horizontal align={'center'} gap={8}>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('benchmark.card.bestPassRate')}+ </Text>+ {latestRun?.status && <StatusBadge status={latestRun.status} />}+ </Flexbox>+ </Flexbox>+ {trend.length > 1 && <Sparkline values={trend} />}+ </Flexbox>+ ) : (+ <Flexbox align={'center'} className={styles.ctaBand} gap={8}>+ <Icon icon={FlaskConical} size={24} style={{ color: cssVar.colorTextQuaternary }} />+ <Flexbox align={'center'} gap={2}>+ <Text color={cssVar.colorTextTertiary}>{t('benchmark.card.empty')}</Text>+ <Text color={cssVar.colorTextQuaternary} fontSize={12}>+ {t('benchmark.card.emptyHint')}+ </Text>+ </Flexbox>+ <WorkspaceLink style={{ textDecoration: 'none' }} to={`/eval/bench/${id}?tab=runs`}>+ <Button icon={Play} size={'small'} variant={'filled'}>+ {t('benchmark.card.startFirst')}+ </Button>+ </WorkspaceLink>+ </Flexbox>+ )}+ </Flexbox>++ {/* Stat strip + tags (pinned) */}+ <Flexbox gap={16}>+ <Flexbox horizontal align={'center'} gap={20}>+ <Stat label={t('sidebar.datasets')} value={datasetCount} />+ <span className={styles.statDivider} />+ <Stat label={t('benchmark.card.casesLabel')} value={testCaseCount || 0} />+ <span className={styles.statDivider} />+ <Stat label={t('benchmark.card.evalsLabel')} value={allRunCount} />+ {bestScore !== undefined && (+ <>+ <span className={styles.statDivider} />+ <Stat label={t('benchmark.card.bestScore')} value={bestScore.toFixed(1)} />+ </>+ )}+ </Flexbox>- {/* Tags */}{tags && tags.length > 0 && (<Flexbox horizontal gap={4} style={{ flexWrap: 'wrap' }}>{tags.slice(0, 4).map((tag) => (- <Tag key={tag} style={{ fontSize: 10 }}>+ <Tag key={tag} size={'small'}>{tag}</Tag>))}- {tags.length > 4 && <Tag style={{ fontSize: 10 }}>+{tags.length - 4}</Tag>}+ {tags.length > 4 && <Tag size={'small'}>+{tags.length - 4}</Tag>}</Flexbox>)}</Flexbox>-- {/* Bottom (pinned) */}- {!hasDatasets ? (- <div className={styles.emptyBox}>- <Icon- icon={Database}- size={24}- style={{ color: 'var(--ant-color-text-quaternary)', marginBottom: 8 }}- />- <p style={{ color: 'var(--ant-color-text-tertiary)', fontSize: 13, margin: '0 0 4px' }}>- {t('benchmark.card.noDataset')}- </p>- <p- style={{- color: 'var(--ant-color-text-quaternary)',- fontSize: 12,- margin: '0 0 12px',- }}- >- {t('benchmark.card.noDatasetHint')}- </p>- <WorkspaceLink style={{ textDecoration: 'none' }} to={`/eval/bench/${id}`}>- <Button icon={Upload} size="small" variant="filled">- {t('benchmark.card.importDataset')}- </Button>- </WorkspaceLink>- </div>- ) : (- <Flexbox gap={8}>- <Flexbox horizontal align="center" justify="space-between">- <span className={styles.recentLabel}>{t('benchmark.card.recentRuns')}</span>- {allRunCount > 3 && (- <WorkspaceLink className={styles.viewAll} to={`/eval/bench/${id}`}>- {t('benchmark.card.viewAll', { count: allRunCount })}- </WorkspaceLink>- )}- </Flexbox>-- {allRunCount > 0 ? (- <Flexbox gap={6}>- {displayRuns.length > 0 ? (- displayRuns.map((run: any) => {- const metrics = run.metrics;- const agentSnapshot = run.config?.agentSnapshot;- const passedCases = metrics?.passedCases ?? 0;- const failedCases = metrics?.failedCases ?? 0;- const errorCases = metrics?.errorCases ?? 0;-- return (- <RunRow- agentName={agentSnapshot?.title}- benchmarkId={id}- cost={metrics?.totalCost}- createdAt={run.createdAt}- errorCount={errorCases}- failCount={failedCases}- id={run.id}- key={run.id}- model={agentSnapshot?.model}- name={run.name}- passCount={passedCases}- passRate={metrics?.passRate}- score={metrics?.averageScore}- status={run.status}- totalCases={metrics?.totalCases ?? 0}- completedCases={- metrics?.completedCases ?? passedCases + failedCases + errorCases- }- />- );- })- ) : (- <p- style={{- color: 'var(--ant-color-text-tertiary)',- fontSize: 12,- textAlign: 'center',- padding: '12px 0',- }}- >- {t('benchmark.card.noRecentRuns')}- </p>- )}- </Flexbox>- ) : (- <div className={styles.emptyBox}>- <Icon- icon={FlaskConical}- size={24}- style={{ color: 'var(--ant-color-text-quaternary)', marginBottom: 8 }}- />- <p- style={{- color: 'var(--ant-color-text-tertiary)',- fontSize: 13,- margin: '0 0 4px',- }}- >- {t('benchmark.card.empty')}- </p>- <p- style={{- color: 'var(--ant-color-text-quaternary)',- fontSize: 12,- margin: '0 0 12px',- }}- >- {t('benchmark.card.emptyHint')}- </p>- <WorkspaceLink style={{ textDecoration: 'none' }} to={`/eval/bench/${id}?tab=runs`}>- <Button icon={Play} size="small" variant="filled">- {t('benchmark.card.startFirst')}- </Button>- </WorkspaceLink>- </div>- )}- </Flexbox>- )}</Flexbox>);},diff --git a/src/routes/(main)/eval/features/BenchmarkEditModal/Content.tsx b/src/routes/(main)/eval/features/BenchmarkEditModal/Content.tsxindex 82d4ee1854e..cc70ce6ad89 100644--- a/src/routes/(main)/eval/features/BenchmarkEditModal/Content.tsx+++ b/src/routes/(main)/eval/features/BenchmarkEditModal/Content.tsx@@ -3,6 +3,7 @@import { Input, Select, TextArea } from '@lobehub/ui';import { useModalContext } from '@lobehub/ui/base-ui';import { App, Form } from 'antd';+import { cssVar } from 'antd-style';import { type FC, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -98,6 +99,7 @@ const BenchmarkEditContent: FC<BenchmarkEditContentProps> = ({><Inputplaceholder={t('benchmark.create.identifier.placeholder')}+ style={{ fontFamily: cssVar.fontFamilyCode }}onChange={() => setIdentifierTouched(true)}/></Form.Item>diff --git a/src/routes/(main)/eval/features/CreateBenchmarkModal/Content.tsx b/src/routes/(main)/eval/features/CreateBenchmarkModal/Content.tsxindex b666368b1cd..4a8ba5c4ada 100644--- a/src/routes/(main)/eval/features/CreateBenchmarkModal/Content.tsx+++ b/src/routes/(main)/eval/features/CreateBenchmarkModal/Content.tsx@@ -3,6 +3,7 @@import { Input, Select, TextArea } from '@lobehub/ui';import { useModalContext } from '@lobehub/ui/base-ui';import { App, Form } from 'antd';+import { cssVar } from 'antd-style';import { type FC, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -76,6 +77,7 @@ const CreateBenchmarkContent: FC<CreateBenchmarkContentProps> = ({ formId, onLoa><Inputplaceholder={t('benchmark.create.identifier.placeholder')}+ style={{ fontFamily: cssVar.fontFamilyCode }}onChange={() => setIdentifierTouched(true)}/></Form.Item>diff --git a/src/routes/(main)/eval/features/DatasetCreateModal/Content.tsx b/src/routes/(main)/eval/features/DatasetCreateModal/Content.tsxindex 5ece59f806f..013b8b8fa5a 100644--- a/src/routes/(main)/eval/features/DatasetCreateModal/Content.tsx+++ b/src/routes/(main)/eval/features/DatasetCreateModal/Content.tsx@@ -1,9 +1,10 @@'use client';-import { Center, Flexbox, Icon, Text } from '@lobehub/ui';+import { Center, Flexbox, Icon, Input, Text, TextArea } from '@lobehub/ui';import { Select, useModalContext } from '@lobehub/ui/base-ui';-import { App, Form, Input } from 'antd';+import { App, Form } from 'antd';import { createStaticStyles, cssVar } from 'antd-style';+import { CheckIcon } from 'lucide-react';import { type FC, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -27,11 +28,81 @@ const CATEGORY_LABELS: Record<string, string> = {};const styles = createStaticStyles(({ css }) => ({+ // Section heading above a labeled group of fields/cards.+ sectionLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,+ // Selectable preset card — tonal, bordered, with a hover wash, a visible+ // focus ring, and a primary-tinted selected state.+ presetCard: css`+ cursor: pointer;++ position: relative;++ padding: 12px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorBgContainer};++ transition:+ border-color 0.15s ease,+ background 0.15s ease;++ &:hover {+ border-color: ${cssVar.colorBorder};+ background: ${cssVar.colorFillTertiary};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ presetCardSelected: css`+ border-color: ${cssVar.colorPrimaryBorder};+ background: ${cssVar.colorPrimaryBg};++ &:hover {+ border-color: ${cssVar.colorPrimaryBorder};+ background: ${cssVar.colorPrimaryBg};+ }+ `,+ presetGrid: css`+ display: grid;+ gap: 8px;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ `,presetIcon: css`- border: 1px solid ${cssVar.colorFillTertiary};+ border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadius};background: ${cssVar.colorBgElevated};`,+ // Required / optional field hint, numbers and field names in mono.+ presetMeta: css`+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};+ `,+ selectedMark: css`+ display: flex;+ align-items: center;+ justify-content: center;++ width: 18px;+ height: 18px;+ border-radius: 999px;++ color: ${cssVar.colorBgContainer};++ background: ${cssVar.colorPrimary};+ `,}));export interface DatasetCreateContentProps {@@ -91,17 +162,9 @@ const DatasetCreateContent: FC<DatasetCreateContentProps> = ({};const presetsByCategory = getPresetsByCategory();- const currentPreset = DATASET_PRESETS[selectedPreset];-- const selectOptions = Object.entries(presetsByCategory)- .filter(([_, presets]) => presets.length > 0)- .map(([category, presets]) => ({- label: CATEGORY_LABELS[category] || category,- options: presets.map((preset) => ({- label: preset.name,- value: preset.id,- })),- }));+ const orderedCategories = Object.entries(presetsByCategory).filter(+ ([, presets]) => presets.length > 0,+ );return (<Form form={form} layout="vertical" name={formId} onFinish={handleFinish}>@@ -120,12 +183,13 @@ const DatasetCreateContent: FC<DatasetCreateContentProps> = ({><Inputplaceholder={t('dataset.create.identifier.placeholder')}+ style={{ fontFamily: cssVar.fontFamilyCode }}onChange={() => setIdentifierTouched(true)}/></Form.Item><Form.Item label={t('dataset.create.description.label')} name="description">- <Input.TextArea placeholder={t('dataset.create.description.placeholder')} rows={3} />+ <TextArea placeholder={t('dataset.create.description.placeholder')} rows={3} /></Form.Item><Form.Item extra={t('dataset.evalMode.hint')} label={t('evalMode.label')} name="evalMode">@@ -133,9 +197,9 @@ const DatasetCreateContent: FC<DatasetCreateContentProps> = ({allowClearplaceholder={t('evalMode.placeholder')}optionRender={(option) => (- <Flexbox gap={2} style={{ padding: '4px 0' }}>+ <Flexbox gap={4} style={{ paddingBlock: 4 }}><div>{option.label}</div>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t(`evalMode.${option.value}.desc` as any)}</Text></Flexbox>@@ -151,63 +215,80 @@ const DatasetCreateContent: FC<DatasetCreateContentProps> = ({{evalModeValue === 'llm-rubric' && (<Form.Item label={t('evalMode.prompt.label')} name={['evalConfig', 'judgePrompt']}>- <Input.TextArea placeholder={t('evalMode.prompt.placeholder')} rows={3} />+ <TextArea placeholder={t('evalMode.prompt.placeholder')} rows={3} /></Form.Item>)}- <Form.Item- label={t('dataset.create.preset.label')}- extra={- currentPreset ? (- <Flexbox gap={4} style={{ marginTop: 8 }}>- <p style={{ color: cssVar.colorTextSecondary, fontSize: 12, margin: 0 }}>- {currentPreset.formatDescription}- </p>- <div style={{ color: cssVar.colorTextTertiary, fontSize: 12 }}>- <strong>Required:</strong> {currentPreset.requiredFields.join(', ')}- {currentPreset.optionalFields.length > 0 && (- <>- {' · '}- <strong>Optional:</strong> {currentPreset.optionalFields.join(', ')}- </>- )}- </div>- </Flexbox>- ) : null- }- >- <Select- options={selectOptions}- placeholder="Select a preset"- value={selectedPreset}- optionRender={(option) => {- const preset = DATASET_PRESETS[option.value as string];- if (!preset) return option.label;-- return (- <Flexbox- horizontal- align="flex-start"- gap={12}- style={{ overflow: 'hidden', width: '100%' }}- >- <Center className={styles.presetIcon} flex="none" height={40} width={40}>- <Icon icon={preset.icon} size={18} />- </Center>- <Flexbox flex={1} gap={2} style={{ minWidth: 0, overflow: 'hidden' }}>- <Text ellipsis style={{ fontSize: 14, fontWeight: 500 }}>- {preset.name}- </Text>- <Text ellipsis style={{ fontSize: 12 }} type="secondary">- {preset.description}- </Text>- </Flexbox>- </Flexbox>- );- }}- onChange={(value) => setSelectedPreset(value)}- />- </Form.Item>+ {/* Preset picker — selectable cards grouped by category, the bold upgrade+ over the previous single dropdown. */}+ <Flexbox gap={12} style={{ marginBlockStart: 4 }}>+ <span className={styles.sectionLabel}>{t('dataset.create.preset.label')}</span>+ {orderedCategories.map(([category, presets]) => (+ <Flexbox gap={8} key={category}>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {CATEGORY_LABELS[category] || category}+ </Text>+ <div className={styles.presetGrid}>+ {presets.map((preset) => {+ const isSelected = selectedPreset === preset.id;+ return (+ <div+ aria-pressed={isSelected}+ className={`${styles.presetCard} ${isSelected ? styles.presetCardSelected : ''}`}+ key={preset.id}+ role="button"+ tabIndex={0}+ onClick={() => setSelectedPreset(preset.id)}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ setSelectedPreset(preset.id);+ }+ }}+ >+ <Flexbox horizontal align="flex-start" gap={12}>+ <Center className={styles.presetIcon} flex="none" height={36} width={36}>+ <Icon icon={preset.icon} size={18} />+ </Center>+ <Flexbox flex={1} gap={2} style={{ minWidth: 0 }}>+ <Text ellipsis weight={500}>+ {preset.name}+ </Text>+ <Text ellipsis color={cssVar.colorTextTertiary} fontSize={12}>+ {preset.description}+ </Text>+ </Flexbox>+ {isSelected && (+ <span className={styles.selectedMark}>+ <Icon icon={CheckIcon} size={12} />+ </span>+ )}+ </Flexbox>+ </div>+ );+ })}+ </div>+ </Flexbox>+ ))}++ {DATASET_PRESETS[selectedPreset] && (+ <Flexbox gap={4} style={{ marginBlockStart: 4 }}>+ <Text fontSize={12} type="secondary">+ {DATASET_PRESETS[selectedPreset].formatDescription}+ </Text>+ <Text className={styles.presetMeta}>+ <strong>Required:</strong> {DATASET_PRESETS[selectedPreset].requiredFields.join(', ')}+ {DATASET_PRESETS[selectedPreset].optionalFields.length > 0 && (+ <>+ {' · '}+ <strong>Optional:</strong>{' '}+ {DATASET_PRESETS[selectedPreset].optionalFields.join(', ')}+ </>+ )}+ </Text>+ </Flexbox>+ )}+ </Flexbox></Form>);};diff --git a/src/routes/(main)/eval/features/DatasetEditModal/Content.tsx b/src/routes/(main)/eval/features/DatasetEditModal/Content.tsxindex 20611d4865b..4e999bd73d2 100644--- a/src/routes/(main)/eval/features/DatasetEditModal/Content.tsx+++ b/src/routes/(main)/eval/features/DatasetEditModal/Content.tsx@@ -4,6 +4,7 @@ import { Center, Flexbox, Icon, Input, Text, TextArea } from '@lobehub/ui';import { Select, useModalContext } from '@lobehub/ui/base-ui';import { App, Form } from 'antd';import { createStaticStyles, cssVar } from 'antd-style';+import { CheckIcon } from 'lucide-react';import { type FC, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -20,11 +21,72 @@ const CATEGORY_LABELS: Record<string, string> = {};const styles = createStaticStyles(({ css }) => ({+ sectionLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,+ presetCard: css`+ cursor: pointer;++ position: relative;++ padding: 12px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadius};++ background: ${cssVar.colorBgContainer};++ transition:+ border-color 0.15s ease,+ background 0.15s ease;++ &:hover {+ border-color: ${cssVar.colorBorder};+ background: ${cssVar.colorFillTertiary};+ }++ &:focus-visible {+ outline: 2px solid ${cssVar.colorPrimary};+ outline-offset: -2px;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ presetCardSelected: css`+ border-color: ${cssVar.colorPrimaryBorder};+ background: ${cssVar.colorPrimaryBg};++ &:hover {+ border-color: ${cssVar.colorPrimaryBorder};+ background: ${cssVar.colorPrimaryBg};+ }+ `,+ presetGrid: css`+ display: grid;+ gap: 8px;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ `,presetIcon: css`- border: 1px solid ${cssVar.colorFillTertiary};+ border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadius};background: ${cssVar.colorBgElevated};`,+ selectedMark: css`+ display: flex;+ align-items: center;+ justify-content: center;++ width: 18px;+ height: 18px;+ border-radius: 999px;++ color: ${cssVar.colorBgContainer};++ background: ${cssVar.colorPrimary};+ `,}));export interface DatasetEditContentProps {@@ -66,16 +128,9 @@ const DatasetEditContent: FC<DatasetEditContentProps> = ({}, [dataset, form]);const presetsByCategory = getPresetsByCategory();-- const selectOptions = Object.entries(presetsByCategory)- .filter(([_, presets]) => presets.length > 0)- .map(([category, presets]) => ({- label: CATEGORY_LABELS[category] || category,- options: presets.map((preset) => ({- label: preset.name,- value: preset.id,- })),- }));+ const orderedCategories = Object.entries(presetsByCategory).filter(+ ([, presets]) => presets.length > 0,+ );const handleFinish = async (values: any) => {onLoadingChange?.(true);@@ -120,9 +175,9 @@ const DatasetEditContent: FC<DatasetEditContentProps> = ({allowClearplaceholder={t('evalMode.placeholder')}optionRender={(option) => (- <Flexbox gap={2} style={{ padding: '4px 0' }}>+ <Flexbox gap={4} style={{ paddingBlock: 4 }}><div>{option.label}</div>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t(`evalMode.${option.value}.desc` as any)}</Text></Flexbox>@@ -157,39 +212,57 @@ const DatasetEditContent: FC<DatasetEditContentProps> = ({</>)}- <Form.Item label={t('dataset.create.preset.label')} style={{ marginBottom: 0 }}>- <Select- options={selectOptions}- placeholder="Select a preset"- value={selectedPreset}- optionRender={(option) => {- const preset = DATASET_PRESETS[option.value as string];- if (!preset) return option.label;-- return (- <Flexbox- horizontal- align="flex-start"- gap={12}- style={{ overflow: 'hidden', width: '100%' }}- >- <Center className={styles.presetIcon} flex="none" height={40} width={40}>- <Icon icon={preset.icon} size={18} />- </Center>- <Flexbox flex={1} gap={2} style={{ minWidth: 0, overflow: 'hidden' }}>- <Text ellipsis style={{ fontSize: 14, fontWeight: 500 }}>- {preset.name}- </Text>- <Text ellipsis style={{ fontSize: 12 }} type="secondary">- {preset.description}- </Text>- </Flexbox>- </Flexbox>- );- }}- onChange={(value) => setSelectedPreset(value)}- />- </Form.Item>+ {/* Preset picker — selectable cards grouped by category. */}+ <Flexbox gap={12} style={{ marginBlockStart: 4 }}>+ <span className={styles.sectionLabel}>{t('dataset.create.preset.label')}</span>+ {orderedCategories.map(([category, presets]) => (+ <Flexbox gap={8} key={category}>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {CATEGORY_LABELS[category] || category}+ </Text>+ <div className={styles.presetGrid}>+ {presets.map((preset) => {+ const isSelected = selectedPreset === preset.id;+ return (+ <div+ aria-pressed={isSelected}+ className={`${styles.presetCard} ${isSelected ? styles.presetCardSelected : ''}`}+ key={preset.id}+ role="button"+ tabIndex={0}+ onClick={() => setSelectedPreset(preset.id)}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ setSelectedPreset(preset.id);+ }+ }}+ >+ <Flexbox horizontal align="flex-start" gap={12}>+ <Center className={styles.presetIcon} flex="none" height={36} width={36}>+ <Icon icon={preset.icon} size={18} />+ </Center>+ <Flexbox flex={1} gap={2} style={{ minWidth: 0 }}>+ <Text ellipsis weight={500}>+ {preset.name}+ </Text>+ <Text ellipsis color={cssVar.colorTextTertiary} fontSize={12}>+ {preset.description}+ </Text>+ </Flexbox>+ {isSelected && (+ <span className={styles.selectedMark}>+ <Icon icon={CheckIcon} size={12} />+ </span>+ )}+ </Flexbox>+ </div>+ );+ })}+ </div>+ </Flexbox>+ ))}+ </Flexbox></Form>);};diff --git a/src/routes/(main)/eval/features/DatasetEditModal/index.tsx b/src/routes/(main)/eval/features/DatasetEditModal/index.tsxindex 772a49c5c87..739d46de3c8 100644--- a/src/routes/(main)/eval/features/DatasetEditModal/index.tsx+++ b/src/routes/(main)/eval/features/DatasetEditModal/index.tsx@@ -17,5 +17,5 @@ export const createDatasetEditModal = (props: Props): ModalInstance =>),renderFooter: ({ formId, loading }) => <DatasetEditFooter formId={formId} loading={loading} />,title: t('dataset.edit.title', { ns: 'eval' }),- width: 480,+ width: 600,});diff --git a/src/routes/(main)/eval/features/DatasetImportModal/MappingStep.tsx b/src/routes/(main)/eval/features/DatasetImportModal/MappingStep.tsxindex 14621df3643..e6f08983df7 100644--- a/src/routes/(main)/eval/features/DatasetImportModal/MappingStep.tsx+++ b/src/routes/(main)/eval/features/DatasetImportModal/MappingStep.tsx@@ -1,8 +1,8 @@'use client';-import { Flexbox } from '@lobehub/ui';+import { Flexbox, Input, Text } from '@lobehub/ui';import { Select } from '@lobehub/ui/base-ui';-import { Checkbox, Input, Table } from 'antd';+import { Checkbox, Table } from 'antd';import { cssVar } from 'antd-style';import { memo, type ReactNode, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -175,10 +175,10 @@ const MappingStep = memo<MappingStepProps>(].map(({ desc, label, value }) => ({label: (<Flexbox gap={2}>- <span style={{ fontSize: 11 }}>{t(`dataset.import.${label}` as any)}</span>- <span style={{ color: roleDescColor(value as MappingTarget), fontSize: 11 }}>+ <Text fontSize={12}>{t(`dataset.import.${label}` as any)}</Text>+ <Text color={roleDescColor(value as MappingTarget)} fontSize={12}>{t(`dataset.import.${desc}` as any)}- </span>+ </Text></Flexbox>),value: value as MappingTarget,@@ -222,7 +222,7 @@ const MappingStep = memo<MappingStepProps>(: undefined,title: (<Flexbox gap={2}>- <span style={{ fontSize: 13, opacity: isIgnored ? 0.4 : 1 }}>{h}</span>+ <span style={{ fontSize: 14, opacity: isIgnored ? 0.4 : 1 }}>{h}</span><Selectoptions={targetOptions}popupMatchSelectWidth={200}@@ -232,8 +232,8 @@ const MappingStep = memo<MappingStepProps>(style={{color:color || (isIgnored ? cssVar.colorTextQuaternary : cssVar.colorTextTertiary),- fontSize: 11,- marginInlineStart: -7,+ fontSize: 12,+ marginInlineStart: -8,}}onChange={(val: MappingTarget) => handleRoleChange(h, val)}/>@@ -251,25 +251,32 @@ const MappingStep = memo<MappingStepProps>();return (- <Flexbox gap={12}>+ <Flexbox gap={16}>{/* Toolbar */}<Flexbox horizontal align="center" justify="space-between">- <Flexbox horizontal align="center" gap={16}>- <span style={{ color: cssVar.colorTextTertiary, fontSize: 13 }}>- {t('dataset.import.fieldMapping.desc')}- </span>- <span style={{ color: cssVar.colorTextQuaternary, fontSize: 12 }}>- {t('dataset.import.preview.rows', { count: totalCount })}- </span>+ <Flexbox gap={2}>+ <Text fontSize={12} type="secondary" weight={500}>+ {t('dataset.import.step.mapping')}+ </Text>+ <Flexbox horizontal align="center" gap={8}>+ <Text color={cssVar.colorTextTertiary} fontSize={12}>+ {t('dataset.import.fieldMapping.desc')}+ </Text>+ <Text+ color={cssVar.colorTextQuaternary}+ fontSize={12}+ style={{ fontFamily: cssVar.fontFamilyCode }}+ >+ {t('dataset.import.preview.rows', { count: totalCount })}+ </Text>+ </Flexbox></Flexbox><Flexbox horizontal align="center" gap={16}>{hasChoices && (<Flexbox horizontal align="center" gap={8}>- <span- style={{ color: cssVar.colorTextSecondary, fontSize: 12, whiteSpace: 'nowrap' }}- >+ <Text fontSize={12} style={{ whiteSpace: 'nowrap' }} type="secondary">{t('dataset.import.expectedDelimiter.desc')}- </span>+ </Text><Inputplaceholder={t('dataset.import.expectedDelimiter.placeholder')}size="small"@@ -281,9 +288,9 @@ const MappingStep = memo<MappingStepProps>()}{hasIgnored && (<Checkbox checked={hideSkipped} onChange={(e) => setHideSkipped(e.target.checked)}>- <span style={{ color: cssVar.colorTextSecondary, fontSize: 12 }}>+ <Text fontSize={12} type="secondary">{t('dataset.import.hideSkipped')}- </span>+ </Text></Checkbox>)}</Flexbox>diff --git a/src/routes/(main)/eval/features/DatasetImportModal/UploadStep.tsx b/src/routes/(main)/eval/features/DatasetImportModal/UploadStep.tsxindex 2f2d3a0241f..f613f4ce629 100644--- a/src/routes/(main)/eval/features/DatasetImportModal/UploadStep.tsx+++ b/src/routes/(main)/eval/features/DatasetImportModal/UploadStep.tsx@@ -1,8 +1,8 @@'use client';import { type FileUploadState } from '@lobechat/types';-import { Center, Flexbox, Icon, Tag } from '@lobehub/ui';-import { Divider, Progress, Upload } from 'antd';+import { Center, Flexbox, Icon, Tag, Text } from '@lobehub/ui';+import { Progress, Upload } from 'antd';import { createStaticStyles } from 'antd-style';import { CloudUpload, ImportIcon } from 'lucide-react';import { memo, useMemo } from 'react';@@ -14,55 +14,76 @@ import { ROLE_COLORS } from './const';const { Dragger } = Upload;const styles = createStaticStyles(({ css, cssVar }) => ({+ // Preset summary panel — a single tonal card describing the chosen format.container: css`overflow: hidden;- border: 1px solid ${cssVar.colorFillTertiary};++ padding: 16px;+ border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorFillQuaternary};`,- divider: css`- margin: 0;+ // Bold dropzone — the single primary action of this step.+ dragger: css`+ .ant-upload-drag {+ border-radius: ${cssVar.borderRadiusLG};+ transition: border-color 0.15s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ }`,draggerContent: css`- min-height: 140px;+ min-height: 160px;`,fieldsWrapper: css`flex-wrap: wrap;`,formatDescription: css`- font-size: 12px;- color: ${cssVar.colorTextDescription};+ font-family: ${cssVar.fontFamilyCode};+ font-size: ${cssVar.fontSizeSM};+ color: ${cssVar.colorTextTertiary};`,hintText: css`margin: 0;- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextTertiary};`,icon: css`color: ${cssVar.colorPrimary};`,iconCenter: css`- border: 1px solid ${cssVar.colorFillTertiary};+ border: 1px solid ${cssVar.colorBorderSecondary};border-radius: ${cssVar.borderRadius};background: ${cssVar.colorBgElevated};`,presetDescription: css`- font-size: 12px;+ font-size: ${cssVar.fontSizeSM};color: ${cssVar.colorTextSecondary};`,presetName: css`- font-size: 14px;- font-weight: 500;+ font-size: ${cssVar.fontSizeLG};+ font-weight: 600;+ color: ${cssVar.colorText};`,progressWrapper: css`width: 100%;max-width: 320px;`,roleLabel: css`- font-size: 10px;+ font-size: ${cssVar.fontSizeSM};+ `,+ // Section label above the field-role legend.+ sectionLabel: css`+ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};`,uploadText: css`margin: 0;- font-size: 14px;+ font-size: ${cssVar.fontSizeLG};font-weight: 500;color: ${cssVar.colorText};`,@@ -116,61 +137,62 @@ const UploadStep = memo<UploadStepProps>(({ onFileSelect, loading, preset, uploareturn (<Flexbox gap={16}>{preset && (- <div className={styles.container}>- {/* Header */}- <Flexbox horizontal align="center" gap={8} paddingBlock={12} paddingInline={16}>- <Center className={styles.iconCenter} flex="none" height={36} width={36}>- <Icon icon={preset.icon} />+ <Flexbox className={styles.container} gap={16}>+ {/* Identity */}+ <Flexbox horizontal align="center" gap={12}>+ <Center className={styles.iconCenter} flex="none" height={40} width={40}>+ <Icon icon={preset.icon} size={20} /></Center>- <Flexbox flex={1}>+ <Flexbox flex={1} gap={2} style={{ minWidth: 0 }}><div className={styles.presetName}>{preset.name}</div><div className={styles.presetDescription}>{preset.description}</div></Flexbox></Flexbox>- <Divider className={styles.divider} />-- {/* Body */}- <Flexbox gap={12} paddingBlock={12} paddingInline={16}>- {preset.formatDescription && (- <div className={styles.formatDescription}>{preset.formatDescription}</div>- )}-- {/* Fields */}- <Flexbox horizontal className={styles.fieldsWrapper} gap={8}>- {fields.map((field) => {- const color = field.role ? ROLE_COLORS[field.role] : undefined;- return (- <Flexbox align="center" gap={2} key={field.name}>- <Tag- style={- color- ? {- background: `color-mix(in srgb, ${color} 15%, transparent)`,- borderColor: 'transparent',- color,- }- : undefined- }- >- {field.name}- {field.required && ' *'}- </Tag>- {field.role && (- <div className={styles.roleLabel} style={{ color: color || undefined }}>- {field.role}- </div>- )}- </Flexbox>- );- })}+ {preset.formatDescription && (+ <div className={styles.formatDescription}>{preset.formatDescription}</div>+ )}++ {/* Field-role legend */}+ {fields.length > 0 && (+ <Flexbox gap={8}>+ <span className={styles.sectionLabel}>{t('dataset.import.fieldMapping')}</span>+ <Flexbox horizontal className={styles.fieldsWrapper} gap={8}>+ {fields.map((field) => {+ const color = field.role ? ROLE_COLORS[field.role] : undefined;+ return (+ <Flexbox align="center" gap={2} key={field.name}>+ <Tag+ style={+ color+ ? {+ background: `color-mix(in srgb, ${color} 15%, transparent)`,+ borderColor: 'transparent',+ color,+ }+ : undefined+ }+ >+ {field.name}+ {field.required && ' *'}+ </Tag>+ {field.role && (+ <div className={styles.roleLabel} style={{ color: color || undefined }}>+ {field.role}+ </div>+ )}+ </Flexbox>+ );+ })}+ </Flexbox></Flexbox>- </Flexbox>- </div>+ )}+ </Flexbox>)}<Draggeraccept=".csv,.xlsx,.xls,.json,.jsonl"+ className={styles.dragger}disabled={loading}maxCount={1}showUploadList={false}@@ -180,11 +202,11 @@ const UploadStep = memo<UploadStepProps>(({ onFileSelect, loading, preset, uploa}}>{loading ? (- <Center className={styles.draggerContent} gap={12}>+ <Center className={styles.draggerContent} gap={16}><IconclassName={styles.icon}icon={CloudUpload}- size={{ size: 40, strokeWidth: 1.5 }}+ size={{ size: 44, strokeWidth: 1.5 }}/><p className={styles.uploadText}>{t('dataset.import.uploading')}</p>{uploadProgress && (@@ -195,7 +217,7 @@ const UploadStep = memo<UploadStepProps>(({ onFileSelect, loading, preset, uploa</Center>) : (<Center className={styles.draggerContent} gap={12}>- <Icon className={styles.icon} icon={ImportIcon} size={{ size: 40, strokeWidth: 1.5 }} />+ <Icon className={styles.icon} icon={ImportIcon} size={{ size: 44, strokeWidth: 1.5 }} /><p className={styles.uploadText}>{t('dataset.import.upload.text')}</p><p className={styles.hintText}>{t('dataset.import.upload.hint')}</p></Center>diff --git a/src/routes/(main)/eval/features/SegmentBar.tsx b/src/routes/(main)/eval/features/SegmentBar.tsxnew file mode 100644index 00000000000..5c2b723c206--- /dev/null+++ b/src/routes/(main)/eval/features/SegmentBar.tsx@@ -0,0 +1,57 @@+'use client';++import { createStaticStyles, cssVar } from 'antd-style';+import { memo } from 'react';++const styles = createStaticStyles(({ css }) => ({+ segment: css`+ height: 100%;++ transition: width 0.3s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+ track: css`+ display: flex;+ overflow: hidden;++ width: 100%;+ border-radius: 999px;++ background: ${cssVar.colorFillSecondary};+ `,+}));++interface SegmentBarProps {+ height?: number;+ /** Proportional segments rendered left→right; zero-value segments are skipped. */+ segments: { color: string; value: number }[];+}++/**+ * A single pill bar split into proportional colored segments — the shared way to+ * show an outcome breakdown (pass / fail / error, status distribution) at a glance+ * across the eval surfaces. Empty (all-zero) renders as a quiet track.+ */+const SegmentBar = memo<SegmentBarProps>(({ segments, height = 8 }) => {+ const total = segments.reduce((sum, s) => sum + s.value, 0);++ return (+ <div className={styles.track} style={{ height }}>+ {total > 0 &&+ segments.map((s, i) =>+ s.value > 0 ? (+ <span+ className={styles.segment}+ key={i}+ style={{ background: s.color, width: `${(s.value / total) * 100}%` }}+ />+ ) : null,+ )}+ </div>+ );+});++export default SegmentBar;diff --git a/src/routes/(main)/eval/features/Sparkline.tsx b/src/routes/(main)/eval/features/Sparkline.tsxnew file mode 100644index 00000000000..64b153d3751--- /dev/null+++ b/src/routes/(main)/eval/features/Sparkline.tsx@@ -0,0 +1,57 @@+'use client';++import { createStaticStyles, cssVar } from 'antd-style';+import { memo } from 'react';++const styles = createStaticStyles(({ css }) => ({+ bar: css`+ transition: height 0.2s ease;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+ `,+}));++interface SparklineProps {+ /** Highest-index value is the most recent run. */+ values: number[];+ width?: number;+}++/**+ * Pass-rate trend across a benchmark's recent runs — a compact at-a-glance read+ * of whether quality is climbing. Values are 0..1; the latest run is drawn in the+ * primary color, earlier runs in a muted success fill.+ */+const Sparkline = memo<SparklineProps>(({ values, width = 132 }) => {+ const height = 40;+ const gap = 4;+ const n = values.length;+ const barWidth = Math.max(3, (width - (n - 1) * gap) / n);++ return (+ <svg height={height} viewBox={`0 0 ${width} ${height}`} width={width}>+ {values.map((v, i) => {+ const clamped = Math.max(0, Math.min(1, v));+ const barHeight = Math.max(3, clamped * height);+ const isLatest = i === n - 1;+ return (+ <rect+ className={styles.bar}+ fill={isLatest ? cssVar.colorPrimary : cssVar.colorSuccess}+ height={barHeight}+ key={i}+ opacity={isLatest ? 1 : 0.45}+ rx={2}+ width={barWidth}+ x={i * (barWidth + gap)}+ y={height - barHeight}+ />+ );+ })}+ </svg>+ );+});++export default Sparkline;diff --git a/src/routes/(main)/eval/features/StatusBadge.tsx b/src/routes/(main)/eval/features/StatusBadge.tsxindex f35d16fb77e..69f023e8c91 100644--- a/src/routes/(main)/eval/features/StatusBadge.tsx+++ b/src/routes/(main)/eval/features/StatusBadge.tsx@@ -37,7 +37,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({gap: 4px;align-items: center;- font-size: 11px;+ font-size: ${cssVar.fontSizeSM};font-weight: 500;line-height: 1;`,diff --git a/src/routes/(main)/eval/features/TestCaseCreateModal/Content.tsx b/src/routes/(main)/eval/features/TestCaseCreateModal/Content.tsxindex e7717393001..356be0ef149 100644--- a/src/routes/(main)/eval/features/TestCaseCreateModal/Content.tsx+++ b/src/routes/(main)/eval/features/TestCaseCreateModal/Content.tsx@@ -1,13 +1,24 @@'use client';-import { Accordion, AccordionItem, Flexbox, Text } from '@lobehub/ui';+import { Accordion, AccordionItem, Flexbox, Input, Text, TextArea } from '@lobehub/ui';import { Select, useModalContext } from '@lobehub/ui/base-ui';-import { App, Form, Input } from 'antd';+import { App, Form } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import { type FC } from 'react';import { useTranslation } from 'react-i18next';import { agentEvalService } from '@/services/agentEval';+const styles = createStaticStyles(({ css }) => ({+ sectionLabel: css`+ margin-block-end: 12px;++ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,+}));+export interface TestCaseCreateContentProps {datasetId: string;formId: string;@@ -67,8 +78,9 @@ const TestCaseCreateContent: FC<TestCaseCreateContentProps> = ({return (<Form form={form} layout="vertical" name={formId} onFinish={handleFinish}>+ <div className={styles.sectionLabel}>{t('caseDetail.section.testCase')}</div><Form.Item label={t('testCase.create.input.label')} name="input" rules={[{ required: true }]}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 6, minRows: 3 }}placeholder={t('testCase.create.input.placeholder')}/>@@ -78,19 +90,22 @@ const TestCaseCreateContent: FC<TestCaseCreateContentProps> = ({name="expected"rules={[{ message: t('testCase.create.expected.required'), required: true }]}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 6, minRows: 2 }}placeholder={t('testCase.create.expected.placeholder')}/></Form.Item>+ <div className={styles.sectionLabel} style={{ marginBlockStart: 4 }}>+ {t('caseDetail.section.scoring')}+ </div><Form.Item label={t('evalMode.label')} name="evalMode"><SelectallowClearplaceholder={t('evalMode.placeholder')}optionRender={(option) => (- <Flexbox gap={2} style={{ padding: '4px 0' }}>+ <Flexbox gap={4} style={{ paddingBlock: 4 }}><div>{option.label}</div>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t(`evalMode.${option.value}.desc` as any)}</Text></Flexbox>@@ -104,7 +119,7 @@ const TestCaseCreateContent: FC<TestCaseCreateContentProps> = ({</Form.Item>{evalModeValue === 'llm-rubric' && (<Form.Item label={t('evalMode.prompt.label')} name={['evalConfig', 'judgePrompt']}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 8, minRows: 3 }}placeholder={t('evalMode.prompt.placeholder')}/>@@ -113,11 +128,11 @@ const TestCaseCreateContent: FC<TestCaseCreateContentProps> = ({<Accordion><AccordionItemitemKey="advanced"- paddingBlock={6}+ paddingBlock={8}paddingInline={4}title={t('testCase.create.advanced')}>- <Flexbox gap={16} style={{ paddingTop: 8 }}>+ <Flexbox gap={16} style={{ paddingBlockStart: 8 }}><Form.Itemlabel={t('testCase.create.difficulty.label')}name="difficulty"diff --git a/src/routes/(main)/eval/features/TestCaseEditModal/Content.tsx b/src/routes/(main)/eval/features/TestCaseEditModal/Content.tsxindex 9f3e68742cf..dab008d578d 100644--- a/src/routes/(main)/eval/features/TestCaseEditModal/Content.tsx+++ b/src/routes/(main)/eval/features/TestCaseEditModal/Content.tsx@@ -1,13 +1,24 @@'use client';-import { Accordion, AccordionItem, Flexbox, Text } from '@lobehub/ui';+import { Accordion, AccordionItem, Flexbox, Input, Text, TextArea } from '@lobehub/ui';import { Select, useModalContext } from '@lobehub/ui/base-ui';-import { App, Form, Input } from 'antd';+import { App, Form } from 'antd';+import { createStaticStyles, cssVar } from 'antd-style';import { type FC, useEffect } from 'react';import { useTranslation } from 'react-i18next';import { agentEvalService } from '@/services/agentEval';+const styles = createStaticStyles(({ css }) => ({+ sectionLabel: css`+ margin-block-end: 12px;++ font-size: ${cssVar.fontSizeSM};+ font-weight: 500;+ color: ${cssVar.colorTextSecondary};+ `,+}));+export interface TestCaseEditContentProps {formId: string;onLoadingChange?: (loading: boolean) => void;@@ -78,8 +89,9 @@ const TestCaseEditContent: FC<TestCaseEditContentProps> = ({return (<Form form={form} layout="vertical" name={formId} onFinish={handleFinish}>+ <div className={styles.sectionLabel}>{t('caseDetail.section.testCase')}</div><Form.Item label={t('testCase.create.input.label')} name="input" rules={[{ required: true }]}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 6, minRows: 3 }}placeholder={t('testCase.create.input.placeholder')}/>@@ -89,19 +101,22 @@ const TestCaseEditContent: FC<TestCaseEditContentProps> = ({name="expected"rules={[{ message: t('testCase.create.expected.required'), required: true }]}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 6, minRows: 2 }}placeholder={t('testCase.create.expected.placeholder')}/></Form.Item>+ <div className={styles.sectionLabel} style={{ marginBlockStart: 4 }}>+ {t('caseDetail.section.scoring')}+ </div><Form.Item label={t('evalMode.label')} name="evalMode"><SelectallowClearplaceholder={t('evalMode.placeholder')}optionRender={(option) => (- <Flexbox gap={2} style={{ padding: '4px 0' }}>+ <Flexbox gap={4} style={{ paddingBlock: 4 }}><div>{option.label}</div>- <Text style={{ fontSize: 12 }} type="secondary">+ <Text fontSize={12} type="secondary">{t(`evalMode.${option.value}.desc` as any)}</Text></Flexbox>@@ -115,7 +130,7 @@ const TestCaseEditContent: FC<TestCaseEditContentProps> = ({</Form.Item>{evalModeValue === 'llm-rubric' && (<Form.Item label={t('evalMode.prompt.label')} name={['evalConfig', 'judgePrompt']}>- <Input.TextArea+ <TextAreaautoSize={{ maxRows: 8, minRows: 3 }}placeholder={t('evalMode.prompt.placeholder')}/>@@ -124,11 +139,11 @@ const TestCaseEditContent: FC<TestCaseEditContentProps> = ({<Accordion><AccordionItemitemKey="advanced"- paddingBlock={6}+ paddingBlock={8}paddingInline={4}title={t('testCase.create.advanced')}>- <Flexbox gap={16} style={{ paddingTop: 8 }}>+ <Flexbox gap={16} style={{ paddingBlockStart: 8 }}><Form.Itemlabel={t('table.columns.category')}name="category"diff --git a/src/routes/(main)/eval/index.tsx b/src/routes/(main)/eval/index.tsxindex 29255587fe3..dd092be3d87 100644--- a/src/routes/(main)/eval/index.tsx+++ b/src/routes/(main)/eval/index.tsx@@ -1,39 +1,59 @@'use client';-import { Button, Empty, Flexbox } from '@lobehub/ui';-import { createStaticStyles } from 'antd-style';+import { Button, Empty, Flexbox, Skeleton, Text } from '@lobehub/ui';+import { createStaticStyles, cssVar } from 'antd-style';import { FlaskConical, Plus } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-import NeuralNetworkLoading from '@/components/NeuralNetworkLoading';import { useEvalStore } from '@/store/eval';import BenchmarkCard from './features/BenchmarkCard';import { createCreateBenchmarkModal } from './features/CreateBenchmarkModal';-const styles = createStaticStyles(({ css, cssVar }) => ({+const styles = createStaticStyles(({ css }) => ({container: css`overflow-y: auto;padding-block: 24px;padding-inline: 32px;`,- subtitle: css`- margin: 0;- font-size: 13px;- color: ${cssVar.colorTextTertiary};+ grid: css`+ display: grid;+ gap: 20px;+ grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));+ `,+ skeletonCard: css`+ padding: 20px;+ border: 1px solid ${cssVar.colorBorderSecondary};+ border-radius: ${cssVar.borderRadiusLG};++ background: ${cssVar.colorBgContainer};`,title: css`margin: 0;-- font-size: 22px;- font-weight: 600;line-height: 1.3;- color: ${cssVar.colorText};- letter-spacing: -0.02em;`,}));+// Loading placeholder that reuses the benchmark-card chrome so loading → loaded+// is a content swap, not a relayout (ux §4.1).+const SkeletonGrid = memo(() => (+ <div className={styles.grid}>+ {[0, 1, 2, 3].map((i) => (+ <Flexbox className={styles.skeletonCard} gap={16} key={i}>+ <Flexbox horizontal gap={12}>+ <Skeleton.Avatar active shape={'square'} size={36} />+ <Flexbox flex={1} gap={8}>+ <Skeleton.Button active size={'small'} style={{ height: 14, width: 160 }} />+ <Skeleton.Button active size={'small'} style={{ height: 12, width: 220 }} />+ </Flexbox>+ </Flexbox>+ <Skeleton.Button active block size={'small'} style={{ height: 64 }} />+ </Flexbox>+ ))}+ </div>+));+const EvalOverview = memo(() => {const { t } = useTranslation('eval');const benchmarkList = useEvalStore((s) => s.benchmarkList);@@ -41,32 +61,32 @@ const EvalOverview = memo(() => {const { isLoading } = useFetchBenchmarks();return (- <Flexbox className={styles.container} gap={32} height="100%" width="100%">+ <Flexbox className={styles.container} gap={32} height={'100%'} width={'100%'}>{/* Header */}- <Flexbox horizontal align="center" justify="space-between">- <Flexbox gap={4}>- <h1 className={styles.title}>{t('overview.title')}</h1>- <p className={styles.subtitle}>{t('overview.subtitle')}</p>+ <Flexbox horizontal align={'center'} gap={16} justify={'space-between'}>+ <Flexbox gap={4} style={{ minWidth: 0 }}>+ <Text as={'h1'} className={styles.title} ellipsis fontSize={30} weight={600}>+ {t('overview.title')}+ </Text>+ <Text type={'secondary'}>{t('overview.subtitle')}</Text></Flexbox>{benchmarkList.length > 0 && (- <Button icon={Plus} type="primary" onClick={() => createCreateBenchmarkModal()}>+ <Button icon={Plus} type={'primary'} onClick={() => createCreateBenchmarkModal()}>{t('overview.createBenchmark')}</Button>)}</Flexbox>- {/* Benchmark cards grid */}+ {/* Body: loading / empty / grid */}{isLoading ? (- <Flexbox align="center" flex={1} justify="center">- <NeuralNetworkLoading size={64} />- </Flexbox>+ <SkeletonGrid />) : benchmarkList.length === 0 ? (- <Flexbox align="center" flex={1} justify="center">+ <Flexbox align={'center'} flex={1} justify={'center'}><Empty description={t('benchmark.empty')} icon={FlaskConical}><Buttonicon={Plus}style={{ marginTop: 16 }}- type="primary"+ type={'primary'}onClick={() => createCreateBenchmarkModal()}>{t('overview.createBenchmark')}@@ -74,13 +94,7 @@ const EvalOverview = memo(() => {</Empty></Flexbox>) : (- <div- style={{- display: 'grid',- gap: 20,- gridTemplateColumns: 'repeat(auto-fill, minmax(480px, 1fr))',- }}- >+ <div className={styles.grid}>{benchmarkList.map((benchmark: any) => (<BenchmarkCardbestScore={benchmark.bestScore}