agent_crew icon indicating copy to clipboard operation
agent_crew copied to clipboard

feat: Post-Actions pages (List, Builder, Detail)

Open sre-helmcode opened this issue 8 months ago • 1 comments

Description

Create three new pages for managing Post-Actions, following existing design patterns from Webhooks/Schedules pages.

Routes (in App.tsx)

/post-actions          → PostActionsListPage
/post-actions/new      → PostActionBuilderPage
/post-actions/:id      → PostActionDetailPage

Sidebar (Layout.tsx)

Add "Post-Actions" entry between Webhooks and Settings in the sidebar navigation.


PostActionsListPage

Pattern: Same as WebhooksListPage / SchedulesListPage

  • Grid of cards (1/2/3 columns responsive)
  • Each card shows: name, method badge (GET/POST/PUT/PATCH/DELETE with color), URL (truncated), auth type indicator, enabled toggle, bindings count, last execution time
  • Polling every 10 seconds
  • Empty state with "New Post-Action" button
  • Click navigates to detail page

PostActionBuilderPage

Pattern: Same as WebhookBuilderPage (create + edit mode via ?edit=id)

Form fields:

  • Name (required, text input)
  • Description (optional, textarea)
  • Method (required, dropdown: GET/POST/PUT/PATCH/DELETE)
  • URL (required, text input with {{variable}} hint)
  • Headers (dynamic key-value pair editor, add/remove rows)
  • Body Template (textarea/code editor, with variable reference tooltip)
    • Show available variables as chips/tags below the editor
    • Syntax highlight {{variables}}
  • Auth Type (radio/select: None / Bearer Token / Basic Auth / Custom Header)
    • Bearer: shows token input (password field)
    • Basic: shows username + password inputs
    • Custom Header: shows header name + value inputs
  • Timeout (number, default 30, range 1-300)
  • Retry Count (number, default 0, range 0-5)
  • Enabled (toggle, default true)

Edit mode: Pre-populate from existing post-action. Auth config fields show placeholder "unchanged" if not modified.

PostActionDetailPage

Pattern: Similar to WebhookDetailPage

Sections:

  1. Header — Name, description, enabled badge, edit/delete buttons
  2. Configuration — Method + URL displayed prominently, headers table, body template (code block), auth type indicator, timeout, retry count
  3. Bindings — Table/list of linked triggers: | Trigger | Type | Condition | Override | Enabled | Actions |
    • "Add Binding" button opens modal:
      • Select trigger type (webhook/schedule)
      • Select specific webhook/schedule from dropdown
      • Select condition (success/failure/any)
      • Optional body override textarea
    • Each row has edit/delete actions
  4. Execution History — Paginated table of PostActionRuns: | Triggered At | Source | Status | HTTP Code | Duration | Error |
    • Expandable rows showing request_sent and response_body
    • Status badges: success (green), failed (red), retrying (yellow)

Acceptance Criteria

  • [ ] Three pages created and routed
  • [ ] Sidebar updated with Post-Actions link
  • [ ] List page with polling and toggle
  • [ ] Builder with all form fields and validation
  • [ ] Builder edit mode working
  • [ ] Detail page with config, bindings, and runs
  • [ ] Add/edit/delete bindings via modal
  • [ ] Responsive design matching existing pages
  • [ ] Error handling with toast notifications

References

  • Depends on: Types + API client issue
  • Plan: PLAN_POST_ACTIONS.md

sre-helmcode avatar Mar 05 '26 16:03 sre-helmcode

Closed: implemented in commit 84b881b (post-actions UI — pages, bindings section, and sidebar navigation)

sre-helmcode avatar Mar 07 '26 12:03 sre-helmcode