From 42e4f70eefdd9651b50b86f3c66542ca28d69ff0 Mon Sep 17 00:00:00 2001 From: Victor Kyriazakos Date: Sun, 26 Jul 2026 21:32:22 +0000 Subject: [PATCH] fix(relay): native-parity Slack approval button styles + labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slack Block Kit buttons only support style primary (green) / danger (red) / default (white). The relay approval + slash-confirm prompts emitted an invalid style 'success' (Slack silently drops it → white/stroke button) and baked emoji into the labels (non-native). Native Slack Hermes uses plain labels with primary/danger. Map to valid styles (once→primary, deny/cancel→danger, session/always→default) and drop the emoji from labels. The connector already compensates success→primary, but emitting valid values at the source is correct and removes the fragile dependency on that compensation. --- gateway/relay/adapter.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gateway/relay/adapter.py b/gateway/relay/adapter.py index b544748208a..e50b9771ed5 100644 --- a/gateway/relay/adapter.py +++ b/gateway/relay/adapter.py @@ -1399,16 +1399,15 @@ class RelayAdapter(BasePlatformAdapter): button→text fallback takes over (same contract as a native adapter's failed button send). """ - options: list = [{"id": "once", "label": "✅ Allow Once", "style": "success"}] + options: list = [{"id": "once", "label": "Allow Once", "style": "primary"}] if not smart_denied and allow_session: - options.append({"id": "session", "label": "✅ Session", "style": "primary"}) + options.append({"id": "session", "label": "Allow Session"}) if allow_permanent: options.append({ "id": "always", - "label": "✅ Always", - "style": "primary", + "label": "Always Allow", }) - options.append({"id": "deny", "label": "❌ Deny", "style": "danger"}) + options.append({"id": "deny", "label": "Deny", "style": "danger"}) cmd_preview = command if len(command) <= 1500 else command[:1500] + "..." text = ( @@ -1455,9 +1454,9 @@ class RelayAdapter(BasePlatformAdapter): gateway's text-intercept flow when the prompt lane is unavailable. """ options = [ - {"id": "once", "label": "✅ Approve Once", "style": "success"}, - {"id": "always", "label": "🔒 Always Approve", "style": "primary"}, - {"id": "cancel", "label": "❌ Cancel", "style": "danger"}, + {"id": "once", "label": "Approve Once", "style": "primary"}, + {"id": "always", "label": "Always Approve"}, + {"id": "cancel", "label": "Cancel", "style": "danger"}, ] text = f"**{title}**\n\n{message}" if title else message prompt_id = self._mint_prompt(