Skip to content

fix(web): page and filter the audit log; list approval decisions apart from the queue (#441) - #510

Merged
mkluiver merged 1 commit into
mainfrom
fix/441-audit-approvals-paging
Nov 26, 2026
Merged

mkluiver merged 1 commit into
mainfrom
fix/441-audit-approvals-paging

Conversation

@mblaauw

@mblaauw mblaauw commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #441.

Summary

The Audit log tab showed the newest 25 entries with no way to reach older
ones, no filter, and rows that said "on agent" without naming which. The
Approvals page loaded 100 approvals of any status and built "Recent
decisions" from that page, so a long pending queue left it empty.

  • API: GET /api/v1/audit-logs accepts area, the action family before the
    first dot (agent matches agent.deleted, not agent_x.y or
    team_run.started); other values are refused with 400.
    GET /api/v1/approvals?status=decided lists every status but pending,
    newest decision first.
  • Audit tab: "Load older activity" pages through nextCursor, a "Show"
    select filters by area, and each row names its target (the recorded
    name, slug or email, else the short target id); "Details" shows the
    action, full target id, request id, IP and metadata. Types come from the
    generated AuditLogPage.
  • Approvals: pending (up to 200, with a notice when capped) and the 30
    latest decisions are separate requests; deciding invalidates every
    approvals list, also from the execution page.
  • Docs: settings and approvals guides.

Testing

  • cargo fmt --check, clippy -D warnings: clean; pnpm api:generate --check: passed
  • cargo test --workspace with a database: 0 failures (190 API integration tests), including new audit_log_pages_and_filters_by_area and decided_approvals_are_listed_apart_from_pending_ones
  • Web: typecheck passed; test 98 passed (4 new in lib/audit.test.ts); pnpm docs:check passed

API additions: area on GET /api/v1/audit-logs, status=decided on GET /api/v1/approvals. Not checked in a browser. The pending queue is capped at the API maximum of 200 with a notice. Conflicts with #498 on the approvals page and docs/guide/approvals.md; whichever merges second needs a merge.

🤖 Generated with Claude Code

…t from the queue (#441)

The Audit log tab showed the newest 25 entries with no way to reach older
ones, no filter, and rows that said "on agent" without naming which. The
Approvals page loaded 100 approvals of any status and built "Recent
decisions" from that page, so a long pending queue left it empty.

- API: `GET /api/v1/audit-logs` accepts `area`, the action family before the
  first dot (`agent` matches `agent.deleted`, not `agent_x.y` or
  `team_run.started`); other values are refused with 400.
  `GET /api/v1/approvals?status=decided` lists every status but pending,
  newest decision first.
- Audit tab: "Load older activity" pages through `nextCursor`, a "Show"
  select filters by area, and each row names its target (the recorded
  name, slug or email, else the short target id); "Details" shows the
  action, full target id, request id, IP and metadata. Types come from the
  generated `AuditLogPage`.
- Approvals: pending (up to 200, with a notice when capped) and the 30
  latest decisions are separate requests; deciding invalidates every
  approvals list, also from the execution page.
- Docs: settings and approvals guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mkluiver
mkluiver merged commit c3ae50d into main Nov 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit log and approvals pages show only the first page: no paging, no filter, and audit entries do not say which item was changed

2 participants