[DT-2777] Ensure Data Library visibility filter is applied even after clearing filters #3256
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.



Addresses
https://broadworkbench.atlassian.net/browse/DT-2777
Summary
Per DUOS-2753, we only only want to show Study and Datasets in Library after DAC approval (unless user is signing official and viewing their own institution). That gets passed in a “visibility modifier”.
However, we only (sort of) do that in the initial /index search request on the Data Library. When e.g. the user selects a filter then deselects it to the default unfiltered state, the visibility modifier is not applied.
The visibility modifier should always be passed (unless user is signing official and viewing their own institution).
To reproduce:
{term: {dacApproval: true}}is included{term: {dacApproval: true}}is not included. Per DUOS-2753, it should be.Before
See video. It might have no obvious impact on dev with my depicted user status, but this demonstrates the lurking issue via the discrepant post bodies as described in steps 4 and 7 above.
Visibility_filter_not_applied_upon_clearing_filters__DUOS_UI__2026-01-09.mov
After
Now the Data Library visibility filter is applied even after clearing filters.
Visibility_filter_applied_upon_clearing_filters__DUOS_UI__2026-01-09.mov
Have you read Terra's Contributing Guide lately? If not, do that first.