Skip to content

feat(core): treat a grouped dock entry's category as an in-group sub-category#462

Merged
antfu merged 4 commits into
mainfrom
chubby-signs-laugh
Jul 23, 2026
Merged

feat(core): treat a grouped dock entry's category as an in-group sub-category#462
antfu merged 4 commits into
mainfrom
chubby-signs-laugh

Conversation

@antfubot

@antfubot antfubot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Clarifies and implements the dual role of a dock entry's category field: when an entry's groupId resolves to a registered group, the entry's outer dock-bar bucket is the group's own category, and the entry's own category becomes an in-group sub-category. A top-level (ungrouped) entry keeps category as its outer bucket, unchanged.

In-group sub-categories divide, ordered by the same category table as the outer bar:

  • the group popover and edge-mode sidebar (section dividers, mirroring the outer bar's category separators),
  • the dock settings reorder list — each sub-category is its own reorder container (grp:<id>:::<subcat>) with its own custom-order + reset, and shows a header when a group spans more than one sub-category,
  • the command palette — grouped members drill down by sub-category (single-sub-category groups stay flat).

Fallbacks: a group with no category sends its members to the default outer bucket; a member with no category falls into a default in-group sub-category; an orphan member (its groupId matches no registered group) falls back to its own category. The outer category-hide toggle is not applied inside a group.

Upstream + dependency

The companion @devframes/hub change (docstrings, hub's own groupByCategory consistency, and a reconciled, exported DEFAULT_CATEGORIES_ORDER) shipped in hub 0.7.10. This PR upgrades to it and makes the category-order table a single source of truth: kit re-exports DEFAULT_CATEGORIES_ORDER from @devframes/hub/constants and drops its local copy. The released table is a framework-first superset (adds ui/data/performance/docs).

The 0.7.10 upgrade also introduced a new client-side DocksEntriesContext API (register/update for client-only docks merged over the server docks). Core hand-rolls its reactive context, so it now keeps a client-dock registry and threads the merged entry list through selection, entry state, grouping, and the palette; kit re-exports DockRegistration.

Linked Issues

Depends on devframes/devframe#130 (released as @devframes/hub@0.7.10).

Additional context

pnpm lint && pnpm typecheck && pnpm test && pnpm build all pass (289 tests; +11 dock-group cases; export snapshots updated for the new kit exports).

This PR was created with the help of an agent.

…category

When a dock entry's groupId resolves to a registered group, its outer
dock-bar bucket is the group's own category and its own category becomes
an in-group sub-category. Sub-categories divide the group popover,
edge-mode sidebar, settings reorder list (own grp:<id>:::<subcat>
containers), and command-palette drill-down, ordered by the shared
category table. Orphan members (unregistered group) fall back to their
own category; unset members fall into a default sub-category.

Docs updated for the dual role of category; the stale skill-reference
category-order table is corrected and viteplus group-vs-category wording
clarified.
@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@462

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@462

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@462

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@462

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@462

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@462

commit: 66eb681

antfubot and others added 3 commits July 23, 2026 03:04
…S_ORDER

The dock category-order table now has a single source of truth upstream in
@devframes/hub (released in 0.7.10). Kit re-exports it from
@devframes/hub/constants and drops its local copy, so standalone hub viewers
and Vite DevTools order categories (and in-group sub-categories) identically.
The released table is a framework-first superset (adds ui/data/performance/docs).
Hub 0.7.10's DocksEntriesContext adds client-side register/update — docks
registered live in the page, merged over the server-provided devframe:docks
docks by id (client overrides server; client-only entries appended) and never
synced to shared state. Core hand-rolls its reactive context, so it now keeps a
client-dock registry and threads the merged entry list through selection, entry
state, grouping, and the command palette. Kit re-exports DockRegistration.
@antfu
antfu merged commit 17213ae into main Jul 23, 2026
8 checks passed
@antfu
antfu deleted the chubby-signs-laugh branch July 23, 2026 04:11
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