Skip to content

Add dynamic search and filtering to account activity#1277

Merged
maebeale merged 1 commit intomainfrom
maebeale/searchable-account-activity
Mar 1, 2026
Merged

Add dynamic search and filtering to account activity#1277
maebeale merged 1 commit intomainfrom
maebeale/searchable-account-activity

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 1, 2026

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

  • Account activity on the user show page was a static paginated table requiring full page reloads
  • Adds real-time search and filtering without leaving the page
  • Makes it easy to find specific events in a user's activity history

How did you approach the change?

  • Extracted account activity table into a lazy-loading Turbo Frame partial (users/sections/_account_activity)
  • Added text search that filters by event name and properties (JSON content)
  • Added a "By" dropdown to filter events by the user who performed them (admins + the account owner)
  • Reused existing collection Stimulus controller for debounced auto-submit and blur-on-submit loading feedback
  • Extracted user_auth_events_base private method to DRY up the Ahoy event query used by both the turbo frame branch and the status/audit queries
  • Added "See all user activity" link to the admin activities page filtered by user

Anything else to add?

  • No new JavaScript — the existing collection_controller.js handles text input debounce, select change auto-submit, clear-and-submit, and blur-on-submit
  • Pagination preserves search and filter params

🤖 Generated with Claude Code

Extract account activity into a lazy-loading Turbo Frame partial with
text search (event name + properties) and a "By" user dropdown filter.
Reuses the existing collection Stimulus controller for debounced
auto-submit and blur-on-submit loading feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/searchable-account-activity branch from 86a0cf5 to 0e8b99a Compare March 1, 2026 13:14
@maebeale maebeale merged commit 713bc55 into main Mar 1, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/searchable-account-activity branch March 1, 2026 13:26
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