fix(hub-ui): show the built-in Settings dock by default - #198
Merged
Conversation
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.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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~settingsdock server-side. Because@devframes/hubis deliberately headless, viewers that mount hub-ui viacreateUi()without registering~settings(e.g.examples/hub-vite-minimal) showed no Settings tab, anddevframes:open-settingswas a no-op there.Change
hub-ui, as the reference viewer, now owns its own
~settings~builtindock:BUILTIN_ENTRY_SETTINGS(ph:gear-duotone, category~builtinso it sorts last) to the viewer's built-in entries.entriescomputed 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-settingsin 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.createDocksContextthrough the story mock RPC: with zero server docks the Settings tab appears in the grouped dock bar andswitchEntry('~settings')selects it; with a host-registered~settingsexactly one entry remains (the server one).This PR was created with the help of an agent.