Open
Conversation
…zero-result query Filter forms send params as `categories`, `sectors`, `windows_types` but the tracker looked for `category_ids`, `sector_ids`, `windows_type_ids` — so filter detail properties were never recorded. Also fix windows type chart reader to handle hash objects from enrich_filter_names, and add top-level `query` key to search_zero events so the "No Results" chart can read them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chartkick hides the title when there's no data, replacing the entire chart with "No data" text. Add a chart_card helper that renders an HTML heading outside the canvas so admins always know which chart they're looking at. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Seed visits and events covering view, print, download, filter, search, search_zero, browse.taggings, and create actions so all admin activity charts have data in the dev environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integration tests verify chart titles render with no data and that seeded event data populates all previously-empty charts. Unit tests validate the extract_search_params fix handles both filter form and edit form param names, and that search_zero events include the top-level query key. Co-Authored-By: Claude Opus 4.6 <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.
Summary
categories/sectors/windows_typesbut tracker looked forcategory_ids/sector_ids/windows_type_idsenrich_filter_namesstores{id, name}hashesquerykey: zero-result search events lacked the top-levelqueryproperty the "No Results" chart readschart_cardhelper so chart titles are always visible even when Chartkick shows "No data"Test plan
bundle exec rspec spec/requests/admin/ahoy_activities_spec.rb— chart title and data tests passbundle exec rspec spec/services/analytics/ahoy_tracker_spec.rb— tracker param fix tests pass🤖 Generated with Claude Code