Skip to content

SCIX-890 fix(vis): keep paper limit and CSV reachable on empty network#905

Draft
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:fix/scix-890-network-not-enough-data
Draft

SCIX-890 fix(vis): keep paper limit and CSV reachable on empty network#905
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:fix/scix-890-network-not-enough-data

Conversation

@thostetler

Copy link
Copy Markdown
Member

The author and paper network pages dropped the entire graph pane when the
backend couldn't build groups, so a user who over-restricted the paper limit
had no way to raise it back and nothing to export. The "not enough data"
response also uses a different shape than success (no root/summaryGraph; raw
rows under fullGraph), which the CSV path wasn't reading.

  1. Add a shared NotEnoughData panel that keeps the paper limit control on
    screen and offers an optional CSV download.
  2. Build the error-state CSV from fullGraph.nodes (author name and weight;
    paper bibcode and metadata), omitting the button when there are no rows.
  3. Model the fullGraph fallback in the vis response types.

When the author or paper network can't be grouped, the page dropped the
whole graph pane, so a user who over-restricted the paper limit had no way
to raise it back up and nothing to export. The "not enough data" response
also has a different shape than success (no root/summaryGraph; raw rows
under fullGraph), which the CSV path wasn't reading.

1. Add NetworkNotEnoughData: the message plus the paper limit control and
   an optional CSV download, shared by both containers.
2. Build the error-state CSV from fullGraph.nodes (author name/weight;
   paper bibcode + metadata), omitting the button when there are no rows.
3. Model the fullGraph fallback in the vis types.
@thostetler
thostetler requested a review from shinyichen July 24, 2026 19:58
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.6%. Comparing base (7872cc8) to head (f16e274).

Files with missing lines Patch % Lines
...izations/Containers/AuthorNetworkPageContainer.tsx 18.8% 13 Missing ⚠️
...lizations/Containers/PaperNetworkPageContainer.tsx 38.1% 13 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #905     +/-   ##
========================================
+ Coverage    67.4%   67.6%   +0.3%     
========================================
  Files         349     350      +1     
  Lines       41238   41334     +96     
  Branches     2132    2137      +5     
========================================
+ Hits        27762   27912    +150     
+ Misses      13427   13373     -54     
  Partials       49      49             
Files with missing lines Coverage Δ
...ts/Visualizations/Widgets/NetworkNotEnoughData.tsx 100.0% <100.0%> (ø)
src/components/Visualizations/Widgets/index.ts 100.0% <100.0%> (ø)
src/components/Visualizations/utils/graphUtils.ts 59.5% <100.0%> (+1.5%) ⬆️
...izations/Containers/AuthorNetworkPageContainer.tsx 20.5% <18.8%> (-0.8%) ⬇️
...lizations/Containers/PaperNetworkPageContainer.tsx 23.1% <38.1%> (+0.4%) ⬆️

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

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