diff --git a/examples/minimal-next-devframe-hub/src/client/devframe/minimal-next-devframe-hub.ts b/examples/minimal-next-devframe-hub/src/client/devframe/minimal-next-devframe-hub.ts index 8387a50..21285b3 100644 --- a/examples/minimal-next-devframe-hub/src/client/devframe/minimal-next-devframe-hub.ts +++ b/examples/minimal-next-devframe-hub/src/client/devframe/minimal-next-devframe-hub.ts @@ -205,13 +205,14 @@ export async function minimalNextDevframeHub( }) // The hub no longer synthesizes built-in docks — a high-level integration - // registers the viewer's native views it wants. `~builtin` views default - // their category to `~builtin`, so this Settings tab sorts last on its own. + // registers the viewer's native views it wants, declaring the `~builtin` + // category itself so this Settings tab groups and sorts last. context.docks.register({ type: '~builtin', id: '~settings', title: 'Settings', icon: 'ph:gear-duotone', + category: '~builtin', }) // Demo devframes alongside the dogfooded built-in plugin packages. diff --git a/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts b/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts index 7d68275..3e5734c 100644 --- a/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts +++ b/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts @@ -35,7 +35,7 @@ describe('minimal-next-devframe-hub (example)', () => { const dockIds = docks.map(d => d.id) expect(dockIds).toContain('next-demo-tool') // The hub synthesizes no built-in docks; the integration registers the - // settings tab itself, and `~builtin` views default to the `~builtin` category. + // settings tab itself, declaring the `~builtin` category explicitly. expect(dockIds).toContain('~settings') expect(docks.find(d => d.id === '~settings')?.category).toBe('~builtin') // The dogfooded built-in plugin packages mount their own docks. diff --git a/packages/hub/src/node/__tests__/host-docks.test.ts b/packages/hub/src/node/__tests__/host-docks.test.ts index da86135..b52eee7 100644 --- a/packages/hub/src/node/__tests__/host-docks.test.ts +++ b/packages/hub/src/node/__tests__/host-docks.test.ts @@ -190,13 +190,13 @@ describe('devframeDockHost grouping', () => { }) }) -describe('devframeDockHost ~builtin category default', () => { +describe('devframeDockHost ~builtin category', () => { it('returns no docks until an integration registers one', () => { const host = new DevframeDocksHost(createContext()) expect(host.values()).toEqual([]) }) - it('defaults a ~builtin view without a category to the ~builtin category', () => { + it('preserves a ~builtin view without a category untouched', () => { const host = new DevframeDocksHost(createContext()) host.register({ type: '~builtin', @@ -206,7 +206,8 @@ describe('devframeDockHost ~builtin category default', () => { }) const entry = host.values()[0] - expect(entry).toMatchObject({ id: '~settings', type: '~builtin', category: '~builtin' }) + expect(entry).toMatchObject({ id: '~settings', type: '~builtin' }) + expect(entry.category).toBeUndefined() }) it('preserves an explicit category on a ~builtin view', () => { diff --git a/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.d.ts index 0aec95c..fd949f3 100644 --- a/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.d.ts @@ -36,7 +36,6 @@ export declare class DevframeDocksHost implements DevframeDocksHost$1 { update: (_: Partial) => void; }; update(_: DevframeDockUserEntry): void; - private withBuiltinCategory; private validateGroupMembership; private prepareRemoteRegistration; } diff --git a/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.js b/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.js index 1de7d77..ce61db3 100644 --- a/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.js +++ b/tests/__snapshots__/tsnapi/@devframes/hub/node.snapshot.js @@ -27,7 +27,6 @@ export class DevframeDocksHost { resolveDevServerOrigin() {} register(_, _) {} update(_) {} - withBuiltinCategory(_) {} validateGroupMembership(_) {} prepareRemoteRegistration(_) {} }