fix(webui): simplify existing copy across all locales (#6116)
* fix(webui): clarify Chinese copy and channel field guidance * fix(webui): complete concise copy across all locales * fix(webui): limit copy rewrite to existing strings
This commit is contained in:
1 parent
de56e5de6b
commit
bbe7648868
210 files changed
+4658
-4658
No files matched your search
@@ -512,7 +512,7 @@ describe("ThreadShell", () => {
|
||||
onToggleSidebar={() => {}} />, null, "tok", ["webui.core.v1", "webui.subagents.v1"]);
|
||||
const view = render(shell());
|
||||
await screen.findByText("Delegate inspection");
|
||||
fireEvent.click(await screen.findByRole("button", { name: /Delegated work Finished: 1/ }));
|
||||
fireEvent.click(await screen.findByRole("button", { name: /Subtasks Finished: 1/ }));
|
||||
const task = await screen.findByRole("button", { name: /Inspect settings Completed/ });
|
||||
await screen.findByText("Delegate inspection");
|
||||
expect(screen.getAllByRole("button", { name: /Inspect settings/ })).toHaveLength(1);
|
||||
@@ -521,7 +521,7 @@ describe("ThreadShell", () => {
|
||||
view.unmount();
|
||||
render(shell());
|
||||
await screen.findByText("Delegate inspection");
|
||||
fireEvent.click(await screen.findByRole("button", { name: /Delegated work Finished: 1/ }));
|
||||
fireEvent.click(await screen.findByRole("button", { name: /Subtasks Finished: 1/ }));
|
||||
await screen.findByRole("button", { name: /Inspect settings Completed/ });
|
||||
expect(client.sendMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -611,7 +611,7 @@ describe("ThreadShell", () => {
|
||||
const view = render(shell("draft-a"));
|
||||
expect(screen.getByRole("textbox")).toHaveValue("draft A");
|
||||
expect(screen.getByLabelText("Quoted context")).toHaveTextContent("quote A");
|
||||
fireEvent.click(screen.getByRole("button", { name: "Remove quoted context" }));
|
||||
fireEvent.click(screen.getByRole("button", { name: "Remove quote" }));
|
||||
view.rerender(shell("draft-b"));
|
||||
expect(screen.getByRole("textbox")).toHaveValue("draft B");
|
||||
expect(screen.getByLabelText("Quoted context")).toHaveTextContent("quote B");
|
||||
@@ -1201,7 +1201,7 @@ describe("ThreadShell", () => {
|
||||
fireEvent.focus(await screen.findByLabelText("fast"));
|
||||
expect(await screen.findByRole("tooltip")).toHaveTextContent("fast gpt-5.5 OpenAI Codex");
|
||||
fireEvent.blur(screen.getByLabelText("fast"));
|
||||
expect(screen.queryByRole("button", { name: "Choose your AI" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Choose model" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("switches through every named preset while preserving call-order priority", async () => {
|
||||
@@ -1285,7 +1285,7 @@ describe("ThreadShell", () => {
|
||||
fireEvent.focus(await screen.findByLabelText("fast"));
|
||||
expect(await screen.findByRole("tooltip")).toHaveTextContent("fast gpt-4 Company Proxy");
|
||||
fireEvent.blur(screen.getByLabelText("fast"));
|
||||
expect(screen.queryByRole("button", { name: "Choose your AI" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Choose model" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps the selected composer preset and attributes only the reply to its actual source", async () => {
|
||||
@@ -1477,7 +1477,7 @@ describe("ThreadShell", () => {
|
||||
));
|
||||
|
||||
await screen.findByText(hasHistory ? "Previous message" : HERO_GREETING_PATTERN);
|
||||
const badge = screen.getByRole("button", { name: "Choose your AI" });
|
||||
const badge = screen.getByRole("button", { name: "Choose model" });
|
||||
fireEvent.focus(badge);
|
||||
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
|
||||
fireEvent.click(badge);
|
||||
@@ -1524,12 +1524,12 @@ describe("ThreadShell", () => {
|
||||
),
|
||||
);
|
||||
|
||||
const badge = await screen.findByRole("button", { name: "Choose your AI" });
|
||||
const badge = await screen.findByRole("button", { name: "Choose model" });
|
||||
expect(screen.queryByTestId("composer-model-setup-icon")).not.toBeInTheDocument();
|
||||
expect(badge.querySelector('[data-needs-setup="true"]')).toHaveClass(
|
||||
"composer-model-pill-setup",
|
||||
);
|
||||
expect(screen.getByTestId("composer-model-setup-label")).toHaveTextContent("Choose your AI");
|
||||
expect(screen.getByTestId("composer-model-setup-label")).toHaveTextContent("Choose model");
|
||||
expect(badge).not.toHaveClass("border-amber-500/35");
|
||||
expect(screen.queryByTestId("composer-model-logo-openai_codex")).not.toBeInTheDocument();
|
||||
|
||||
@@ -1539,7 +1539,7 @@ describe("ThreadShell", () => {
|
||||
});
|
||||
fireEvent.click(badge);
|
||||
|
||||
expect(screen.queryByRole("dialog", { name: "Choose your AI" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("dialog", { name: "Choose model" })).not.toBeInTheDocument();
|
||||
expect(onOpenModelSettings).toHaveBeenCalledTimes(1);
|
||||
expect(input).toHaveValue("hello");
|
||||
expect(client.sendMessage).not.toHaveBeenCalled();
|
||||
@@ -1585,7 +1585,7 @@ describe("ThreadShell", () => {
|
||||
);
|
||||
|
||||
await screen.findByLabelText("Message input");
|
||||
expect(screen.queryByRole("button", { name: "Toggle image generation mode" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Image mode" })).not.toBeInTheDocument();
|
||||
|
||||
await act(async () => {
|
||||
rerender(
|
||||
@@ -1602,7 +1602,7 @@ describe("ThreadShell", () => {
|
||||
);
|
||||
});
|
||||
|
||||
expect(screen.queryByRole("button", { name: "Toggle image generation mode" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Image mode" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("restores in-memory messages when switching away and back to a session", async () => {
|
||||
@@ -2133,7 +2133,7 @@ describe("ThreadShell", () => {
|
||||
expect(greeting).toHaveClass("select-none", "whitespace-nowrap");
|
||||
expect(screen.getByRole("textbox")).toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Write code" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Create a project plan" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Make a plan" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("does not leak the previous thread when opening a brand-new chat", async () => {
|
||||
@@ -2242,7 +2242,7 @@ describe("ThreadShell", () => {
|
||||
);
|
||||
|
||||
const menu = await openMessageActions("answer 100");
|
||||
fireEvent.click(within(menu).getByRole("button", { name: "Fork" }));
|
||||
fireEvent.click(within(menu).getByRole("button", { name: "New chat from here" }));
|
||||
|
||||
await waitFor(() =>
|
||||
expect(onForkChat).toHaveBeenCalledWith("long-chat", 101),
|
||||
@@ -4397,10 +4397,10 @@ describe("ThreadShell", () => {
|
||||
);
|
||||
await act(async () => {});
|
||||
|
||||
expect(screen.queryByText("Design an app icon")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Design an icon")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Write code")).not.toBeInTheDocument();
|
||||
|
||||
expect(screen.queryByText("Design an app icon")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Design an icon")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Write code")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user