agent_crew
agent_crew copied to clipboard
feat: Post-Action bindings section in Webhook/Schedule detail pages
Description
Add a "Post-Actions" section to WebhookDetailPage and ScheduleDetailPage that shows linked post-actions and allows managing bindings inline.
WebhookDetailPage Changes
Add a collapsible section after the existing content:
"Post-Actions" Section:
- Uses reverse lookup endpoint:
GET /api/webhooks/:id/post-actions - Shows list of bound post-actions:
| Post-Action Name | Condition | Body Override | Enabled | Actions |
- Post-Action Name links to
/post-actions/:id - Condition badge: success (green), failure (red), any (blue)
- Body Override: indicator icon if set, expandable to view
- Actions: edit condition, toggle, unlink
- Post-Action Name links to
- "Link Post-Action" button:
- Opens modal with:
- Dropdown of available post-actions (from
GET /api/post-actions) - Condition select (success/failure/any)
- Optional body override textarea with variable hints
- Dropdown of available post-actions (from
- Creates binding via
POST /api/post-actions/:paId/bindings
- Opens modal with:
- Empty state: "No post-actions linked. Link one to get notified when this webhook runs."
ScheduleDetailPage Changes
Identical section as WebhookDetailPage, but using:
GET /api/schedules/:id/post-actionsfor listingtrigger_type: "schedule"when creating bindings
Shared Component
Consider extracting a PostActionBindingsSection component that both pages can use:
interface PostActionBindingsSectionProps {
triggerType: 'webhook' | 'schedule';
triggerId: string;
onBindingChange?: () => void;
}
Acceptance Criteria
- [ ] Post-Actions section visible in WebhookDetailPage
- [ ] Post-Actions section visible in ScheduleDetailPage
- [ ] List bindings with condition badges
- [ ] Link new post-action via modal
- [ ] Edit binding condition and body override
- [ ] Unlink (delete) binding with confirmation
- [ ] Empty state when no bindings
- [ ] Shared component to avoid duplication
- [ ] Polling/refresh after binding changes
References
- Depends on: Types + API client issue, Post-Actions pages issue
- Plan:
PLAN_POST_ACTIONS.md
Closed: implemented in commit 84b881b (post-actions UI — pages, bindings section, and sidebar navigation)