Skip to content

feat: upgrade to devframe v0.9.0-beta.1 and adopt @devframes/hub-ui client - #529

Open
antfubot wants to merge 4 commits into
mainfrom
deps/devframe-0.9.0-beta.1
Open

feat: upgrade to devframe v0.9.0-beta.1 and adopt @devframes/hub-ui client#529
antfubot wants to merge 4 commits into
mainfrom
deps/devframe-0.9.0-beta.1

Conversation

@antfubot

@antfubot antfubot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Two related changes on the devframe 0.9 line.

1. Upgrade devframe (+ all @devframes/*) to v0.9.0-beta.1 — migrates to the trimmed 0.9 public API per the 0.9 migration guide:

  • kit: mountDevframe(ctx, d, opts)ctx.install(d, opts); dropped the removed mountDevframe re-export; simplified KitNodeContext.
  • oxc: defineDevframe from the devframe root; core: collectStaticRpcDump from devframe/rpc/dump, normalizeHttpServerUrl from devframe/internal, inlined the removed isObject.
  • Transitive 0.9 fallout: WS transport now hands a DevframeRpcConnection (was a crossws Peer); DockRenderersContext.mount returns a DockRendererMountResult union; bumped the birpc catalog to ^4.1.0.

2. Replace the hand-rolled web-components client with @devframes/hub-ui, branded as Vite DevTools — re-platforms core's serving onto the hub's initHub({ ui }) path:

  • The kit context is handed to initHub in "bring your own context" mode; the hub owns the RPC connection meta, the shared WebSocket transport, and the branded ui slot under /__devtools/. This retires the bespoke WS server, the passive-mode server flag, and the local static serving.
  • Branding via createUi({ branding }): product name Vite DevTools, primary color #6b84fd, and a self-contained "V+" mark inlined as a data: URI logo/favicon so it renders in the injected dock, the standalone viewer, and static builds.
  • Injection collapses to a single external module script at <base>embedded.js; the static build bakes the hub-ui viewer + embedded bootstrap + branding.json into the snapshot.
  • Removed the local client sources, the standalone Vite build, the client tsdown entries + shadow-DOM CSS pipeline, and the ./client/* subpath exports (~15.6k lines).

Public API snapshots (tsnapi) updated for the intentional breaking removals.

Linked Issues

Additional context

pnpm lint && pnpm test && pnpm typecheck && pnpm build all pass. Live in-browser UI parity against the reference viewer (dock types, the ~settings view, command palette) is worth a follow-up validation pass, since the reference UI renders ~builtin reserved-id views itself.

This PR was created with the help of an agent.

Migrate to devframe 0.9 following the upstream migration guide: drop the
removed compatibility shims and adopt the slimmed public API surface across
kit and core.
@pkg-pr-new

pkg-pr-new Bot commented Aug 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

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

@vitejs/devtools-kit

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

@vitejs/devtools-oxc

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

@vitejs/devtools-rolldown

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

@vitejs/devtools-vite

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

@vitejs/devtools-vitest

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

commit: fc7fdc7

…evTools

Replace the hand-rolled web-components client (the injected overlay dock, the
standalone SPA, and the bespoke shadow-DOM UnoCSS pipeline) with the reference
hub viewer from @devframes/hub-ui, re-platforming core's serving onto the
hub's initHub({ ui }) path.

- Re-platform serving onto initHub: the DevTools context is handed to
  initHub({ base, context, ui, auth, server/ws }) as a "bring your own
  context" hub, which owns the RPC connection meta, the shared WebSocket
  transport, and the branded ui slot under /__devtools/. This retires the
  bespoke WS server (ws.ts), the passive-mode server flag, and the local
  static serving.
- Brand the reference UI as Vite DevTools via createUi({ branding }): product
  name, primary color (#6b84fd), and a self-contained "V+" mark shipped as a
  data-URI logo/favicon so it renders in the injected dock, the standalone
  viewer, and static builds alike.
- Injection is now a single external module script pointing at the
  hub-served <base>embedded.js; the static build bakes the hub-ui viewer,
  embedded bootstrap, and branding.json into the snapshot.
- Remove the local client sources, the standalone Vite build, the client
  tsdown entries + CSS build, and the client subpath exports.

Live in-browser UI parity (dock types, settings view, command palette) should
be validated against the reference viewer as a follow-up.
@antfubot antfubot changed the title deps: upgrade devframe to v0.9.0-beta.1 feat: upgrade to devframe v0.9.0-beta.1 and adopt @devframes/hub-ui client Aug 13, 2026
… for static builds

- playgrounds/core: remove the local build-css HMR plugin and its import; the
  client is now the prebuilt @devframes/hub-ui, so there is no shadow-DOM CSS
  to rebuild (fixes the dev-server config load error).
- build-static: seed an empty `devframe:dock-renderers` shared state before
  collecting the RPC dump so the hub-ui client's boot-time manifest read has a
  static dump match instead of erroring. Verified by the e2e static-build suite.
… runtime injection

- branding: use the official Vite+ brand assets (icon + wordmark, light/dark)
  from voidzero-dev/community-design-resources for the hub-ui logo/wordmark/
  favicon, replacing the hand-drawn placeholder mark.
- injection: load `<base>embedded.js` via an inline module that creates the
  script element at runtime instead of a static `<script type=module src>`.
  A static root-relative module src makes Vite pre-transform the hub-served
  bootstrap through its own pipeline (logging "Failed to load url
  /__devtools/embedded.js"); depending on the Vite version it can shadow the
  real module, breaking the client's `import.meta.url`-relative branding.json
  fetch so the dock falls back to devframe's default accent instead of the
  Vite DevTools primary color. Runtime injection keeps embedded.js out of
  Vite's module graph, so branding resolves correctly.

The hub-ui branding mechanism itself is correct (primaryColor feeds
`--devframe-primary` and the derived ramp), so no upstream change is needed.
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.

1 participant