diff --git a/services/web-ui/public/screens-library.jsx b/services/web-ui/public/screens-library.jsx index 81b445f..d56737c 100644 --- a/services/web-ui/public/screens-library.jsx +++ b/services/web-ui/public/screens-library.jsx @@ -17,6 +17,8 @@ function Library({ navigate, onOpenAsset, openProject, onClearProject }) { var normalized = (list || []).map(function(b) { return { ...b, count: b.asset_count != null ? b.asset_count : (b.count || 0), icon: b.type || 'grid' }; }); if (!openProject) window.ZAMPP_DATA.BINS = normalized; setBins(normalized); + // Auto-expand all bins so nested children are always visible + setExpandedBins(function(prev) { var s = new Set(prev); normalized.forEach(function(b){ s.add(b.id); }); return s; }); }) .catch(function() {}); }, [openProject]); @@ -29,7 +31,8 @@ function Library({ navigate, onOpenAsset, openProject, onClearProject }) { }, [refreshBins]); const [creatingChildOf, setCreatingChildOf] = React.useState(null); - const [expandedBins, setExpandedBins] = React.useState(new Set()); + // Start with all bins expanded so nested children are visible immediately + const [expandedBins, setExpandedBins] = React.useState(() => new Set((window.ZAMPP_DATA?.BINS||[]).map(b=>b.id))); const createBin = () => { if (!openProject) { window.alert('Open a project first (Projects → click a project), then create a bin inside it.'); return; }