@happyvertical/smrt-svelte 0.60.18 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/AGENTS.md +6 -0
  2. package/agents/components.md +15 -0
  3. package/agents/connect-ai.md +180 -0
  4. package/agents/cookbook-shell.md +173 -6
  5. package/agents/import-export.md +10 -0
  6. package/agents/screens.md +233 -12
  7. package/agents/settings.md +84 -0
  8. package/agents/testing.md +6 -0
  9. package/agents/workspace.md +64 -1
  10. package/dist/components/app/AppShell.svelte +220 -7
  11. package/dist/components/app/AppShell.svelte.d.ts +49 -3
  12. package/dist/components/app/AppShell.svelte.d.ts.map +1 -1
  13. package/dist/components/app/OwnerSetupForm.svelte +5 -3
  14. package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -1
  15. package/dist/components/app/PhoneTabBar.svelte +28 -1
  16. package/dist/components/app/PhoneTabBar.svelte.d.ts +10 -0
  17. package/dist/components/app/PhoneTabBar.svelte.d.ts.map +1 -1
  18. package/dist/components/app/ShellAccountMenu.svelte +46 -0
  19. package/dist/components/app/ShellAccountMenu.svelte.d.ts +13 -0
  20. package/dist/components/app/ShellAccountMenu.svelte.d.ts.map +1 -0
  21. package/dist/components/app/ShellSettingsPage.svelte +119 -4
  22. package/dist/components/app/ShellSettingsPage.svelte.d.ts +18 -0
  23. package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -1
  24. package/dist/components/app/index.d.ts +3 -2
  25. package/dist/components/app/index.d.ts.map +1 -1
  26. package/dist/components/app/index.js +1 -1
  27. package/dist/components/app/owner-setup-types.d.ts +1 -0
  28. package/dist/components/app/owner-setup-types.d.ts.map +1 -1
  29. package/dist/components/app/settings-menu-item.d.ts +8 -0
  30. package/dist/components/app/settings-menu-item.d.ts.map +1 -0
  31. package/dist/components/app/settings-menu-item.js +1 -0
  32. package/dist/components/app/slot-item.d.ts +53 -0
  33. package/dist/components/app/slot-item.d.ts.map +1 -1
  34. package/dist/components/audit/RecordHistory.svelte +30 -22
  35. package/dist/components/audit/RecordHistory.svelte.d.ts +31 -10
  36. package/dist/components/audit/RecordHistory.svelte.d.ts.map +1 -1
  37. package/dist/components/audit/index.d.ts +1 -1
  38. package/dist/components/audit/index.d.ts.map +1 -1
  39. package/dist/components/audit/types.d.ts +12 -6
  40. package/dist/components/audit/types.d.ts.map +1 -1
  41. package/dist/components/connect-ai/ConnectAi.svelte +584 -0
  42. package/dist/components/connect-ai/ConnectAi.svelte.d.ts +23 -0
  43. package/dist/components/connect-ai/ConnectAi.svelte.d.ts.map +1 -0
  44. package/dist/components/connect-ai/client.d.ts +68 -0
  45. package/dist/components/connect-ai/client.d.ts.map +1 -0
  46. package/dist/components/connect-ai/client.js +121 -0
  47. package/dist/components/connect-ai/index.d.ts +4 -0
  48. package/dist/components/connect-ai/index.d.ts.map +1 -0
  49. package/dist/components/connect-ai/index.js +2 -0
  50. package/dist/components/connect-ai/server.d.ts +33 -0
  51. package/dist/components/connect-ai/server.d.ts.map +1 -0
  52. package/dist/components/connect-ai/server.js +190 -0
  53. package/dist/components/connect-ai/types.d.ts +48 -0
  54. package/dist/components/connect-ai/types.d.ts.map +1 -0
  55. package/dist/components/connect-ai/types.js +1 -0
  56. package/dist/components/cookbook/CookbookApp.svelte +84 -5
  57. package/dist/components/cookbook/CookbookApp.svelte.d.ts +1 -1
  58. package/dist/components/cookbook/CookbookApp.svelte.d.ts.map +1 -1
  59. package/dist/components/cookbook/app-props.d.ts +65 -0
  60. package/dist/components/cookbook/app-props.d.ts.map +1 -0
  61. package/dist/components/cookbook/app-props.js +1 -0
  62. package/dist/components/cookbook/build.d.ts +3 -0
  63. package/dist/components/cookbook/build.d.ts.map +1 -1
  64. package/dist/components/cookbook/build.js +92 -8
  65. package/dist/components/cookbook/catalog.d.ts +2 -1
  66. package/dist/components/cookbook/catalog.d.ts.map +1 -1
  67. package/dist/components/cookbook/catalog.js +5 -2
  68. package/dist/components/cookbook/context.d.ts +6 -0
  69. package/dist/components/cookbook/context.d.ts.map +1 -1
  70. package/dist/components/cookbook/index.d.ts +2 -1
  71. package/dist/components/cookbook/index.d.ts.map +1 -1
  72. package/dist/components/cookbook/index.js +1 -1
  73. package/dist/components/cookbook/registry.d.ts +3 -0
  74. package/dist/components/cookbook/registry.d.ts.map +1 -1
  75. package/dist/components/cookbook/registry.js +5 -0
  76. package/dist/components/cookbook/server.d.ts +1 -0
  77. package/dist/components/cookbook/server.d.ts.map +1 -1
  78. package/dist/components/cookbook/surfaces.d.ts +14 -0
  79. package/dist/components/cookbook/surfaces.d.ts.map +1 -0
  80. package/dist/components/cookbook/surfaces.js +6 -0
  81. package/dist/components/cookbook/types.d.ts +0 -28
  82. package/dist/components/cookbook/types.d.ts.map +1 -1
  83. package/dist/components/import-export/ImportExport.svelte +21 -2
  84. package/dist/components/import-export/ImportExport.svelte.d.ts.map +1 -1
  85. package/dist/components/import-export/fields.d.ts +1 -0
  86. package/dist/components/import-export/fields.d.ts.map +1 -1
  87. package/dist/components/import-export/fields.js +8 -3
  88. package/dist/components/import-export/props.d.ts +5 -1
  89. package/dist/components/import-export/props.d.ts.map +1 -1
  90. package/dist/components/onboarding/FirstRunOnboarding.svelte +249 -0
  91. package/dist/components/onboarding/FirstRunOnboarding.svelte.d.ts +21 -0
  92. package/dist/components/onboarding/FirstRunOnboarding.svelte.d.ts.map +1 -0
  93. package/dist/components/onboarding/OnboardingAssistant.svelte +82 -0
  94. package/dist/components/onboarding/OnboardingAssistant.svelte.d.ts +19 -0
  95. package/dist/components/onboarding/OnboardingAssistant.svelte.d.ts.map +1 -0
  96. package/dist/components/onboarding/client.d.ts +7 -0
  97. package/dist/components/onboarding/client.d.ts.map +1 -0
  98. package/dist/components/onboarding/client.js +26 -0
  99. package/dist/components/onboarding/index.d.ts +5 -0
  100. package/dist/components/onboarding/index.d.ts.map +1 -0
  101. package/dist/components/onboarding/index.js +3 -0
  102. package/dist/components/onboarding/types.d.ts +38 -0
  103. package/dist/components/onboarding/types.d.ts.map +1 -0
  104. package/dist/components/onboarding/types.js +1 -0
  105. package/dist/components/overview/recipe-widgets.d.ts +2 -18
  106. package/dist/components/overview/recipe-widgets.d.ts.map +1 -1
  107. package/dist/components/overview/recipe-widgets.js +14 -14
  108. package/dist/components/screens/DetailScreen.svelte +40 -16
  109. package/dist/components/screens/DetailScreen.svelte.d.ts.map +1 -1
  110. package/dist/components/screens/EditForm.svelte +83 -18
  111. package/dist/components/screens/EditForm.svelte.d.ts.map +1 -1
  112. package/dist/components/screens/ListScreen.svelte +35 -9
  113. package/dist/components/screens/ListScreen.svelte.d.ts.map +1 -1
  114. package/dist/components/screens/RecipeScreens.svelte +78 -6
  115. package/dist/components/screens/RecipeScreens.svelte.d.ts +2 -1
  116. package/dist/components/screens/RecipeScreens.svelte.d.ts.map +1 -1
  117. package/dist/components/screens/RecordHeader.svelte +18 -4
  118. package/dist/components/screens/RecordHeader.svelte.d.ts +2 -1
  119. package/dist/components/screens/RecordHeader.svelte.d.ts.map +1 -1
  120. package/dist/components/screens/RecordScreen.svelte +22 -3
  121. package/dist/components/screens/RecordScreen.svelte.d.ts.map +1 -1
  122. package/dist/components/screens/ReferencePicker.svelte +103 -0
  123. package/dist/components/screens/ReferencePicker.svelte.d.ts +12 -0
  124. package/dist/components/screens/ReferencePicker.svelte.d.ts.map +1 -0
  125. package/dist/components/screens/fields.d.ts +6 -14
  126. package/dist/components/screens/fields.d.ts.map +1 -1
  127. package/dist/components/screens/fields.js +67 -10
  128. package/dist/components/screens/index.d.ts +3 -1
  129. package/dist/components/screens/index.d.ts.map +1 -1
  130. package/dist/components/screens/index.js +2 -0
  131. package/dist/components/screens/reference-labels.svelte.d.ts +11 -0
  132. package/dist/components/screens/reference-labels.svelte.d.ts.map +1 -0
  133. package/dist/components/screens/reference-labels.svelte.js +50 -0
  134. package/dist/components/screens/references.d.ts +6 -0
  135. package/dist/components/screens/references.d.ts.map +1 -0
  136. package/dist/components/screens/references.js +26 -0
  137. package/dist/components/screens/relations.d.ts +3 -1
  138. package/dist/components/screens/relations.d.ts.map +1 -1
  139. package/dist/components/screens/relations.js +4 -3
  140. package/dist/components/screens/roles.d.ts.map +1 -1
  141. package/dist/components/screens/roles.js +3 -2
  142. package/dist/components/screens/source.d.ts +37 -0
  143. package/dist/components/screens/source.d.ts.map +1 -0
  144. package/dist/components/screens/source.js +96 -0
  145. package/dist/components/screens/types.d.ts +63 -2
  146. package/dist/components/screens/types.d.ts.map +1 -1
  147. package/dist/components/screens/values.d.ts.map +1 -1
  148. package/dist/components/screens/values.js +5 -0
  149. package/dist/components/settings/OwnerApprovalsSettings.svelte +169 -0
  150. package/dist/components/settings/OwnerApprovalsSettings.svelte.d.ts +13 -0
  151. package/dist/components/settings/OwnerApprovalsSettings.svelte.d.ts.map +1 -0
  152. package/dist/components/settings/PrebuiltComponentsSettings.svelte +83 -0
  153. package/dist/components/settings/PrebuiltComponentsSettings.svelte.d.ts +14 -0
  154. package/dist/components/settings/PrebuiltComponentsSettings.svelte.d.ts.map +1 -0
  155. package/dist/components/settings/WorkProfileSettings.svelte +250 -0
  156. package/dist/components/settings/WorkProfileSettings.svelte.d.ts +22 -0
  157. package/dist/components/settings/WorkProfileSettings.svelte.d.ts.map +1 -0
  158. package/dist/components/settings/index.d.ts +3 -0
  159. package/dist/components/settings/index.d.ts.map +1 -1
  160. package/dist/components/settings/index.js +3 -0
  161. package/dist/components/workspace/admin-shell/AdminShell.svelte +186 -18
  162. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +26 -1
  163. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
  164. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +18 -3
  165. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts +6 -0
  166. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts.map +1 -1
  167. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +89 -5
  168. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts +7 -1
  169. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts.map +1 -1
  170. package/dist/components/workspace/admin-shell/layout.d.ts +4 -0
  171. package/dist/components/workspace/admin-shell/layout.d.ts.map +1 -1
  172. package/dist/components/workspace/admin-shell/layout.js +17 -4
  173. package/dist/components/workspace/admin-shell/settings-delta.d.ts.map +1 -1
  174. package/dist/components/workspace/admin-shell/settings-delta.js +4 -3
  175. package/dist/components/workspace/admin-shell/settings-sections.d.ts +10 -0
  176. package/dist/components/workspace/admin-shell/settings-sections.d.ts.map +1 -0
  177. package/dist/components/workspace/admin-shell/settings-sections.js +16 -0
  178. package/dist/components/workspace/admin-shell/settings.d.ts +7 -0
  179. package/dist/components/workspace/admin-shell/settings.d.ts.map +1 -1
  180. package/dist/components/workspace/admin-shell/settings.js +26 -0
  181. package/dist/components/workspace/admin-shell/shell-icons.d.ts +4 -0
  182. package/dist/components/workspace/admin-shell/shell-icons.d.ts.map +1 -1
  183. package/dist/components/workspace/admin-shell/shell-icons.js +4 -0
  184. package/dist/components/workspace/admin-shell/state.svelte.d.ts +13 -5
  185. package/dist/components/workspace/admin-shell/state.svelte.d.ts.map +1 -1
  186. package/dist/components/workspace/admin-shell/state.svelte.js +37 -2
  187. package/dist/components/workspace/admin-shell/types.d.ts +32 -1
  188. package/dist/components/workspace/admin-shell/types.d.ts.map +1 -1
  189. package/dist/components/workspace/index.d.ts +3 -2
  190. package/dist/components/workspace/index.d.ts.map +1 -1
  191. package/dist/components/workspace/index.js +2 -1
  192. package/dist/i18n/server.d.ts +2 -0
  193. package/dist/i18n/server.d.ts.map +1 -1
  194. package/dist/i18n/server.js +2 -0
  195. package/dist/i18n/strings.connect-ai.d.ts +57 -0
  196. package/dist/i18n/strings.connect-ai.d.ts.map +1 -0
  197. package/dist/i18n/strings.connect-ai.js +57 -0
  198. package/dist/i18n/strings.onboarding.d.ts +51 -0
  199. package/dist/i18n/strings.onboarding.d.ts.map +1 -0
  200. package/dist/i18n/strings.onboarding.js +51 -0
  201. package/dist/i18n/strings.screens.d.ts +12 -0
  202. package/dist/i18n/strings.screens.d.ts.map +1 -1
  203. package/dist/i18n/strings.screens.js +13 -1
  204. package/dist/i18n/strings.settings.d.ts +2 -0
  205. package/dist/i18n/strings.settings.d.ts.map +1 -1
  206. package/dist/i18n/strings.settings.js +2 -0
  207. package/dist/i18n/strings.workspace.d.ts +14 -0
  208. package/dist/i18n/strings.workspace.d.ts.map +1 -1
  209. package/dist/i18n/strings.workspace.js +15 -1
  210. package/dist/smrt-knowledge.okf.md +21 -10
  211. package/package.json +46 -17
package/agents/screens.md CHANGED
@@ -14,7 +14,7 @@ which can also be used on its own. Every screen takes a generated web `definitio
14
14
  (`ScreenCollectionDefinition`, structurally a `SmrtWebCollectionDefinition`) and
15
15
  an optional resolved `policy` (`ScreenPolicy`, structurally smrt-fields'
16
16
  `ResolvedObjectFieldPolicy`). The module imports neither package: smrt-svelte
17
- stays below the domain layer, and the app passes both in as props.
17
+ stays below the domain layer. The app passes them as props, or `CookbookApp` supplies resolved policies through context.
18
18
 
19
19
  - **Field selection is `fields.ts`, pure and node-testable.** `deriveScreenFields`
20
20
  is the single rule for list / view / edit. A field renders only when it is in
@@ -27,8 +27,7 @@ stays below the domain layer, and the app passes both in as props.
27
27
  - **Without a policy the code seed applies**: `ui.basic` / `ui.group` / `ui.order`
28
28
  hints and the cold-start rule (no `basic` markers => everything basic; any
29
29
  marker => unmarked fields advanced). Order is `order`, then declaration order.
30
- - **Tiers**: list shows basic scalar columns only (no long text, JSON or raw
31
- reference columns; capped at `DEFAULT_MAX_LIST_COLUMNS`, an explicit `columns`
30
+ - **Tiers**: list shows basic scalar and named reference columns (no long text or JSON; capped at `DEFAULT_MAX_LIST_COLUMNS`, an explicit `columns`
32
31
  list is never capped); view and edit show advanced fields behind a disclosure
33
32
  (the edit one opens itself when an advanced field has a problem). Policy
34
33
  `label`, `help` and `required` win over the manifest; on create, a resolved
@@ -47,15 +46,41 @@ stays below the domain layer, and the app passes both in as props.
47
46
  key/value rows (`jsonScreenEntries`). Empty optional text becomes `null` when the field is nullable and `''`
48
47
  otherwise (unset text persists as `''`); every other empty optional field is
49
48
  `null`. Errors are codes, mapped to messages by the component via `useI18n`.
50
- - **Reference fields link (`relations`, `hrefFor`, `labels`).** `DetailScreen`
51
- renders a `foreignKey` / `crossPackageRef` value as `<a href={hrefFor(field,
52
- id)}>{labels[model](id)}</a>`; without an href the label alone, without a
53
- label a shortened id (`shortScreenId`: first eight characters and `…`) in
54
- `<code>` with the full id as its tooltip, inside the link when there is one. `labels` is keyed by the **target model id**,
55
- which the screen finds through the `reference` relations (below), so pass
56
- `relations` whenever you pass `labels`.
49
+ - **Named references use `references: ScreenReferenceSources`.** Each entry holds
50
+ the exposed target's definition, the same `RecipeScreensSource` used for its
51
+ screen, and an optional `href(id)` for its record route. Edges resolve by
52
+ `relationships[].relatedCollection`; names read only the owning manifest's
53
+ `displayLabelField`, never per-screen guesses. `ListScreen` includes basic
54
+ foreign-key and cross-package columns, resolves repeated IDs once per source
55
+ and snapshot, and sorts/filters their displayed names. `DetailScreen` and the
56
+ record header link names when the target supplies a route. Failed, deleted,
57
+ unnamed or unavailable targets show “Linked record unavailable”; a late answer
58
+ from a previous snapshot cannot replace the current name. The legacy
59
+ `relations` / `labels` / `hrefFor` props remain supported.
60
+ - **Create/edit references use smrt-ui `RelationInput`.** It calls the target's
61
+ `source.search({ query, offset, limit })` with 25-row pages, resolves the
62
+ initial selection through `get`, and submits the ID. Search never downloads
63
+ the collection through `list`. Arrow keys / Enter select, Escape restores the
64
+ committed label, Tab reaches “Load more records”, and optional references
65
+ have a named Clear button. Search errors and empty results are announced.
66
+ A missing target or searchable display label disables the picker with an
67
+ explanation while preserving the stored ID on unrelated edits. All picker
68
+ messages use `strings.screens.ts`.
69
+ - **REST adapters.** REST-only `endpoint` / `actions` metadata belongs to the
70
+ adapter parameter types, composed from smrt-web; the transport-neutral
71
+ `ScreenCollectionDefinition` omits it so consumer definitions can extend
72
+ both their REST contract and the screen contract.
73
+ `createRecipeScreensSource(definition, fetchers)` uses
74
+ smrt-web's envelope/error handling and exposes only permitted mutations.
75
+ `search` requests `limit + 1` rows, `offset`, a display-field `like` filter,
76
+ and stable display-field/ID ordering. `createRecipeScreenReferences(definitions,
77
+ { basePath, fetch, hrefFor })` builds the map for the exposed definitions;
78
+ `basePath` defaults to `/api`. Pass the app's record-route resolver as
79
+ `hrefFor(definition, id)`; no route is guessed for a model with data only.
80
+ `RecipeScreens` forwards the map to every mode; absent an explicit map it
81
+ builds REST sources from `definitions` (routes still belong to the host).
57
82
  - **Transport-neutral.** `RecipeScreens` drives a `RecipeScreensSource`
58
- (`list` / `get` / `create` / `update` / `delete`); an operation the source lacks
83
+ (`list` / `search` / `get` / `create` / `update` / `delete`); an operation the source lacks
59
84
  (or `can` turns off) is simply not offered, so a read-only source is a
60
85
  read-only screen set. `view` and `recordId` are bindable and `onnavigate`
61
86
  fires on every user navigation, so an app can mirror them into its router.
@@ -71,7 +96,7 @@ stays below the domain layer, and the app passes both in as props.
71
96
  - **Not the policy-editing surface.** The policy gear, field-usage telemetry and
72
97
  the per-field renderer registry live in `ObjectForm`
73
98
  (`@happyvertical/smrt-fields/svelte`); `EditForm` is the dependency-light
74
- default and does not replace it. Not wired into recipe surfaces yet (#3708).
99
+ default and does not replace it. Recipe surfaces receive the same resolved screen policy.
75
100
  - Component props live in `types.ts`, not in the `.svelte` files, so the barrel
76
101
  never re-exports types from a component.
77
102
  - **Where a package model's definition and data come from (#3749).** A cookbook
@@ -226,3 +251,199 @@ below, and the edit form as a **mode** of the same screen. Props are
226
251
  "View all" hrefs, host-owned override edits, record change reload) and the
227
252
  link cases in `__tests__/DetailScreen.test.ts`; `overview/__tests__/record.test.ts`
228
253
  and the parent-context case in `overview/__tests__/load.test.ts`.
254
+
255
+ ## Reference validation and remaining projection requirement
256
+
257
+ `__tests__/references.test.ts` uses mock data sources and an injected REST
258
+ fetcher; `smrt-ui`'s `RelationInput.behavior.test.ts` covers the pagination
259
+ primitive. Run `pnpm --filter @happyvertical/smrt-svelte test` and
260
+ `pnpm --filter @happyvertical/smrt-ui test`.
261
+
262
+ | Behavior / trigger | Positive case | Failure / invariant | Evidence |
263
+ | --- | --- | --- | --- |
264
+ | List mounts with FK/cross-package IDs | Both columns show names; name search retains row | Repeated IDs share lookup; late/deleted targets cannot show old names | Component mock-source test |
265
+ | Record/detail opens | Name links through target route in detail and party header | Missing name shows unavailable notice; legacy callbacks still work | Component tests and axe |
266
+ | Create/edit opens and searches | Initial label; bounded name search; next page; keyboard select posts ID | Empty/offline search preserves selection; no full-list call | Component mock-source test |
267
+ | Clear/save | Optional clear submits null | Required empty blocks save; unavailable target keeps stored ID | Component tests |
268
+ | REST search | Declared label, limit/offset, stable ordering | No search without label; disallowed mutations absent; transport errors propagate | Injected-fetch test |
269
+ | Pagination action | Tab reaches action, appends unique results, returns focus | Old page discarded on new query; failed page retains prior results | smrt-ui component tests and axe |
270
+
271
+ Actor: browser user; data executor: mock source or injected REST fetch, no
272
+ persistence/transaction changes. Runtime: Svelte 5 / jsdom / Node 26; SQL dialect
273
+ coverage is N/A because transport-neutral screens do not execute SQL. Existing
274
+ field-policy exclusion tests remain mandatory. The new default-column assertion
275
+ was also executed against isolated copies of the base and head derivation modules:
276
+ the base failed the reference-column assertion and the head passed.
277
+
278
+ **Linked display names.** Core supports `display.label: { via, field,
279
+ fallback }`; generated definitions carry `displayLabelField: 'displayLabel'`,
280
+ `displayLabelProjection`, and a public text field with `readonly: true`.
281
+ The server resolves the related name before filtering, sorting and pagination.
282
+ Reference sources use the same bounded name query as an own-field label; screens
283
+ never load the Profile collection themselves. Commerce Customer declares this
284
+ for `profileId` → Profile.name, with `Unnamed customer` for a missing target.
285
+
286
+ `deriveScreenFields` keeps readonly fields out of edit inputs and submitted
287
+ payloads, even with explicit `fields`. Their values remain available in the
288
+ record header/view and list name column. The display field leads default columns
289
+ when no explicit order overrides it. A resolved policy still owns visibility
290
+ and labels: hidden or omitted fields never reach the header/list, a custom label
291
+ wins, and policy inclusion cannot make a server-computed field writable. This
292
+ uses the existing field intersection and title role, with no new policy resolver.
293
+
294
+ B1b interaction tests extend existing `fields.test.ts` and `references.test.ts`:
295
+ manifest-readonly cannot be overridden by explicit edit fields; policy label,
296
+ hidden and omitted cases; rendered record heading/list column; and submitted
297
+ payload exclusion. The commerce canary exercises the actual REST-to-reference
298
+ source path; core tests check SQL query bounds and live exposure before reads.
299
+
300
+ Registry-based `smrt-fields.resolveFieldPolicy` currently enumerates registered
301
+ model fields and does not enumerate the virtual `displayLabel`. Such a policy
302
+ omits the name, and screens continue to exclude omitted fields. The owning
303
+ policy resolver must expose the validated readonly projection as an addressable
304
+ presentation field for cookbook policies to label/hide it; defaulting around a
305
+ missing policy entry in screens would weaken the existing exclusion rule. The
306
+ B1b screen tests use explicit structural policies and do not claim that resolver
307
+ integration is implemented here.
308
+
309
+ Reuse check: repeated MCP `review_smrt_project` on smrt-svelte; read the intent
310
+ index and searched readonly/readOnly/derivedFields/displayLabel/ScreenFieldPolicy
311
+ in screens, smrt-ui, chat, core and smrt-fields. Reused `deriveScreenFields`, the
312
+ existing title-role/header and source implementations, and the existing test
313
+ fixtures. No production file, helper or component was added. Structural types
314
+ mirror core/web projection and readonly metadata; `ScreenFieldPolicy` is unchanged.
315
+
316
+ ## Reuse audit (B1)
317
+
318
+ Audited the five B1 commits against base `06c0b64fe3`, using Node 26.12.1.
319
+ The added production files are `ReferencePicker.svelte`, `references.ts`,
320
+ `reference-labels.svelte.ts`, and `source.ts`; the fifth added file,
321
+ `__tests__/references.test.ts`, is test-only. New public types in the existing
322
+ `types.ts` are `ScreenSearchRequest`, `ScreenSearchPage`,
323
+ `ScreenReferenceSource`, and `ScreenReferenceSources`; `ReferencePicker.Props`
324
+ is component-local. `RelationInput.more` extends the existing primitive.
325
+ No model, route, or tool was introduced.
326
+
327
+ The configured smrt-dev-mcp server was available. Ran
328
+ `review-smrt-project` with duplicate detection and source evidence on core,
329
+ smrt-ui, smrt-web, and smrt-svelte; its findings do not identify these additions.
330
+ Used `build-context` architecture queries for the exact names plus their
331
+ purposes (reference picker; display-name/target resolution; bounded REST
332
+ source; search/reference types), `build-package-specialist-context` for
333
+ smrt-ui, smrt-svelte, smrt-web, core, chat, and commerce, and
334
+ `introspect-project` for the commerce model inventory. This server exposes
335
+ context/introspection tools rather than a separate component-search tool.
336
+ Read `docs/knowledge/intents/index.md`. Verified candidates with `rg` by both
337
+ symbol and purpose across those packages, profiles, types, and planner, plus a
338
+ workspace-wide search for record-label/display-label helpers.
339
+
340
+ | Addition | Searches and existing candidate | Decision |
341
+ | --- | --- | --- |
342
+ | `ReferencePicker.svelte` (including its options/page/search/resolve handlers and Props) | MCP picker context; `rg` ReferencePicker/RelationInput/selector/picker/search/hasMore. Read smrt-ui RelationInput/Combobox, commerce PartySelect/CustomerSelect/VendorSelect, planner RelationField, chat ModelPicker. | Keep the manifest/source adapter over RelationInput. PartySelect requires commerce DTOs; planner RelationField requires its catalog, recipe state, preview source, and nested forms; ModelPicker selects inference models. No other live, metadata-driven paged adapter exists. |
343
+ | `references.ts` (screenReferenceTarget, screenRecordLabel, screenReferenceId) | MCP naming context; `rg` targetOf/relatedCollection/displayLabelField/recordLabel/displayLabel/idOf. Read screens relations.ts, core ui-metadata.ts, planner display.ts/labels.ts, and palette rowTitle. | Reuse the existing targetOf resolver, extended to reference-source maps. Keep the strict resolved-metadata value reader and scalar ID guard: planner/palette helpers guess fallback fields or IDs; core resolves field metadata, not row values; RecipeScreens.idOf is component-bound and accepts broader values. |
344
+ | `reference-labels.svelte.ts` (useScreenReferenceLabels) | MCP naming/source contexts; `rg` relationLabels/cache/dedup/stale/resolveLabel. Read planner relationLabels, smrt-web createSmrtWebQuery/createSmrtWebClient, and Svelte remoteQuery. | Keep snapshot binding to arbitrary source.get. Planner traverses its sample catalog recursively; remoteQuery needs a collection and the canonical query protocol. Neither binds per-field labels to this transport-neutral source. Coalescing lasts only for the current snapshot. |
345
+ | `source.ts` (createRecipeScreensSource, createRecipeScreenReferences) | MCP source context; `rg` createDefinitionFetchers/unwrapListResult/createCollectionImportExport/defaultSearchRows/paging. | Already reuses smrt-web fetchers and envelope/error helpers. Import/export accumulates entire exports; palette search returns ranked navigation items without paging. Keep the small screen-source adapter. |
346
+ | `types.ts` additions | MCP type context; `rg` DataQueryOffsetPage/SmrtWebQueryPage/RelationOption/SearchRequest/ReferenceSource. | Derive ScreenSearchRequest bounds from DataQueryOffsetPage. Keep the source map and minimal page contracts; full query results require protocol metadata, while RelationOption is the existing control's ID/label DTO. |
347
+ | `__tests__/references.test.ts` (mockReferences) | Existing screen fixtures and smrt-ui test-support setup/a11y; `rg` mockReferences and component golden tests. | Reuse the golden-test harness; the new mock is a local fixture for this source contract. |
348
+
349
+ The planner's Profile-name lookup is preview application code and scans the
350
+ whole Customer/Vendor collection. It cannot provide the missing owning-package
351
+ projection or bounded REST filtering described above; it was not copied.
352
+
353
+ ## Cookbook policy and vocabulary context
354
+
355
+ `CookbookApp` resolves its raw `cookbook.policies` automatically through
356
+ `@happyvertical/smrt-fields/policy.resolveCookbookFieldPolicy`. That is the pure
357
+ kernel extracted from the existing server resolver: code seeds, sparse encoded
358
+ app rows, required-field safety and policy locks have one implementation.
359
+ `RecipeScreens`, standalone list/record/detail/edit screens and definition-driven
360
+ `ImportExport` consume the context. A host supplies its cookbook, catalog and
361
+ normal definitions/sources; it never needs to pre-resolve field policies.
362
+ Explicit screen policies and the older `CookbookApp.fieldPolicies` override
363
+ remain supported for hosts that already resolve tenant/user layers on the server.
364
+
365
+ Collection vocabulary comes from the active shell entry, including
366
+ `layout.items[id].label`. `RecipeScreens.entryId` disambiguates keyed entries for
367
+ the same model. A layout rename is used as written for both collection and
368
+ record-kind labels; otherwise the recipe's explicit `noun` wins. There is no
369
+ singularization guess. Explicit definition `label` / `singularLabel` wins over
370
+ the shell. Navigation Reset still restores the recipe label because `navGroups`
371
+ retain their originals.
372
+
373
+ `ScreenFieldPolicy.readOnly` controls the record value; `locked` controls policy
374
+ customization. Read-only controls show the formatted value and never enter edit
375
+ payloads. Hidden fields never become controls, columns, search values or exports.
376
+ Edits omit hidden/read-only values, preserving existing data under patch updates.
377
+ Creates include resolved defaults for hidden/read-only fields, explicit null
378
+ included. Changing the policy re-seeds a mounted form. Raw default values are
379
+ validated by the owning field resolver against the generated field type. The
380
+ resolved currency default also controls minor-unit conversion (KWD uses three
381
+ decimals); edits format and preserve the record's own currency.
382
+
383
+ `RecipeScreens` loads a recipe-owned `route` surface when its declared path
384
+ exactly matches the selected entry path. `surfacePath` selects another declared
385
+ route, including a record route managed by a host router. The component receives
386
+ `definition`, resolved `policy`, `source`, `view`, `recordId` and optional
387
+ `surfaceProps`. No declared match, unavailable export or failed import uses the
388
+ generic screens. Components load through the shell's generated resolver; no host
389
+ component map is needed. This is client-side lazy replacement; SSR retains the
390
+ generic screen until the selected component loads.
391
+
392
+ Regression evidence uses the existing cookbook harness and an installed fixture
393
+ package in `screens/__tests__/RecipeScreens.test.ts`:
394
+
395
+ | Behavior / trigger | Positive | Negative / invariant | Context and executor | Runtime / edge | Level / command |
396
+ | --- | --- | --- | --- | --- | --- |
397
+ | Navigate list/create/view/edit | Cookbook collection/field labels reach navigation, titles, actions and back links | Original model vocabulary absent from renamed navigation | Cookbook context; memory source, no SQL transaction | Svelte browser; resolved-policy input | Component; package `pnpm test` |
398
+ | Create with raw hidden/read-only defaults | Defaults reach create payload | Hidden control absent; read-only value cannot edit | Raw cookbook; same source create spy | Svelte browser; wire payload | Installed-package fixture; package `pnpm test` |
399
+ | Edit a visible value | Visible edit saved | Hidden/read-only stored values preserved | Cookbook context; patch update spy | Svelte browser; wire payload | Component; package `pnpm test` |
400
+ | Search/export | Visible fields remain searchable/exportable | Hidden value cannot match a row, become a column or reach CSV | Raw cookbook; memory rows and download spy | Svelte browser; DataTable/ImportExport | Component; package `pnpm test` |
401
+ | Select a recipe route | Installed manifest component renders with raw policies | Recipe without a surface or with a missing export retains generic screens | Actual consumer plugin, fixture package; no host mapping | Svelte browser; generated dynamic import | Fixture; package `pnpm test` |
402
+
403
+ The four original context regression tests were also run against the original
404
+ product sources: all four fail there and pass with the context implementation.
405
+
406
+ The installed fixture's nine new regression cases fail against the previous
407
+ committed screen implementation; all twenty screen cases pass on the integrated
408
+ implementation.
409
+
410
+ Integration cases in `RecipeScreens.test.ts` cover manifest-proven app aliases,
411
+ live host exposure projection, and read-only/hidden reference pickers under raw
412
+ cookbook policies. The read-only picker remains disabled and resolves a display name;
413
+ the hidden picker never loads its target. Existing source and reference-label APIs
414
+ are reused unchanged.
415
+
416
+ ## Q1 shared-screen defaults
417
+
418
+ Generated `listFields` comes from the owning model's `display.list`; the display
419
+ label leads. Internal hash/JSON/authority/provenance and plain id columns are never
420
+ defaults. Explicit policy exclusions remain authoritative. Required and primary
421
+ edit fields render in the basic tier; if no basic field remains, the first allowed
422
+ input is promoted. An empty editable set renders a notice instead of an empty form.
423
+
424
+ Virtual inputs carry `writeThrough: '<link field>'`. Selecting a different existing
425
+ record omits those inputs from the payload, preserving that contact's own values.
426
+ The server still owns linked writes and transaction/tenant enforcement; see
427
+ [core's contract](../../core/agents/write-through.md). Cookbook item `singularLabel`
428
+ overrides the derived singular label. Reference labels use the target cookbook
429
+ entry; explicit field policy labels win. CookbookApp renders `chat.assistant`
430
+ through its authenticated, host-bound assistant panel and never separately mounts
431
+ the raw recipe component without its transport and registry.
432
+
433
+ Save failures from `SmrtWebRequestError` display its safe typed `publicMessage`
434
+ for 4xx responses. Unexpected failures display the generic save message with
435
+ the server-created `requestId`; arbitrary server exception text stays hidden.
436
+
437
+
438
+ ### Inline prerequisite fields (Q1 follow-up)
439
+
440
+ `deriveScreenFields` accepts the app's available reference sources. If a link
441
+ owns inline `writeThrough` inputs but its target has no available list, view and
442
+ edit omit that prerequisite link and retain the inline fields. Ordinary
443
+ references keep named links and selectors when the target is available. Cookbook
444
+ vocabulary labels an available existing-record selector with the cookbook's
445
+ singular noun. The same existing vocabulary substitution applies to implicit
446
+ field labels (for example Member type), explicit labels and help. RecipeScreens refreshes the current detail snapshot after saving
447
+ an unchanged record id, as well as refreshing the list. Regression tests exercise
448
+ all three contact values, clearing, client search/sort, prerequisite omission and
449
+ preservation of an available named link; no new component/helper file was added.
@@ -23,3 +23,87 @@ The summary-row type and selected-detail type may differ: list pages can remain
23
23
  cheap while only the selected definition is fully resolved. This is the
24
24
  scalability contract; do not resolve every settings editor before passing data
25
25
  to the catalog.
26
+
27
+ ## Pre-built components
28
+
29
+ `PrebuiltComponentsSettings` composes the existing preference control and restart
30
+ link. Supply the current `enabled` value and an authorized `onsave` callback;
31
+ failed saves restore the last persisted choice and show a fixed translated error.
32
+ The checkbox has a visible On/Off status and a plain explanation. New hosts mount
33
+ `OwnerApprovalsSettings` separately near the top of Settings. Legacy optional
34
+ `approvals`, `transport` and `ondecided` props remain supported by delegating to
35
+ that same component. The preference control owns no store or approval authority.
36
+
37
+ `OwnerApprovalsSettings` extracts the existing status filter and transport
38
+ observation composition once. It renders the canonical chat `AssistantApprovalCard`
39
+ for pending/approved/executing records from an authorized host loader, removes
40
+ terminal outcomes observed through the card's existing decision or polling calls,
41
+ and labels its empty state. Its optional `onsettled` callback runs once per known
42
+ pending/approved/executing hold that canonically succeeds, before publishing the
43
+ new views and unmounting its card. Seeded historical successes never notify;
44
+ `ondecided` remains the existing human-decision callback. Both props and transport
45
+ observations use Chat's shared `reconcileAssistantApprovalView` to retain already
46
+ observed canonical progress; normalized rows also return to the card. Final view
47
+ publication reconciles again after an awaited host refresh so overlapping holds
48
+ cannot regress. No status is inferred from time or a missing row.
49
+
50
+ While no unsettled card exists, targeted owner-list discovery retries once per
51
+ second. It stops when cards take over polling, shares any outstanding list read
52
+ across that handoff, and clears timers/discards obsolete results on cleanup.
53
+ The existing transport has no abort-signal parameter; unmount cannot cancel an
54
+ already-issued network request, but its result cannot publish or notify. Discovery
55
+ errors expose no transport details, and host refresh failures do not change the
56
+ canonical result. No authority, recovery payload or decision route is added.
57
+ The product and generated cookbook Settings share this export. Mounted tests cover
58
+ delayed/external completion, callback-driven invalidation, historical/remounted
59
+ successes, stale decisions/lists, two-hold overlap, discovery and cleanup, alongside
60
+ the existing decision/poll and fail-closed verification cases. Legacy Prebuilt
61
+ tests retain their original assertions. MCP architecture/review/introspection and
62
+ name/purpose searches found the canonical card and original composition, with no
63
+ existing reusable titled owner settings container.
64
+
65
+ ## Assistant
66
+
67
+ `WorkProfileSettings` composes smrt-ui Card, FormGroup, Input, Select, Toggle and
68
+ Button and the existing Disclosure. The host supplies sparse overrides, resolved
69
+ profiles, an editable flag and authorized save/reset callbacks. Basic controls show
70
+ the human engine label, selection evidence and requested effort, preview, and
71
+ assist escalation. Exact requested/current model IDs, model/effort overrides and
72
+ limits live in the closed Advanced disclosure. Strongest/custom/fallback labels
73
+ come from inference selection metadata; an old or unverified result is only
74
+ configured/provider-default, never inferred strongest from its tier. It owns no model policy, persistence or approval authority. Unknown
75
+ engine/catalog resolution is shown as unavailable while editing/reset remain
76
+ usable. CLI token limits are explicitly advisory where the CLI cannot enforce a
77
+ per-call ceiling; app-tool count and wall-time checks remain host-enforced.
78
+ The note describes own-plan/API-key billing. Safety switches are absent.
79
+
80
+ MCP architecture inventory and intent/name/purpose searches found inference's
81
+ resolver, preferences' kind store, SettingsCatalog and ConnectAi. The editor adds
82
+ only the missing domain composition, reusing the shared visual/form primitives
83
+ and translated messages. Mounted tests exercise edit/save/reset, refused save,
84
+ unavailable connection repair and accessibility.
85
+
86
+ Save forwards sparse owner overrides, not the resolved defaults shown in the
87
+ controls. Untouched Save and unrelated effort/preview/budget edits must not
88
+ materialize `budgets.passes`; the design host can size a default run within its
89
+ recommended maximum. An explicitly saved pass count, including the recommended
90
+ number itself, remains an owner override. Reset removes the preference and the
91
+ next loader supplies `{}`. Mounted regressions cover untouched/unrelated edits,
92
+ explicit two/four-pass round trips and reset followed by sparse Save.
93
+
94
+ Duration controls display seconds while persistence remains integer milliseconds.
95
+ The existing Input uses decimal text for these fixed-point values; native numeric
96
+ binding can otherwise lose a millisecond before parsing at the safe-integer
97
+ boundary. Component-local `formatBudgetSeconds`/`changeBudgetSeconds` use exact
98
+ integer arithmetic, reject nonpositive/sub-millisecond/unsafe values, and block
99
+ Save until corrected without replacing the owner value with a default. Other
100
+ budgets keep numeric controls. Tests retain all prior sparse-save assertions and
101
+ cover 12345ms, 1001ms and MAX_SAFE_INTEGER round trips, malformed text, advanced
102
+ visibility, actual human summaries and remembered fallback presentation.
103
+
104
+ Reuse review/context/introspection and intent/name/purpose queries found no
105
+ precision-preserving duration editor in UI/Svelte/Chat/Core/inference. The private
106
+ Chat tool-duration formatter intentionally rounds and cannot edit owner budgets.
107
+ The conversion stays in the existing domain component; no new utility file or
108
+ primitive is introduced. Engine labels reuse inference's public pure label seam,
109
+ and Advanced reuses smrt-ui Disclosure.
package/agents/testing.md CHANGED
@@ -27,3 +27,9 @@ await expectNoA11yViolations(container); // axe; color-contrast off (jsdom has n
27
27
  - **Hook-dependent components** (anything calling `useAppState`/`useSTT`/`useAuth` — they throw outside `<Provider>`): `vi.mock` the hook module with stub defaults. See `src/components/forms/__tests__/Form.test.ts`.
28
28
  - **Form-input a11y** (programmatic labels, `aria-describedby`, axe-clean for `Input`/`TextInput`/etc.) is L1's deliverable (#1420) on top of this harness — bare primitives like `Input` get behavior tests here, labelled axe coverage there.
29
29
  - Existing reference suites: Button, Input, Modal, DataTable, Form. The pattern is what sweep S11 (#1416) rolls out repo-wide.
30
+
31
+ The full standalone `pnpm test` runs published-entry conformance after unit and
32
+ script tests. Its `ensure-conformance-build.mjs` rebuilds this package and its
33
+ dependencies. Do not overlap it with a root or filtered build in the same
34
+ worktree: either build can replace `dist` while the other reads declarations.
35
+ Run the complete suite, then the build/knowledge checks sequentially.
@@ -76,7 +76,9 @@ toggles, focus tools, mounted drawer, or edit-mode controls. A default
76
76
  `AdminShell` still shows its brand, so its header stays; an app with no
77
77
  footer content and no dock tools has no footer and no right strip.
78
78
 
79
- **Phone defaults.** `phone.scrim` and `phone.swipeToClose` are on (pass `false`
79
+ **Phone defaults.** `AppShell` navigation starts closed on phones, independent of the saved desktop sidebar state. Phone open/close gestures do not overwrite that desktop preference. The header renders the full brand title, with CSS ellipsis when space runs out.
80
+
81
+ `phone.scrim` and `phone.swipeToClose` are on (pass `false`
80
82
  to turn one off). Opening the left or right surface collapses the other
81
83
  (`ShellState.closeExclusivePeers`, not persisted), and starting a layout edit
82
84
  closes any open surface. The Menu opener is an icon button (hamburger, name
@@ -163,6 +165,53 @@ leftSidebar.header -> footer.end; rightSidebar.footer -> footer.end ->
163
165
  header.end -> leftSidebar.footer. The legacy `tenantFooter` prop keeps its own
164
166
  `footerInHeader` fallback.
165
167
 
168
+ ### Docked panel (sidebar, panel, content)
169
+
170
+ `AdminShell`/`AppShell` `panel?: Snippet<[{ viewport, open }]>` adds a docked
171
+ column between the left sidebar and the main area (a chat, say). It is opt-in:
172
+ without `panel` no wrapper or separator renders and the grid is unchanged. Not
173
+ a fifth edge: it lives in `.smrt-admin-shell__body` (grid column 2, row 3)
174
+ beside `<main>`, so `PANEL_EDGES`, `ShellLayout.panels` and the four regions do
175
+ not change. It stays mounted while closed (`hidden`), so chat state survives a
176
+ toggle. Props: `panelOpen` (host-owned; `AppShell` `bind:panelOpen`),
177
+ `panelLabel`, `panelResize` (`true`, limits, or `false`), `panelSize` (px until
178
+ resized, default 400), `panelEnabled` (`AppShell`; turn it off without
179
+ removing the snippet, e.g. plugin mode). The content keeps
180
+ `--smrt-admin-shell-panel-main-min` (20rem) via CSS.
181
+
182
+ Resizing reuses the edge machinery: `ShellSizeKey = PanelEdge | 'panel'`,
183
+ `ShellState.resizeLimits('panel')` (`dockedPanelLimits`, set from
184
+ `panelResize` by `AdminShell`; defaults `DEFAULT_SHELL_DOCKED_PANEL_RESIZE`
185
+ 280-800 px, step 16), `panelSize('panel')`, `setPanelSize('panel', n | null)`,
186
+ `clampPanelSize`, and the same pointer/keyboard handlers as the edges (drag
187
+ persists once on release, Arrow/Shift+Arrow/Home/End, Enter and double-click
188
+ reset, `role="separator"` with `aria-valuenow|min|max`, `data-testid`
189
+ `admin-shell-resizer-panel`). The width is stored as `ShellSettingsDelta.sizes.panel`
190
+ (`sanitizeShellSettingsDelta` accepts that key only for `sizes`). On phones the
191
+ panel is a full-size view over main (main is `inert`), no separator.
192
+
193
+ `sidebarFooterDivider` (default `true`, `AdminShell` and `AppShell`) draws the hairline above the sidebar footer slots and the collapsed rail's footer; `false` sets `data-footer-divider="off"` on the shell root and removes them, for a host whose neighbouring column draws its own line at that height.
194
+
195
+ `AppShell` builds on it: `panelToggle: { label, icon?, slot? }` is the built-in
196
+ `item:panel-toggle` (icon `ShellIconButton`, `aria-pressed`, default slot
197
+ `leftSidebar.footer`); on a phone with `phoneTabBar` it is the "panel" tab
198
+ instead (`PhoneTabBar` `panelTab`), the open state is internal (starts closed,
199
+ closes on `currentHref` change). `voiceToggle: { label, state: 'off' | 'on' |
200
+ 'unavailable', unavailableLabel?, onpress?, slot? }` is `item:voice` above it:
201
+ a toggle, or a dimmed `aria-disabled` control with no pressed state that never
202
+ calls `onpress`. `ShellSlotItem.rail` (and these two items) keeps a
203
+ `leftSidebar.footer` item as an icon above the avatar in the collapsed rail
204
+ instead of falling back to another region (the footer slot wraps so the full
205
+ account row takes its own line).
206
+
207
+ Account menu items: `AppShell` `accountMenu: { slot?, items?, theme? }`. `items`
208
+ are caller-owned `WorkspaceAccountMenuItem`s (`{ id, label, href?, onselect?,
209
+ badge?, badgeLabel? }`) listed before Settings; a positive `badge` shows on the
210
+ item and the summed count on the closed trigger (also in its accessible name).
211
+ `theme: true` adds a "Theme: Light|Dark" item that toggles the shell's
212
+ `ThemeProvider` scheme (`ShellAccountMenu`, which reads the theme context).
213
+ Order: items, Theme, Settings, Sign out.
214
+
166
215
  ### Edge toggles and hotkeys are opt-in (#3661)
167
216
 
168
217
  `AdminShell`/`AppShell` `edgeToggles?: boolean | Partial<Record<PanelEdge,
@@ -246,6 +295,15 @@ dialog and the global shortcut, so it mounts once. Planner-style hosts that
246
295
  rendered their own `header.end` assistant toggle should pass `dockToggles`
247
296
  (`dock:assistant`) and `user` instead.
248
297
 
298
+ Sectioned settings: `ShellSettingsPage basePath="/settings"` lists the
299
+ sections (`SHELL_SETTINGS_SECTIONS`, Shortcuts only when hotkeys are
300
+ available, plus `extraSections` the host adds) as a menu linking to
301
+ `${basePath}/${id}`; with `section="layout"` (or children for a host section,
302
+ with `title`) it renders that one page with a back link. `ShellSettingsPanel`
303
+ takes the same `section` prop. Without `basePath` the page stays the one-page
304
+ Appearance + Account + Layout mode. `isShellSettingsSection()` is a ready
305
+ SvelteKit param matcher for the `[section]` route.
306
+
249
307
  Async sign-out (#3860): `onSignOut?: () => void | Promise<void>` (AppShell,
250
308
  `WorkspaceAccountMenu`, `ShellSettingsPage`/`ShellSettingsPanel`) is awaited.
251
309
  While pending the control is busy (`aria-busy`) and disabled, so a second
@@ -689,6 +747,11 @@ lives beside, not inside, `./workspace` so the AdminShell barrel stays free of
689
747
  form is a plain `method="POST"`; pass `enhance` from `$app/forms` to enhance
690
748
  it. The token is a hidden field only and is never stored, logged or shown.
691
749
  Single-use, loopback-only enforcement stays server-side.
750
+ Optional `data.launchMode: 'desktop'` selects translated reopen guidance for the
751
+ existing desktop launch flow, suppressing forms, tokens and terminal/server
752
+ messages for missing, expired or unavailable links. An explicit ready
753
+ invitation keeps the manual form for non-autoClaim owner-link consumers. The
754
+ runtime owns detection and authorization; the component only presents its data.
692
755
 
693
756
  `AppShell chrome={false}` omits generated chrome while retaining Provider,
694
757
  ThemeProvider, shell layout context and the canonical `useAdminShell()` state.