@@ -82,7 +82,6 @@ function getVersionTime(version: string): string | undefined {
8282// ─── Version groups ───────────────────────────────────────────────────────────
8383
8484const expandedGroups = ref (new Set <string >())
85- const loadingGroup = ref <string | null >(null )
8685
8786const versionGroups = computed (() => {
8887 const byKey = new Map <string , string []>()
@@ -101,21 +100,23 @@ const versionGroups = computed(() => {
101100 }))
102101})
103102
104- async function toggleGroup(groupKey : string ) {
103+ function toggleGroup(groupKey : string ) {
105104 if (expandedGroups .value .has (groupKey )) {
106105 expandedGroups .value .delete (groupKey )
107- return
106+ } else {
107+ expandedGroups .value .add (groupKey )
108108 }
109- expandedGroups .value .add (groupKey )
110- if (! fullVersionMap .value ) {
111- loadingGroup .value = groupKey
112- try {
109+ }
110+
111+ watch (
112+ versionSummary ,
113+ async summary => {
114+ if (summary ) {
113115 await ensureFullDataLoaded ()
114- } finally {
115- loadingGroup .value = null
116116 }
117- }
118- }
117+ },
118+ { immediate: true },
119+ )
119120
120121// ─── Version filter ───────────────────────────────────────────────────────────
121122
@@ -383,13 +384,7 @@ const flatItems = computed<FlatItem[]>(() => {
383384 <span class =" w-4 h-4 flex items-center justify-center text-fg-subtle shrink-0" >
384385 <Transition name =" icon-swap" mode =" out-in" >
385386 <span
386- v-if =" loadingGroup === item.groupKey"
387- key =" loading"
388- class =" i-svg-spinners:ring-resize w-3 h-3"
389- aria-hidden =" true"
390- />
391- <span
392- v-else-if =" isFilterActive"
387+ v-if =" isFilterActive"
393388 key =" search"
394389 class =" i-lucide:funnel w-3 h-3"
395390 aria-hidden =" true"
@@ -561,5 +556,4 @@ const flatItems = computed<FlatItem[]>(() => {
561556 opacity : 0 ;
562557 transform : scale (0.5 );
563558}
564-
565559 </style >
0 commit comments