fix(activity): stop unmapped actions rendering as identical events - #129
Merged
Conversation
Uploading a file and deleting it produced the same row in the activity log — "Activity event" over the filename, distinguishable only by timestamp. The same was true of approving and deleting a comment. The server was never at fault: it records media_uploaded and media_deleted as distinct actions and always has. ACTION_META in the activity view simply had no media_* or comment_* keys, so both fell through to a FALLBACK_META constant whose label, icon, and colour were fixed — collapsing every unmapped action into one indistinguishable row. Add the six missing mappings, and replace the constant fallback with a label derived from the action key, so a future action nobody remembers to map reads as "Media uploaded" rather than losing its meaning. Cross-checked against every action string the handlers emit: none are unmapped, and no mapping is dead. The breakdown panel had the same blind spot from the other direction — it enumerated ACTION_META and counted matching events, so an unmapped action was absent from it entirely. Count from the events instead, busiest first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Uploading a file and deleting it produced the same row in the activity log — "Activity event" over the filename, distinguishable only by timestamp. Approving and deleting a comment had the same problem.
Cause
Not the logging. The server records
media_uploadedandmedia_deletedas distinct actions and always has — confirmed against the activity table.ACTION_METAin the activity view simply had nomedia_*orcomment_*keys, so both fell through to aFALLBACK_METAconstant whose label, icon and colour were fixed. Every unmapped action collapsed into one indistinguishable row.Changes
media_uploaded,media_updated,media_deleted,media_index_started,comment_status_updated,comment_deleted.ACTION_METAand counted matching events, so unmapped actions were absent from it entirely. Now counts from the events themselves, busiest first.Verification
Cross-checked the mapping against every action string the handlers emit, including those built into variables in
taxonomy.goandhandlers.go: nothing emitted is unmapped, nothing mapped is dead.Follow-up
classified_moderated/classified_deletedare deliberately unmapped here — those handlers don't exist onmainyet. Once the classifieds PR merges they render via the new fallback as "Classified moderated": correct, but with a generic icon. Worth a small follow-up adding explicit entries.🤖 Generated with Claude Code