# Audit logs

> Studio activity log (owner/admin).

**Audit logs** show sensitive studio activity for owners and admins.

## Route

```txt
/orgs/:orgHandle/:handle/logs
```

Helper: `StudioPaths.LOGS`.

## Capabilities

- Studio log listing (owner + admins)
- Entry in the user menu, studio settings, and ⌘K (not in the sidebar)
- Filters: domain, person (actor), action type, date range + search
- Interactive rows with a detail panel (actor, absolute timestamp, entity link, metadata/diff)
- Absolute timestamps in local time
- “Load more” pagination with total
- CSV export from the filter bar
- Members without permission see an “admins only” empty state (not a generic error)

## API

`GET /api/profiles/:studioId/audit-logs` and `/search` accept:

| Query | Notes |
| --- | --- |
| `domain` | Product domain |
| `actorUserId` | Actor |
| `action` | Exact action (`tasks.created`, …) |
| `from` / `to` | Epoch ms or RFC3339 |
| `cursor` / `limit` | Pagination |
| `q` | `/search` only |

The list includes `meta.total`.

## AI review priorities

Owners and admins can run **Highlight relevant events with AI** on up to 33 loaded entries per operation. Redacted metadata (field names only) is sent for inference; results are per-viewer findings keyed to immutable audit log IDs. Annotations can be undone or dismissed; source rows, pagination, totals, and CSV export stay unchanged. Routes: `/api/profiles/:studioId/audit-logs/ai/*`.

## Code

- Feature: `apps/app/features/audit-logs/`
- Demo seed: `SeedAuditLogs` in `apps/api/internal/seed/`
