Skip to content

[feat] Add gateway trigger subscriptions and deliveries UI#4744

Draft
jp-agenta wants to merge 1 commit into
wp5-web-catalogfrom
wp6-web-subscriptions
Draft

[feat] Add gateway trigger subscriptions and deliveries UI#4744
jp-agenta wants to merge 1 commit into
wp5-web-catalogfrom
wp6-web-subscriptions

Conversation

@jp-agenta

Copy link
Copy Markdown
Member

Context

The backend can store trigger subscriptions and (with the api lane) dispatch them, but there is no UI to create or inspect them. Users need to pick a shared connection, choose which provider event to watch, bind a workflow, and later see whether deliveries succeeded.

What this adds

A Triggers settings area that mirrors the existing webhook-subscription UI.

Under Settings > Triggers, a subscriptions section lists a shared connection's subscriptions with create and edit drawers. The TriggerSubscriptionDrawer binds a workflow revision through the shared EntityPicker + workflowRevisionAdapter, and sends the destination as a references dict keyed workflow_revision in the /retrieve shape the backend expects:

references: { workflow_revision: { id: "<revision-id>" } }

The inputs mapping is edited as JSON in the shared editor. In edit mode the connection is locked, since it is the FK anchor of the subscription. The TriggerDeliveriesDrawer shows delivery history for a subscription so you can confirm events are landing and see failures.

Data fetching goes through three new hooks (useTriggerSubscriptions, useTriggerSubscription, useTriggerDeliveries) plus the entities api wiring, and a triggerReferenceSchema validates the reference shape.

Tests / notes

  • gatewayTriggerApi.test.ts passes (13/13).
  • pnpm lint-fix clean on web/.

What to QA

  • Settings > Triggers: pick a shared connection, create a subscription, choose an event and bind a workflow revision via the picker. It saves and appears in the list.
  • Edit that subscription. The connection field is locked; changing the event or rebinding the workflow saves.
  • Open the deliveries drawer for a subscription. Past deliveries list with their status.
  • Regression: the existing webhook-subscription (Automations) UI still renders and edits as before, since this reuses its components.

Mirrors the webhook-subscription settings UI for inbound triggers.

- Subscriptions section under Settings > Triggers, listing a shared
  connection's subscriptions with create/edit drawers.
- TriggerSubscriptionDrawer binds a workflow revision via the shared
  EntityPicker + workflowRevisionAdapter, sending the destination as a
  references dict (workflow_revision) in the /retrieve shape; inputs
  mapping edited as JSON. Connection locked in edit mode (FK anchor).
- TriggerDeliveriesDrawer shows delivery history per subscription.
- useTriggerSubscriptions / useTriggerSubscription / useTriggerDeliveries
  hooks plus entities api wiring; triggerReferenceSchema added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 18, 2026 5:30pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8a0e3a28-a988-482e-9823-12f68982babf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wp6-web-subscriptions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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