Summary
When viewing an automation detail page in the frontend, event-based automations do not display their event trigger configuration. The backend provides several fields for event triggers that the frontend does not currently render.
Backend Event Trigger Fields
The EventTrigger schema in automation/schemas.py includes the following fields:
| Field |
Type |
Description |
type |
"event" |
Trigger type identifier |
source |
string |
Event source - "github" for built-in integration or custom webhook source name (e.g., "linear", "stripe") |
on |
string | string[] |
Event key pattern(s) to match, e.g., "pull_request.opened", "push", "issue_comment.created", or ["pull_request.opened", "pull_request.synchronize"] |
filter |
string | null |
Optional JMESPath filter expression evaluated against the raw payload, e.g., "icontains(comment.body, '@openhands')" or "repository.full_name == 'myorg/myrepo'" |
Current Frontend State
The frontend AutomationTrigger interface in frontend/src/types/automation.ts only has:
export interface AutomationTrigger {
type: string;
schedule?: string;
schedule_human?: string;
}
This is cron-specific and lacks the event trigger fields.
Current Display Issue
In ConfigurationSection.tsx, the trigger display logic shows:
- Trigger type:
"Schedule" for cron, otherwise just the raw type string ("event")
- Schedule: Only displays
schedule/schedule_human (cron-specific fields)
For event-based automations, users cannot see:
- What event source is being listened to (GitHub, Linear, custom webhook, etc.)
- What event types will trigger the automation
- What filter conditions are applied
Proposed Solution
1. Update TypeScript Types
Update AutomationTrigger interface to include event fields:
export interface AutomationTrigger {
type: string;
// Cron fields
schedule?: string;
schedule_human?: string;
// Event fields
source?: string;
on?: string | string[];
filter?: string | null;
}
2. Update ConfigurationSection Component
Add conditional rendering for event triggers in configuration-section.tsx:
For event triggers, display:
- Source: Show the event source (e.g., "GitHub", "Linear", or custom webhook name)
- Event(s): Show the event pattern(s) being listened to (e.g.,
pull_request.opened, push)
- Filter: If present, show the filter expression (potentially with a code/monospace font since it's a JMESPath expression)
Example display for an event automation:
| Field |
Value |
| Trigger |
Event |
| Source |
GitHub |
| Event(s) |
issue_comment.created |
| Filter |
icontains(comment.body, '@openhands') |
3. Consider UX for Complex Values
- For
on field with multiple patterns (array), consider displaying as a comma-separated list or as individual badges/chips
- For
filter field, consider using a monospace font and potentially truncation with expand/tooltip for long expressions
Acceptance Criteria
References
- Backend schema:
automation/schemas.py (EventTrigger class, lines 57-173)
- Frontend types:
frontend/src/types/automation.ts
- Frontend component:
frontend/src/components/automations/detail/configuration-section.tsx
Summary
When viewing an automation detail page in the frontend, event-based automations do not display their event trigger configuration. The backend provides several fields for event triggers that the frontend does not currently render.
Backend Event Trigger Fields
The
EventTriggerschema inautomation/schemas.pyincludes the following fields:type"event"sourcestring"github"for built-in integration or custom webhook source name (e.g.,"linear","stripe")onstring | string[]"pull_request.opened","push","issue_comment.created", or["pull_request.opened", "pull_request.synchronize"]filterstring | null"icontains(comment.body, '@openhands')"or"repository.full_name == 'myorg/myrepo'"Current Frontend State
The frontend
AutomationTriggerinterface infrontend/src/types/automation.tsonly has:This is cron-specific and lacks the event trigger fields.
Current Display Issue
In
ConfigurationSection.tsx, the trigger display logic shows:"Schedule"for cron, otherwise just the raw type string ("event")schedule/schedule_human(cron-specific fields)For event-based automations, users cannot see:
Proposed Solution
1. Update TypeScript Types
Update
AutomationTriggerinterface to include event fields:2. Update ConfigurationSection Component
Add conditional rendering for event triggers in
configuration-section.tsx:For event triggers, display:
pull_request.opened,push)Example display for an event automation:
issue_comment.createdicontains(comment.body, '@openhands')3. Consider UX for Complex Values
onfield with multiple patterns (array), consider displaying as a comma-separated list or as individual badges/chipsfilterfield, consider using a monospace font and potentially truncation with expand/tooltip for long expressionsAcceptance Criteria
source,on, andfilterfields inAutomationTriggerConfigurationSectionrenders event source when trigger type is"event"ConfigurationSectionrenders event pattern(s) when trigger type is"event"ConfigurationSectionrenders filter expression when present (with appropriate styling)"event"References
automation/schemas.py(EventTriggerclass, lines 57-173)frontend/src/types/automation.tsfrontend/src/components/automations/detail/configuration-section.tsx