Skip to content

fix(agentex): Slack gateway — empty ack body + clearer breadcrumb attribution - #406

Open
michael-chou359 wants to merge 1 commit into
mainfrom
mc/slack-breadcrumb-wording
Open

fix(agentex): Slack gateway — empty ack body + clearer breadcrumb attribution#406
michael-chou359 wants to merge 1 commit into
mainfrom
mc/slack-breadcrumb-wording

Conversation

@michael-chou359

@michael-chou359 michael-chou359 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Two small Slack-gateway polish fixes.

{} stray message

Slack renders a bare {} JSON body as a stray message in the channel. The ack-only responses (modal opened, view_submission close, ignored interactions) were returning {}, so Slack posted junk. Added a _slack_ack helper: an empty result → a truly empty 200 body; a non-empty result → JSON as before. Applied to /slack/commands and /slack/interactions (events keep their JSON — the url_verification challenge needs it, and events aren't user-facing).

Breadcrumb wording

The /agents breadcrumb footer said via <@user> through *agent* — "via" and "through" are synonyms back-to-back, which reads as word soup. Now: <@user> asked *agent* (e.g. "@michaelchou asked golden-agent").

Testing

_slack_ack unit test (empty → empty 200 body, non-empty → JSON); full Slack gateway suite green; ruff clean.

🤖 Generated with Claude Code

Greptile Summary

The PR changes Slack command and interaction acknowledgements so empty results produce a truly empty HTTP 200 response while non-empty results remain JSON, and clarifies modal breadcrumb attribution.

  • Adds a shared Slack acknowledgement response helper and focused unit coverage.
  • Applies empty-body acknowledgement handling to slash-command and interaction routes.
  • Updates the generated OpenAPI artifact for the changed response annotations.
  • Rewords the /agents breadcrumb footer without changing its identity or routing behavior.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

All current slash-command and interaction return paths align with the new empty-versus-JSON acknowledgement behavior, and the breadcrumb change is presentation-only.

Important Files Changed

Filename Overview
agentex/src/api/routes/slack.py Introduces _slack_ack and consistently maps all current empty handler results to bodyless 200 responses while retaining JSON for actionable Slack payloads.
agentex/src/domain/use_cases/slack_gateway_use_case.py Rewords the modal breadcrumb attribution; interpolation, identity selection, and dispatch behavior remain unchanged.
agentex/tests/unit/api/test_slack_routes.py Directly verifies the helper’s empty-body and non-empty JSON serialization paths.
agentex/openapi.yaml Reflects the generated schema resulting from the routes’ explicit Response return type.

Reviews (1): Last reviewed commit: "fix(agentex): Slack gateway — empty ack ..." | Re-trigger Greptile

Context used (3)

…ribution

- Slack renders a bare `{}` JSON body as a stray message, so the ack-only
  responses (modal opened, view_submission close, ignored interactions) now
  send a truly EMPTY 200 via a _slack_ack helper instead of returning `{}`.
- Breadcrumb footer reads "<@user> asked *agent*" instead of the ambiguous
  "via <@user> through *agent*" (via/through were synonyms back-to-back).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@michael-chou359
michael-chou359 requested a review from a team as a code owner August 17, 2026 17:06
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

✱ Stainless preview builds

This PR will update the agentex-sdk SDKs with the following commit messages.

openapi

fix(types): remove response schemas from slack commands and interactions

python

chore(internal): regenerate SDK with no functional changes

typescript

chore(internal): regenerate SDK with no functional changes

Edit this comment to update them. They will appear in their respective SDK's changelogs.

agentex-sdk-openapi studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅

New diagnostics (2 note)
💡 Schema/IsAmbiguous: Missing type for schema
💡 Schema/IsAmbiguous: Missing type for schema
agentex-sdk-typescript studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ⏭️lint ⏭️test ✅

New diagnostics (2 note)
💡 Schema/IsAmbiguous: Missing type for schema
💡 Schema/IsAmbiguous: Missing type for schema
agentex-sdk-python studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ⏭️lint ⏭️test ✅

New diagnostics (2 note)
💡 Schema/IsAmbiguous: Missing type for schema
💡 Schema/IsAmbiguous: Missing type for schema

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-08-17 20:05:24 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant