Skip to content

Fix search within "My Dandisets" to include owned/embargoed dandisets#2841

Open
bendichter wants to merge 1 commit into
masterfrom
fix-search-my-dandisets-2834
Open

Fix search within "My Dandisets" to include owned/embargoed dandisets#2841
bendichter wants to merge 1 commit into
masterfrom
fix-search-my-dandisets-2834

Conversation

@bendichter
Copy link
Copy Markdown
Member

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=true together (the dandiset list action runs get_queryset(), honoring user=me/embargoed, then applies the search filter). The bug was entirely in the frontend.

Changes

  • DandisetSearchField.vueperformSearch now stays on the current route for the myDandisets page (previously only searchDandisets), instead of pushing to the public search route. This keeps the search scoped to the user's own dandisets.
  • DandisetsPage.vue — added a searchActive computed (props.search || !!route.query.search). The search param is now sent whenever a search is active, not only on the dedicated public search view. Combined with the existing user: 'me' and embargoed: true params 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 lint and yarn type-check pass 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:

  1. Sign in, go to My Dandisets.
  2. Search for a term that matches an embargoed dandiset you own.
  3. Confirm the URL stays on /dandiset/my?search=..., the embargoed dandiset appears, and the result count is shown.

🤖 Generated with Claude Code

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>
@bendichter
Copy link
Copy Markdown
Member Author

bendichter commented Jun 1, 2026

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

@bendichter bendichter marked this pull request as ready for review June 1, 2026 15:13
@bendichter bendichter requested a review from kabilar June 1, 2026 15:13
@yarikoptic
Copy link
Copy Markdown
Member

FWIW, tried on preview - worked for me. Filed

since ideally we get it all green before merging

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.

UI: It's not possible to search within "My dandisets"

2 participants