You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6d3b3c8
Browse filesBrowse the repository at this point in the historyBrowse files
Applies review feedback:
- `ctx.configs` (the `DevframeConfigsHost` with `contribute`/`resolve`) is
now `ctx.staticConfig` — a plain, non-reactive `Partial<DevframeConnectionConfigsRegistry>`
object mutated at setup time. Drops the host class and its test; the
instance shell serializes the object straight into `ConnectionMeta.configs`.
- The hub-wide dock-bar preferences (`categoryOrder` / `maxVisibleItems` /
`defaultMode` / `defaultPosition`) move off the per-entry `DevframeDockDefaults`
into a dedicated `DevframeDockPreferences` type, declared on the new
`DevframeDefinition.dockPreferences`. `installDevframe` aggregates it into
`ctx.staticConfig.dock`; the hub's `configs.dock` registry key now points at
`DevframeDockPreferences` (the `DevframeDockConfig` alias is gone).
Built with the help of an agent.
`ctx.configs` builds up `ConnectionMeta.configs` — static, boot-time data delivered once through the connection handshake every client already performs, and never mutated again. Contrast it with `ctx.scope(id).settings`, which is mutable and synced bidirectionally over shared-state RPC for the life of the session.
136
+
`ctx.staticConfig` is this context's own `ConnectionMeta.configs` — static, boot-time data delivered once through the connection handshake every client already performs, and read-only from the browser. It's a plain, **non-reactive** object: write it during `setup(ctx)`, never during the session (it's serialized once, after setup). Contrast it with `ctx.scope(id).settings`, which is mutable and synced bidirectionally over shared-state RPC for the life of the session.
`updater` receives whatever's been contributed to that key so far (or `undefined` on the first contribution), so multiple contributors sharing a key — a hub aggregating each installed devframe's own preference, for example — own their own merge semantics (overwrite, shallow-merge a record, …) rather than the host imposing one.
/** Id of the dock group this entry collapses under, if any. */
264
264
groupId?: string
265
-
// TODO: `categoryOrder` / `maxVisibleItems` / `defaultMode` / `defaultPosition` are not per-entry attributes, but global hub-wide preferences. They should be moved to a separate `DevframeDockPreferences` type and surfaced in the connection meta, not on the entry itself.
265
+
}
266
+
267
+
/**
268
+
* A devframe's opinion about the **hub-wide** dock bar — not attributes of
269
+
* its own synthesized entry, but preferences the hub aggregates across every
270
+
* installed devframe and publishes once via `ConnectionMeta.configs.dock`.
271
+
* Declared on {@link DevframeDefinition.dockPreferences}. Standalone adapters
272
+
* (`cli` / `spa` / `build`) ignore this entirely.
273
+
*/
274
+
exportinterfaceDevframeDockPreferences{
266
275
/**
267
-
* This devframe's opinion about the top-level dock-bar **category**
268
-
* ordering, hub-wide — not an attribute of this entry itself. Every
269
-
* installed devframe's `categoryOrder` is shallow-merged into one
270
-
* aggregate (last-installed wins per key), delivered once via
271
-
* `ConnectionMeta.configs.dock.categoryOrder` and merged beneath
272
-
* `DEFAULT_CATEGORIES_ORDER`. A host page's own
276
+
* The top-level dock-bar **category** ordering. Every installed devframe's
277
+
* `categoryOrder` is shallow-merged into one aggregate (last-installed wins
278
+
* per key) and merged beneath `DEFAULT_CATEGORIES_ORDER`. A host page's own
273
279
* `createDevframeClientHost({ categoryOrder })` still overrides it.
274
280
*/
275
281
categoryOrder?: Record<string,number>
276
282
/**
277
-
* This devframe's preferred inline-item capacity for the floating dock
278
-
* bar before entries overflow — hub-wide, not an attribute of this entry.
279
-
* The last installed devframe declaring it wins; an explicit `layout`
280
-
* prop passed to the dock UI still overrides it. Edge mode ignores this
281
-
* by design — it shows every entry with no capacity cutoff.
283
+
* Preferred inline-item capacity for the floating dock bar before entries
284
+
* overflow. The last installed devframe declaring it wins; an explicit
285
+
* `layout` prop passed to the dock UI still overrides it. Edge mode ignores
286
+
* this by design — it shows every entry with no capacity cutoff.
282
287
*/
283
288
maxVisibleItems?: number
284
289
/**
285
-
* Seeds a first-run visitor's dock mode — hub-wide, not an attribute of
286
-
* this entry. Only applies when the visitor has no stored dock
287
-
* preference yet; never overwrites one who already moved their dock. The
288
-
* last installed devframe declaring it wins.
290
+
* Seeds a first-run visitor's dock mode. Only applies when the visitor has
291
+
* no stored dock preference yet; never overwrites one who already moved
292
+
* their dock. The last installed devframe declaring it wins.
0 commit comments