Skip to content

Your lightweight open-source personal agent.

fix(webui): improve automation edit message field

chengyongru04496e9e2866
diff --git a/webui/src/components/settings/SettingsView.tsx b/webui/src/components/settings/SettingsView.tsx
index 49a27ba88..8c04338ed 100644
--- a/webui/src/components/settings/SettingsView.tsx
+++ b/webui/src/components/settings/SettingsView.tsx
@@ -3854,16 +3854,13 @@ function AutomationEditDialog({
return (
<Dialog open={Boolean(job)} onOpenChange={onOpenChange}>
{job ? (
- <DialogContent className="w-[min(calc(100vw-2rem),34rem)] rounded-[26px]">
+ <DialogContent
+ aria-describedby={undefined}
+ className="w-[min(calc(100vw-2rem),34rem)] rounded-[26px]"
+ >
<form className="space-y-5" onSubmit={submit}>
<DialogHeader>
<DialogTitle>{tx("settings.automations.editTitle", "Edit automation")}</DialogTitle>
- <DialogDescription>
- {tx(
- "settings.automations.editDescription",
- "Update the prompt and schedule. The linked chat stays unchanged.",
- )}
- </DialogDescription>
</DialogHeader>
<div className="space-y-4">
@@ -3885,7 +3882,7 @@ function AutomationEditDialog({
<Textarea
value={draft.message}
onChange={(event) => setDraft((prev) => ({ ...prev, message: event.target.value }))}
- className="min-h-24 resize-y rounded-[12px] text-[13px] leading-5"
+ className="min-h-[160px] resize-none rounded-[12px] text-[13px] leading-5"
/>
</label>
diff --git a/webui/src/tests/app-layout.test.tsx b/webui/src/tests/app-layout.test.tsx
index 33e5d413f..07461bc32 100644
--- a/webui/src/tests/app-layout.test.tsx
+++ b/webui/src/tests/app-layout.test.tsx
@@ -501,6 +501,13 @@ describe("App layout", () => {
expect(await screen.findByText("Past one-shot")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Edit" }));
expect(screen.queryByText("Run time must be in the future.")).not.toBeInTheDocument();
+ expect(
+ screen.queryByText("Update the prompt and schedule. The linked chat stays unchanged."),
+ ).not.toBeInTheDocument();
+ expect(screen.getByDisplayValue("Old one-shot message")).toHaveClass(
+ "min-h-[160px]",
+ "resize-none",
+ );
fireEvent.change(screen.getByDisplayValue("Old one-shot message"), {
target: { value: "Updated one-shot message" },