From db59958ae82cd85cba4a6b085f23daa9794d9ba1 Mon Sep 17 00:00:00 2001 From: harry-harish <22562634+harry-harish@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:56:53 +0530 Subject: [PATCH] fix(connector-slack): neutral consent-card header (fits act + egress) The consent card's header was hardcoded 'peek wants to act on your browser', which misreads for share_session's data egress (an upload, not a browser act). The connector can't distinguish a delegated act from an egress (both use details:{}), so make the header action-agnostic and let the summary carry the specific request. No behavior change. Co-Authored-By: Claude Opus 4.8 Signed-off-by: harry-harish <22562634+harry-harish@users.noreply.github.com> --- packages/connector-slack/src/blockkit.test.ts | 3 ++- packages/connector-slack/src/blockkit.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/connector-slack/src/blockkit.test.ts b/packages/connector-slack/src/blockkit.test.ts index 6b77989..4c28024 100644 --- a/packages/connector-slack/src/blockkit.test.ts +++ b/packages/connector-slack/src/blockkit.test.ts @@ -58,7 +58,8 @@ describe('consentCard delegated path (summary only, empty details)', () => { const header = blocks.find((b) => b.type === 'header') as | { text: { text: string } } | undefined; - expect(header?.text.text).toContain('peek wants to act'); + // Neutral header (serves act, delegated-act, AND egress); the summary carries specifics. + expect(header?.text.text).toBe('peek wants your approval'); const section = blocks.find((b) => b.type === 'section') as | { text: { text: string } } | undefined; diff --git a/packages/connector-slack/src/blockkit.ts b/packages/connector-slack/src/blockkit.ts index 247cd10..d576421 100644 --- a/packages/connector-slack/src/blockkit.ts +++ b/packages/connector-slack/src/blockkit.ts @@ -98,7 +98,10 @@ export function consentCard( const value = APPROVE_BUTTON_VALUE(correlationId, conversationId); const header: KnownBlock = { type: 'header', - text: { type: 'plain_text', text: 'peek wants to act on your browser' }, + // Neutral header: one consent card serves acting on the browser, delegated + // acts, AND data egress (share_session). The summary sentence below always + // carries the specific request, so the header stays action-agnostic. + text: { type: 'plain_text', text: 'peek wants your approval' }, }; const context: KnownBlock = { type: 'context',