-
- No tools in this group yet
-
-
-
+
+
-
-
-
+
+
+
{{ getCategoryLabel(subcategory) }}
+
+
+
+
-
-
-
-
-
- {{ member.title }}
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ member.title }}
+
+
-
-
+
+
+
+
+
+
+
+
+
diff --git a/packages/core/src/client/webcomponents/state/__tests__/dock-groups.test.ts b/packages/core/src/client/webcomponents/state/__tests__/dock-groups.test.ts
index 211700909..db958b714 100644
--- a/packages/core/src/client/webcomponents/state/__tests__/dock-groups.test.ts
+++ b/packages/core/src/client/webcomponents/state/__tests__/dock-groups.test.ts
@@ -3,8 +3,10 @@ import { DEFAULT_STATE_USER_SETTINGS, DEVTOOLS_INSPECTOR_DOCK_ID } from '@vitejs
import { describe, expect, it } from 'vitest'
import {
docksGroupByCategories,
+ getCategoryLabel,
getEntryGroup,
getGroupMembers,
+ getGroupMembersGrouped,
getRegisteredGroupIds,
resolveCommandIcon,
} from '../dock-settings'
@@ -92,6 +94,98 @@ describe('dock groups', () => {
})
})
+describe('in-group sub-categories (dual role of `category`)', () => {
+ // The group carries category 'framework' (the OUTER bucket for the whole
+ // group); its members carry their own categories, which act as IN-GROUP
+ // sub-categories. An orphan (groupId → no registered group) keeps its own
+ // category as the outer bucket.
+ const entries: DevToolsDockEntry[] = [
+ group('nuxt', { category: 'framework' }),
+ iframe('nuxt:overview', { groupId: 'nuxt', category: 'app', defaultOrder: 1 }),
+ iframe('nuxt:pages', { groupId: 'nuxt', category: 'app', defaultOrder: 0 }),
+ iframe('nuxt:graph', { groupId: 'nuxt', category: 'advanced' }),
+ iframe('orphan', { groupId: 'ghost', category: 'web' }),
+ ]
+
+ function categoryOf(grouped: ReturnType