Repository navigation
Add a per-request action log and surface failed approvals to staff - #636
Open
superconductor-for-github[bot] wants to merge 1 commit into
Open
superconductor-for-github[bot] wants to merge 1 commit into
superconductor-for-github[bot] wants to merge 1 commit into
Conversation
Adds requests.action_log, a jsonb array of entries (action, time, actor, message) managed by Request::ActionLog. - Approving, denying, and canceling a request each append an entry. - A failed approval leaves the request untouched and logs the LMS's error, including when the staff member's LMS access cannot be used at all. - When a course auto-approves and a request stays pending, the log says which rule it fell outside of, or that no staff Canvas access worked. Course staff see the log on the request page, with an alert while the latest attempt is an unresolved failure. Failed requests are also flagged in the requests table (immediately, for single and batch approvals) and in the pending-requests digest email. Students never see the log. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Part 3 of 3 split out of #633. Independent of the other two parts: it branches from
mainand can merge in any order.General Info
Changes
Adds
requests.action_log, ajsonbarray of entries (action, time, actor, message) managed byRequest::ActionLog.What gets logged
How staff see it
Students never see the log.
Notes for review
Request#approvenow returnsfalse(and logs) if the LMS call succeeded but the request could not be saved; it used to returntruewith the status silently unchanged.Merge note: this PR and the
last_action_atPR each add a migration, so whichever merges second will conflict indb/schema.rb(the version line and the new column). Re-runningbin/rails db:migrateresolves it. No other files conflict.Screenshots
Taken on the combined change in #633, so the timestamps shown also reflect the
last_action_atPR.Testing
Documentation
None needed.
Checklist
🤖 Generated with Claude Code