Skip to content

fix(activity): stop unmapped actions rendering as identical events - #129

Merged
ssavutu merged 1 commit into
mainfrom
fix/activity-log-indistinguishable-events
Aug 1, 2026
Merged

fix(activity): stop unmapped actions rendering as identical events#129
ssavutu merged 1 commit into
mainfrom
fix/activity-log-indistinguishable-events

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 1, 2026

Copy link
Copy Markdown
Member

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_uploaded and media_deleted as distinct actions and always has — confirmed against the activity table. 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. Every unmapped action collapsed into one indistinguishable row.

Changes

  • Six missing mappings: media_uploaded, media_updated, media_deleted, media_index_started, comment_status_updated, comment_deleted.
  • The constant fallback becomes a label derived from the action key, so an action nobody remembers to map reads as "Media uploaded" rather than losing its meaning. This is the actual fix — the bug wasn't a missing entry, it was that a missing entry destroyed information.
  • The breakdown panel had the same blind spot inverted: it enumerated ACTION_META and 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.go and handlers.go: nothing emitted is unmapped, nothing mapped is dead.

Follow-up

classified_moderated / classified_deleted are deliberately unmapped here — those handlers don't exist on main yet. 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

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>
@ssavutu
ssavutu merged commit 5eb34f5 into main Aug 1, 2026
6 checks passed
@ssavutu
ssavutu deleted the fix/activity-log-indistinguishable-events branch August 1, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant