Skip to content

🐛 Point the date range facet link at the catalog - #797

Merged
AKFosterDev merged 2 commits into
productionfrom
homepage-range-facet-link
Oct 9, 2026
Merged

AKFosterDev merged 2 commits into
productionfrom
homepage-range-facet-link

Conversation

@kirkkwang

@kirkkwang kirkkwang commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

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:

ActionView::Template::Error (No route matches {:action=>"range_limit", :controller=>"hyrax/homepage", ...})
app/views/themes/heritage/hyrax/homepage/_browse_facets.html.erb:10

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

  • Root cause: blacklight_range_limit 8.5.0's RangeFacetComponent#range_limit_url calls main_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 in Hyrax::HomepageController#search_facet_path, but the component calls url_for directly, so a controller override can't reach it.
  • Belongs upstream in Hyku or blacklight_range_limit; remove the decorator once it lands there.
  • Waived for this hotfix: adversarial review, the full local rspec/rubocop run (CI covers it), and browser QA.
  • No deploy steps. Tenants recover as soon as this is deployed; the reindex does not need to be rerun.

`production` -> `staging` 2026-10-08
@kirkkwang kirkkwang added Contribute Back Code needs to be contributed to open source patch-ver for release notes labels Oct 9, 2026
@kirkkwang
kirkkwang requested a balanced review from Copilot October 9, 2026 14:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 RangeFacetComponent decorator.
  • 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.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Test Results

      4 files  ±0        4 suites  ±0   1m 14s ⏱️ +6s
114 548 tests  - 2  114 545 ✅  - 2  3 💤 ±0  0 ❌ ±0 
    437 runs   - 2      434 ✅  - 2  3 💤 ±0  0 ❌ ±0 

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.
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/DuplicatedGem
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/DuplicatedGroup
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/GemComment
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/GemFilename
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/GemVersion
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/InsecureProtocolSource
app.controllers.show_detailed_exceptions_decorator ‑ Bundler/OrderedGems
app.controllers.show_detailed_exceptions_decorator ‑ Gemspec/DependencyVersion
app.controllers.show_detailed_exceptions_decorator ‑ Gemspec/DeprecatedAttributeAssignment
app.controllers.show_detailed_exceptions_decorator ‑ Gemspec/DevelopmentDependencies
…
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/DuplicatedGem
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/DuplicatedGroup
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/GemComment
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/GemFilename
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/GemVersion
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/InsecureProtocolSource
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Bundler/OrderedGems
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Gemspec/DependencyVersion
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Gemspec/DeprecatedAttributeAssignment
app.components.blacklight_range_limit.range_facet_component_decorator ‑ Gemspec/DevelopmentDependencies
…

♻️ 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
@AKFosterDev
AKFosterDev force-pushed the homepage-range-facet-link branch from a155636 to 618eaf4 Compare October 9, 2026 15:06
@AKFosterDev
AKFosterDev changed the base branch from main to staging October 9, 2026 15:06
@AKFosterDev
AKFosterDev marked this pull request as ready for review October 9, 2026 15:10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@AKFosterDev
AKFosterDev enabled auto-merge October 9, 2026 15:18
@AKFosterDev
AKFosterDev self-requested a review October 9, 2026 15:19
@AKFosterDev
AKFosterDev changed the base branch from staging to production October 9, 2026 15:22
@AKFosterDev
AKFosterDev merged commit 2e37647 into production Oct 9, 2026
18 checks passed
@AKFosterDev
AKFosterDev deleted the homepage-range-facet-link branch October 9, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribute Back Code needs to be contributed to open source patch-ver for release notes

Projects

Status: Notch8 QA

Development

Successfully merging this pull request may close these issues.

3 participants