Surface admin import-log view in user actions#135
Merged
Conversation
The admin import-job endpoints (list + reasoned, audited detail view) and their client functions already existed but weren't surfaced. Adds an ImportLogsSection to the per-user Explain-account panel, next to Sessions and reusing the same pattern: lists a user's import jobs and, on a required reason, shows the full event log inline. Each view writes the existing import_log_view audit row (shown in the audit log and the user's own 'admin activity' card) and refreshes the panel's recent-activity list on success.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the existing admin import-job view in the admin UI. The backend endpoints (list a user's import jobs + a reason-gated, audited detail view) and their client functions already shipped; this wires them into the per-user admin panel so support can actually read an import's event log when debugging a failed import.
Changes
ImportLogsSectionto the per-user "Explain account" panel (next to Sessions), modelled on the existingSessionsSectionpattern.import_log_viewaudit row (already shown in the admin audit log and the user's own "admin activity on your account" card). On success it refreshes the panel's recent-activity list so the access shows immediately.Testing
ruff check sheaf/passes (no backend changes)cd web && npm run lint && npx tsc --noEmitpasses (zero errors in the touched files)Security / privacy impact
Article 9 data. The detail view is the existing reason-gated, admin-only endpoint that writes an
import_log_viewaudit row, so reading a user's import history stays transparent to that user. Import events carry only structural data (counts, stages, source ids), never decrypted member content. No new endpoint and no new data exposure; this is UI wiring of an already-audited backend.Screenshots
Inline addition to the existing admin Users > Explain account expander (an "Import jobs" list with per-job "View logs"); no standalone screen.