Backend: Add ListAdminActions and ListModerationStates RPCs#8469
Conversation
Adds paginated, filterable list endpoints so admins can browse the full admin action log (with admin and target usernames) and moderation state history (filterable by content author).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 Release NotesThis PR does not need to be included in release notes. Reason: This PR adds backend RPCs to support admin and moderation teams browsing historical admin actions and moderation states in internal admin UI. It is not a user-facing feature for end users, and while moderation-related, it appears to be internal tooling rather than a safety feature users directly notice. It also does not rise to the level of major technical infrastructure work for release notes. 🤖 Bot Debug InformationModel: |
Adds two new admin/moderation review RPCs to support browsing historical activity from the admin UI:
Admin.ListAdminActions— paginated list of admin action log entries, optionally filtered byadmin_user_idand/ortarget_user_id. Returns newest first. TheAdminActionLogmessage gainstarget_user_idandtarget_usernamefields so callers can render rows without an extra lookup.Moderation.ListModerationStates— paginated list ofModerationStaterows, ordered chronologically (with optionalnewest_first). Supports filtering to states whose underlying content was authored by a specific user, byEXISTS-checking each registered moderation object type's author column.Testing
make formatandmake mypypass.uv run pytest src/tests/test_admin.py src/tests/test_moderation.py(run locally before pushing).Backend checklist
For maintainers
This PR was created with the Couchers PR skill.