Skip to content

Commit 197c02b

Browse files
committed
Merge origin/main into fancy-bobcats-ring
Resolve pnpm-lock.yaml by taking main's lock (incl. the devframe 0.6.2 bump from #411) and re-running pnpm install to reconcile the kit/core dependency changes. context.ts and plugins/index.ts auto-merged cleanly, keeping both the integration-owned built-in docks (#411) and the install-launcher shell. Exclude the standalone production playground (#413) from the repo-wide ESLint run: it is its own workspace mirroring a real user install, so it intentionally uses plain dependency specifiers rather than the repo catalog.
2 parents d6d57ed + 22e9047 commit 197c02b

23 files changed

Lines changed: 533 additions & 593 deletions

eslint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ export default antfu({
99
'plans',
1010
'e2e/fixtures/**/dist',
1111
'e2e/fixtures/**/.vite-devtools',
12+
// The production playground is a standalone workspace (its own
13+
// `pnpm-workspace.yaml`) that mirrors a real user install, so it uses plain
14+
// dependency specifiers rather than the repo catalog and stays out of the
15+
// repo-wide ESLint run.
16+
'playgrounds/production',
1217
// `packages/oxc` (donated from yuyinws/oxc-inspector) carries its own
1318
// oxlint/oxfmt style and is linted by its own toolchain, so it stays out of
1419
// the repo-wide ESLint run.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@json-render/vue": "catalog:frontend",
5252
"@nuxt/devtools": "catalog:devtools",
5353
"@nuxt/eslint": "catalog:devtools",
54+
"@nuxt/icon": "catalog:build",
5455
"@types/chrome": "catalog:types",
5556
"@types/connect": "catalog:types",
5657
"@types/d3": "catalog:types",

packages/core/src/node/context.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ export async function createDevToolsContext(
4040
mode,
4141
host: createViteDevToolsHost({ viteConfig, viteServer, workspaceRoot }),
4242
builtinRpcDeclarations,
43-
// The terminals + messages panels are provided by the official
44-
// `@devframes/plugin-terminals` / `@devframes/plugin-messages` devframes
45-
// (mounted in `DevTools()`), so suppress the hub's built-in `~terminals` /
46-
// `~messages` docks to avoid duplicates. The `~settings` built-in stays.
47-
builtinDocks: { terminals: false, messages: false },
4843
viteConfig,
4944
viteServer,
5045
})) as ViteDevToolsNodeContext
@@ -53,6 +48,19 @@ export async function createDevToolsContext(
5348
// setup() hooks can reference DTK codes via `ctx.diagnostics.logger`.
5449
context.diagnostics.register(diagnostics)
5550

51+
// The hub no longer synthesizes built-in docks — Vite DevTools, as the
52+
// high-level integration, registers the viewer's native views it wants. The
53+
// terminals + messages panels come from the official `@devframes/plugin-terminals`
54+
// / `@devframes/plugin-messages` devframes (mounted in `DevTools()`), so only the
55+
// Settings tab is registered here. A `~builtin` view defaults its category to
56+
// `~builtin`, so this Settings tab sorts last on its own.
57+
context.docks.register({
58+
type: '~builtin',
59+
id: '~settings',
60+
title: 'Settings',
61+
icon: 'ph:gear-duotone',
62+
})
63+
5664
const rpcHost = context.rpc as RpcFunctionsHost
5765

5866
// Interactive OTP auth, provided by devframe's `createInteractiveAuth`

packages/core/src/node/plugins/auto-hide.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import type { KitNodeContext } from '@vitejs/devtools-kit/node'
33
/**
44
* Keep a dock entry out of the dock bar while its backing collection is empty.
55
*
6-
* Mirrors the hub's built-in `~terminals` / `~messages` docks: attaches a live
7-
* `when` getter to the registered entry that resolves to `'false'`
6+
* Attaches a live `when` getter to the registered entry that resolves to `'false'`
87
* (unconditionally hidden) while `isEmpty()` and `undefined` (visible)
98
* otherwise. The hub already re-serializes the dock shared state on every
109
* terminal / message change, so the getter is re-read at exactly the right

packages/core/src/node/plugins/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ export async function DevTools(options: DevToolsOptions = {}): Promise<Plugin[]>
158158
// Terminals, messages, and the inspector are first-party tooling, so they
159159
// live in the `~builtin` dock category — alongside the built-in Settings
160160
// dock — rather than the `~viteplus` group (which collects integrations
161-
// like Rolldown). The hub's own `~terminals` / `~messages` docks are
162-
// suppressed via `builtinDocks` in `createDevToolsContext`.
161+
// like Rolldown). The hub synthesizes no docks of its own; these
162+
// plugin-mounted iframe docks are the terminals / messages tabs.
163163
//
164-
// The hub's built-in `~messages` docks auto-hid themselves
165-
// when empty; the plugin-mounted iframe docks that replaced them carry no
166-
// such rule, so we restore it here — the dock is filtered out of the bar
167-
// (`when: 'false'`) whenever there are no sessions / messages.
164+
// An empty messages feed should hide its tab, so we attach that rule here —
165+
// the dock is filtered out of the bar (`when: 'false'`) whenever there are
166+
// no messages.
168167
const terminalsDevframe = createTerminalsDevframe()
169168
const messagesDevframe = createMessagesDevframe()
170169
const inspectDevframe = createInspectDevframe({ id: DEVTOOLS_INSPECTOR_DOCK_ID })

packages/oxc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"devtools-oxc": "./bin/devtools-oxc.mjs"
3030
},
3131
"files": [
32+
"bin",
3233
"dist"
3334
],
3435
"scripts": {

packages/rolldown/src/app/pages/index.vue

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
<script setup lang="ts">
22
import type { BuildInfo } from '~~/node/rolldown/logs-manager'
3+
import DisplayIconButton from '@vitejs/devtools-ui/components/DisplayIconButton.vue'
4+
import { useClipboard } from '@vueuse/core'
35
import { computed, ref } from 'vue'
46
import { useRpc } from '#imports'
57
8+
const ENABLE_DEVTOOLS_SNIPPET = `export default defineConfig({
9+
build: {
10+
rolldownOptions: {
11+
devtools: {}
12+
}
13+
}
14+
})`
15+
16+
const { copy, copied } = useClipboard({ source: ENABLE_DEVTOOLS_SNIPPET })
17+
618
const sessionMode = ref<'list' | 'compare'>('list')
719
820
const modeList = [
@@ -50,9 +62,26 @@ function selectSession(session: BuildInfo) {
5062
<p v-if="sessions.length" op50>
5163
{{ sessionMode === 'list' ? 'Select a build session to get started:' : 'Select 2 build sessions to compare:' }}
5264
</p>
53-
<p v-else op50>
54-
No sessions yet, run a build to get started.
55-
</p>
65+
<div v-else flex="~ col gap-3" items-center max-w-140>
66+
<p m0 op50 text-center>
67+
No sessions yet.
68+
<br>
69+
Enable devtools output in your Rolldown config, then run a build:
70+
</p>
71+
<div relative w-full>
72+
<pre m0 p3 pr10 rounded-lg border="~ base" bg-code font-mono text-sm of-auto text-left><code>{{ ENABLE_DEVTOOLS_SNIPPET }}</code></pre>
73+
<DisplayIconButton
74+
absolute top2 right2
75+
title="Copy snippet"
76+
class-icon="i-ph-copy-duotone"
77+
:active="copied"
78+
@click="copy()"
79+
/>
80+
</div>
81+
<p m0 op40 text-sm text-center>
82+
See <a href="https://github.com/vitejs/devtools/blob/main/docs/errors/RDDT0001.md" target="_blank" rel="noopener" hover="op100 underline">RDDT0001</a> for details.
83+
</p>
84+
</div>
5685
<div relative flex="~ col gap3 items-center">
5786
<PanelSessionSelector
5887
:session-mode="sessionMode"

packages/rolldown/src/uno.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
webFonts: {
2828
processors: createLocalFontProcessor({
2929
fontAssetsDir: fileURLToPath(new URL('./public/fonts', import.meta.url)),
30-
fontServeBaseUrl: './fonts',
30+
fontServeBaseUrl: '../fonts',
3131
}),
3232
},
3333
}),

packages/vite/src/uno.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default defineConfig({
88
presetDevToolsUI({
99
webFonts: {
1010
processors: createLocalFontProcessor({
11-
fontAssetsDir: fileURLToPath(new URL('./app/public/fonts', import.meta.url)),
12-
fontServeBaseUrl: './fonts',
11+
fontAssetsDir: fileURLToPath(new URL('./public/fonts', import.meta.url)),
12+
fontServeBaseUrl: '../fonts',
1313
}),
1414
},
1515
}),

playgrounds/production/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
.tarballs
4+
pnpm-lock.yaml
5+
*.local

0 commit comments

Comments
 (0)