Skip to content

Add visit ID and props filters to activity events#1348

Open
maebeale wants to merge 3 commits intomainfrom
maebeale/activity-event-filters
Open

Add visit ID and props filters to activity events#1348
maebeale wants to merge 3 commits intomainfrom
maebeale/activity-event-filters

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 6, 2026

What is the goal of this PR and why is this important?

  • Admin activity events page needed more granular search capabilities to debug and investigate specific user interactions
  • Adds two new filters: visit ID and props search

How did you approach the change?

  • Visit ID filter: integer input field (backend filter already existed, this adds the UI)
  • Props filter: full-text search across the entire properties JSON blob by casting to string
  • Text filter uses sanitize_sql_like to prevent SQL injection in LIKE clauses
  • Added colored filter badges to the active filters subheader
  • Preserved new params in quick range links

UI Testing Checklist

  • Navigate to admin Activities > Events page
  • Filter by Visit ID — verify events scoped to that visit
  • Filter by Props — verify events with matching property values appear
  • Verify filter badges appear in subheader when filters are active
  • Verify quick range links preserve new filter params
  • Combine new filters with existing filters (user, time period, etc.)

Anything else to add?

  • No schema changes required — all filters query existing columns

🤖 Generated with Claude Code

Adds three new search fields to the admin activities events page:
- Resource Name: text search on resource_title in event properties JSON
- Visit ID: integer filter on visit_id (backend existed, adds UI)
- Props: full-text search across the entire properties JSON blob

Also adds filter badges to the active filters subheader and preserves
new params in quick range links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maebeale added a commit that referenced this pull request Mar 6, 2026
Replace full-page-reload filtering with the same Turbo Frame + Stimulus
collection controller pattern used by stories. Filters now auto-submit
with debounce on text input and immediate submit on select/checkbox
changes. Adds sortable columns, skeleton loaders, and filtered/total
count display. Incorporates resource name, props, and event name filters
from #1348.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switches from JSON_UNQUOTE(JSON_EXTRACT(...)) to the ->> shorthand
for more reliable JSON path extraction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maebeale added a commit that referenced this pull request Mar 6, 2026
Resolve merge conflicts by keeping the dynamic search refactor and
adopting the MySQL ->> shorthand operator for JSON extraction from
the parent branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale changed the title Add resource name, visit ID, and props filters to activity events Add visit ID and props filters to activity events Mar 6, 2026
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