Skip to content

slack: no public way to obtain trigger_id from the Raw escape hatch (modal-open flow unreachable) #12

Description

@ThomasK33

Problem

The Slack adapter preserves trigger_id and response_url on the Raw Platform Escape Hatch of chat.Command / chat.Interaction, and exposes OpenModal / OpenModalForTenant that require a trigger_id. But the concrete types behind Raw (commandForm, interactionPayload) are unexported, and the only trigger-ID extractor is TriggerIDForTest in adapters/slack/export_test.go — test-only.

Consequences:

  • RespondURL(ctx, raw any, msg) works because it accepts the escape hatch directly.
  • The modal-open flow is effectively unreachable from application code: there is no supported way to obtain the trigger_id for OpenModal without re-parsing the original webhook JSON yourself.

Surfaced by the codex review of #11 (docs restructure): the interactive-components how-to could not show a followable modal example. The guide currently documents this as a known gap pointing at this issue.

Proposal

Either:

  1. Export a small accessor, e.g. slack.TriggerID(raw any) (string, bool) (mirroring the test helper), or
  2. Make the modal API accept the escape hatch directly, e.g. OpenModalFromRaw(ctx, raw any, view any) error, matching the RespondURL shape.

Option 2 keeps trigger_id opaque and symmetric with RespondURL; option 1 is more general (native content targeting, logging). Update docs/how-to/interactive-components.md to show the real flow once available.


Generated with mux • Model: anthropic:claude-fable-5 • Thinking: xhigh

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions