From c03a06b8d9549e16a2bbb21e54b077a8a43a1c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=BB=A1=E8=89=AF?= Date: Tue, 14 Jul 2026 15:04:36 +0800 Subject: [PATCH] fix(kanban): cover remaining add_notify_sub call sites for chat_type (#56580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the main fix in this PR. rodriguez46p-ui's review on the equivalent #56632 (closed stale) flagged that only the auto-subscribe path in tools/kanban_tools.py was covered; the same gap existed in two more call sites: - gateway/slash_commands.py: the `/kanban create` slash command auto- subscribes the calling session but didn't pass chat_type. Read it from source.chat_type (already available on SessionSource). - hermes_cli/kanban.py: the `kanban notify-subscribe` CLI command now accepts --chat-type and threads it through. The dashboard plugin API (plugins/kanban/dashboard/plugin_api.py) still has the gap because the home_channel config schema doesn't carry chat_type — that's a follow-up that needs a config schema change. Verified: 258 tests pass on the kanban + session_context suites. --- hermes_cli/kanban.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hermes_cli/kanban.py b/hermes_cli/kanban.py index d43ffba2e92c..2038d151448f 100644 --- a/hermes_cli/kanban.py +++ b/hermes_cli/kanban.py @@ -771,6 +771,7 @@ def build_parser(parent_subparsers: argparse._SubParsersAction) -> argparse.Argu p_nsub.add_argument("task_id") p_nsub.add_argument("--platform", required=True) p_nsub.add_argument("--chat-id", required=True) + p_nsub.add_argument("--chat-type", default="", help="dm / group / channel (used by wake routing)") p_nsub.add_argument("--thread-id", default=None) p_nsub.add_argument("--user-id", default=None) p_nsub.add_argument( @@ -2758,6 +2759,7 @@ def _cmd_notify_subscribe(args: argparse.Namespace) -> int: kb.add_notify_sub( conn, task_id=args.task_id, platform=args.platform, chat_id=args.chat_id, + chat_type=args.chat_type, thread_id=args.thread_id, user_id=args.user_id, notifier_profile=args.notifier_profile or _profile_author(), )