Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions packages/core/src/node/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export async function createDevToolsContext(
mode,
host: createViteDevToolsHost({ viteConfig, viteServer, workspaceRoot }),
builtinRpcDeclarations,
// The terminals + messages panels are provided by the official
// `@devframes/plugin-terminals` / `@devframes/plugin-messages` devframes
// (mounted in `DevTools()`), so suppress the hub's built-in `~terminals` /
// `~messages` docks to avoid duplicates. The `~settings` built-in stays.
builtinDocks: { terminals: false, messages: false },
viteConfig,
viteServer,
})) as ViteDevToolsNodeContext
Expand All @@ -52,6 +47,19 @@ export async function createDevToolsContext(
// setup() hooks can reference DTK codes via `ctx.diagnostics.logger`.
context.diagnostics.register(diagnostics)

// The hub no longer synthesizes built-in docks — Vite DevTools, as the
// high-level integration, registers the viewer's native views it wants. The
// terminals + messages panels come from the official `@devframes/plugin-terminals`
// / `@devframes/plugin-messages` devframes (mounted in `DevTools()`), so only the
// Settings tab is registered here. A `~builtin` view defaults its category to
// `~builtin`, so this Settings tab sorts last on its own.
context.docks.register({
type: '~builtin',
id: '~settings',
title: 'Settings',
icon: 'ph:gear-duotone',
})

const rpcHost = context.rpc as RpcFunctionsHost

// Interactive OTP auth, provided by devframe's `createInteractiveAuth`
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/node/plugins/auto-hide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import type { KitNodeContext } from '@vitejs/devtools-kit/node'
/**
* Keep a dock entry out of the dock bar while its backing collection is empty.
*
* Mirrors the hub's built-in `~terminals` / `~messages` docks: attaches a live
* `when` getter to the registered entry that resolves to `'false'`
* Attaches a live `when` getter to the registered entry that resolves to `'false'`
* (unconditionally hidden) while `isEmpty()` and `undefined` (visible)
* otherwise. The hub already re-serializes the dock shared state on every
* terminal / message change, so the getter is re-read at exactly the right
Expand Down
11 changes: 5 additions & 6 deletions packages/core/src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ export async function DevTools(options: DevToolsOptions = {}): Promise<Plugin[]>
// Terminals, messages, and the inspector are first-party tooling, so they
// live in the `~builtin` dock category — alongside the built-in Settings
// dock — rather than the `~viteplus` group (which collects integrations
// like Rolldown). The hub's own `~terminals` / `~messages` docks are
// suppressed via `builtinDocks` in `createDevToolsContext`.
// like Rolldown). The hub synthesizes no docks of its own; these
// plugin-mounted iframe docks are the terminals / messages tabs.
//
// The hub's built-in `~messages` docks auto-hid themselves
// when empty; the plugin-mounted iframe docks that replaced them carry no
// such rule, so we restore it here — the dock is filtered out of the bar
// (`when: 'false'`) whenever there are no sessions / messages.
// An empty messages feed should hide its tab, so we attach that rule here —
// the dock is filtered out of the bar (`when: 'false'`) whenever there are
// no messages.
const terminalsDevframe = createTerminalsDevframe()
const messagesDevframe = createMessagesDevframe()
const inspectDevframe = createInspectDevframe({ id: DEVTOOLS_INSPECTOR_DOCK_ID })
Expand Down
151 changes: 129 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ catalogs:
unrun: ^0.3.1
vite: ^8.1.4
deps:
'@devframes/hub': ^0.6.0
'@devframes/plugin-inspect': ^0.6.0
'@devframes/plugin-messages': ^0.6.0
'@devframes/plugin-terminals': ^0.6.0
'@devframes/hub': ^0.6.2
'@devframes/plugin-inspect': ^0.6.2
'@devframes/plugin-messages': ^0.6.2
'@devframes/plugin-terminals': ^0.6.2
'@rolldown/debug': ^1.1.5
actionspack: ^0.1.5
ansis: ^4.3.1
birpc: ^4.0.0
cac: ^7.0.0
devframe: ^0.6.0
devframe: ^0.6.2
diff: ^9.0.0
envinfo: ^7.21.0
get-port-please: ^3.2.0
Expand Down
Loading