Repository navigation
🐛 Point the date range facet link at the catalog - #797
Conversation
`production` -> `staging` 2026-10-08
There was a problem hiding this comment.
🟢 Approval recommended
The focused override addresses the routing defect and includes appropriate regression coverage.
0 open findings
What changed in this PR
Pins the date range distribution link to the catalog controller, preventing homepage routing failures.
Changes:
- Adds a targeted
RangeFacetComponentdecorator. - Adds regression coverage for homepage and catalog routing.
| File | Description |
|---|---|
app/components/blacklight_range_limit/range_facet_component_decorator.rb |
Overrides range facet URL generation. |
spec/components/blacklight_range_limit/range_facet_component_decorator_spec.rb |
Verifies the failure and corrected route. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results 4 files ±0 4 suites ±0 1m 14s ⏱️ +6s Results for commit 618eaf4. ± Comparison against base commit 9766d97. This pull request removes 1580 and adds 1578 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
The range facet builds its "view distribution" link with no controller, so on the homepage, where the heritage and cultural_repository themes render facets, it resolves to hyrax/homepage#range_limit. That has no route, and the home page 500s once the date range field is indexed. Assisted by: Opus 5.5
a155636 to
618eaf4
Compare
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
Story
🐛 Point the date range facet link at the catalog
a155636
The range facet builds its "view distribution" link with no controller,
so on the homepage, where the heritage and cultural_repository themes
render facets, it resolves to hyrax/homepage#range_limit. That has no
route, and the home page 500s once the date range field is indexed.
Assisted by: Opus 5.5
Expected Behavior Before Changes
On a tenant using the heritage or cultural_repository home page theme, once the date range field (
date_range_isim) has indexed values, the home page returns a 500:Seen on production at https://au-archives.hykucommons.org/ (heritage theme) during the current reindex.
Expected Behavior After Changes
The home page renders. The date range facet's "view distribution" link points to
/catalog/range_limit, which is the same route it uses on/catalog.Notes
RangeFacetComponent#range_limit_urlcallsmain_app.url_for(action: 'range_limit')without a controller, so Rails uses the current controller. Hyku already works around the same problem for the facet "more" link inHyrax::HomepageController#search_facet_path, but the component callsurl_fordirectly, so a controller override can't reach it.