From 6a24b17629aad9bd0566ad0a7699d686ea860abb Mon Sep 17 00:00:00 2001 From: chengyongru <61816729+chengyongru@users.noreply.github.com> Date: Fri, 13 Nov 2026 17:12:18 +0800 Subject: [PATCH] feat(webui): refresh the empty chat welcome (#6650) * feat(webui): refresh the empty chat welcome * fix(webui): keep empty chat accessible in split panes * chore(webui): remove unused fixture test id --- webui/browser/composer-surface.spec.ts | 2 +- webui/browser/new-chat-skeleton-fixture.tsx | 13 ++- webui/browser/new-chat-skeleton.spec.ts | 87 +++++++++++++-- webui/browser/theme-toggle-fixture.tsx | 2 +- webui/browser/workspace-access-focus.spec.ts | 4 +- webui/public/brand/nanobot_mark_outline.svg | 20 ++++ webui/src/components/StartupSkeleton.tsx | 2 +- webui/src/components/startup-skeleton.css | 9 +- webui/src/components/thread/ThreadShell.tsx | 100 +----------------- .../src/components/thread/ThreadViewport.tsx | 2 +- .../components/thread/ThreadWelcomeMark.tsx | 89 ++++++++++++++++ .../components/thread/thread-welcome-mark.css | 41 +++++++ webui/src/i18n/locales/en/common.json | 6 -- webui/src/i18n/locales/es/common.json | 6 -- webui/src/i18n/locales/fr/common.json | 6 -- webui/src/i18n/locales/id/common.json | 6 -- webui/src/i18n/locales/ja/common.json | 6 -- webui/src/i18n/locales/ko/common.json | 6 -- webui/src/i18n/locales/pt-BR/common.json | 6 -- webui/src/i18n/locales/vi/common.json | 6 -- webui/src/i18n/locales/zh-CN/common.json | 6 -- webui/src/i18n/locales/zh-TW/common.json | 6 -- webui/src/tests/app-layout.test.tsx | 10 +- webui/src/tests/i18n.test.tsx | 4 - .../tests/temporary-chat-navigation.test.tsx | 4 +- webui/src/tests/thread-shell.test.tsx | 39 ++++--- 26 files changed, 283 insertions(+), 205 deletions(-) create mode 100644 webui/public/brand/nanobot_mark_outline.svg create mode 100644 webui/src/components/thread/ThreadWelcomeMark.tsx create mode 100644 webui/src/components/thread/thread-welcome-mark.css diff --git a/webui/browser/composer-surface.spec.ts b/webui/browser/composer-surface.spec.ts index f46f5d566..114e3510e 100644 --- a/webui/browser/composer-surface.spec.ts +++ b/webui/browser/composer-surface.spec.ts @@ -20,7 +20,7 @@ for (const theme of ["light", "dark"]) { await expect(surface).toBeVisible(); const input = page.getByRole("textbox", { name: "Message input" }); await input.blur(); - await page.getByTestId("hero-greeting").click(); + await page.getByTestId("thread-empty-region").click(); const rest = await surface.evaluate(element => getComputedStyle(element).boxShadow); const bounds = await surface.boundingBox(); const footer = await page.locator(".thread-composer-footer").boundingBox(); diff --git a/webui/browser/new-chat-skeleton-fixture.tsx b/webui/browser/new-chat-skeleton-fixture.tsx index 7fde45f72..bbfb4535e 100644 --- a/webui/browser/new-chat-skeleton-fixture.tsx +++ b/webui/browser/new-chat-skeleton-fixture.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import { ThreadShell } from "@/components/thread/ThreadShell"; +import { PaneWorkbench } from "@/components/workbench/PaneWorkbench"; import type { WorkspaceScopePayload } from "@/lib/types"; import { StartupSkeleton } from "@/components/StartupSkeleton"; import { settings } from "@/dev/gallery/settings"; @@ -18,11 +19,19 @@ export function NewChatSkeletonFixture() { {params.has("loading") ? : <>