Fix search within "My Dandisets" to include owned/embargoed dandisets#2841
Open
bendichter wants to merge 1 commit into
Open
Fix search within "My Dandisets" to include owned/embargoed dandisets#2841bendichter wants to merge 1 commit into
bendichter wants to merge 1 commit into
Conversation
Searching from the "My Dandisets" page silently fell through to the public search, omitting the user's embargoed dandisets (#2834). - DandisetSearchField: keep the search in context on the myDandisets route instead of always pushing to the public searchDandisets route. - DandisetsPage: send the `search` param whenever a search is active (not only on the dedicated search view). Combined with the existing user=me and embargoed=true params, search now spans owned + embargoed dandisets. Result count and search-error alert use the same flag. - MyDandisetsView: show a search-aware empty state instead of the misleading "You haven't created any dandisets yet". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
I tested this and can confirm that it works. It correctly filters to only dandisets I own, and it includes embargoed dandisets. Anyone else's results will vary because it depends on what dandisets you as a user own |
Member
|
FWIW, tried on preview - worked for me. Filed since ideally we get it all green before merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #2834.
Searching from the My Dandisets page silently fell through to the public search route, so results only ever showed public dandisets — the user's embargoed dandisets were omitted, and there was no way to search across them.
The backend already supports
user=me+search+embargoed=truetogether (the dandisetlistaction runsget_queryset(), honoringuser=me/embargoed, then applies the search filter). The bug was entirely in the frontend.Changes
DandisetSearchField.vue—performSearchnow stays on the current route for themyDandisetspage (previously onlysearchDandisets), instead of pushing to the public search route. This keeps the search scoped to the user's own dandisets.DandisetsPage.vue— added asearchActivecomputed (props.search || !!route.query.search). Thesearchparam is now sent whenever a search is active, not only on the dedicated public search view. Combined with the existinguser: 'me'andembargoed: trueparams on this page, search now spans owned + embargoed dandisets. The "N results found" header and inline search-error alert use the same flag.MyDandisetsView.vue— empty state now shows "No results found in your dandisets." during a search, instead of the misleading "You haven't created any dandisets yet."Testing
yarn lintandyarn type-checkpass for the changed files. Opening as a draft to test signed-in behavior on the deploy preview, since signing in locally is difficult.To verify:
/dandiset/my?search=..., the embargoed dandiset appears, and the result count is shown.🤖 Generated with Claude Code