Activity Log — Implementation Spec
Overview
A global activity log that tracks all significant operations across the Ever Works platform. Users access it from a dedicated sidebar menu item, where they can see a real-time feed of everything happening across all their works and account-level actions.
This is separate from the existing Work History tab (which provides detailed per-work execution traces with step logs, changelogs, and metrics). The Activity Log is a higher-level, cross-work feed that answers: "What has happened across my account?"
Requirements
- Dedicated Activity page accessible from sidebar navigation
- Table with columns: DateTime, Work, Action Type, Details
activity_logDB table with JSON details column, work reference, and enum action type- Call a logging method from every significant operation in the platform
- Activity Log page pulls from the API/DB table
- Simultaneously send events to Jitsu analytics
- Capture as much activity as possible
- Real-time feed — new activities appear without page refresh
- Filters by activity type, work, status, date range
- Search across activity descriptions and work names
- Clickable entries open detail view with full logs, items affected, duration, errors
- Badge on sidebar icon showing count of currently running operations
- Export activity log as CSV
Deferred: Retry failed and dismiss were removed per review feedback. Retry may be revisited in a future PR for specific action types like generation.
Database Schema
Table: activity_log
| Column | Type | Nullable | Description |
|---|---|---|---|
id | UUID (PK) | No | Primary key |
userId | UUID (FK → users) | No | Who performed the action |
workId | UUID (FK → works) | Yes | Which work (null for account-level actions) |
actionType | varchar/enum | No | Category of action (see enum below) |
action | varchar | No | Specific action identifier (e.g. items.generated, plugin.enabled) |
status | varchar/enum | No | pending, in_progress, completed, failed |
summary | varchar | No | Human-readable summary (e.g. "Generated 24 items for Tech Startups") |
details | JSON | Yes | Structured data — items affected, parameters, error messages, duration, linked history ID |
metadata | JSON | Yes | Extra data for analytics/Jitsu |
ipAddress | varchar | Yes | Request IP address |
userAgent | varchar | Yes | Request user agent |
createdAt | timestamp | No | When the activity was logged |
updatedAt | timestamp | No | Last update (for status transitions: pending → completed) |
Indexes
(userId, createdAt DESC)— main query path (user's activity feed)(userId, actionType)— filter by type(userId, workId)— filter by work(userId, status)— filter by status, count running operations for badge
Action Types
enum ActivityActionType {
// Generation
GENERATION = 'generation',
COMPARISON_GENERATION = 'comparison_generation',
// Deployment
DEPLOYMENT = 'deployment',
// Work lifecycle
WORK_CREATED = 'work_created',
WORK_UPDATED = 'work_updated',
WORK_DELETED = 'work_deleted',
// Items
ITEM_ADDED = 'item_added',
ITEM_UPDATED = 'item_updated',
ITEM_REMOVED = 'item_removed',
// Plugins
PLUGIN_ENABLED = 'plugin_enabled',
PLUGIN_DISABLED = 'plugin_disabled',
PLUGIN_CONFIGURED = 'plugin_configured',
// Members
MEMBER_INVITED = 'member_invited',
MEMBER_ROLE_CHANGED = 'member_role_changed',
MEMBER_REMOVED = 'member_removed',
// Schedule
SCHEDULE_CREATED = 'schedule_created',
SCHEDULE_UPDATED = 'schedule_updated',
SCHEDULE_DELETED = 'schedule_deleted',
SCHEDULE_EXECUTED = 'schedule_executed',
// Import / Export
IMPORT = 'import',
EXPORT = 'export',
// Settings
SETTINGS_UPDATED = 'settings_updated',
WEBSITE_SETTINGS_UPDATED = 'website_settings_updated',
PROMPTS_UPDATED = 'prompts_updated',
// Auth / Account
USER_LOGIN = 'user_login',
USER_SIGNUP = 'user_signup',
PROVIDER_CONNECTED = 'provider_connected',
PASSWORD_CHANGED = 'password_changed',
// Chat / AI
CHAT_CONVERSATION = 'chat_conversation',
// Community
COMMUNITY_PR_MERGED = 'community_pr_merged'
}
Activity Status
enum ActivityStatus {
PENDING = 'pending',
IN_PROGRESS = 'in_progress',
COMPLETED = 'completed',
FAILED = 'failed'
}
Backend Architecture
New module: activity-log
packages/agent/src/
├── entities/
│ └── activity-log.entity.ts # TypeORM entity
├── database/repositories/