-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Problem
The activity feed currently has two limitations:
-
No filtering - All events display with no way to filter by severity. As the system grows (more components, more events), the feed becomes noisy. Users need to quickly isolate warnings/errors.
-
Only health checks emit events -
activity.add_event()exists as a clean utility (app/services/system/activity.py:87) but is only called fromhealth.pyfor startup and status change events. Other meaningful system events (scheduler job execution, job failures, etc.) are silent.
Requirements
1. Segmented filter button on activity feed
Add a single-select segmented button bar above the feed table: All | Info | Warning | Error
- All shows everything (default)
- Info shows info + warning + error (severity >= 1)
- Warning shows warning + error (severity >= 2)
- Error shows error/unhealthy only (severity >= 3)
- Filter applies to
_STATUS_SEVERITYmapping already inactivity_feed.py - Filter should persist across refreshes (store selected filter as instance state)
- Grouping logic should still work on the filtered set
2. Wire up scheduler job events
Add activity.add_event() calls in the scheduler component so job executions appear in the feed:
- Job started: status="info"
- Job completed successfully: status="success"
- Job failed: status="error" with exception details
Files to modify
app/components/frontend/dashboard/activity_feed.py- Add segmented filter UI + filtering logicapp/components/scheduler/main.py- Add activity events for job execution- Template counterparts in
aegis/templates/copier-aegis-project/{{ project_slug }}/
Current State
Activity service (app/services/system/activity.py):
add_event(component, event_type, message, status, details)- already a clean, importable utilityActivityEventdataclass with: component, event_type, message, status, timestamp, detailsInMemoryEventStorewith bounded deque (100 events)- Protocol-based design ready for Redis/DB backends
Activity feed UI (app/components/frontend/dashboard/activity_feed.py):
- Already has
_STATUS_SEVERITYmapping (success=0, healthy=0, info=1, warning=2, error=3, unhealthy=3) - Groups consecutive same-component events
- No filter controls - always shows all events
Event sources - only health.py:
activity.add_event(...)on first health check (startup)activity.add_event(...)on status change- No other file in the codebase calls
activity.add_event()