feat(webui): unify icons and refine interaction feedback (#6074)

* feat(webui): unify product icons and refine interaction feedback

* test(webui): align layout and tooltip expectations with icon refresh

* test(webui): verify temporary chat uses shared icon controls

* fix(webui): toggle workspace access directly and restore send arrow

* fix(webui): keep the send control circular

* fix(webui): clear workspace toggle background on pointer leave

* test(webui): isolate GitHub navigation in star prompt tests

* test(webui): prevent external default navigation during star link clicks
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-06 00:46:38 +08:00
1 parent 9dc0abae4f
commit 63bdd40280
59 files changed
+615 -505

No files matched your search

+4 -4
View File
@@ -10,7 +10,7 @@ const presets = [
];
describe("ModelPresetBadge setup tooltip", () => {
it.each([true, false])("hides model details on hover and focus (hero: %s)", async (isHero) => {
it.each([true, false])("keeps setup actionable without repeating its prompt in a tooltip (hero: %s)", async (isHero) => {
const user = userEvent.setup();
const onClick = vi.fn();
render(
@@ -27,12 +27,12 @@ describe("ModelPresetBadge setup tooltip", () => {
const trigger = screen.getByRole("button", { name: "Choose your AI" });
await user.hover(trigger);
expect(await screen.findByRole("tooltip")).toHaveTextContent(/^Choose your AI$/);
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
await user.unhover(trigger);
fireEvent.keyDown(trigger, { key: "Escape" });
await waitFor(() => expect(screen.queryByRole("tooltip")).not.toBeInTheDocument());
fireEvent.focus(trigger);
expect(await screen.findByRole("tooltip")).toHaveTextContent(/^Choose your AI$/);
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
await user.click(trigger);
expect(onClick).toHaveBeenCalledTimes(1);
});
@@ -56,7 +56,7 @@ describe("ModelPresetBadge setup tooltip", () => {
expect(trigger).toHaveTextContent("选择你的 AI");
expect(trigger.querySelector("[data-fallback]")).toBeNull();
fireEvent.focus(trigger);
expect(await screen.findByRole("tooltip")).toHaveTextContent(/^选择你的 AI$/);
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
},
);
});