Skip to content

fix(search): correct export citation loading and selection handling#881

Draft
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:fix/search-export-citation-flow
Draft

fix(search): correct export citation loading and selection handling#881
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:fix/search-export-citation-flow

Conversation

@thostetler
Copy link
Copy Markdown
Member

Search-page citation export had two issues: exporting all showed an empty/placeholder state for several seconds before results appeared, and after exporting a subselection it was impossible to export all records because the previous subset's qid was reused.

  • Surface a loading state during the initial export fetch in useCitationExporter and consume it in CitationExporter
  • Render a loading skeleton on the export page until the search data and the client are ready, removing the static-to-interactive hydration swap
  • Gate the vault qid navigation on selected mode so export all uses the plain query and ignores a stale cached qid; preserve the selection
  • Add tests for the initial loading state and the selection/qid handling

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.4%. Comparing base (6a15785) to head (3be10e0).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #881     +/-   ##
========================================
+ Coverage    61.2%   61.4%   +0.3%     
========================================
  Files         348     348             
  Lines       41373   41405     +32     
  Branches     1826    1839     +13     
========================================
+ Hits        25297   25412    +115     
+ Misses      16033   15948     -85     
- Partials       43      45      +2     
Files with missing lines Coverage Δ
...c/components/CitationExporter/CitationExporter.tsx 76.8% <100.0%> (+0.3%) ⬆️
...components/CitationExporter/useCitationExporter.ts 98.2% <100.0%> (+5.0%) ⬆️
src/components/ResultList/ListActions.tsx 85.2% <100.0%> (+7.2%) ⬆️

... and 7 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.

Search-page citation export had two issues: exporting 'all' showed an empty/placeholder state for several seconds before results appeared, and after exporting a subselection it was impossible to export all records because the previous subset's qid was reused.

- Surface a loading state during the initial export fetch in useCitationExporter and consume it in CitationExporter
- Render a loading skeleton on the export page until the search data and the client are ready, removing the static-to-interactive hydration swap
- Gate the vault qid navigation on selected mode so 'export all' uses the plain query and ignores a stale cached qid; preserve the selection
- Add tests for the initial loading state and the selection/qid handling
@thostetler thostetler force-pushed the fix/search-export-citation-flow branch from 97711e3 to 3be10e0 Compare June 4, 2026 16:21
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.

1 participant