From e5b55986b91ce9cf4e7725f01128d9986dfb02e5 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 13:06:02 +0000 Subject: [PATCH] docs(routes): Clarify fallback hints and document group-scoped stop and fallback upgrade behavior --- app/composables/useI18n.ts | 5 +++-- docs/guide/routes.md | 2 ++ docs/zh/guide/routes.md | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/composables/useI18n.ts b/app/composables/useI18n.ts index 3b45d0f..7d60a36 100644 --- a/app/composables/useI18n.ts +++ b/app/composables/useI18n.ts @@ -223,7 +223,7 @@ const en: Dict = { "routeEditor.enabled": "Route enabled", "routeEditor.fallback": "Fallback route", "routeEditor.fallbackHint": - "Only fires when no other route in this group matched; its filters still apply", + "Only fires when no regular (non-fallback) route in this group matched; its filters still apply", "routeEditor.stop": "Stop on match", "routeEditor.stopHint": "When matched, later routes in this group are not evaluated for this event", @@ -668,7 +668,8 @@ const zh: Dict = { "routeEditor.idHint": "唯一,使用 a-z / 0-9 / 短横线", "routeEditor.enabled": "启用路由", "routeEditor.fallback": "兜底路由", - "routeEditor.fallbackHint": "仅当本分组没有其它路由匹配该事件时才发送,其过滤器仍会生效", + "routeEditor.fallbackHint": + "仅当本分组没有普通(非兜底)路由匹配该事件时才发送,其过滤器仍会生效", "routeEditor.stop": "匹配后停止", "routeEditor.stopHint": "该路由匹配后,不再评估本分组的后续路由", "routeEditor.filters": "过滤器", diff --git a/docs/guide/routes.md b/docs/guide/routes.md index 94a88c4..0fbb445 100644 --- a/docs/guide/routes.md +++ b/docs/guide/routes.md @@ -43,6 +43,8 @@ Each entry of `targets` is a push destination, so one route can forward to sever Routes are evaluated in the order the console shows them, group by group. `stop` and `fallback` act within a group: a matching `stop` route skips the later routes of its own group only, and a group's fallback routes stay silent only when one of that group's regular routes matched — one group never silences another. To change it, click **Reorder** on the group page, drag routes by their handle (or focus a handle and press ↑ / ↓), then **Save order**. The order is stored per group in D1 (`d1_routes.position`, migration `0012`); a database without that migration keeps loading routes in id order. +**Upgrade note:** If your configuration relied on `stop` in one group preventing routes in another group from running, or on a regular route match in one group suppressing fallback sends in another, review your existing routes when upgrading. These effects now apply only within the same group, so routes in other groups may start sending. Move routes that need to be mutually exclusive into the same group, then check their order and `stop` / `fallback` settings. + ## Discord Role Mentions Set `discordRoleIds` on a route to ping one or more Discord roles (身份组) whenever that route fires. The mention (`<@&roleId>`) is prepended to the message content of every **Discord** target of the route; Telegram targets ignore this field. Mentions only trigger notifications when the bot has the `Mention Everyone` permission (or the role is marked mentionable), and the bot must be able to see the role. diff --git a/docs/zh/guide/routes.md b/docs/zh/guide/routes.md index 6a7323c..20e1bc7 100644 --- a/docs/zh/guide/routes.md +++ b/docs/zh/guide/routes.md @@ -43,6 +43,8 @@ 路由按控制台中显示的顺序逐个分组评估。`stop` 与 `fallback` 只在分组内生效:匹配的 `stop` 路由只跳过本分组的后续路由;只有本分组的普通路由匹配时,本分组的兜底路由才不发送——一个分组永远不会屏蔽另一个分组。在分组页点击**调整顺序**,拖动路由左侧的手柄(或聚焦手柄后按 ↑ / ↓),再点击**保存顺序**。顺序按分组保存在 D1(`d1_routes.position`,迁移 `0012`);未执行该迁移的数据库会继续按 id 顺序加载路由。 +**升级提示:** 如果现有配置依赖某个分组的 `stop` 阻止其他分组的路由执行,或依赖某个分组的普通路由匹配来抑制其他分组的兜底路由发送,请在升级时检查现有路由。这些行为现在仅在同一分组内生效,因此其他分组的路由可能开始发送消息。请将需要共同排他的路由移至同一分组,再检查它们的顺序及 `stop` / `fallback` 设置。 + ## Discord 身份组提醒 在路由上设置 `discordRoleIds` 可在其触发时提醒一个或多个 Discord 身份组(角色)。提醒(`<@&roleId>`)会加在路由所有 **Discord** 目标的消息内容前;Telegram 目标忽略该字段。只有当机器人拥有 `Mention Everyone` 权限(或身份组标记为可提及)且能看到该身份组时,提醒才会触发通知。