fix(F-550): Onboarding Special-Buttons 4-Tupel mit ::-Suffix — msg-Payload 'ONBOARD' → 'ONBOARD::skip_all'/'ONBOARD::later'
Root-Cause (Rainer, F550_Architektur): Special-Buttons als 3-Tupel (label, prefix, style) gebaut → button_builder prefix-only-Fallback (msg_payload='ONBOARD'). Dispatcher erwartet 'ONBOARD::<action>'. Fix: - 3 Aufrufstellen in adapter.py auf 4-Tupel (label, prefix, style, suffix) mit suffix='skip_all'/'later' umgestellt - Handler _handle_onboarding_button_click um Slug-Erkennung ergänzt (action=='skip_all'/'later') — zuvor nur Emoji/Label-Match - button_builder.py Docstring Tupel-Reihenfolge korrigiert - 10 Tests in test_f550_button_payload.py (Builder→Dispatcher-Konsistenz) Doku-vs-Code-Drift korrigiert (P-019/P-187-Klasse): Rainers Doku nannte Tupel-Reihenfolge (label,prefix,suffix,style), Code liest style=tup[2], suffix=tup[3]. Pitfall P-295 dokumentiert. @implements: [F-550]
This commit is contained in:
+8
-8
@@ -1,4 +1,4 @@
|
||||
# @implements: [F-549] — boten_rooms: Gateway-subscribete Archivar-Bypass-Räume
|
||||
# @implements: [F-549, F-550] — boten_rooms: Gateway-subscribete Archivar-Bypass-Räume; F-550: Onboarding Special-Buttons 4-Tupel mit ::-Suffix
|
||||
"""
|
||||
Rocket.Chat Platform Adapter for Hermes Agent.
|
||||
|
||||
@@ -7903,8 +7903,8 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
num_buttons.append((clean_name, f"ONBOARD:{rid}", f"select_{rid}"))
|
||||
|
||||
special_buttons = [
|
||||
("⏭️ Alle überspringen", "ONBOARD", "default"),
|
||||
("⏰ Später", "ONBOARD", "default"),
|
||||
("⏭️ Alle überspringen", "ONBOARD", "default", "skip_all"),
|
||||
("⏰ Später", "ONBOARD", "default", "later"),
|
||||
]
|
||||
|
||||
attachments = build_button_attachments(
|
||||
@@ -8741,7 +8741,7 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
|
||||
# Globale Aktionen
|
||||
if prefix_part == "ONBOARD":
|
||||
if "⏭️" in action or "Überspringen" in action:
|
||||
if "⏭️" in action or "Überspringen" in action or action == "skip_all":
|
||||
missing = state["missing_rooms"]
|
||||
for room in missing:
|
||||
rid = room["room_id"]
|
||||
@@ -8756,7 +8756,7 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
await self._onboarding_next_room()
|
||||
return
|
||||
|
||||
if "⏰" in action or "Später" in action:
|
||||
if "⏰" in action or "Später" in action or action == "later":
|
||||
from archivar.onboarding import release_onboarding_lock
|
||||
for room in state.get("missing_rooms", []):
|
||||
release_onboarding_lock(room["room_id"])
|
||||
@@ -9121,8 +9121,8 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
num_buttons.append((clean_name, f"ONBOARD:{rid}", f"select_{rid}"))
|
||||
|
||||
special_buttons = [
|
||||
("⏭️ Überspringen", "ONBOARD", "default"),
|
||||
("⏰ Später", "ONBOARD", "default"),
|
||||
("⏭️ Überspringen", "ONBOARD", "default", "skip_all"),
|
||||
("⏰ Später", "ONBOARD", "default", "later"),
|
||||
]
|
||||
|
||||
attachments = build_button_attachments(
|
||||
@@ -9214,7 +9214,7 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
num_buttons.append((name, f"ONBOARD:{rid}", f"select_{rid}"))
|
||||
|
||||
special_buttons = [
|
||||
("⏭️ Überspringen", "ONBOARD", "default"),
|
||||
("⏭️ Überspringen", "ONBOARD", "default", "skip_all"),
|
||||
]
|
||||
|
||||
attachments = build_button_attachments(
|
||||
|
||||
Reference in New Issue
Block a user