Skip to content

SCIX-952 fix(libraries): send applied filters with add/remove-by-query - #983

Merged
thostetler merged 1 commit into
adsabs:masterfrom
thostetler:fix/scix-952-add-all-preserve-search-filters
Nov 20, 2026
Merged

thostetler merged 1 commit into
adsabs:masterfrom
thostetler:fix/scix-952-add-all-preserve-search-filters

Conversation

@thostetler

Copy link
Copy Markdown
Member

"Add all" with no selection sent only the search text to biblib, dropping every applied filter and adding the entire unfiltered result set to the library.

  • Also switched from the query still being typed in the search bar to the one actually submitted, since the former could include text the search never ran.
  • One handler backs add-to-existing, add-to-new-library, and remove-by-query, so all three were affected.
  • During the brief window before the first search completes, the submitted query is empty; that fails safe since Solr rejects an empty query with a 400. Considered and dropped a submit guard for this as unnecessary.

Add/remove-by-query sourced the payload from the debounced search-bar
query and sent only q, so biblib acted on the entire unfiltered result
set. One handler backs add-to-existing, add-to-new, and
remove-by-query, so all three were affected.

Now reads the submitted query and builds fq from the resolved getFQs()
clauses plus any raw fq clause without an fq_ companion, dropping blank
clauses and omitting fq entirely when there are none.
@github-actions

Copy link
Copy Markdown
Contributor

Bundle size

Shared by all pages: 632.6 kB (-0.0 kB) ⚪

No route changed by more than 1 kB. ✅

First load = polyfills + shared _app chunks + route chunks, gzipped.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.3%. Comparing base (2a6c3d3) to head (22dca9c).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #983     +/-   ##
========================================
+ Coverage    57.2%   57.3%   +0.2%     
========================================
  Files         402     401      -1     
  Lines       12512   12513      +1     
  Branches     2816    2813      -3     
========================================
+ Hits         7147    7163     +16     
+ Misses       4691    4678     -13     
+ Partials      674     672      -2     
Files with missing lines Coverage Δ
...mponents/Libraries/AddToRemoveFromLibraryModal.tsx 72.1% <100.0%> (+15.0%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler
thostetler marked this pull request as ready for review November 19, 2026 20:45

@shinyichen shinyichen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 Good catch

@thostetler
thostetler merged commit d4ccb44 into adsabs:master Nov 20, 2026
5 of 6 checks passed
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.

2 participants