Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-9193: fix(autopilots): edit each webhook trigger from its own row (#10793)
Multica Eve0e917ecf4c45
diff --git a/apps/docs/content/docs/autopilots.fr.mdx b/apps/docs/content/docs/autopilots.fr.mdxindex 71dabbcc78..108ad57fd9 100644--- a/apps/docs/content/docs/autopilots.fr.mdx+++ b/apps/docs/content/docs/autopilots.fr.mdx@@ -45,7 +45,7 @@ Le mode **Exécution seule** exige que le runtime soit disponible au moment du d## Exécuter selon une planification-L'éditeur de planification vous permet de choisir l'heure d'exécution, les jours de répétition, la plage horaire et le fuseau horaire, et affiche un aperçu des prochaines exécutions. Une automatisation peut avoir plusieurs planifications ; l'activation ou la désactivation d'un déclencheur individuel se fait avec la commande CLI `autopilot trigger-update` — voir [Utiliser le CLI](/cli) pour les paramètres.+L'éditeur de planification vous permet de choisir l'heure d'exécution, les jours de répétition, la plage horaire et le fuseau horaire, et affiche un aperçu des prochaines exécutions. Une automatisation peut avoir plusieurs planifications ; pour modifier, activer ou désactiver un déclencheur individuel, cliquez sur le bouton de modification de sa ligne dans **Déclencheurs**, ou utilisez la commande CLI `autopilot trigger-update` — voir [Utiliser le CLI](/cli) pour les paramètres.Lorsque vous avez besoin de règles plus complexes, modifiez directement le cron standard à 5 champs :@@ -87,7 +87,7 @@ Contraintes applicables aux requêtes webhook :### Filtres d'événements-Lorsqu'une même source envoie plusieurs types d'événements, ajoutez des filtres d'événements au déclencheur. Chaque ligne contient un nom d'événement et une liste facultative d'actions ; une exécution est déclenchée si une ligne correspond, et laisser toutes les lignes vides accepte tous les événements.+Lorsqu'une même source envoie plusieurs types d'événements, ajoutez des filtres d'événements au déclencheur. Chaque ligne contient un nom d'événement et une liste facultative d'actions ; une exécution est déclenchée si une ligne correspond, et laisser toutes les lignes vides accepte tous les événements. Pour modifier les filtres d'un webhook, cliquez sur **Modifier le webhook** sur sa ligne dans **Déclencheurs**.Par exemple, avec `workflow_run` comme nom d'événement et `completed, failed` comme actions, seuls ces deux types de résultats `workflow_run` sont acceptés. Multica reconnaît l'événement et l'action à partir des en-têtes de requête et des champs de charge utile courants, notamment l'en-tête `X-GitHub-Event` de GitHub et le champ `action` du corps.diff --git a/apps/docs/content/docs/autopilots.ja.mdx b/apps/docs/content/docs/autopilots.ja.mdxindex 48d5a5125a..606b9c8955 100644--- a/apps/docs/content/docs/autopilots.ja.mdx+++ b/apps/docs/content/docs/autopilots.ja.mdx@@ -45,7 +45,7 @@ import { AutopilotDemo } from "@/components/demos/autopilot-demo";## スケジュールで実行する-スケジュールエディターでは、実行時刻、繰り返す曜日、時間帯、タイムゾーンを指定し、次回以降の実行時刻をプレビューできます。1 つのオートパイロットに複数のスケジュールを追加できます。個別のトリガーを有効または無効にする場合は、CLI の `autopilot trigger-update` を使います。引数は [CLI コマンド](/cli)を参照してください。+スケジュールエディターでは、実行時刻、繰り返す曜日、時間帯、タイムゾーンを指定し、次回以降の実行時刻をプレビューできます。1 つのオートパイロットに複数のスケジュールを追加できます。個別のトリガーを変更したり有効・無効を切り替えたりするには、「トリガー」の該当行にある編集ボタンをクリックするか、CLI の `autopilot trigger-update` を使います。引数は [CLI コマンド](/cli)を参照してください。より複雑なルールが必要な場合は、標準の 5 フィールド cron を直接編集できます。@@ -87,7 +87,7 @@ Webhook リクエストには次の制約があります。### イベントをフィルターする [#event-filters]-同じ送信元から複数種類のイベントが届く場合、トリガーにイベントフィルターを追加できます。各行にイベント名と、任意で action の一覧を指定します。いずれか 1 行に一致すると実行され、すべて空の場合は全イベントを受け入れます。+同じ送信元から複数種類のイベントが届く場合、トリガーにイベントフィルターを追加できます。各行にイベント名と、任意で action の一覧を指定します。いずれか 1 行に一致すると実行され、すべて空の場合は全イベントを受け入れます。Webhook のフィルターを編集するには、「トリガー」の該当行にある **Webhook を編集** をクリックします。たとえばイベント名に `workflow_run`、Actions に `completed, failed` を指定すると、この 2 種類の `workflow_run` の結果だけを受け取ります。Multica は一般的なリクエストヘッダーと payload からイベントと action を判定します。GitHub の `X-GitHub-Event` と body の `action` にも対応しています。diff --git a/apps/docs/content/docs/autopilots.ko.mdx b/apps/docs/content/docs/autopilots.ko.mdxindex 0a6eb0910e..0d9c85d3b0 100644--- a/apps/docs/content/docs/autopilots.ko.mdx+++ b/apps/docs/content/docs/autopilots.ko.mdx@@ -45,7 +45,7 @@ import { AutopilotDemo } from "@/components/demos/autopilot-demo";## 일정에 따라 실행-일정 편집기에서 실행 시간, 반복 요일, 시간 범위, 시간대를 선택하고 다음 실행 시간을 미리 볼 수 있습니다. 오토파일럿 하나에 여러 일정을 추가할 수 있습니다. 특정 트리거를 개별적으로 켜거나 끄려면 CLI의 `autopilot trigger-update`를 사용하세요. 인수는 [CLI 명령](/cli)을 참고하세요.+일정 편집기에서 실행 시간, 반복 요일, 시간 범위, 시간대를 선택하고 다음 실행 시간을 미리 볼 수 있습니다. 오토파일럿 하나에 여러 일정을 추가할 수 있습니다. 특정 트리거를 수정하거나 개별적으로 켜거나 끄려면 '트리거'에서 해당 줄의 수정 버튼을 클릭하거나 CLI의 `autopilot trigger-update`를 사용하세요. 인수는 [CLI 명령](/cli)을 참고하세요.더 복잡한 규칙이 필요하면 표준 5필드 cron을 직접 수정할 수 있습니다.@@ -87,7 +87,7 @@ Webhook 요청에는 다음 제약이 있습니다.### 이벤트 필터링 [#event-filters]-같은 소스에서 여러 종류의 이벤트를 보낸다면 트리거에 이벤트 필터를 추가할 수 있습니다. 각 줄에는 이벤트 이름과 선택적인 action 목록을 입력합니다. 어느 한 줄이라도 일치하면 실행되며 모두 비워 두면 모든 이벤트를 받습니다.+같은 소스에서 여러 종류의 이벤트를 보낸다면 트리거에 이벤트 필터를 추가할 수 있습니다. 각 줄에는 이벤트 이름과 선택적인 action 목록을 입력합니다. 어느 한 줄이라도 일치하면 실행되며 모두 비워 두면 모든 이벤트를 받습니다. Webhook의 필터를 수정하려면 '트리거'에서 해당 줄의 **Webhook 수정**을 클릭하세요.예를 들어 이벤트 이름에 `workflow_run`, Actions에 `completed, failed`를 입력하면 이 두 종류의 `workflow_run` 결과만 받습니다. Multica는 GitHub의 `X-GitHub-Event`와 body의 `action`을 포함해 일반적인 요청 header와 payload에서 이벤트와 action을 식별합니다.diff --git a/apps/docs/content/docs/autopilots.mdx b/apps/docs/content/docs/autopilots.mdxindex ceb22a9d71..ab9b10f51f 100644--- a/apps/docs/content/docs/autopilots.mdx+++ b/apps/docs/content/docs/autopilots.mdx@@ -45,7 +45,7 @@ Below is an autopilot whose execution mode is Create issue. Click **Run now**, o## Run on a schedule-The schedule editor lets you pick the run time, repeat days, time window, and timezone, and previews the upcoming run times. One autopilot can have multiple schedules; to enable or disable an individual trigger, use the CLI's `autopilot trigger-update` — see [Using the CLI](/cli) for the parameters.+The schedule editor lets you pick the run time, repeat days, time window, and timezone, and previews the upcoming run times. One autopilot can have multiple schedules. To change, enable, or disable one trigger, click the edit button on its row under **Triggers**, or use the CLI's `autopilot trigger-update` — see [Using the CLI](/cli) for the parameters.For more complex rules, edit the standard 5-field cron directly:@@ -87,7 +87,7 @@ Constraints on webhook requests:### Filter events [#event-filters]-When one source sends several event types, add event filters to the trigger. Each row holds one event name plus an optional list of actions; a run fires if any row matches, and leaving all rows empty accepts every event.+When one source sends several event types, add event filters to the trigger. Each row holds one event name plus an optional list of actions; a run fires if any row matches, and leaving all rows empty accepts every event. To edit a webhook's filters, click **Edit webhook** on its row under **Triggers**.For example, with `workflow_run` as the event name and `completed, failed` as the actions, only those two kinds of `workflow_run` results are accepted. Multica recognizes the event and action from common request headers and payload fields, including GitHub's `X-GitHub-Event` and the `action` field in the body.diff --git a/apps/docs/content/docs/autopilots.zh-Hant.mdx b/apps/docs/content/docs/autopilots.zh-Hant.mdxindex 214e4e28a5..3064d51038 100644--- a/apps/docs/content/docs/autopilots.zh-Hant.mdx+++ b/apps/docs/content/docs/autopilots.zh-Hant.mdx@@ -45,7 +45,7 @@ import { AutopilotDemo } from "@/components/demos/autopilot-demo";## 按時間執行-時間表編輯器可以選擇執行時間、重複日期、時間視窗和時區,並預覽接下來的執行時間。一條自動化可以新增多個時間表;單獨啟停某個觸發器要用 CLI 的 `autopilot trigger-update`,引數見 [CLI 命令](/cli)。+時間表編輯器可以選擇執行時間、重複日期、時間視窗和時區,並預覽接下來的執行時間。一條自動化可以新增多個時間表;要修改或單獨啟停某個觸發器,點「觸發器」中該行的編輯按鈕,或用 CLI 的 `autopilot trigger-update`,引數見 [CLI 命令](/cli)。規則更復雜時,直接編輯標準 5 欄位 cron:@@ -87,7 +87,7 @@ Webhook 請求的約束:### 過濾事件 [#事件過濾]-同一個來源會傳送多種事件時,給觸發器加上事件過濾。每行一個事件名,加可選的 action 列表;任意一行命中就執行,全部留空則接收所有事件。+同一個來源會傳送多種事件時,給觸發器加上事件過濾。每行一個事件名,加可選的 action 列表;任意一行命中就執行,全部留空則接收所有事件。要編輯某個 Webhook 的過濾,點「觸發器」中該行的 **編輯 Webhook**。例如,事件名填寫 `workflow_run`,Actions 填寫 `completed, failed`,只會接收這兩類 `workflow_run` 結果。Multica 會從常見請求頭和 payload 中識別事件與 action,包括 GitHub 的 `X-GitHub-Event` 和 body 中的 `action`。diff --git a/apps/docs/content/docs/autopilots.zh.mdx b/apps/docs/content/docs/autopilots.zh.mdxindex 5a5c7a90a5..3b9ef97f7e 100644--- a/apps/docs/content/docs/autopilots.zh.mdx+++ b/apps/docs/content/docs/autopilots.zh.mdx@@ -45,7 +45,7 @@ import { AutopilotDemo } from "@/components/demos/autopilot-demo";## 按时间运行-时间表编辑器可以选择运行时间、重复日期、时间窗口和时区,并预览接下来的运行时间。一条自动化可以添加多个时间表;单独启停某个触发器要用 CLI 的 `autopilot trigger-update`,参数见 [CLI 命令](/cli)。+时间表编辑器可以选择运行时间、重复日期、时间窗口和时区,并预览接下来的运行时间。一条自动化可以添加多个时间表;要修改或单独启停某个触发器,点「触发器」中该行的编辑按钮,或用 CLI 的 `autopilot trigger-update`,参数见 [CLI 命令](/cli)。规则更复杂时,直接编辑标准 5 字段 cron:@@ -87,7 +87,7 @@ Webhook 请求的约束:### 过滤事件 [#事件过滤]-同一个来源会发送多种事件时,给触发器加上事件过滤。每行一个事件名,加可选的 action 列表;任意一行命中就运行,全部留空则接收所有事件。+同一个来源会发送多种事件时,给触发器加上事件过滤。每行一个事件名,加可选的 action 列表;任意一行命中就运行,全部留空则接收所有事件。要编辑某个 Webhook 的过滤,点「触发器」中该行的 **编辑 Webhook**。例如,事件名填写 `workflow_run`,Actions 填写 `completed, failed`,只会接收这两类 `workflow_run` 结果。Multica 会从常见请求头和 payload 中识别事件与 action,包括 GitHub 的 `X-GitHub-Event` 和 body 中的 `action`。diff --git a/packages/views/autopilots/components/autopilot-detail-page.tsx b/packages/views/autopilots/components/autopilot-detail-page.tsxindex 77560b1f13..9569eab67b 100644--- a/packages/views/autopilots/components/autopilot-detail-page.tsx+++ b/packages/views/autopilots/components/autopilot-detail-page.tsx@@ -57,6 +57,7 @@ import {} from "@multica/ui/components/ui/alert-dialog";import { ScheduleEditor } from "./schedule-editor/schedule-editor";import { WebhookUrlField } from "./webhook-url-field";+import { WebhookEventFilterSummary } from "./webhook-event-filter-section";import { getDefaultScheduleConfig, type ScheduleConfig } from "./schedule-editor/model";import { browserTimezone } from "../../common/timezone-select";import { cronFields, parseCron, toCron } from "./schedule-editor/cron-mapping";@@ -75,6 +76,7 @@ import { ReadonlyContent } from "../../editor";import { TranscriptButton } from "../../common/task-transcript";import { AutopilotDialog } from "./autopilot-dialog";import { EditScheduleTriggerDialog } from "./edit-schedule-trigger-dialog";+import { EditWebhookTriggerDialog } from "./edit-webhook-trigger-dialog";import { useRunAutopilotNow } from "./use-run-autopilot-now";import { useRegisterCommandBarContext } from "../../search/register-context";import { WebhookPayloadPreview } from "./webhook-payload-preview";@@ -437,18 +439,25 @@ export function TriggerRow({ trigger, autopilotId, canWrite }: { trigger: Autopi</IconButton>) : null;- // Schedule rows only: cron and timezone are the fields this dialog edits, and- // the API rejects them on any other kind. It rides alongside Delete so the- // row that states a schedule is also the row that can change it — without it- // an autopilot with two schedules has no editable schedule at all (MUL-7478).+ // Each schedule and webhook row edits itself, riding alongside Delete so the+ // row that states a trigger is also the row that can change it. The+ // autopilot dialog speaks for one schedule and for a first-and-only webhook;+ // without these, two schedules (MUL-7478), a webhook added beside a schedule+ // or a second webhook had no editor at all. Api rows have nothing to edit.+ const editLabel =+ trigger.kind === "schedule"+ ? t(($) => $.trigger_row.edit_schedule)+ : isWebhook+ ? t(($) => $.trigger_row.edit_webhook)+ : null;const editButton =- canWrite && trigger.kind === "schedule" ? (+ canWrite && editLabel ? (<IconButtonsize="icon-sm"variant="ghost"className="shrink-0 text-muted-foreground"onClick={() => setEditOpen(true)}- label={t(($) => $.trigger_row.edit_schedule)}+ label={editLabel}><Pencil className="size-3.5" /></IconButton>@@ -493,7 +502,7 @@ export function TriggerRow({ trigger, autopilotId, canWrite }: { trigger: Autopi})}</span>)}- {editButton}+ {!showWebhookUrlRow && editButton}{!showWebhookUrlRow && deleteButton}</div></div>@@ -522,12 +531,18 @@ export function TriggerRow({ trigger, autopilotId, canWrite }: { trigger: Autopi<RotateCw className={cn("h-3.5 w-3.5 text-muted-foreground", rotateToken.isPending && "animate-spin")} /></IconButton>)}+ {editButton}{deleteButton}</>}/></div>)}+ {isWebhook && (+ <div className="mt-1.5 pl-6">+ <WebhookEventFilterSummary filters={trigger.event_filters ?? []} />+ </div>+ )}<AlertDialog open={confirmOpen} onOpenChange={(v) => { if (!v && !deleting) setConfirmOpen(false); }}><AlertDialogContent><AlertDialogHeader>@@ -552,12 +567,21 @@ export function TriggerRow({ trigger, autopilotId, canWrite }: { trigger: Autopi</AlertDialogFooter></AlertDialogContent></AlertDialog>- <EditScheduleTriggerDialog- open={editOpen}- onOpenChange={setEditOpen}- autopilotId={autopilotId}- trigger={trigger}- />+ {isWebhook ? (+ <EditWebhookTriggerDialog+ open={editOpen}+ onOpenChange={setEditOpen}+ autopilotId={autopilotId}+ trigger={trigger}+ />+ ) : (+ <EditScheduleTriggerDialog+ open={editOpen}+ onOpenChange={setEditOpen}+ autopilotId={autopilotId}+ trigger={trigger}+ />+ )}<AlertDialog open={rotateOpen} onOpenChange={(v) => { if (!v && !rotateToken.isPending) setRotateOpen(false); }}><AlertDialogContent><AlertDialogHeader>diff --git a/packages/views/autopilots/components/autopilot-dialog.schedule.test.tsx b/packages/views/autopilots/components/autopilot-dialog.schedule.test.tsxindex 432c7bbada..f4c8756dcb 100644--- a/packages/views/autopilots/components/autopilot-dialog.schedule.test.tsx+++ b/packages/views/autopilots/components/autopilot-dialog.schedule.test.tsx@@ -325,3 +325,59 @@ describe("AutopilotDialog schedule section on an autopilot with several triggersexpect(mockCreateTrigger).not.toHaveBeenCalled();});});++// The webhook panel renders for an autopilot whose first trigger is a webhook.+// It holds one filter list, so with two webhooks it used to show and save the+// first as if it were the only one. It now hands those to the trigger rows,+// each of which edits its own webhook.+describe("AutopilotDialog webhook section", () => {+ beforeEach(() => {+ mockUpdateAutopilot.mockReset().mockResolvedValue({ id: AUTOPILOT_ID });+ mockCreateTrigger.mockReset().mockResolvedValue({ id: "trg-new" });+ mockUpdateTrigger.mockReset().mockResolvedValue({ id: "trg-hook" });+ });++ const webhook = (overrides: Partial<AutopilotTrigger> = {}) =>+ trigger({+ id: "trg-hook",+ kind: "webhook",+ cron_expression: null,+ timezone: null,+ webhook_token: "tok-1",+ event_filters: [{ event: "pull_request" }],+ ...overrides,+ });++ it("edits the filters of the autopilot's only webhook", async () => {+ const user = userEvent.setup();+ renderEditDialog([webhook(), trigger({ id: "trg-sched" })]);++ await user.click(screen.getByRole("button", { name: "Remove filter" }));+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger.mock.calls[0]?.[0]).toEqual({+ autopilotId: AUTOPILOT_ID,+ triggerId: "trg-hook",+ event_filters: [],+ });+ });++ it("sends the reader to the trigger rows instead of editing the first of several webhooks", async () => {+ const user = userEvent.setup();+ renderEditDialog([webhook(), webhook({ id: "trg-hook-2", webhook_token: "tok-2" })]);++ expect(+ screen.getByText(+ "This autopilot has more than one webhook. Close this dialog and edit each one under Triggers below.",+ ),+ ).toBeInTheDocument();+ expect(screen.queryByRole("button", { name: "Remove filter" })).not.toBeInTheDocument();++ await user.click(saveButton());++ // Other fields still save; the webhooks are left to their rows.+ await waitFor(() => expect(mockUpdateAutopilot).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger).not.toHaveBeenCalled();+ });+});diff --git a/packages/views/autopilots/components/autopilot-dialog.tsx b/packages/views/autopilots/components/autopilot-dialog.tsxindex aaf2dfe583..3b5b001ea7 100644--- a/packages/views/autopilots/components/autopilot-dialog.tsx+++ b/packages/views/autopilots/components/autopilot-dialog.tsx@@ -69,6 +69,7 @@ import { parseCron, toCron } from "./schedule-editor/cron-mapping";import { useScheduleSubmitGate } from "./schedule-editor/validate";import { WebhookEventFilterSection } from "./webhook-event-filter-section";import { WebhookUrlField } from "./webhook-url-field";+import { serializeEventFilters } from "./webhook-payload-condition";import { useT } from "../../i18n";import { formatSchedulePartialFailureToast } from "./autopilot-dialog-toast";import type { WebhookEventFilter } from "@multica/core/types";@@ -113,23 +114,6 @@ const OUTPUT_MODE_ICONS: Record<AutopilotExecutionMode, typeof FilePlus2> = {run_only: Play,};-// Webhook event-filter dirty detection--// serializeEventFilters returns a stable JSON string so the edit-mode dirty-// check can compare the current filters against the snapshot taken on open-// without depending on reference equality. Normalizes empty Actions and-// Conditions to [] so omitted-vs-explicit-empty doesn't show as a phantom-// change.-function serializeEventFilters(filters: WebhookEventFilter[]): string {- return JSON.stringify(- filters.map((f) => ({- event: f.event,- actions: f.actions ?? [],- conditions: f.conditions ?? [],- })),- );-}-// AutopilotDialogexport function AutopilotDialog(props: AutopilotDialogProps) {@@ -204,8 +188,20 @@ export function AutopilotDialog(props: AutopilotDialogProps) {})();const [triggerKind, setTriggerKind] = useState<"schedule" | "webhook">(initialKind);- const initialEventFilters: WebhookEventFilter[] =- !isCreate && props.triggers[0]?.event_filters ? props.triggers[0].event_filters : [];+ // The webhook panel only renders when the first trigger is a webhook, so this+ // is that row. Its filters are editable here only while it is the sole+ // webhook: this panel holds one filter list, and with two webhooks it would+ // show the first as if it were the whole story and save into that one alone.+ // Every webhook row on the detail page carries its own editor regardless.+ const existingWebhook = isCreate+ ? null+ : props.triggers.find((trig) => trig.kind === "webhook") ?? null;+ const webhookTriggerCount = isCreate+ ? 0+ : props.triggers.filter((trig) => trig.kind === "webhook").length;+ const webhookFiltersLocked = webhookTriggerCount >= 2;++ const initialEventFilters: WebhookEventFilter[] = existingWebhook?.event_filters ?? [];const [eventFilters, setEventFilters] = useState<WebhookEventFilter[]>(initialEventFilters);const initialCronRef = useRef(toCron(initialCfg));@@ -217,9 +213,7 @@ export function AutopilotDialog(props: AutopilotDialogProps) {const eventFiltersDirty =serializeEventFilters(eventFilters) !== initialEventFiltersRef.current;- const firstTriggerIdRef = useRef(- !isCreate && props.triggers[0] ? props.triggers[0].id : null,- );+ const webhookTriggerIdRef = useRef(existingWebhook?.id ?? null);// The row the schedule write targets, snapshotted at mount like the one// above. Null means there is none to patch, so the write creates one.const scheduleTriggerIdRef = useRef(existingSchedule?.id ?? null);@@ -418,13 +412,14 @@ export function AutopilotDialog(props: AutopilotDialogProps) {// UpdateAutopilotTriggerRequest in autopilot.go).if (triggerKind === "webhook" &&+ !webhookFiltersLocked &&eventFiltersDirty &&- firstTriggerIdRef.current+ webhookTriggerIdRef.current) {try {await updateTrigger.mutateAsync({autopilotId: props.autopilotId,- triggerId: firstTriggerIdRef.current,+ triggerId: webhookTriggerIdRef.current,event_filters: eventFilters,});} catch (err) {@@ -682,6 +677,7 @@ export function AutopilotDialog(props: AutopilotDialogProps) {) : (<WebhookSectionisCreate={isCreate}+ filtersLocked={webhookFiltersLocked}eventFilters={eventFilters}onEventFiltersChange={setEventFilters}/>@@ -1042,10 +1038,12 @@ function TriggerKindSection({function WebhookSection({isCreate,+ filtersLocked,eventFilters,onEventFiltersChange,}: {isCreate: boolean;+ filtersLocked: boolean;eventFilters: WebhookEventFilter[];onEventFiltersChange: (filters: WebhookEventFilter[]) => void;}) {@@ -1060,10 +1058,18 @@ function WebhookSection({: t(($) => $.dialog.webhook_help_edit)}</p></div>- <WebhookEventFilterSection- filters={eventFilters}- onChange={onEventFiltersChange}- />+ {filtersLocked ? (+ <div className="rounded-md border border-dashed p-3">+ <p className="text-caption text-muted-foreground">+ {t(($) => $.dialog.webhook_multiple_notice)}+ </p>+ </div>+ ) : (+ <WebhookEventFilterSection+ filters={eventFilters}+ onChange={onEventFiltersChange}+ />+ )}</div>);}diff --git a/packages/views/autopilots/components/edit-webhook-trigger-dialog.test.tsx b/packages/views/autopilots/components/edit-webhook-trigger-dialog.test.tsxnew file mode 100644index 0000000000..9e32082114--- /dev/null+++ b/packages/views/autopilots/components/edit-webhook-trigger-dialog.test.tsx@@ -0,0 +1,172 @@+import { describe, it, expect, vi, beforeEach } from "vitest";+import { screen, waitFor } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";+import type { AutopilotTrigger } from "@multica/core/types";+import { renderWithI18n } from "../../test/i18n";++// The editor a webhook row opens. The PATCH stays partial for the reason the+// schedule dialog's does: a changed filter list or enabled flag republishes+// the rule version and moves this trigger's accountability to the saver+// (`UpdateAutopilotTrigger` in server/internal/handler/autopilot.go, MUL-4302),+// so a rename must not carry them along.++const mockUpdateTrigger = vi.hoisted(() => vi.fn());++vi.mock("@multica/core/autopilots/mutations", () => ({+ useUpdateAutopilotTrigger: () => ({ mutateAsync: mockUpdateTrigger }),+}));++vi.mock("sonner", () => ({ toast: { success: vi.fn(), error: vi.fn() } }));++import { EditWebhookTriggerDialog } from "./edit-webhook-trigger-dialog";++const AUTOPILOT_ID = "ap-1";++function trigger(overrides: Partial<AutopilotTrigger> = {}): AutopilotTrigger {+ return {+ id: "trg-hook",+ autopilot_id: AUTOPILOT_ID,+ kind: "webhook",+ enabled: true,+ cron_expression: null,+ timezone: null,+ next_run_at: null,+ webhook_token: "tok-1",+ label: null,+ event_filters: [{ event: "pull_request", actions: ["opened"] }],+ last_fired_at: null,+ created_at: "2026-01-01T00:00:00Z",+ updated_at: "2026-01-01T00:00:00Z",+ ...overrides,+ };+}++function renderDialog(trig: AutopilotTrigger = trigger()) {+ const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });+ const onOpenChange = vi.fn();+ const tree = (next: AutopilotTrigger) => (+ <QueryClientProvider client={qc}>+ <EditWebhookTriggerDialog+ open+ onOpenChange={onOpenChange}+ autopilotId={AUTOPILOT_ID}+ trigger={next}+ />+ </QueryClientProvider>+ );+ const result = renderWithI18n(tree(trig));+ return { ...result, onOpenChange, refreshProps: (next: AutopilotTrigger) => result.rerender(tree(next)) };+}++const saveButton = () => screen.getByRole("button", { name: "Save" });+const labelInput = () => screen.getByPlaceholderText("e.g. GitHub pull requests");+const enabledSwitch = () => screen.getByRole("switch", { name: "Enabled" });++beforeEach(() => {+ mockUpdateTrigger.mockReset().mockResolvedValue({ id: "trg-hook" });+});++describe("EditWebhookTriggerDialog", () => {+ it("writes an added rule to this webhook as its whole filter list", async () => {+ const user = userEvent.setup();+ const { onOpenChange } = renderDialog();++ await user.type(screen.getByPlaceholderText("e.g. workflow_run"), "issues");+ await user.click(screen.getByRole("button", { name: "Add" }));+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger.mock.calls[0]?.[0]).toEqual({+ autopilotId: AUTOPILOT_ID,+ triggerId: "trg-hook",+ event_filters: [{ event: "pull_request", actions: ["opened"] }, { event: "issues" }],+ });+ expect(onOpenChange).toHaveBeenCalledWith(false);+ });++ it("clears the filters explicitly when the last rule is removed", async () => {+ const user = userEvent.setup();+ renderDialog();++ await user.click(screen.getByRole("button", { name: "Remove filter" }));+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ // An omitted field leaves the stored filters in place server-side; only+ // an explicit [] takes the webhook back to accepting every event.+ expect(mockUpdateTrigger.mock.calls[0]?.[0].event_filters).toEqual([]);+ });++ it("sends the label alone when only the label was touched", async () => {+ const user = userEvent.setup();+ renderDialog(trigger({ label: "Old name" }));++ await user.clear(labelInput());+ await user.type(labelInput(), "GitHub");+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger.mock.calls[0]?.[0]).toEqual({+ autopilotId: AUTOPILOT_ID,+ triggerId: "trg-hook",+ label: "GitHub",+ });+ });++ it("pauses a webhook without resending its filters", async () => {+ const user = userEvent.setup();+ renderDialog();++ await user.click(enabledSwitch());+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger.mock.calls[0]?.[0]).toEqual({+ autopilotId: AUTOPILOT_ID,+ triggerId: "trg-hook",+ enabled: false,+ });+ });++ it("has nothing to save until something changes", async () => {+ const user = userEvent.setup();+ renderDialog();++ expect(saveButton()).toBeDisabled();++ await user.click(enabledSwitch());+ expect(saveButton()).toBeEnabled();++ await user.click(enabledSwitch());+ expect(saveButton()).toBeDisabled();+ });++ it("leaves alone filters a teammate changed under the open dialog", async () => {+ const user = userEvent.setup();+ const { refreshProps } = renderDialog();++ refreshProps(trigger({ event_filters: [{ event: "push" }] }));+ expect(saveButton()).toBeDisabled();++ await user.click(enabledSwitch());+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ expect(mockUpdateTrigger.mock.calls[0]?.[0].event_filters).toBeUndefined();+ });++ it("keeps the dialog open when the write fails, with the server's reason", async () => {+ const user = userEvent.setup();+ const { onOpenChange } = renderDialog();+ mockUpdateTrigger.mockRejectedValueOnce(new Error("event_filters[0].event is required"));++ await user.click(enabledSwitch());+ await user.click(saveButton());++ await waitFor(() => expect(mockUpdateTrigger).toHaveBeenCalledTimes(1));+ const { toast } = await import("sonner");+ expect(toast.error).toHaveBeenCalledWith("event_filters[0].event is required");+ expect(onOpenChange).not.toHaveBeenCalledWith(false);+ });+});diff --git a/packages/views/autopilots/components/edit-webhook-trigger-dialog.tsx b/packages/views/autopilots/components/edit-webhook-trigger-dialog.tsxnew file mode 100644index 0000000000..c533685328--- /dev/null+++ b/packages/views/autopilots/components/edit-webhook-trigger-dialog.tsx@@ -0,0 +1,145 @@+"use client";++import { useRef, useState } from "react";+import { useUpdateAutopilotTrigger } from "@multica/core/autopilots/mutations";+import { Button } from "@multica/ui/components/ui/button";+import { Switch } from "@multica/ui/components/ui/switch";+import { Dialog, DialogContent, DialogTitle } from "@multica/ui/components/ui/dialog";+import { toast } from "sonner";+import type { AutopilotTrigger, WebhookEventFilter } from "@multica/core/types";+import { WebhookEventFilterSection } from "./webhook-event-filter-section";+import { serializeEventFilters } from "./webhook-payload-condition";+import { useT } from "../../i18n";++// The webhook counterpart of EditScheduleTriggerDialog: every webhook row opens+// its own editor for event filters, label and enabled. The autopilot dialog's+// webhook panel only reaches an autopilot whose first trigger is its sole+// webhook, so a webhook added beside a schedule, or a second webhook, had no+// editor at all. URL copy / rotate stays on the row. Mounted per open so the+// editor hydrates from the row as it stands now.+export function EditWebhookTriggerDialog({+ open,+ onOpenChange,+ autopilotId,+ trigger,+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ autopilotId: string;+ trigger: AutopilotTrigger;+}) {+ if (!open) return null;+ return (+ <EditWebhookTriggerDialogBody+ onOpenChange={onOpenChange}+ autopilotId={autopilotId}+ trigger={trigger}+ />+ );+}++function EditWebhookTriggerDialogBody({+ onOpenChange,+ autopilotId,+ trigger,+}: {+ onOpenChange: (open: boolean) => void;+ autopilotId: string;+ trigger: AutopilotTrigger;+}) {+ const { t } = useT("autopilots");+ const updateTrigger = useUpdateAutopilotTrigger();+ const [filters, setFilters] = useState<WebhookEventFilter[]>(trigger.event_filters ?? []);+ const [label, setLabel] = useState(trigger.label ?? "");+ const [enabled, setEnabled] = useState(trigger.enabled);+ const [submitting, setSubmitting] = useState(false);++ // Snapshotted at mount, never read live off `trigger`, for the same reason+ // as the schedule dialog: a teammate's save refreshing the detail query under+ // an open dialog must not read as this user's edit and be written back.+ const baseline = useRef({+ filters: serializeEventFilters(trigger.event_filters ?? []),+ label: (trigger.label ?? "").trim(),+ enabled: trigger.enabled,+ });+ const filtersDirty = serializeEventFilters(filters) !== baseline.current.filters;+ const labelDirty = label.trim() !== baseline.current.label;+ const enabledDirty = enabled !== baseline.current.enabled;+ const canSubmit = !submitting && (filtersDirty || labelDirty || enabledDirty);++ const handleSubmit = async () => {+ if (!canSubmit) return;+ setSubmitting(true);+ try {+ // Only the fields that moved. A changed filter list or enabled flag is a+ // substantive edit server-side (rule version + accountability move to the+ // saver, MUL-4302), so a rename must not carry them along. The list is+ // sent whole: an empty array clears the filters and accepts every event.+ await updateTrigger.mutateAsync({+ autopilotId,+ triggerId: trigger.id,+ ...(filtersDirty ? { event_filters: filters } : {}),+ ...(labelDirty ? { label: label.trim() } : {}),+ ...(enabledDirty ? { enabled } : {}),+ });+ toast.success(t(($) => $.edit_webhook_dialog.toast_updated));+ onOpenChange(false);+ } catch (err) {+ toast.error(+ err instanceof Error && err.message+ ? err.message+ : t(($) => $.edit_webhook_dialog.toast_update_failed),+ );+ } finally {+ setSubmitting(false);+ }+ };++ return (+ <Dialog open onOpenChange={onOpenChange}>+ {/* Wider than the schedule dialog: a rule row, its conditions and the+ add-rule inputs share one line each and need the room. */}+ <DialogContent className="sm:max-w-md">+ <DialogTitle>{t(($) => $.edit_webhook_dialog.title)}</DialogTitle>+ <div className="min-w-0 space-y-4 pt-2">+ <WebhookEventFilterSection filters={filters} onChange={setFilters} />++ <div>+ <label className="text-caption font-medium text-muted-foreground">+ {t(($) => $.edit_trigger_dialog.label_field)}+ </label>+ <input+ type="text"+ value={label}+ onChange={(e) => setLabel(e.target.value)}+ placeholder={t(($) => $.edit_webhook_dialog.label_placeholder)}+ disabled={submitting}+ className="mt-1 w-full rounded-md border bg-background px-3 py-2 text-body outline-none focus:ring-1 focus:ring-ring disabled:opacity-50"+ />+ </div>++ <div className="flex items-center justify-between gap-3">+ <span className="text-caption font-medium text-muted-foreground">+ {t(($) => $.edit_trigger_dialog.enabled_label)}+ </span>+ <Switch+ size="sm"+ checked={enabled}+ onCheckedChange={setEnabled}+ disabled={submitting}+ aria-label={t(($) => $.edit_trigger_dialog.enabled_label)}+ />+ </div>++ <div className="flex justify-end pt-1">+ <Button size="sm" onClick={handleSubmit} disabled={!canSubmit}>+ {submitting+ ? t(($) => $.edit_trigger_dialog.submitting)+ : t(($) => $.edit_trigger_dialog.submit)}+ </Button>+ </div>+ </div>+ </DialogContent>+ </Dialog>+ );+}diff --git a/packages/views/autopilots/components/trigger-row.test.tsx b/packages/views/autopilots/components/trigger-row.test.tsxindex 7e57cd37aa..0b10dbf09c 100644--- a/packages/views/autopilots/components/trigger-row.test.tsx+++ b/packages/views/autopilots/components/trigger-row.test.tsx@@ -1,5 +1,5 @@import { describe, it, expect, vi, beforeEach } from "vitest";-import { screen } from "@testing-library/react";+import { screen, within } from "@testing-library/react";import userEvent from "@testing-library/user-event";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import type { AutopilotTrigger } from "@multica/core/types";@@ -126,3 +126,70 @@ describe("TriggerRow", () => {expect(screen.queryByRole("button", { name: "Edit schedule" })).not.toBeInTheDocument();});});++// A webhook's filters used to be reachable only through the autopilot dialog,+// which renders them for the first trigger alone: a webhook added beside a+// schedule, or a second webhook, could not be edited anywhere.+describe("TriggerRow on a webhook", () => {+ beforeEach(() => {+ vi.clearAllMocks();+ });++ function webhook(overrides: Partial<AutopilotTrigger> = {}): AutopilotTrigger {+ return trigger({+ id: "trg-hook",+ kind: "webhook",+ cron_expression: null,+ timezone: null,+ next_run_at: null,+ webhook_token: "tok-1",+ ...overrides,+ });+ }++ it("opens the editor on the webhook this row fires", async () => {+ const user = userEvent.setup();+ renderRow(webhook({ event_filters: [{ event: "pull_request", actions: ["opened"] }] }));++ await user.click(screen.getByRole("button", { name: "Edit webhook" }));++ const dialog = await screen.findByRole("dialog");+ expect(within(dialog).getByText("Edit webhook", { selector: "h2" })).toBeInTheDocument();+ expect(within(dialog).getByText("pull_request")).toBeInTheDocument();+ });++ it("says a webhook without filters accepts every event", () => {+ renderRow(webhook());++ expect(screen.getByText("Accepts all events")).toBeInTheDocument();+ });++ it("reads out each filter rule with its payload condition count", () => {+ renderRow(+ webhook({+ event_filters: [+ {+ event: "pull_request",+ actions: ["opened", "synchronize"],+ conditions: [+ { path: "pull_request.base.ref", op: "equals", value: "main" },+ { path: "sender.type", op: "not_equals", value: "Bot" },+ ],+ },+ { event: "issues" },+ ],+ }),+ );++ expect(screen.getByTitle("pull_request · opened, synchronize · 2 conditions")).toBeInTheDocument();+ expect(screen.getByTitle("issues")).toBeInTheDocument();+ expect(screen.queryByText("Accepts all events")).not.toBeInTheDocument();+ });++ it("shows a reader who cannot write the filters but no edit entry", () => {+ renderRow(webhook(), false);++ expect(screen.getByText("Accepts all events")).toBeInTheDocument();+ expect(screen.queryByRole("button", { name: "Edit webhook" })).not.toBeInTheDocument();+ });+});diff --git a/packages/views/autopilots/components/webhook-event-filter-section.tsx b/packages/views/autopilots/components/webhook-event-filter-section.tsxindex 4dcdc31a73..dce47ac8fe 100644--- a/packages/views/autopilots/components/webhook-event-filter-section.tsx+++ b/packages/views/autopilots/components/webhook-event-filter-section.tsx@@ -307,7 +307,10 @@ export function WebhookEventFilterSection({</div>)}- <div className="flex gap-2">+ {/* Actions widen only where the row has room (the per-webhook dialog),+ so their placeholder isn't clipped there; the autopilot dialog's side+ panel keeps w-28, which leaves the event placeholder whole. */}+ <div className="@container/ef-add flex gap-2"><inputtype="text"value={newEvent}@@ -332,7 +335,7 @@ export function WebhookEventFilterSection({}}}placeholder={t(($) => $.dialog.event_filter_actions_placeholder)}- className="w-28 rounded-md border bg-background px-2.5 py-1.5 text-caption outline-none focus:ring-1 focus:ring-ring"+ className="w-28 rounded-md border bg-background px-2.5 py-1.5 text-caption outline-none focus:ring-1 focus:ring-ring @sm/ef-add:w-36"/><buttontype="button"@@ -355,3 +358,47 @@ export function WebhookEventFilterSection({</div>);}++// How many rules the trigger row spells out before folding the rest into "+N".+const SUMMARY_RULE_LIMIT = 3;++// The read-only readback of a webhook's filters on its trigger row, so the row+// says what it will ignore without opening the editor. No filters is a state+// worth stating: it means every delivery starts a run.+export function WebhookEventFilterSummary({ filters }: { filters: WebhookEventFilter[] }) {+ const { t } = useT("autopilots");+ const shown = filters.slice(0, SUMMARY_RULE_LIMIT);+ const hidden = filters.length - shown.length;+ return (+ <div className="flex min-w-0 flex-wrap items-center gap-1.5 text-caption text-muted-foreground">+ <Filter className="size-3 shrink-0" aria-label={t(($) => $.dialog.event_filter_label)} />+ {filters.length === 0 ? (+ <span>{t(($) => $.trigger_row.event_filter_summary_all)}</span>+ ) : (+ <>+ {shown.map((f, idx) => {+ const conditionCount = f.conditions?.length ?? 0;+ const actions = f.actions && f.actions.length > 0 ? f.actions.join(", ") : null;+ const conditions =+ conditionCount > 0+ ? t(($) => $.trigger_row.event_filter_summary_conditions, { count: conditionCount })+ : null;+ const text = [f.event, actions, conditions].filter(Boolean).join(" · ");+ return (+ <span+ key={idx}+ title={text}+ className="inline-block max-w-full truncate rounded-xs border bg-background px-1.5"+ >+ <span className="font-mono text-foreground">{f.event}</span>+ {actions && <span> {actions}</span>}+ {conditions && <span> · {conditions}</span>}+ </span>+ );+ })}+ {hidden > 0 && <span>+{hidden}</span>}+ </>+ )}+ </div>+ );+}diff --git a/packages/views/autopilots/components/webhook-payload-condition.ts b/packages/views/autopilots/components/webhook-payload-condition.tsindex 537762e48b..4d003d99e2 100644--- a/packages/views/autopilots/components/webhook-payload-condition.ts+++ b/packages/views/autopilots/components/webhook-payload-condition.ts@@ -1,4 +1,5 @@import type {+ WebhookEventFilter,WebhookPayloadCondition,WebhookPayloadConditionValue,} from "@multica/core/types";@@ -79,3 +80,17 @@ export function buildCondition(draft: ConditionDraft): WebhookPayloadCondition |if (draft.ignoreCase) condition.ignore_case = true;return condition;}++// serializeEventFilters returns a stable JSON string so an editor can compare+// the filters it holds against the snapshot taken on open without depending+// on reference equality. Normalizes empty actions and conditions to [] so+// omitted-vs-explicit-empty doesn't show as a phantom change.+export function serializeEventFilters(filters: WebhookEventFilter[]): string {+ return JSON.stringify(+ filters.map((f) => ({+ event: f.event,+ actions: f.actions ?? [],+ conditions: f.conditions ?? [],+ })),+ );+}diff --git a/packages/views/locales/en/autopilots.json b/packages/views/locales/en/autopilots.jsonindex ee8d39e8b3..6a527e50c3 100644--- a/packages/views/locales/en/autopilots.json+++ b/packages/views/locales/en/autopilots.json@@ -184,6 +184,10 @@"url_copied": "Webhook URL copied","url_copy_failed": "Failed to copy","edit_schedule": "Edit schedule",+ "edit_webhook": "Edit webhook",+ "event_filter_summary_all": "Accepts all events",+ "event_filter_summary_conditions_one": "{{count}} condition",+ "event_filter_summary_conditions_other": "{{count}} conditions","rotate_url": "Rotate URL","rotate_confirm_title": "Rotate webhook URL","rotate_confirm_description": "The current URL will stop working immediately. Any external systems calling it must be updated with the new URL. Continue?",@@ -285,6 +289,12 @@"toast_updated": "Schedule updated","toast_update_failed": "Failed to update schedule"},+ "edit_webhook_dialog": {+ "title": "Edit webhook",+ "label_placeholder": "e.g. GitHub pull requests",+ "toast_updated": "Webhook updated",+ "toast_update_failed": "Failed to update webhook"+ },"dialog": {"sr_create": "New Autopilot","sr_edit": "Edit Autopilot",@@ -363,6 +373,7 @@"event_filter_condition_values_placeholder": "main, release","event_filter_condition_ignore_case": "Ignore case","schedule_multiple_notice": "This autopilot has {{count}} schedules. Close this dialog and edit each one under Triggers below.",+ "webhook_multiple_notice": "This autopilot has more than one webhook. Close this dialog and edit each one under Triggers below.","schedule_empty": "No schedule — this autopilot only runs when triggered manually.","schedule_add": "Add schedule","error_title_required": "Enter a name for this autopilot.",diff --git a/packages/views/locales/es/autopilots.json b/packages/views/locales/es/autopilots.jsonindex 4ff22e21ee..5b7ffa9de8 100644--- a/packages/views/locales/es/autopilots.json+++ b/packages/views/locales/es/autopilots.json@@ -184,6 +184,10 @@"url_copied": "URL del webhook copiada","url_copy_failed": "No se ha podido copiar","edit_schedule": "Editar programación",+ "edit_webhook": "Editar webhook",+ "event_filter_summary_all": "Acepta todos los eventos",+ "event_filter_summary_conditions_one": "{{count}} condición",+ "event_filter_summary_conditions_other": "{{count}} condiciones","rotate_url": "Rotar URL","rotate_confirm_title": "Rotar URL del webhook","rotate_confirm_description": "La URL actual dejará de funcionar inmediatamente. Cualquier sistema externo que la llame debe actualizarse con la nueva URL. ¿Continuar?",@@ -285,6 +289,12 @@"toast_updated": "Programación actualizada","toast_update_failed": "No se ha podido actualizar la programación"},+ "edit_webhook_dialog": {+ "title": "Editar webhook",+ "label_placeholder": "p. ej., Pull requests de GitHub",+ "toast_updated": "Webhook actualizado",+ "toast_update_failed": "No se ha podido actualizar el webhook"+ },"dialog": {"sr_create": "Nueva automatización","sr_edit": "Editar automatización",@@ -346,6 +356,7 @@"event_filter_remove_label": "Quitar filtro","event_filter_hint": "Solo se procesan eventos que coinciden con una regla y todas sus condiciones. Deja vacío para aceptar todos los eventos.","schedule_multiple_notice": "Esta automatización tiene {{count}} programaciones. Cierra este diálogo y edita cada una en Disparadores, más abajo.",+ "webhook_multiple_notice": "Esta automatización tiene varios webhooks. Cierra este diálogo y edita cada uno en Disparadores, más abajo.","schedule_empty": "Sin programación: esta automatización solo se ejecuta cuando se dispara manualmente.","schedule_add": "Añadir programación","error_title_required": "Introduce un nombre para esta automatización.",diff --git a/packages/views/locales/fr/autopilots.json b/packages/views/locales/fr/autopilots.jsonindex f4d42511c6..012739a551 100644--- a/packages/views/locales/fr/autopilots.json+++ b/packages/views/locales/fr/autopilots.json@@ -184,6 +184,10 @@"url_copied": "URL du webhook copiée","url_copy_failed": "Échec de la copie","edit_schedule": "Modifier la planification",+ "edit_webhook": "Modifier le webhook",+ "event_filter_summary_all": "Accepte tous les événements",+ "event_filter_summary_conditions_one": "{{count}} condition",+ "event_filter_summary_conditions_other": "{{count}} conditions","rotate_url": "Renouveler l'URL","rotate_confirm_title": "Renouveler l'URL du webhook","rotate_confirm_description": "L'URL actuelle cessera de fonctionner immédiatement. Tous les systèmes externes qui l'appellent devront être mis à jour avec la nouvelle. Continuer ?",@@ -285,6 +289,12 @@"toast_updated": "Planification mise à jour","toast_update_failed": "Échec de la mise à jour de la planification"},+ "edit_webhook_dialog": {+ "title": "Modifier le webhook",+ "label_placeholder": "ex. Pull requests GitHub",+ "toast_updated": "Webhook mis à jour",+ "toast_update_failed": "Échec de la mise à jour du webhook"+ },"dialog": {"sr_create": "Nouvelle automatisation","sr_edit": "Modifier l'automatisation",@@ -363,6 +373,7 @@"event_filter_condition_values_placeholder": "main, release","event_filter_condition_ignore_case": "Ignorer la casse","schedule_multiple_notice": "Cette automatisation a {{count}} planifications. Fermez cette fenêtre et modifiez chacune dans la liste Déclencheurs ci-dessous.",+ "webhook_multiple_notice": "Cette automatisation a plusieurs webhooks. Fermez cette fenêtre et modifiez chacun dans la liste Déclencheurs ci-dessous.","schedule_empty": "Aucune planification — cette automatisation ne s'exécute que sur déclenchement manuel.","schedule_add": "Ajouter une planification","error_title_required": "Saisissez un nom pour cette automatisation.",diff --git a/packages/views/locales/ja/autopilots.json b/packages/views/locales/ja/autopilots.jsonindex 6fd1872a11..ef64e8de9f 100644--- a/packages/views/locales/ja/autopilots.json+++ b/packages/views/locales/ja/autopilots.json@@ -184,6 +184,9 @@"url_copied": "Webhook URL をコピーしました","url_copy_failed": "URL をコピーできませんでした","edit_schedule": "スケジュールを編集",+ "edit_webhook": "Webhook を編集",+ "event_filter_summary_all": "すべてのイベントを受け付けます",+ "event_filter_summary_conditions_other": "条件 {{count}} 件","rotate_url": "URL を再生成","rotate_confirm_title": "Webhook URL を再生成","rotate_confirm_description": "現在の URL は直ちに動作を停止します。この URL を呼び出している外部システムは新しい URL に更新する必要があります。続けますか?",@@ -285,6 +288,12 @@"toast_updated": "スケジュールを更新しました","toast_update_failed": "スケジュールの更新に失敗しました"},+ "edit_webhook_dialog": {+ "title": "Webhook を編集",+ "label_placeholder": "例: GitHub のプルリクエスト",+ "toast_updated": "Webhook を更新しました",+ "toast_update_failed": "Webhook の更新に失敗しました"+ },"dialog": {"sr_create": "新規オートパイロット","sr_edit": "オートパイロットを編集",@@ -363,6 +372,7 @@"event_filter_condition_values_placeholder": "main, release","event_filter_condition_ignore_case": "大文字と小文字を区別しない","schedule_multiple_notice": "このオートパイロットにはスケジュールが {{count}} 件あります。このダイアログを閉じて、下の「トリガー」から個別に編集してください。",+ "webhook_multiple_notice": "このオートパイロットには Webhook が複数あります。このダイアログを閉じて、下の「トリガー」から個別に編集してください。","schedule_empty": "スケジュールはありません。このオートパイロットは手動で実行したときだけ動きます。","schedule_add": "スケジュールを追加","error_title_required": "オートパイロット名を入力してください。",diff --git a/packages/views/locales/ko/autopilots.json b/packages/views/locales/ko/autopilots.jsonindex d5564494dc..714f22df79 100644--- a/packages/views/locales/ko/autopilots.json+++ b/packages/views/locales/ko/autopilots.json@@ -184,6 +184,9 @@"url_copied": "Webhook URL을 복사했습니다","url_copy_failed": "URL을 복사하지 못했습니다","edit_schedule": "일정 수정",+ "edit_webhook": "Webhook 수정",+ "event_filter_summary_all": "모든 이벤트 수락",+ "event_filter_summary_conditions_other": "조건 {{count}}개","rotate_url": "URL 재발급","rotate_confirm_title": "Webhook URL 재발급","rotate_confirm_description": "현재 URL은 즉시 동작을 멈춥니다. 이 URL을 호출하는 외부 시스템은 새 URL로 업데이트해야 합니다. 계속할까요?",@@ -285,6 +288,12 @@"toast_updated": "일정을 수정했습니다","toast_update_failed": "일정 수정에 실패했습니다"},+ "edit_webhook_dialog": {+ "title": "Webhook 수정",+ "label_placeholder": "예: GitHub 풀 리퀘스트",+ "toast_updated": "Webhook을 수정했습니다",+ "toast_update_failed": "Webhook 수정에 실패했습니다"+ },"dialog": {"sr_create": "새 오토파일럿","sr_edit": "오토파일럿 수정",@@ -363,6 +372,7 @@"event_filter_condition_values_placeholder": "main, release","event_filter_condition_ignore_case": "대소문자 무시","schedule_multiple_notice": "이 오토파일럿에는 일정이 {{count}}개 있습니다. 이 대화상자를 닫고 아래 '트리거'에서 각각 수정하세요.",+ "webhook_multiple_notice": "이 오토파일럿에는 Webhook이 여러 개 있습니다. 이 대화상자를 닫고 아래 '트리거'에서 각각 수정하세요.","schedule_empty": "일정이 없습니다. 이 오토파일럿은 수동으로 실행할 때만 동작합니다.","schedule_add": "일정 추가","error_title_required": "오토파일럿 이름을 입력하세요.",diff --git a/packages/views/locales/ru/autopilots.json b/packages/views/locales/ru/autopilots.jsonindex d2f4f1064e..dd9c88459b 100644--- a/packages/views/locales/ru/autopilots.json+++ b/packages/views/locales/ru/autopilots.json@@ -184,6 +184,12 @@"url_copied": "URL вебхука скопирован","url_copy_failed": "Не удалось скопировать","edit_schedule": "Изменить расписание",+ "edit_webhook": "Изменить вебхук",+ "event_filter_summary_all": "Принимает все события",+ "event_filter_summary_conditions_one": "{{count}} условие",+ "event_filter_summary_conditions_few": "{{count}} условия",+ "event_filter_summary_conditions_many": "{{count}} условий",+ "event_filter_summary_conditions_other": "{{count}} условия","rotate_url": "Обновить URL","rotate_confirm_title": "Обновить URL вебхука","rotate_confirm_description": "Текущий URL перестанет работать немедленно. Все внешние системы, вызывающие его, нужно обновить на новый URL. Продолжить?",@@ -285,6 +291,12 @@"toast_updated": "Расписание обновлено","toast_update_failed": "Не удалось обновить расписание"},+ "edit_webhook_dialog": {+ "title": "Изменить вебхук",+ "label_placeholder": "например, PR из GitHub",+ "toast_updated": "Вебхук обновлён",+ "toast_update_failed": "Не удалось обновить вебхук"+ },"dialog": {"sr_create": "Новый автопилот","sr_edit": "Редактирование автопилота",@@ -346,6 +358,7 @@"event_filter_remove_label": "Удалить фильтр","event_filter_hint": "Обрабатываются события, соответствующие правилу и всем его условиям. Оставьте пустым, чтобы принимать все события.","schedule_multiple_notice": "У этого автопилота {{count}} расписаний. Закройте это окно и измените каждое из них в разделе «Триггеры» ниже.",+ "webhook_multiple_notice": "У этого автопилота несколько вебхуков. Закройте это окно и измените каждый из них в разделе «Триггеры» ниже.","schedule_empty": "Нет расписания — этот автопилот запускается только вручную.","schedule_add": "Добавить расписание","error_title_required": "Введите название для этого автопилота.",diff --git a/packages/views/locales/zh-Hans/autopilots.json b/packages/views/locales/zh-Hans/autopilots.jsonindex bae7171a64..8d886aea76 100644--- a/packages/views/locales/zh-Hans/autopilots.json+++ b/packages/views/locales/zh-Hans/autopilots.json@@ -184,6 +184,9 @@"url_copied": "已复制 Webhook URL","url_copy_failed": "复制失败","edit_schedule": "编辑时间表",+ "edit_webhook": "编辑 Webhook",+ "event_filter_summary_all": "接收所有事件",+ "event_filter_summary_conditions_other": "{{count}} 个条件","rotate_url": "重新生成 URL","rotate_confirm_title": "重新生成 Webhook URL","rotate_confirm_description": "当前 URL 将立即失效。所有调用它的外部系统都需要更新为新 URL。继续吗?",@@ -285,6 +288,12 @@"toast_updated": "时间表已更新","toast_update_failed": "更新时间表失败"},+ "edit_webhook_dialog": {+ "title": "编辑 Webhook",+ "label_placeholder": "例如:GitHub PR",+ "toast_updated": "Webhook 已更新",+ "toast_update_failed": "更新 Webhook 失败"+ },"dialog": {"sr_create": "新建自动化","sr_edit": "编辑自动化",@@ -363,6 +372,7 @@"event_filter_condition_values_placeholder": "main, release","event_filter_condition_ignore_case": "忽略大小写","schedule_multiple_notice": "该自动化有 {{count}} 条时间表。关闭此弹窗,在下方「触发器」中逐条编辑。",+ "webhook_multiple_notice": "该自动化有多个 Webhook。关闭此弹窗,在下方「触发器」中逐条编辑。","schedule_empty": "还没有时间表——这个自动化只在手动触发时运行。","schedule_add": "添加时间表","error_title_required": "请填写自动化名称。",diff --git a/packages/views/locales/zh-Hant/autopilots.json b/packages/views/locales/zh-Hant/autopilots.jsonindex b2a69bd4f9..c1ae47ed12 100644--- a/packages/views/locales/zh-Hant/autopilots.json+++ b/packages/views/locales/zh-Hant/autopilots.json@@ -184,6 +184,9 @@"url_copied": "已複製 Webhook URL","url_copy_failed": "複製失敗","edit_schedule": "編輯時間表",+ "edit_webhook": "編輯 Webhook",+ "event_filter_summary_all": "接收所有事件",+ "event_filter_summary_conditions_other": "{{count}} 個條件","rotate_url": "重新生成 URL","rotate_confirm_title": "重新生成 Webhook URL","rotate_confirm_description": "當前 URL 將立即失效。所有呼叫它的外部系統都需要更新為新 URL。繼續嗎?",@@ -285,6 +288,12 @@"toast_updated": "時間表已更新","toast_update_failed": "更新時間表失敗"},+ "edit_webhook_dialog": {+ "title": "編輯 Webhook",+ "label_placeholder": "例如:GitHub PR",+ "toast_updated": "Webhook 已更新",+ "toast_update_failed": "更新 Webhook 失敗"+ },"dialog": {"sr_create": "新建自動化","sr_edit": "編輯自動化",@@ -346,6 +355,7 @@"event_filter_remove_label": "移除過濾條件","event_filter_hint": "只處理符合規則且本文符合全部條件的事件。留空則接收所有事件。","schedule_multiple_notice": "該自動化有 {{count}} 條時間表。關閉此彈窗,在下方「觸發器」中逐條編輯。",+ "webhook_multiple_notice": "該自動化有多個 Webhook。關閉此彈窗,在下方「觸發器」中逐條編輯。","schedule_empty": "還沒有時間表——這個自動化只在手動觸發時執行。","schedule_add": "新增時間表","error_title_required": "請填寫自動化名稱。",