Skip to content

NickAkhmetov/MUI 9 QA follow-ups and organ cell types dataset links - #4113

Merged
NickAkhmetov merged 2 commits into
mainfrom
nickakhmetov/mui-9-qa-followups
Oct 29, 2026
Merged

NickAkhmetov merged 2 commits into
mainfrom
nickakhmetov/mui-9-qa-followups

Conversation

@NickAkhmetov

@NickAkhmetov NickAkhmetov commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes three issues QA found after the MUI 9 upgrade (#4082), plus one older bug on the organ page. None of the three QA issues is caused by MUI 9 itself.

  • Cell population plot reloads when the cell types section switches to ATACseq. The ATACseq tab mounts its table only when it is selected. Its useIndexedDatasetsForOrgan call then revalidates the Elasticsearch query that the plot shares. Every hit in that query has the same score, so Elasticsearch can return the hits in a different order on each request. The plot builds its scFind count request keys from that list in order, so a new order meant new keys, a refetch and the loading skeleton. useIndexedDatasetsForOrgan's query now sorts by _id.
  • Bulk data transfer tab contents do not fill the section. StyledTabPanel is a row flexbox, so its child was only as wide as its content. Production has the same CSS but a narrower main column, so the gap did not show there. Children of the panel now get flexGrow: 1. The Collections and Publications sections had their own workarounds for this, and those are now redundant. I left them in place.
  • Section description info icon is misaligned with the text. The icon now sits in a body1 line box with vertical-align: middle, so it centers on the first line of text. This replaces the marginTop offset on the text. The icon also looks lower in QA for a separate reason: from NickAkhmetov/CAT-1550 Say and See Front-end Integration / Back-end Enhancements #3983 until NickAkhmetov/Update Say & See to udi-yac 0.9.0, fix chart field changes #4111, udi-yac's stylesheet applied a Tailwind preflight rule, svg { vertical-align: middle }, to every icon in the app. NickAkhmetov/Update Say & See to udi-yac 0.9.0, fix chart field changes #4111 scoped that rule to .udi-yac, so icons went back to baseline. This PR does not restore the global rule.
  • "View Datasets" in the organ cell types table links to every dataset. The table's matched datasets are already UUIDs, but useUUIDsFromHubmapIds looked them up by hubmap_id.keyword. No document matched, so the button got an empty UUID filter and the search showed all datasets. The cell now uses the existing useSCFindIDAdapter, which accepts both UUIDs and HuBMAP IDs. I deleted useUUIDsFromHubmapIds, which had no other callers.

Design Documentation/Original Tickets

N/A. These came from QA of the MUI 9 upgrade (#4082).

Testing

Check Result
pnpm test 1060 passed, 7 skipped (146 files)
pnpm tsc clean
ESLint on changed files clean

Manual checks against a local dev server:

  • /organs/lung: switching the cell types tabs from ATACseq to RNAseq and back no longer refetches cell-type-count or reloads the plot.
  • Bulk data transfer on a raw RNAseq dataset (HBM965.GWBH.574): the RNAseq and Salmon tab contents now fill the panel (1392px). Before, the Salmon tab content was 1245px.
  • Section description icons, both subsection and full size: the icon's top is about 2px above the cap height of the first line of text.
  • /organs/lung, "adventitial fibroblast" row (27/45): "View Datasets" now opens a search with 27 results. Before, it showed all 9,727 datasets.

Screenshots/Video

N/A

Checklist

  • Code follows the project's style guidelines
  • Changelog entry added (CHANGELOG-mui-9-qa-followups.md)

🤖 Generated with Claude Code

- Sort the organ's indexed dataset UUIDs. Elasticsearch returns these
  tied-score hits in a different order on each request, so when the cell
  types section mounted its ATACseq tab, SWR revalidation changed the
  cell population plot's request keys and reloaded the plot.
- Stretch TableTabs panel children to the panel's width, so bulk data
  transfer tab contents fill the section.
- Put the SectionDescription info icon in a body1 line box with
  vertical-align: middle, so it centers on the first line of text.
- Pass the cell types table's matched datasets through
  useSCFindIDAdapter. They are already UUIDs, so the old hubmap_id
  lookup matched nothing and "View Datasets" linked to an unfiltered
  search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment on lines +189 to +192
const datasetUUIDs = (searchData?.hits?.hits.map((h) => h._id) ?? []).filter((id) => id != null);
// These hits all tie on score, so ES returns them in a different order on each request. Sort them so
// that SWR revalidating this query (e.g. when the cell types section mounts its ATACseq tab) doesn't
// change the request keys that callers like the cell population plot build from this list.
const datasetUUIDs = (searchData?.hits?.hits.map((h) => h._id) ?? []).filter((id) => id != null).sort();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not just apply a sort in the ES query?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's simpler. Done in 2e38f43: the query now has sort: [{ _id: 'asc' }], the same as the shared ID queries in useSearchData.ts, and the client-side .sort() is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NickAkhmetov
NickAkhmetov merged commit 2b5a32d into main Oct 29, 2026
9 checks passed
@NickAkhmetov
NickAkhmetov deleted the nickakhmetov/mui-9-qa-followups branch October 29, 2026 14:43
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.

2 participants