feat(audit): filter audit log by user name instead of UUID (PMS-584) #394

Merged
longjacksonle merged 2 commits from feat/PMS-584-audit-user-name-filter into main 2026-06-30 20:11:13 +02:00

PMS-584 (found in PMS-566 Audit Log smoke)

The audit log already shows the acting user by name in the table, but filtering by user required pasting a raw user UUID. This makes the user filter a pick-by-name dropdown.

Commits (small, logical)

  1. Fetch the full user list for the filter: /auth/users?per_page=200 so the dropdown lists every user (and diff FK resolution covers more), not just the default first page.
  2. Replace the "User ID" UUID text input with a "User" Select listing tenant users by name (value = user id). A selected id not in the fetched list (deleted / paged out) is preserved as a short-id option so the active filter still shows.

The wire format and CSV export are unchanged (still user_id); only the picker is humanized.

Scope note

The other filters are already name-based, not UUIDs: Action is a fixed dropdown, Entity type is a text field ("ticket"), dates are date pickers. So the user filter was the only UUID-paste case. Resolving non-user FK ids in the detail diff panel remains the separate PMS-566 item (the page does not cache those lists).

Verified

dx build clean (32s), no warnings, fmt clean. Dev app serves this branch.

Test

Audit Log > filters: "User" is now a dropdown of names (+ "All Users"); picking one filters the log to that user; CSV export respects it.

🤖 Generated with Claude Code

## PMS-584 (found in PMS-566 Audit Log smoke) The audit log already shows the acting user by name in the table, but filtering by user required pasting a raw user UUID. This makes the user filter a pick-by-name dropdown. ## Commits (small, logical) 1. Fetch the full user list for the filter: `/auth/users?per_page=200` so the dropdown lists every user (and diff FK resolution covers more), not just the default first page. 2. Replace the "User ID" UUID text input with a "User" Select listing tenant users by name (value = user id). A selected id not in the fetched list (deleted / paged out) is preserved as a short-id option so the active filter still shows. The wire format and CSV export are unchanged (still `user_id`); only the picker is humanized. ## Scope note The other filters are already name-based, not UUIDs: Action is a fixed dropdown, Entity type is a text field ("ticket"), dates are date pickers. So the user filter was the only UUID-paste case. Resolving non-user FK ids in the detail diff panel remains the separate PMS-566 item (the page does not cache those lists). ## Verified dx build clean (32s), no warnings, fmt clean. Dev app serves this branch. ## Test Audit Log > filters: "User" is now a dropdown of names (+ "All Users"); picking one filters the log to that user; CSV export respects it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Request /auth/users?per_page=200 so the upcoming user-name filter dropdown lists every user (and diff FK resolution covers more), instead of just the default first page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(audit): filter audit log by user name, not UUID (PMS-584)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m47s
Create release / Create release from merged PR (pull_request) Has been skipped
4f9a6db1d3
Replace the raw "User ID" UUID text filter with a "User" dropdown that lists tenant users by name (value = user id). A selected id missing from the fetched list (deleted / paged out) is preserved as a short-id option so the active filter still shows. The wire format and CSV export are unchanged (still user_id); only the picker is humanized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-584-audit-user-name-filter 2026-06-30 20:11:13 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!394
No description provided.