026fb1c67f6c42f339bf2af21c3ee37903953930 max Thu Sep 17 06:01:20 2026 -0700 Faceted composite: a trackDb "visibility hide" on a child must not pin it hidden #Preview2 week - bugs introduced now will need a build patch to fix tdbVisLimitedByAncestors() took any local "visibility" setting on a faceted composite's child as the user asking for that display mode, so a trackDb "visibility hide" clamped the child to hide for good: neither the _sel checkbox nor onlyVisibility could lift it, and nothing on the page said why. The MethBase2 hub at hgdownload.soe.ucsc.edu/hubs/methbase/v3 writes that line on all 26,028 of its subtracks, so picking samples in its faceted table wrote the right cart variables and then drew nothing. The native hg38 Methbase track has the line only on the composite, which is why it worked and the hub did not. Only a cart value now counts as a request to hide. A trackDb "visibility hide" falls back like no setting at all, since whether a faceted child shows is the checkbox's business. No faceted composite in trackDb relies on the old reading - they use visibility full/squish on children and hide only on the container. refs #34246 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 593ca22fca2..b02d6a8abce 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -10045,36 +10045,43 @@ enum trackVisibility vis = tdbLocalVisibility(cart,tdb,&subtrackOverride); // Children of a faceted composite are heterogeneous enough that one inherited vis won't // do, so they keep a display mode of their own and the parent's vis is only a ceiling. boolean facetedChild = (tdbIsContainerChild(tdb) && tdbIsFacetedComposite(tdb->parent)); char *onlyVis = (facetedChild ? trackDbLocalSetting(tdb, "onlyVisibility") : NULL); if (tdbIsContainerChild(tdb)) { if (facetedChild) { // A child of a faceted composite holds a display mode of its own rather than // inheriting the parent's. NOTE: tdb->visibility can't tell "asked for something" // from "inherited a default", since trackDbFieldsFromSettings() fills it through // the inheriting trackDbSetting() - hence trackDbLocalSetting here. + // A trackDb "visibility hide" is only a default though, and a generated hub + // trackDb can carry one on every subtrack; taking it for a request to hide left a + // checked subtrack undrawable with nothing on the page to say why. So only a cart + // value counts as the user asking for hide - trackDb hide falls back like no + // setting at all, since whether the child shows is the checkbox's business. + boolean askedToHide = (subtrackOverride && vis == tvHide); boolean hasOwnVis = (subtrackOverride - || trackDbLocalSetting(tdb, "visibility") != NULL); + || (trackDbLocalSetting(tdb, "visibility") != NULL + && vis != tvHide)); if (onlyVis != NULL) { // onlyVisibility pins the child to a single mode, but asking to hide still hides - if (!(hasOwnVis && vis == tvHide)) + if (!askedToHide) vis = tvFromVisOnlySetting(onlyVis); } else if (!hasOwnVis) vis = tvFull; // No mode of its own, so take whatever the parent allows } // subtracks without explicit (cart) vis but are selected, should get inherited vis else if (!subtrackOverride) vis = tvFull; // subtracks with checkbox that says no, are stopped cold if (checkBoxToo && !fourStateVisible(subtrackFourStateChecked(tdb,cart))) vis = tvHide; // Checkbox says no } if (facetedChild) { // Note this skips the subtrackOverride shortcut below on purpose: escaping the