Skip to content

Log search records with IDs, position, FRBR groups - #481

Open
JPrevost wants to merge 2 commits into
mainfrom
timx730
Open

JPrevost wants to merge 2 commits into
mainfrom
timx730

Conversation

@JPrevost

Copy link
Copy Markdown
Member

https://mitlibraries.atlassian.net/browse/TIMX-730

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@qltysh

qltysh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

❌ 12 blocking issues (13 total)

Tool Category Rule Count
rubocop Lint Class has too many lines. [541/100] 3 ❌
rubocop Style Align \.filter\_map with \.send on line 1208. 3 ❌
rubocop Lint Assignment Branch Condition size for load\_all\_results is too high. [<26, 29, 3> 39.06/17] 2 ❌
rubocop Lint Method has too many lines. [27/10] 2 ❌
rubocop Style Incorrect formatting, autoformat by running qlty fmt. 1 ❌
rubocop Lint Parenthesize the param `controller.send(:search_results_log_payload)[:returned_results]
                                       \.filter\_map \{ \|result\| result\[:frbr\_group\_id\] \}` to make sure that the block will be associated with the `controller\.send\(:search\_results\_log\_payload\)\[:returned\_results\]
                                       \.filter\_map` method call\.|1|❌|

|qlty|Structure|Function with high complexity (count = 5): search_results_log_returned_results|1||

@qltysh one-click actions:

  • Auto-fix formatting (qlty fmt && git push)

return [] if search_log_http_error?

results = search_log_format.turbo_stream? ? Array(@append_results) : Array(@results)
search_results_log_entries(results)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function with high complexity (count = 5): search_results_log_returned_results [qlty:function-complexity]

controller.instance_variable_set(:@results, data[:results])

assert_equal ['12345'], controller.send(:search_results_log_payload)[:frbr_group_ids]
assert_equal ['12345'], controller.send(:search_results_log_payload)[:returned_results]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Parenthesize the param controller.send(:search_results_log_payload)[:returned_results]
.filter_map { |result| result[:frbr_group_id] }
to make sure that the block will be associated with the controller.send(:search_results_log_payload)[:returned_results]
.filter_map
method call. [rubocop:Lint/AmbiguousBlockAssociation]


assert_equal ['12345'], controller.send(:search_results_log_payload)[:frbr_group_ids]
assert_equal ['12345'], controller.send(:search_results_log_payload)[:returned_results]
.filter_map { |result| result[:frbr_group_id] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Align .filter_map with .send on line 1208. [rubocop:Layout/MultilineMethodCallIndentation]


assert_equal ['merged-group'], controller.send(:search_results_log_payload)[:frbr_group_ids]
assert_equal ['merged-group'], controller.send(:search_results_log_payload)[:returned_results]
.pluck(:frbr_group_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Align .pluck with .send on line 1235. [rubocop:Layout/MultilineMethodCallIndentation]

assert_select '.record-title', text: /Cached Primo Document Title/
assert_equal ['cached-group'], @controller.send(:search_results_log_payload)[:frbr_group_ids]
assert_equal ['cached-group'], @controller.send(:search_results_log_payload)[:returned_results]
.pluck(:frbr_group_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Align .pluck with .send on line 1265. [rubocop:Layout/MultilineMethodCallIndentation]

@coveralls

coveralls commented Oct 30, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41075779929

Coverage increased (+0.003%) to 98.426%

Details

  • Coverage increased (+0.003%) from the base build.
  • Patch coverage: 39 of 39 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1906
Covered Lines: 1876
Line Coverage: 98.43%
Coverage Strength: 1855.93 hits per line

💛 - Coveralls

@mitlib
mitlib temporarily deployed to timdex-ui-pi-timx730-c53vt5txf October 30, 2026 14:47 Inactive

This branch was successfully deployed

1 active deployment
timdex-ui-pi-timx730-c53vt5txf — ce003777 Deployed Oct 30, 2026 by JPrevost
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.

3 participants