@micha.bigler/ui-core-micha 3.14.3 → 4.0.0

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 (367) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +7 -0
  3. package/dist/auth/UserMenu.js +1 -1
  4. package/dist/auth/apiClient.js +7 -6
  5. package/dist/chat/ChatList.js +1 -1
  6. package/dist/chat/ChatThread.js +2 -1
  7. package/dist/chat/ChatWorkspace.js +1 -1
  8. package/dist/chat/ModelPicker.js +2 -5
  9. package/dist/chat/kitSxRegistry.js +9 -0
  10. package/dist/chat/useChatSocket.js +1 -1
  11. package/dist/components/LoginForm.js +1 -1
  12. package/dist/components/SecurityComponent.js +1 -1
  13. package/dist/components/UserListComponent.js +2 -8
  14. package/dist/components/charts/ChartFrame.js +1 -1
  15. package/dist/components/charts/ScatterChart.js +2 -1
  16. package/dist/components/charts/kitSxRegistry.js +6 -0
  17. package/dist/entries/charts.js +6 -0
  18. package/dist/entries/chat.js +8 -0
  19. package/dist/entries/markdown.js +1 -0
  20. package/dist/index.js +0 -14
  21. package/dist/layout/SectionNav.js +1 -1
  22. package/dist/messaging/AttachmentList.js +2 -2
  23. package/dist/messaging/Composer.js +2 -1
  24. package/dist/messaging/ConversationLaunchers.js +1 -4
  25. package/dist/messaging/ConversationList.js +1 -1
  26. package/dist/messaging/DirectMessageLauncher.js +1 -1
  27. package/dist/messaging/MessagingProvider.js +0 -0
  28. package/dist/messaging/PollCard.js +7 -5
  29. package/dist/messaging/ReadTicks.js +2 -2
  30. package/dist/messaging/Thread.js +5 -3
  31. package/dist/notifications/NotificationBell.js +4 -7
  32. package/dist/notifications/NotificationSettings.js +1 -1
  33. package/dist/onboarding/OnboardingProvider.js +3 -6
  34. package/dist/pages/AccountPage.js +1 -2
  35. package/dist/pages/LoginPage.js +2 -3
  36. package/dist/pages/PasswordChangePage.js +2 -3
  37. package/dist/pages/PasswordInvitePage.js +2 -3
  38. package/dist/pages/PasswordResetRequestPage.js +2 -3
  39. package/dist/pages/SignUpPage.js +2 -3
  40. package/dist/pages/SignupConfirmPage.js +2 -3
  41. package/dist/theme/createAppTheme.js +5 -4
  42. package/dist/theme/kitSxEntry.js +11 -0
  43. package/dist/theme/kitSxRegistry.js +2 -15
  44. package/dist/theme/themeCompleteness.js +3 -12
  45. package/dist/utils/auth-errors.js +4 -3
  46. package/package.json +41 -16
  47. package/.github/workflows/publish.yml +0 -126
  48. package/DESIGN.md +0 -60
  49. package/WORK_ORDERS.md +0 -148
  50. package/dev/entries.jsx +0 -721
  51. package/dev/fixtures.js +0 -26
  52. package/dev/main.jsx +0 -75
  53. package/dev/mockTransport.jsx +0 -128
  54. package/docs/CHART-LAYOUT.md +0 -157
  55. package/docs/DARK-TOKENS.md +0 -140
  56. package/docs/TYPE-SCALE.md +0 -111
  57. package/docs/messaging-deviations.md +0 -118
  58. package/index.html +0 -12
  59. package/renovate.json +0 -10
  60. package/scripts/chart-api-census.mjs +0 -415
  61. package/src/auth/AuthContext.jsx +0 -158
  62. package/src/auth/ReauthModal.jsx +0 -82
  63. package/src/auth/UserMenu.jsx +0 -121
  64. package/src/auth/apiClient.jsx +0 -232
  65. package/src/auth/authApi.jsx +0 -539
  66. package/src/auth/authConfig.jsx +0 -34
  67. package/src/auth/reauth.js +0 -47
  68. package/src/chat/ChatComposer.jsx +0 -36
  69. package/src/chat/ChatList.jsx +0 -87
  70. package/src/chat/ChatThread.jsx +0 -128
  71. package/src/chat/ChatWorkspace.jsx +0 -244
  72. package/src/chat/MarkdownReply.jsx +0 -22
  73. package/src/chat/ModelPicker.jsx +0 -85
  74. package/src/chat/api.js +0 -18
  75. package/src/chat/useChatSocket.js +0 -32
  76. package/src/chat/wire.js +0 -7
  77. package/src/components/AccessCodeManager.jsx +0 -288
  78. package/src/components/AccessCodeSingleUseToggle.jsx +0 -92
  79. package/src/components/AllowedEmailDomainsManager.jsx +0 -92
  80. package/src/components/AuthFactorRequirementCard.jsx +0 -95
  81. package/src/components/BulkInviteCsvTab.jsx +0 -198
  82. package/src/components/EmptyState.jsx +0 -38
  83. package/src/components/LoginForm.jsx +0 -159
  84. package/src/components/MFAComponent.jsx +0 -350
  85. package/src/components/MfaLoginComponent.jsx +0 -252
  86. package/src/components/MobileBottomNav.jsx +0 -82
  87. package/src/components/PasskeysComponent.jsx +0 -252
  88. package/src/components/PasswordChangeForm.jsx +0 -87
  89. package/src/components/PasswordResetRequestForm.jsx +0 -43
  90. package/src/components/PasswordSetForm.jsx +0 -97
  91. package/src/components/ProfileComponent.jsx +0 -348
  92. package/src/components/QrSignupManager.jsx +0 -404
  93. package/src/components/QrSignupValidityManager.jsx +0 -106
  94. package/src/components/RegistrationMethodsManager.jsx +0 -150
  95. package/src/components/SecurityComponent.jsx +0 -141
  96. package/src/components/SocialLoginButtons.jsx +0 -83
  97. package/src/components/SoftChip.jsx +0 -93
  98. package/src/components/StatTile.jsx +0 -39
  99. package/src/components/SupportRecoveryRequestsTab.jsx +0 -482
  100. package/src/components/TurnstileWidget.jsx +0 -99
  101. package/src/components/UserInviteComponent.jsx +0 -76
  102. package/src/components/UserListComponent.jsx +0 -618
  103. package/src/components/charts/BarChart.jsx +0 -102
  104. package/src/components/charts/ChartFrame.jsx +0 -214
  105. package/src/components/charts/LineChart.jsx +0 -126
  106. package/src/components/charts/ScatterChart.jsx +0 -299
  107. package/src/components/charts/TimeSeriesChart.jsx +0 -300
  108. package/src/components/charts/chartDefaults.js +0 -644
  109. package/src/components/charts/chartLabels.js +0 -36
  110. package/src/components/charts/exportChart.js +0 -258
  111. package/src/components/charts/formatters.js +0 -39
  112. package/src/components/charts/palette.js +0 -33
  113. package/src/components/charts/yearTickInterval.js +0 -7
  114. package/src/i18n/authTranslations.ts +0 -2651
  115. package/src/i18n/chartsTranslations.ts +0 -91
  116. package/src/i18n/chatTranslations.ts +0 -55
  117. package/src/i18n/messagingTranslations.ts +0 -120
  118. package/src/i18n/notificationsTranslations.ts +0 -32
  119. package/src/i18n/onboardingTranslations.ts +0 -29
  120. package/src/i18n/sectionNavTranslations.ts +0 -20
  121. package/src/i18n/uiCoreTranslations.js +0 -29
  122. package/src/i18n/userMenuTranslations.ts +0 -5
  123. package/src/index.js +0 -158
  124. package/src/layout/PageLayout.jsx +0 -36
  125. package/src/layout/SectionNav.jsx +0 -320
  126. package/src/messaging/AttachmentList.jsx +0 -145
  127. package/src/messaging/Composer.jsx +0 -197
  128. package/src/messaging/ConversationLaunchers.jsx +0 -51
  129. package/src/messaging/ConversationList.jsx +0 -109
  130. package/src/messaging/DirectMessageLauncher.jsx +0 -112
  131. package/src/messaging/MessageBubble.jsx +0 -183
  132. package/src/messaging/MessagingProvider.jsx +0 -0
  133. package/src/messaging/MessagingScopeConfig.jsx +0 -24
  134. package/src/messaging/PollCard.jsx +0 -163
  135. package/src/messaging/ReactionBar.jsx +0 -43
  136. package/src/messaging/ReadTicks.jsx +0 -82
  137. package/src/messaging/Thread.jsx +0 -195
  138. package/src/messaging/api.js +0 -48
  139. package/src/messaging/composerImageCompression.js +0 -35
  140. package/src/messaging/linkifyText.jsx +0 -37
  141. package/src/notifications/NotificationBell.jsx +0 -84
  142. package/src/notifications/NotificationSettings.jsx +0 -330
  143. package/src/notifications/NotificationsProvider.jsx +0 -224
  144. package/src/notifications/PopupSurface.jsx +0 -105
  145. package/src/notifications/api.js +0 -55
  146. package/src/notifications/feedApi.js +0 -18
  147. package/src/notifications/realtime.jsx +0 -138
  148. package/src/notifications/serviceWorker/sw.js +0 -50
  149. package/src/onboarding/OnboardingProvider.jsx +0 -326
  150. package/src/onboarding/OnboardingWizard.jsx +0 -61
  151. package/src/onboarding/WizardDialogShell.jsx +0 -51
  152. package/src/onboarding/api.js +0 -13
  153. package/src/onboarding/stepSelection.js +0 -16
  154. package/src/onboarding/steps/BrowserPushStep.jsx +0 -121
  155. package/src/onboarding/steps/CompleteNameStep.jsx +0 -46
  156. package/src/onboarding/steps/CookieConsentStep.jsx +0 -133
  157. package/src/onboarding/steps/PwaInstallStep.jsx +0 -47
  158. package/src/pages/AccountPage.jsx +0 -394
  159. package/src/pages/LoginPage.jsx +0 -343
  160. package/src/pages/PasswordChangePage.jsx +0 -62
  161. package/src/pages/PasswordInvitePage.jsx +0 -177
  162. package/src/pages/PasswordResetRequestPage.jsx +0 -68
  163. package/src/pages/SignUpPage.jsx +0 -268
  164. package/src/pages/SignupConfirmPage.jsx +0 -155
  165. package/src/testing/checkKitIntegration.js +0 -233
  166. package/src/theme/createAppTheme.js +0 -423
  167. package/src/theme/fonts.js +0 -3
  168. package/src/theme/index.js +0 -21
  169. package/src/theme/kitSxRegistry.js +0 -285
  170. package/src/theme/themeCompleteness.js +0 -1045
  171. package/src/theme/tokens.js +0 -478
  172. package/src/utils/auth-errors.js +0 -76
  173. package/src/utils/authService.js +0 -223
  174. package/src/utils/resolveErrorText.js +0 -28
  175. package/src/utils/webauthn.js +0 -51
  176. package/tests/AccountPage.profileStatements.test.jsx +0 -162
  177. package/tests/AccountPage.test.jsx +0 -200
  178. package/tests/AuthContext.test.jsx +0 -129
  179. package/tests/BarChart.test.jsx +0 -112
  180. package/tests/BrowserPushStep.test.jsx +0 -110
  181. package/tests/ChartFrame.test.jsx +0 -336
  182. package/tests/ConversationList.test.jsx +0 -144
  183. package/tests/CookieConsentStep.test.jsx +0 -69
  184. package/tests/EmptyState.test.jsx +0 -62
  185. package/tests/LineChart.test.jsx +0 -80
  186. package/tests/MessagingProvider.test.jsx +0 -50
  187. package/tests/MobileBottomNav.test.jsx +0 -319
  188. package/tests/NotificationBell.test.jsx +0 -60
  189. package/tests/NotificationSettings.test.jsx +0 -276
  190. package/tests/NotificationsProvider.test.jsx +0 -240
  191. package/tests/OnboardingProvider.test.jsx +0 -294
  192. package/tests/OnboardingWizard.test.jsx +0 -143
  193. package/tests/PasswordChangeForm.test.jsx +0 -70
  194. package/tests/PasswordInvitePage.test.jsx +0 -142
  195. package/tests/PasswordSetForm.test.jsx +0 -70
  196. package/tests/PopupSurface.test.jsx +0 -142
  197. package/tests/ProfileComponent.refresh.test.jsx +0 -194
  198. package/tests/QrSignupManager.registrationContext.test.jsx +0 -106
  199. package/tests/QrSignupManagerInfoBox.test.jsx +0 -49
  200. package/tests/ScatterChart.test.jsx +0 -270
  201. package/tests/SectionNav.test.jsx +0 -363
  202. package/tests/SignUpPage.test.jsx +0 -208
  203. package/tests/SoftChip.test.jsx +0 -105
  204. package/tests/StatTile.test.jsx +0 -57
  205. package/tests/Thread.test.jsx +0 -151
  206. package/tests/TimeSeriesChart.test.jsx +0 -367
  207. package/tests/UserListComponent.test.jsx +0 -192
  208. package/tests/UserMenu.test.jsx +0 -171
  209. package/tests/apiClientLanguage.test.js +0 -33
  210. package/tests/apiClientPublicPaths.test.js +0 -178
  211. package/tests/authApiLogin.test.js +0 -42
  212. package/tests/authApiRegistration.test.js +0 -31
  213. package/tests/authErrorCodeRendering.test.jsx +0 -77
  214. package/tests/authErrors.test.js +0 -74
  215. package/tests/authTranslations.test.js +0 -74
  216. package/tests/chart-api-census.test.js +0 -366
  217. package/tests/chartAxisTickBand.test.jsx +0 -95
  218. package/tests/chartDefaults.test.js +0 -902
  219. package/tests/chartLabels.test.js +0 -50
  220. package/tests/chartsPalette.test.js +0 -99
  221. package/tests/chatApi.test.js +0 -48
  222. package/tests/chatDriverNames.test.jsx +0 -71
  223. package/tests/chatExports.test.js +0 -3
  224. package/tests/chatList.test.jsx +0 -84
  225. package/tests/chatPicker.test.jsx +0 -82
  226. package/tests/chatSocket.test.jsx +0 -26
  227. package/tests/chatThread.test.jsx +0 -116
  228. package/tests/chatTranslations.test.js +0 -47
  229. package/tests/chatWorkspace.test.jsx +0 -234
  230. package/tests/checkKitIntegration.test.jsx +0 -219
  231. package/tests/createAppTheme.test.js +0 -132
  232. package/tests/createAppThemeDark.test.js +0 -127
  233. package/tests/createAppThemeLightGuard.test.js +0 -40
  234. package/tests/createAppThemePageContrast.test.js +0 -108
  235. package/tests/createAppThemeTypography.test.js +0 -53
  236. package/tests/errorCallSiteGuard.test.js +0 -32
  237. package/tests/exportChart.test.js +0 -313
  238. package/tests/feedApi.test.js +0 -46
  239. package/tests/fixtures/light-theme-baseline.json +0 -2234
  240. package/tests/i18nAggregate.test.js +0 -120
  241. package/tests/i18nGermanVariant.test.js +0 -65
  242. package/tests/loginPageErrorResolution.test.jsx +0 -102
  243. package/tests/messagingApi.test.js +0 -32
  244. package/tests/messagingChunk6.test.jsx +0 -116
  245. package/tests/messagingCompactBubble.test.jsx +0 -64
  246. package/tests/messagingComposer.test.jsx +0 -136
  247. package/tests/messagingComposerChunk5.test.jsx +0 -113
  248. package/tests/messagingContractConformance.test.js +0 -69
  249. package/tests/messagingDirectMessageLauncher.test.jsx +0 -151
  250. package/tests/messagingExports.test.js +0 -21
  251. package/tests/messagingInteractions.test.jsx +0 -136
  252. package/tests/messagingLastMessagePreview.test.jsx +0 -93
  253. package/tests/messagingLinkify.test.jsx +0 -51
  254. package/tests/messagingMessageActions.test.jsx +0 -163
  255. package/tests/messagingMsg6.test.jsx +0 -105
  256. package/tests/messagingMsg6f.test.jsx +0 -155
  257. package/tests/messagingMsg6g.test.jsx +0 -166
  258. package/tests/messagingMsg6h.test.jsx +0 -136
  259. package/tests/messagingMsg6i.test.jsx +0 -129
  260. package/tests/messagingPollRendering.test.jsx +0 -142
  261. package/tests/messagingReactionMerge.test.jsx +0 -77
  262. package/tests/messagingReadTicksTooltip.test.jsx +0 -36
  263. package/tests/messagingThreadReceipts.test.jsx +0 -178
  264. package/tests/messagingThreadingQuoting.test.jsx +0 -87
  265. package/tests/messagingUnreadLifecycle.test.jsx +0 -78
  266. package/tests/notificationsApi.test.js +0 -41
  267. package/tests/notificationsExports.test.js +0 -34
  268. package/tests/onboardingDescriptors.test.js +0 -132
  269. package/tests/packageTreeShaking.test.js +0 -126
  270. package/tests/realtime.test.jsx +0 -219
  271. package/tests/resolveErrorText.test.js +0 -72
  272. package/tests/stepSelection.test.js +0 -53
  273. package/tests/themeCompleteness.test.js +0 -626
  274. package/tests/timeSeriesLegend.test.js +0 -99
  275. package/tests/userScreenTranslations.test.jsx +0 -218
  276. package/tsconfig.build.json +0 -18
  277. package/vite.config.mjs +0 -6
  278. package/work-orders/AUTH-1.md +0 -74
  279. package/work-orders/AUTH-2.md +0 -74
  280. package/work-orders/AUTH-4.md +0 -183
  281. package/work-orders/AUTH-5.md +0 -154
  282. package/work-orders/AUTH-7.md +0 -181
  283. package/work-orders/AUTH-8.md +0 -184
  284. package/work-orders/CHART-1.md +0 -285
  285. package/work-orders/CHART-2.md +0 -222
  286. package/work-orders/CHART-3.md +0 -163
  287. package/work-orders/CHART-4.md +0 -203
  288. package/work-orders/CHART-5.md +0 -226
  289. package/work-orders/CHART-6.md +0 -428
  290. package/work-orders/CHART-7.md +0 -175
  291. package/work-orders/DX-1.md +0 -169
  292. package/work-orders/DX-2.md +0 -188
  293. package/work-orders/DX-3.md +0 -195
  294. package/work-orders/I18N-1.md +0 -254
  295. package/work-orders/I18N-3.md +0 -207
  296. package/work-orders/MSG-3.md +0 -375
  297. package/work-orders/MSG-3b.md +0 -1002
  298. package/work-orders/MSG-3c.md +0 -378
  299. package/work-orders/MSG-3d.md +0 -268
  300. package/work-orders/MSG-3e.md +0 -164
  301. package/work-orders/MSG-3f.md +0 -391
  302. package/work-orders/MSG-6e.md +0 -308
  303. package/work-orders/MSG-6f.md +0 -214
  304. package/work-orders/MSG-6g.md +0 -244
  305. package/work-orders/MSG-6h.md +0 -238
  306. package/work-orders/MSG-6i.md +0 -271
  307. package/work-orders/MSG-6j.md +0 -117
  308. package/work-orders/NOTIF-12.md +0 -214
  309. package/work-orders/NOTIF-13.md +0 -142
  310. package/work-orders/NOTIF-14.md +0 -151
  311. package/work-orders/PRIM-1.md +0 -177
  312. package/work-orders/SHELL-1.md +0 -255
  313. package/work-orders/SHELL-2.md +0 -197
  314. package/work-orders/SHELL-3.md +0 -359
  315. package/work-orders/SHELL-4.md +0 -351
  316. package/work-orders/SHELL-5.md +0 -345
  317. package/work-orders/SHELL-6.md +0 -210
  318. package/work-orders/THEME-1.md +0 -587
  319. package/work-orders/THEME-10.md +0 -303
  320. package/work-orders/THEME-11.md +0 -208
  321. package/work-orders/THEME-2.md +0 -339
  322. package/work-orders/THEME-3.md +0 -210
  323. package/work-orders/THEME-4.md +0 -271
  324. package/work-orders/THEME-5.md +0 -341
  325. package/work-orders/THEME-6.md +0 -247
  326. package/work-orders/THEME-7.md +0 -82
  327. package/work-orders/THEME-8.md +0 -211
  328. package/work-orders/THEME-9.md +0 -194
  329. package/work-orders/UCM-AUTH-10.md +0 -490
  330. package/work-orders/UCM-AUTH-11.md +0 -185
  331. package/work-orders/UCM-AUTH-12.md +0 -98
  332. package/work-orders/UCM-AUTH-13.md +0 -47
  333. package/work-orders/UCM-AUTH-9.md +0 -207
  334. package/work-orders/UCM-CHART-10.md +0 -150
  335. package/work-orders/UCM-CHART-11.md +0 -132
  336. package/work-orders/UCM-CHART-12.md +0 -348
  337. package/work-orders/UCM-CHART-13.md +0 -122
  338. package/work-orders/UCM-CHART-14.md +0 -198
  339. package/work-orders/UCM-CHART-15.md +0 -187
  340. package/work-orders/UCM-CHART-16.md +0 -169
  341. package/work-orders/UCM-CHART-17.md +0 -195
  342. package/work-orders/UCM-CHART-18.md +0 -200
  343. package/work-orders/UCM-CHART-8.md +0 -147
  344. package/work-orders/UCM-CHART-9.md +0 -265
  345. package/work-orders/UCM-CHAT-1.md +0 -190
  346. package/work-orders/UCM-CHAT-2.md +0 -75
  347. package/work-orders/UCM-DEP-1.md +0 -63
  348. package/work-orders/UCM-I18N-4.md +0 -226
  349. package/work-orders/UCM-I18N-5.md +0 -211
  350. package/work-orders/UCM-MSG-20.md +0 -192
  351. package/work-orders/UCM-PRIM-2.md +0 -114
  352. package/work-orders/UCM-SHELL-7.md +0 -134
  353. package/work-orders/UCM-SHELL-8.md +0 -125
  354. package/work-orders/UCM-TEST-1.md +0 -304
  355. package/work-orders/UCM-THEME-13.md +0 -69
  356. package/work-orders/UCM-THEME-14.md +0 -312
  357. package/work-orders/UCM-THEME-15.md +0 -356
  358. package/work-orders/UCM-THEME-16.md +0 -80
  359. package/work-orders/UCM-THEME-17.md +0 -111
  360. package/work-orders/UCM-THEME-18.md +0 -184
  361. package/work-orders/assets/AUTH-4-user-list-card.html +0 -407
  362. package/work-orders/assets/PRIM-1-dashboard-primitives.html +0 -624
  363. package/work-orders/assets/SHELL-2-account-navigation.html +0 -1159
  364. package/work-orders/assets/THEME-1-baseline-reference-sheet.html +0 -1352
  365. package/work-orders/assets/UCM-CHAT-1-ai-chat.html +0 -447
  366. package/work-orders/assets/UCM-THEME-13-dark-prototype.html +0 -390
  367. package/work-orders/assets/UCM-THEME-17-type-scale.html +0 -391
@@ -1,304 +0,0 @@
1
- # UCM-TEST-1: A kit integration check every app runs in its own suite
2
-
3
- # A. Envelope, authored by the Expertenchat
4
-
5
- ## Goal & expected outcome
6
-
7
- The kit's auth screens are the same code in every app, so their behaviour is accepted once, in the kit.
8
- What differs per app is **how the app wires the kit in**: its i18n setup, its providers around the kit's
9
- pages, the `i18next` instance the kit reads. Today each bump order writes its own tests for that, app by
10
- app, and the operator walked the same auth flows by hand in every app.
11
-
12
- After this order the kit ships **one exported check**, `checkKitIntegration`, that an app calls from a
13
- single test in its own suite. It returns findings in the style of `assertThemeComplete`: an empty list
14
- means the app's wiring is sound. Every later bump in every app then re-checks the wiring automatically.
15
-
16
- **Operator decisions (2026-10-01):** the check lives centrally in the kit, not as copies per app; a
17
- separate, automated staging smoke covers the runtime (`workflow-templates` `WFT-CI-31`); bumps already
18
- in flight are not held up, and apps adopt the check with their next bump.
19
-
20
- ## Context the operator established
21
-
22
- - **Precedent for the shape:** `assertThemeComplete(theme)` returns `{ findings }`, is exported from the
23
- package root (`src/index.js:12`), and apps assert `findings` equals `[]`.
24
- - **What apps load from the kit for i18n:** `uiCoreTranslations` (`src/i18n/uiCoreTranslations.js`),
25
- which spreads the auth, charts, messaging, notifications, onboarding, section-nav and user-menu
26
- catalogues. Apps spread it into their own i18next resources at start-up, **kit keys last** (e.g.
27
- `survey_app/frontend/i18n/index.js`).
28
- - **Which `i18next` the kit reads:** `apiClient` imports the **default** `i18next` instance
29
- (`src/auth/apiClient.jsx:2,13`) to send `Accept-Language`. Kit components read `t` and `i18n` from
30
- `useTranslation()` (e.g. `src/pages/LoginPage.jsx:30`). `i18next`/`react-i18next` are peer
31
- dependencies.
32
- - **What the per-app bump orders tested by hand** (`survey_app` `SVA-DEP-1`/`SVA-DEP-2`): the kit's
33
- `SignUpPage` and `PasswordInvitePage` render inside the app's providers
34
- (`survey_app/frontend/src/AuthRoutesIntegration.test.jsx`), and `i18n.exists('Auth.field.email.invalid')`
35
- holds in the app's own i18n.
36
- - **The defect this guards against end to end:** a login with a malformed e-mail showed the raw code
37
- `invalid` (`UCM-AUTH-10`). The kit's resolver fixes it, but only if the app's i18n carries the kit's
38
- keys and the kit's pages run on the app's instance.
39
- - **Consumers measured 2026-09-30:** every consumer runs `vitest` with jsdom. Some mount `LoginPage`
40
- twice (`webshop-guenter` also in `src/pages/pwa/StaffLoginPage.jsx`). Several mock `react-i18next`
41
- globally in some test files.
42
-
43
- ## The check (decided)
44
-
45
- `checkKitIntegration({ i18n, wrapper, pages })` -> `Promise<{ findings }>`, exported from the package
46
- root. `i18n` is the app's own instance, `wrapper` the app's own provider component (whatever the app
47
- puts around its routes), `pages` the kit pages the app mounts (default: the kit's auth pages that the
48
- app imports). Each finding names its check and a reason. Four checks:
49
-
50
- 1. **Catalogue.** Every key in `uiCoreTranslations` resolves through the app's `i18n` in every language
51
- that both the kit ships (`de`/`en`/`fr`/`sw`) and the app supports. A missing key is one finding,
52
- with key and language.
53
- 2. **Instance.** The default `i18next` instance is initialised and is the instance the app passed in.
54
- Otherwise the finding says what will break: `Accept-Language` is missing or wrong.
55
- 3. **Render.** Each page in `pages` renders inside `wrapper` without throwing, and no rendered text
56
- node is a raw kit key (`Auth.*` or another key of the kit's catalogues) or a bare backend code. The
57
- check stubs the kit's `apiClient` transport for its own duration, so no request leaves the test, and
58
- restores it afterwards.
59
- 4. **Error text.** `LoginPage` inside `wrapper` receives, through that stub, exactly the allauth response
60
- from the original defect (`400`, `errors[0] = {code: "invalid", param: "email", message: ...}`). The
61
- shown text equals the app-language text of `Auth.field.email.invalid`.
62
-
63
- ## Scope + non-goals
64
-
65
- In scope: the function and its four checks; its export from the package root; a `README.md` section
66
- "Consumer integration check" with the one-line test an app writes; `CHANGELOG.md`; a **minor** release.
67
-
68
- Non-goals:
69
- - No change in any app. Adoption happens per app with its next bump, as its own row.
70
- - No runtime dependency added for consumers. Rendering uses the existing peers (`react`, `react-dom`).
71
- - No check of the app's test mocks. A suite whose mocks lack `i18n` still fails in that suite, as today.
72
- - No replacement for the kit's own tests. They keep owning the kit's behaviour.
73
- - No staging or browser check (`WFT-CI-31`).
74
-
75
- ## Tier · precondition / gate
76
-
77
- - **Tier 3 · tests: each of the four checks with a passing and a failing case; the kit's existing auth
78
- and i18n tests.** A change inside shared-core, on the auth surface.
79
- - Precondition: none.
80
- - Downstream: every app adopts it with its next kit bump. `WFT-CI-31` is independent of this order.
81
-
82
- ## Risks
83
-
84
- - **A check that cannot fail is decoration.** Each check needs a test showing it reports the specific
85
- defect: a missing key, a second `i18next` instance, a wrapper that throws, a raw code on screen.
86
- - **The transport stub must not leak.** If it is not restored, it silently swallows the requests of the
87
- tests that run after it. Restore it even when a check throws.
88
- - **Kit keys that the app intentionally leaves untranslated** for a language it does not offer must not
89
- become findings. Hence "languages both support" in check 1.
90
- - **Locally, importing the kit's root module crashes vitest's worker pool on this workstation**
91
- (`fitness-monitor` `FM-15`). That is an environment issue: CI is the evidence. The check itself must not
92
- add to the import weight of tests that do not call it.
93
-
94
- ## Required tests to WRITE (you write them and run YOUR OWN new ones; the Orchestrator's run is the gate)
95
-
96
- Kit test suite, one new file:
97
-
98
- 1. A correctly wired fixture app (own `i18n` with `uiCoreTranslations`, a provider wrapper) -> `findings`
99
- equals `[]`.
100
- 2. One key removed from the fixture's resources -> exactly one catalogue finding naming that key and
101
- language.
102
- 3. The fixture passes a separate `i18next` instance -> an instance finding.
103
- 4. A wrapper that throws -> a render finding naming the page.
104
- 5. The resolver bypassed (a fixture that shows `err.code`) -> an error-text finding.
105
- 6. After the check, a request through `apiClient` is no longer stubbed.
106
-
107
- Run, do not write: the kit's existing auth and i18n tests.
108
-
109
- ## Parity guardrail
110
-
111
- No change to any existing export, component or behaviour. The function is new and test-only in purpose.
112
-
113
- ---
114
-
115
- # B. Implementation map, filled by the Orchestrator and ADDRESSED TO THE IMPLEMENTER
116
-
117
- ## Context package
118
-
119
- ### Where this lives, and what it may depend on
120
-
121
- - New file `src/testing/checkKitIntegration.js` (new subdirectory, mirroring how `src/theme/` groups
122
- `assertThemeComplete`). Export `checkKitIntegration` from `src/index.js` at the root, next to the
123
- existing theme-completeness exports (line ~10-21) — same section-style comment, same pattern.
124
- - **Hard constraint from the Non-goals: "Rendering uses the existing peers (react, react-dom)" —
125
- this explicitly does NOT include `@testing-library/react`.** Every existing kit test uses RTL, but
126
- RTL is a devDependency of THIS repo, not a declared peer dependency — if the shipped function
127
- imported it, every consuming app would need RTL in its own `node_modules` at the exact version
128
- this kit expects, silently, which is exactly the "no runtime dependency added for consumers" this
129
- WO forbids. Render with plain `react-dom/client` (`createRoot`) and `act` from `react` — verified
130
- now: `import { act } from 'react'` resolves and is a function on this repo's installed React
131
- `19.2.6` (`node -e "console.log(typeof require('react').act)"` → `function`), so use that import,
132
- not the legacy `react-dom/test-utils` path. Read rendered output via plain
133
- DOM (`container.textContent`, `document.createTreeWalker`), not `screen`/`within`.
134
- - `react-router-dom` (`^7.15.1`) and `axios` (`^1.16.1`) ARE existing peers — safe to import
135
- `MemoryRouter` and to manipulate the shared `apiClient` axios instance directly.
136
-
137
- ### The four checks, in the order the Envelope lists them
138
-
139
- 1. **Catalogue.** Import `{ uiCoreTranslations }` from `'../i18n/uiCoreTranslations'`. For each key,
140
- for each language in the INTERSECTION of the kit's shipped languages
141
- (`['de','en','fr','sw']`) and the app's own supported languages, assert
142
- `i18n.exists(key, { lng: lang })` — **not** `i18n.exists(key)` alone, which only checks the
143
- CURRENT active language; i18next's `exists`/`t` both accept an `lng` option to check a specific
144
- language without switching the instance's active one (verify this against the installed
145
- `i18next` version's own typings/source before relying on it — do not assume from memory).
146
- Derive "the app's own supported languages" with this priority (first one that yields a
147
- non-empty array): `i18n.options?.supportedLngs` (filter out falsy entries and the literal
148
- string `'cimode'`, which i18next auto-adds) → `Object.keys(i18n.options?.resources || {})` →
149
- `i18n.languages` (least reliable, only the currently-resolved fallback chain — last resort).
150
- One finding per missing `(key, lang)` pair, naming both.
151
- 2. **Instance.** Import the kit's OWN default `i18next` singleton (`import i18next from 'i18next'`
152
- — the exact same import `src/auth/apiClient.jsx` already uses). Finding if `!i18next.isInitialized`
153
- OR `i18n !== i18next` (reference inequality — the whole point is catching an app that created a
154
- SEPARATE instance via `i18next.createInstance()` and wrapped its tree in its own
155
- `I18nextProvider`, which is exactly the Risk `UCM-AUTH-10` named: the kit's `apiClient` would then
156
- send `Accept-Language` from an uninitialized, different instance). Name what breaks in the
157
- reason text (`Accept-Language` will be missing or wrong) — do not just say "mismatch".
158
- 3. **Render.** For each page component in `pages` (default: `[LoginPage, SignUpPage,
159
- PasswordInvitePage]` — the three pages `UCM-AUTH-9`/`UCM-AUTH-10` actually touched, and the same
160
- set `survey_app`'s own `AuthRoutesIntegration.test.jsx` already covers by hand), render
161
- `<MemoryRouter><Wrapper><Page /></Wrapper></MemoryRouter>` into a fresh detached `div` (own
162
- `createRoot` per page, `root.unmount()` after each, even on failure — use try/finally per page,
163
- not one try around the whole loop, so one page's render failure doesn't skip scanning the rest).
164
- Wrap the render in `act(async () => { ... })` so effects/microtasks settle before you scan.
165
- Catch a throw during render → one finding naming the page's display name (`Page.displayName ||
166
- Page.name || 'page'`) and the error message; do NOT let it abort the whole check (catch per-page,
167
- continue the loop). If it didn't throw, walk every text node
168
- (`document.createTreeWalker(container, NodeFilter.SHOW_TEXT)`) and flag any whose TRIMMED content
169
- either (a) exactly equals a key in `uiCoreTranslations` (a literal untranslated key leaking to
170
- screen — the i18next missing-key echo), or (b) matches a bare lowercase/snake_case single-token
171
- shape with no spaces, e.g. `/^[a-z][a-z0-9_]*$/` and length > 2 (the exact shape of the original
172
- defect, a raw backend code like `invalid` — tune this pattern against Required Test #5's fixture
173
- until it fires on that fixture and not on ordinary rendered prose; do not accept the first regex
174
- that merely compiles). One finding per offending text node, naming the page and the text found.
175
- 4. **Error text.** This check is not driven by the `pages` array — it ALWAYS specifically exercises
176
- `LoginPage` (imported directly by this module), because it is testing the kit's resolver wiring
177
- through a real submit flow, not generic rendering. Render `LoginPage` the same way as check 3.
178
- Stub the credentials-login POST specifically — exact path, verified now:
179
- `/api/auth/browser/v1/auth/login` (`src/auth/authConfig.jsx`'s `HEADLESS_BASE` +
180
- `src/auth/authApi.jsx:99`'s `loginWithPassword`) — to reject with EXACTLY
181
- the operator's original defect shape:
182
- `{ response: { status: 400, data: { errors: [{ code: 'invalid', param: 'email', message: '<some
183
- backend text>' }] } } }` (a plain object is sufficient — `resolveErrorText`/`extractErrorInfo`
184
- only ever read `.response?.status`/`.response?.data` off the rejected value, nothing
185
- AxiosError-specific). Fill the email/password inputs via plain DOM (`input.value = '...'` +
186
- dispatching a real `input`/`change` `Event` so React's controlled-input `onChange` fires —
187
- `Object.getOwnPropertyDescriptor` trick may be needed to set a native input value in a way React
188
- notices; this is a well-known React-testing gotcha independent of any test-utility library, look
189
- it up if the naive `input.value = x; input.dispatchEvent(new Event('input'))` doesn't trigger the
190
- controlled state update) and submit (dispatch a `submit` Event on the form, or `.click()` the
191
- submit button). `await act(async () => { ...await flush... })` until the error text renders.
192
- Assert the rendered text equals `i18n.t('Auth.field.email.invalid')` evaluated in the APP's
193
- current active language (`i18n.language`), read via the SAME walk-and-scan helper check 3 uses
194
- (do not duplicate the scanning logic — factor it into one shared helper both checks call).
195
-
196
- ### Stubbing `apiClient` — must never leak, must restore even on throw
197
-
198
- `apiClient` (`src/auth/apiClient.jsx`, default export, an axios instance) is shared, module-singleton
199
- state — the SAME instance every kit page uses. Capture `const originalAdapter =
200
- apiClient.defaults.adapter;` BEFORE check 3 starts, install a replacement
201
- (`apiClient.defaults.adapter = async (config) => { ... }`) that, by default, REJECTS every request
202
- (so check 3's page renders — which must not make real network calls at all — fail loudly if they
203
- accidentally do, rather than hanging on a real fetch), and for check 4 specifically, additionally
204
- matches on `config.url` to return the fixture rejection ONLY for the login endpoint
205
- (`HEADLESS_BASE`-relative, check `src/auth/authApi.jsx`'s `loginWithPassword` for the exact path) and
206
- the default reject-everything behaviour for anything else. **Wrap the ENTIRE checks 3+4 body in a
207
- `try { ... } finally { apiClient.defaults.adapter = originalAdapter; }`** — the restore must run even
208
- if a render throws an error this code doesn't catch, even if an `expect`-shaped helper you write
209
- itself throws. This is Required Test #6's whole point and the Risk note's explicit warning.
210
-
211
- ### `README.md` — "Consumer integration check" section
212
-
213
- One short section with the one-line test an app writes, e.g.:
214
- ```js
215
- import { checkKitIntegration } from '@micha.bigler/ui-core-micha';
216
- import i18n from '../i18n'; // the app's own initialised default i18next instance
217
- import { AppProviders } from '../AppProviders'; // whatever the app wraps its routes in
218
-
219
- it('kit integration is sound', async () => {
220
- const { findings } = await checkKitIntegration({ i18n, wrapper: AppProviders });
221
- expect(findings).toEqual([]);
222
- });
223
- ```
224
- Name the default `pages` set explicitly (`LoginPage`, `SignUpPage`, `PasswordInvitePage`) and that an
225
- app can pass its own `pages` array to cover more/fewer pages.
226
-
227
- ### Test file — new, next to the existing kit tests (e.g. `tests/checkKitIntegration.test.js`)
228
-
229
- Build ONE minimal fixture i18next instance + a trivial `Wrapper` (e.g. just renders `children`, or a
230
- thin `AuthContext.Provider` with a fake user so `LoginPage`'s own context read doesn't throw) reused
231
- across the 6 Required Tests, each test mutating ONE thing away from "correctly wired":
232
- 1. Correctly wired fixture (own real `i18next.createInstance()` seeded with `uiCoreTranslations` in
233
- all 4 kit languages, THIS instance also assigned as the global default — i.e. do not create a
234
- second competing instance for the "passing" case, since check 2 would then always fail; for a
235
- realistic "app's own instance IS the default" fixture either call `i18next.init(...)` on the
236
- real default singleton directly, matching how an app actually does it, or structure the fixture
237
- so the "instance" check specifically is satisfiable) → `findings` is `[]`.
238
- 2. Remove one key's resources for one language from the fixture → exactly one catalogue finding
239
- naming that key and language.
240
- 3. Pass a SEPARATE `i18next.createInstance()` as `i18n` instead of the default singleton → an
241
- instance finding.
242
- 4. A `wrapper` that throws during render → a render finding naming the page.
243
- 5. **The actual regression proof:** stub the login POST to reject with the operator's exact shape
244
- but WITHOUT going through the kit's resolver (simulate "the resolver bypassed" by using a fixture
245
- `LoginPage`-equivalent harness only if you must — more directly: this is best proven by reverting
246
- `resolveErrorText`'s field-key step locally, confirming check 4 then reports an error-text
247
- finding instead of passing, then restoring — narrate this in `PROGRESS` as the transient
248
- mutation proof, same pattern as `UCM-AUTH-11`/`UCM-THEME-15` in this repo, rather than leaving a
249
- permanently reverted copy in the committed suite).
250
- 6. After calling `checkKitIntegration(...)` once, assert `apiClient.defaults.adapter` is back to
251
- whatever it was before the call (capture the reference beforehand) — proves restoration even on
252
- the success path; also add a case that makes an internal step throw (e.g. a page whose render
253
- throws) and still assert the adapter was restored afterwards (the `try/finally` must cover the
254
- failure path too, not just the happy path).
255
-
256
- Run, do not write: the kit's existing auth and i18n tests (grep `tests/` for
257
- `i18nAggregate`/`authErrors`/`resolveErrorText`/`loginPageErrorResolution` — these are the
258
- directly-dependent set the Orchestrator re-runs as the gate).
259
-
260
- ## Do-not-touch / invariants
261
-
262
- - No change to any existing export, component, or behaviour (Parity guardrail) — this is a new,
263
- additive, test-only function.
264
- - Do not add `@testing-library/react` (or any other new package) to `dependencies`,
265
- `peerDependencies`, or `devDependencies` for this function's own sake.
266
- - Do not touch `apiClient.jsx`'s actual interceptors/exports — only reach into
267
- `apiClient.defaults.adapter` from the NEW module, temporarily, with a guaranteed restore.
268
-
269
- ---
270
-
271
- # C. Orchestrator only, NOT ADDRESSED TO THE IMPLEMENTER
272
-
273
- > **If you are the implementer reading this work order as your own specification: STOP at this line.**
274
- > Everything below describes what the Orchestrator does AFTER you finish. You do none of it: no
275
- > reviewers, no verification run, no register edit, no `git add`/`commit`/`push`.
276
-
277
- ### Execution directive
278
-
279
- Check `.claude/codex-status.md` first (newest-first; read it with `head`). No line for today means use
280
- Codex. Before `git push`, run `git log origin/main..HEAD` and push only if every listed commit is this
281
- order's (parallel sessions share this checkout).
282
-
283
- ### Review routing
284
-
285
- Tier 3: independent `reviewer` (all configured lenses) and `ui_reviewer`, concurrent, one batch, before
286
- the commit. No `sec_reviewer`: the function adds no runtime path, it only reads what is already there.
287
-
288
- ### Verification
289
-
290
- Run the check once against a real consumer before release. `survey_app` is on `3.9.x` and has the closest
291
- existing test (`frontend/src/AuthRoutesIntegration.test.jsx`). Do it from a scratch copy or a local pack,
292
- never by committing to that repo. Name the result in the register Notiz.
293
-
294
- ### Register + commit + release
295
-
296
- Row -> `done` with the review Notiz in the `AGENTS.md` shape and the published version. The publish
297
- runs on push to `main` when `package.json`/`src/**` change; verify it through the job log
298
- (`npm view` lags for provenance publishes). Adoption rows per app are added by the Expertenchat when
299
- each app's next bump is scoped.
300
-
301
- ### Mini-handover
302
-
303
- `Orchestrator: implement work-orders/UCM-TEST-1.md in ui-core-micha (main). git pull first, read the WO,
304
- then follow orchestrate-codex.`
@@ -1,69 +0,0 @@
1
- # UCM-THEME-13: Freeze a dark-mode baseline token set
2
-
3
- # A. Envelope, authored by the Expertenchat
4
-
5
- ## Goal & expected outcome
6
-
7
- The central token file `src/theme/tokens.js` has one light baseline palette and no dark one. This order
8
- produces the **decided** dark token set as a committed reference sheet, `docs/DARK-TOKENS.md`. The
9
- operator freezes it before `UCM-THEME-14` puts those values into code. The output is a document. No
10
- source file changes here.
11
-
12
- Operator decision (2026-09-29): dark mode gets its own work order in the kit, rather than one app keeping
13
- a raw `createTheme` for it.
14
-
15
- ## Context the operator established
16
-
17
- - **One consumer today: `webshop-guenter`.** It has a light/dark switch (`frontend/src/App.jsx:96`)
18
- and a hand-built `darkTheme` from its operator design handoff (background `#0E0B08`, paper
19
- `#171209`, primary `#D49040`, secondary `#A88868`). Its adoption, `WSG-THEME-1`, is blocked on this
20
- order and on `UCM-THEME-14`. No other app in the estate renders a dark theme (measured 2026-09-29).
21
- - The light baseline covers: the palette (primary is app identity; secondary, the status family
22
- `success/warning/error/info/stale` with `main/light/dark/contrastText` plus `text/fill/bg`,
23
- `background.default/subtle/paper`, the text inks, `divider`, `controlBorder`), `dataSeries` (six
24
- categorical colours) and `shadow.rest/overlay`. Typography, radii, spacing, density and motion do not
25
- depend on the mode.
26
-
27
- ## Scope + non-goals
28
-
29
- In scope: `docs/DARK-TOKENS.md` with a value for every **mode-dependent** light token class listed
30
- above, each with a one-line reason, and a contrast table: every text/fill pair and every
31
- `main`-on-surface pair at 3:1 or better against the dark `background.default` and `background.paper`.
32
- Follow the `design-language` skill's process: inventory first, then a structural round, then values
33
- decided in an instrument, then the freeze.
34
-
35
- Non-goals:
36
- - No change to any light value.
37
- - No code, no tests. `UCM-THEME-14` implements.
38
- - No per-app dark identity. An app's dark primary stays that app's own, just as its light one does.
39
- - No automatic switching (`prefers-color-scheme`) and no toggle component. Apps own their switch.
40
-
41
- ## Tier · precondition / gate
42
-
43
- - **Tier 2 · tests: none (document only).** It decides the future content of shared-core, but it does
44
- not change shared-core. The code change is `UCM-THEME-14`, which is Tier 3.
45
- - Precondition: none.
46
- - Gate: **the operator freezes the sheet**, and the sheet itself says so with a dated section. Until
47
- then `UCM-THEME-14` does not start.
48
-
49
- ## Risks
50
-
51
- - **A dark palette drawn from a single app's handoff becomes that app's palette for everyone.**
52
- webshop-guenter's values are one input to the inventory, not the answer. It keeps its own values as
53
- identity in any case (`WSG-THEME-1`).
54
- - **Status tints (`bg`) are the class that breaks first on dark.** A light tint over a dark page fails
55
- contrast in the other direction.
56
-
57
- ---
58
-
59
- # B. Implementation map
60
-
61
- *Not applicable. This is an Expertenchat document order, authored in-session with the operator.*
62
-
63
- ---
64
-
65
- # C. Orchestrator only, NOT ADDRESSED TO THE IMPLEMENTER
66
-
67
- > **If you are the implementer reading this: STOP.** There is no implementer for this order.
68
-
69
- Register: row -> `done` with the commit of the frozen sheet. Downstream: `UCM-THEME-14` unblocks.