Audit Trail
The dashboard's immutable event log — searchable, filterable, hash-chain verified, with real-time updates and expandable event details.
Audit Trail
The Audit Trail page at /dashboard/audit provides a complete, immutable record of every action taken by agents, users, and the system. Every entry is part of a cryptographic hash chain, making the log tamper-evident and verifiable.
Header
The page header displays:
| Element | Description |
|---|---|
| Title | "Audit Trail" |
| Subtitle | Description with total event count |
| Chain verified badge | Green badge confirming hash chain integrity. The dashboard verifies the chain on initial load by checking that each entry's hash correctly references the previous entry. |
Filters
Two rows of filter controls appear below the header:
Type Filters
Filter events by category. Each filter shows its event count:
| Filter | Dot Color | Description |
|---|---|---|
| All | — | Show all events (default) |
| Tasks | Agent Green (#10B981) | Task execution events: task.start, task.complete, task.fail |
| Reviews | Channel Purple (#8B5CF6) | Review events: review.start, review.complete, review.approve |
| Deploys | Alert Amber (#F59E0B) | Deploy events: deploy.request, deploy.approve, deploy.execute |
| Incidents | Critical Red (#EF4444) | Incident events: incident.detect, incident.investigate, incident.resolve |
Each filter button displays a colored dot (not an emoji) followed by the label and a count badge:
Risk Filters
Filter events by risk level using pill-shaped buttons:
| Filter | Dot Color | Description |
|---|---|---|
| All | — | Show all risk levels (default) |
| Low | Agent Green (#10B981) | Low-risk events (formatting, linting, status checks) |
| Medium | Alert Amber (#F59E0B) | Medium-risk events (code changes, PR reviews) |
| High | Critical Red (#EF4444) | High-risk events (deploy requests, config changes) |
| Critical | Deep Red (#DC2626) | Critical events (production deploys, security incidents) |
System Events Toggle
A "System events" toggle appears alongside the filter controls. When disabled (the default), GitHub and Vercel webhook events are hidden from the timeline. These events include push notifications, deployment status updates, and CI/CD triggers that can add noise when reviewing agent activity. Enable the toggle to see the full, unfiltered event stream.
Search Bar
A search input below the filters searches across multiple fields:
- Actor — who performed the action
- Action — the event type
- Detail — the event description
- Project — the associated project name
- Event ID — the unique event identifier
Search is performed client-side on the currently loaded events and triggers a server-side search for broader results when the user presses Enter.
Event Table
The main content area is a table displaying audit events. Events are ordered newest-first.
Table Columns
| Column | Description | Width |
|---|---|---|
| Risk | Colored dot indicating risk level | 40px |
| Time | Relative timestamp (e.g., "2m ago", "1h ago") | 80px |
| Actor | Who performed the action, color-coded by type | 150px |
| Action | Event type in monospace font | 160px |
| Detail | Truncated event description (max 60 characters) | Flexible |
| Risk | Risk level badge (LOW, MEDIUM, HIGH, CRITICAL) | 80px |
| Result | Outcome badge (SUCCESS, FAILURE, PENDING) | 80px |
| Expand | Chevron to expand row details | 40px |
Actor Color Coding
| Actor Type | Text Color | Example |
|---|---|---|
| Agent | Signal Blue (#3B82F6) | "project-agent", "review-agent" |
| User | Chalk (#F5F5F7) | "Sarah Chen", "U0123ABC" |
| System | Slate (#6B7280) | "System", "webhook" |
The formatActor function resolves Slack UIDs to human-readable display names. For example, U0ABC123XY becomes "Sarah Chen" if that mapping exists. Otherwise, the raw UID is displayed.
Action Badges
Action types are displayed in monospace (JetBrains Mono) font with a subtle background:
Risk Badges
| Level | Color | Background |
|---|---|---|
| LOW | Agent Green | rgba(16, 185, 129, 0.1) |
| MEDIUM | Alert Amber | rgba(245, 158, 11, 0.1) |
| HIGH | Critical Red | rgba(239, 68, 68, 0.1) |
| CRITICAL | Deep Red | rgba(220, 38, 38, 0.2) |
Result Badges
| Result | Color | Description |
|---|---|---|
| SUCCESS | Agent Green (#10B981) | Action completed successfully |
| FAILURE | Critical Red (#EF4444) | Action failed |
| PENDING | Alert Amber (#F59E0B) | Action awaiting approval or completion |
Example Table Row
Expandable Rows
Clicking the chevron (or anywhere on the row) expands it to show full event details:
| Field | Description |
|---|---|
| Event ID | Unique UUID for this event |
| Timestamp | Full ISO 8601 timestamp |
| Project | Associated repository (owner/repo format) |
| Hash | SHA-256 hash that chains to the previous event, providing tamper evidence |
| Full Detail | Complete, un-truncated event description |
Pagination
The audit trail uses server-side pagination:
- Page size: 20 events per page
- Previous / Next buttons navigate between pages
- Page indicator shows current page and total page count
- Filters and search are applied server-side, so pagination reflects the filtered result set
LIVE Indicator
When the dashboard is connected to a live backend and actively polling for new events, a LIVE indicator appears in the top-right corner of the audit trail:
The dot pulses gently to indicate active polling. New events appear at the top of the table automatically without requiring a page refresh.
When the backend is unreachable or polling is paused, the indicator disappears.
Hash Chain Verification
The audit trail's hash chain provides tamper evidence. Each event's hash is computed from:
- The event's own data (ID, timestamp, actor, action, detail, risk, result)
- The hash of the previous event
The "Chain verified" badge in the header confirms that the dashboard has validated the chain for all displayed events. If a chain break is detected (a hash doesn't match the expected value), the badge changes to a red warning:
This would indicate that an event has been modified or deleted outside of normal operation.
API Endpoints
The audit trail page interacts with these endpoints:
| Endpoint | Method | Description |
|---|---|---|
GET /api/audit | GET | Fetch paginated audit events |
GET /api/audit?type=tasks | GET | Filter by event type |
GET /api/audit?risk=high | GET | Filter by risk level |
GET /api/audit?search=deploy | GET | Search events |
GET /api/audit?page=2&limit=20 | GET | Paginate results |
POST /api/audit/:id/approve | POST | Approve a pending action |
All requests include the x-org-id header for tenant isolation.
Next Steps
- Agent Detail — view activity for a specific agent
- Settings — configure team roles and policies
- Security — learn about RBAC and approval flows