Repository navigation
Conversation
|
@0froq is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "689ba5105f42a37427322762e84dee8c71af6afa",
"result": {
"overallSummary": "Adds `createUi({ settingsDefaults })`, letting a host project seed per-visitor panel settings (unbound shortcuts, dock order, recent-dock limit, etc.) via `ConnectionMeta.configs.ui.settingsDefaults`. The seed is resolved as a layer between hub-ui's built-in defaults and the visitor's stored settings, so a developer's own change always wins and a reset returns to the project default instead of the built-in one; dock-order and command-binding logic, plus the Settings UI, are updated to read and compare against this seeded layer.",
"groups": [
{
"key": "settings-seed-core",
"label": "Seed settings from connection meta",
"summary": "`createUi({ settingsDefaults })` publishes a partial `DevframeDocksUserSettings` on `ConnectionMeta.configs.ui.settingsDefaults`. `resolveUserSettings()` stacks it between hub-ui's built-in defaults and the visitor's stored value (merging `commandShortcuts`/`docksCustomOrder` per key instead of replacing the whole map), and the commands context and dock-order helpers read the seed so a project default can be overridden per-developer and a reset returns to the project default rather than the built-in one.",
"category": "core",
"filePaths": [
"packages/hub-ui/src/index.ts",
"packages/hub-ui/src/types.ts",
"packages/hub-ui/src/client/types.ts",
"packages/hub-ui/src/client/state/settings-defaults.ts",
"packages/hub-ui/src/client/state/context.ts",
"packages/hub-ui/src/client/state/commands.ts",
"packages/hub-ui/src/client/state/dock-settings.ts"
],
"fileNotes": [
{
"path": "packages/hub-ui/src/client/state/settings-defaults.ts",
"text": "`resolveUserSettings` is the single place the three layers (built-in, host seed, stored) stack; `docksCustomOrder` merges per key on purpose so one reordered dock doesn't drop every other seeded order.",
"critical": true
},
{
"path": "packages/hub-ui/src/client/state/context.ts",
"text": "`settings` now resolves the seed before exposing it, instead of exposing the raw stored value; writes still go to the raw `settingsStore`.",
"critical": true
},
{
"path": "packages/hub-ui/src/client/state/dock-settings.ts",
"text": "`resolveGroupMemberMove` takes a `fallbackCustomOrder` baseline now; comparing a move against the declared order instead of the seeded one would wrongly delete a move that happens to land back on the declared order."
},
{
"path": "packages/hub-ui/src/types.ts",
"text": "The `DevframeDocksUserSettings` module augmentation moved here from `client/types.ts` so the published node-entry types can reference these fields without pulling in the client graph (and its optional `@devframes/json-render` peer import)."
}
]
},
{
"key": "ui-components",
"label": "Dock and shortcuts UI updates",
"summary": "Wires the dock-order drag handling and the Settings pages to the host-seeded defaults, so a drag that lands back on the seeded order still gets written down and the Shortcuts page compares against the seed instead of the declared binding when deciding whether a shortcut reads as overridden.",
"category": "ui",
"filePaths": [
"packages/hub-ui/src/client/components/dock/DockGroupSidebar.vue",
"packages/hub-ui/src/client/components/views-builtin/SettingsDocks.vue",
"packages/hub-ui/src/client/components/views-builtin/SettingsShortcuts.vue"
],
"fileNotes": [
{
"path": "packages/hub-ui/src/client/components/views-builtin/SettingsShortcuts.vue",
"text": "`getDefaultKeybindings` now prefers the host's seeded shortcut over the command's declared one, which is what the reset/clear button puts back."
}
]
},
{
"key": "tests",
"label": "Tests and snapshot",
"summary": "New and updated coverage for the seeding behaviour (host default under stored value, per-key merge, visitor override wins, command binding resolution) plus a regression test guarding that the published node-entry declaration file never side-effect-imports the client graph's optional peer.",
"category": "tests",
"filePaths": [
"packages/hub-ui/src/client/state/settings-defaults.test.ts",
"packages/hub-ui/src/client/state/commands.test.ts",
"packages/hub-ui/src/client/state/dock-settings.test.ts",
"packages/hub-ui/src/index.test.ts",
"tests/published-declarations.test.ts",
"tests/__snapshots__/tsnapi/@devframes/hub-ui/index.snapshot.d.ts"
],
"fileNotes": [
{
"path": "tests/published-declarations.test.ts",
"text": "Guards against TS2882 for consumers without the optional `@devframes/json-render` peer, which is why `settingsDefaults` typing was moved to `src/types.ts` in the core group."
}
]
},
{
"key": "docs",
"label": "Document settingsDefaults option",
"summary": "Documents the new `settingsDefaults` option on `createUi()`, including the per-key merge behaviour and which settings stay visitor-owned.",
"category": "docs",
"filePaths": [
"docs/content/1.guide/18.hub-initiate.md"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-23T04:55:00.863Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
`createUi({ settingsDefaults })` publishes a partial
`DevframeDocksUserSettings` as `ConnectionMeta.configs.ui.settingsDefaults`,
resolved below the visitor's stored value and above the built-in defaults.
It lets a host put panel defaults in its own config file, such as leaving
`Mod+K` unbound for a project.
Records stack per key so a seeded shortcut or dock order survives one the
visitor changed, and the shortcut settings page compares against the seed
rather than the declared binding so a seeded shortcut does not read as
overridden. The three dock lists stay visitor-owned: the stored list is
always present, so a seeded one could never be undone from Settings.
0froq
force-pushed
the
feat/hub-ui-settings-defaults
branch
from
November 21, 2026 21:03
b6240c1 to
eb7b2e6
Compare
SaKaNa-Y
reviewed
Nov 22, 2026
A reorder was compared against the declared order, so a move that landed there was deleted and the host seed put the dock back. Compare against the order the container falls back to instead, which includes the seed.
SaKaNa-Y
reviewed
Nov 23, 2026
`createUi()`'s options named the settings seed through a client module, so the node entry's declaration rollup imported the client graph and with it the optional `@devframes/json-render` peer, which fails a consumer's typecheck with TS2882. The settings type and the field augmentation behind it now live in `src/types.ts`, so neither is reachable from the node entry.
SaKaNa-Y
approved these changes
Nov 23, 2026
This branch has not been deployed
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.
Related to vitejs/devtools#532
Description
Panel settings are per-visitor state in
devframe:user-settings, so a project has no way to say "leaveMod+Kunbound here" or "order the dock bar this way". Every developer sets it by hand, and a workspace on a fresh port starts over.createUi({ settingsDefaults })now takes a partialDevframeDocksUserSettingsand publishes it asConnectionMeta.configs.ui.settingsDefaults.resolveUserSettings()stacks it between the built-in defaults and the stored value, so a setting someone changed in Settings still wins, and a reset returns to the project default instead of the built-in one. The commands context reads the seed per command id ingetKeybindings(), which is what lets a command start unbound while a developer who binds it themselves still wins. The Shortcuts page compares against the seed, so a seeded shortcut does not read as overridden.commandShortcutsanddocksCustomOrderstack per key. A flat spread would drop every other seeded entry as soon as one of them was overridden.docksHidden,docksCategoriesHiddenanddocksPinnedstay out of the seed type: the stored list is always present, so a seeded list could never be undone from Settings.The plugin-level option follows in vitejs/devtools#647 once a release carries this one.
Test
New and changed tests, all under
packages/hub-ui:src/client/state/settings-defaults.test.ts: the host default applies under the stored value, including per-key dock order; the visitor's own value wins; the built-in defaults remain when nothing is seeded.src/client/state/commands.test.ts: a seeded binding applies when the visitor has no override; a visitor override wins, including an empty array that unbinds; the declared binding applies when nothing is seeded.src/index.test.ts:createUipublishessettingsDefaults, and omits the field when the host passes none.The first two fail on
main, where the seed is ignored: