Skip to content

fix(hub-ui): show the built-in Settings dock by default - #198

Merged
antfu merged 1 commit into
mainfrom
fix/hub-ui-settings-dock-default-visible
Aug 13, 2026
Merged

fix(hub-ui): show the built-in Settings dock by default#198
antfu merged 1 commit into
mainfrom
fix/hub-ui-settings-dock-default-visible

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

The reference viewer (@devframes/hub-ui) already ships a full port of Vite DevTools' Settings view, but the Settings tab only appeared when a host happened to register the ~settings dock server-side. Because @devframes/hub is deliberately headless, viewers that mount hub-ui via createUi() without registering ~settings (e.g. examples/hub-vite-minimal) showed no Settings tab, and devframes:open-settings was a no-op there.

Change

hub-ui, as the reference viewer, now owns its own ~settings ~builtin dock:

  • Add BUILTIN_ENTRY_SETTINGS (ph:gear-duotone, category ~builtin so it sorts last) to the viewer's built-in entries.
  • The dock entries computed injects it only when the merged server + client dock list has no ~settings, so a host that registers its own Settings dock still wins the merge — no duplicate.

Settings is now visible in the dock bar and reachable via devframes:open-settings in every hub-ui consumer, without each host wiring it up.

Verification

  • tsc --noEmit, ESLint, and the full hub-ui build (incl. the standalone SPA) pass.
  • Exercised the real createDocksContext through the story mock RPC: with zero server docks the Settings tab appears in the grouped dock bar and switchEntry('~settings') selects it; with a host-registered ~settings exactly one entry remains (the server one).

This PR was created with the help of an agent.

The Settings view was ported but its dock entry only appeared when a host registered ~settings server-side. hub-ui, as the reference viewer, now owns the ~settings ~builtin dock and injects it into its entries when absent, so Settings is visible in the dock bar and reachable via devframes:open-settings in every consumer. A host that registers its own ~settings still wins the merge, so no duplicate appears.
@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit fafcfbe
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a7d72b2e0a7280008d3b0fd
😎 Deploy Preview https://deploy-preview-198--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 78470d2 into main Aug 13, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants