@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,169 +0,0 @@
1
- # DX-1 — minimal Vite dev harness for ucm components
2
-
3
- Status: done · **Tier 2** (dev-only tooling; **adds devDependencies → approval-gated**) · Target repo: `ui-core-micha` (main)
4
- *Reclassified 2026-08-01: labelled Tier 1 at authoring, but it adds dependencies in a shared-core
5
- repo — two binding Tier-2 surfaces per AGENTS.md's Tiering gate. A named independent `reviewer` did
6
- run (one P2 on the provider's own WebSocket), so only the label was wrong.*
7
-
8
- ---
9
-
10
- ## Part A — Envelope (Expertenchat, 2026-07-31)
11
-
12
- ### Goal
13
-
14
- Give `ui-core-micha` a way to **render** its components during development. Today `package.json`
15
- exposes only `build` (tsc) and `test` (vitest): there is no Storybook, no demo app, no dev page. Every
16
- shipped surface — auth, onboarding, notifications, charts — has only ever been verified in jsdom or
17
- after a consuming app pinned it.
18
-
19
- Immediate driver: MSG-3 is ~3700 LOC of new UI (jg's parity target: `Thread.jsx` alone is 2470 LOC)
20
- that no app mounts until MSG-5, and the operator granted a redesign licence, which is only iterable
21
- if the result can be looked at. But the gap is not messaging-specific and the harness is not
22
- messaging-specific.
23
-
24
- ### Expected outcome
25
-
26
- - A `pnpm dev` (or equivalent) script starting a Vite dev server that mounts ucm components in a
27
- browser, with the repo's MUI theme, `react-i18next` and router context wired the way a host app
28
- wires them.
29
- - A small set of harness entries covering the existing surfaces well enough to prove the harness is
30
- real: at minimum one notifications surface and one charts surface. Adding an entry for a new
31
- component must be a few lines, not a framework.
32
- - **A single component must be mountable standalone**, not only a whole assembled surface. MSG-3
33
- relies on this: it requires one harness entry per named component as its decomposition forcing
34
- function, so the harness must not assume an entry equals a full page.
35
- - A **mock transport layer** the entries drive: fixture data plus an injectable API/realtime adapter,
36
- so a surface can be exercised without a backend. Where a component takes its data through a
37
- provider, the harness supplies a mock provider rather than patching the component.
38
- - Light/dark theme and viewport switching, since responsive and dark-mode correctness is exactly what
39
- jsdom cannot show.
40
- - Harness code lives outside the published package: not exported from `src/index.js`, excluded from
41
- `tsconfig.build.json`, and adding **zero** runtime dependencies. `dist/` must be byte-identical in
42
- content to a build from before this WO.
43
- - `README` (or `CONTRIBUTING`) gains a short section on running the harness and adding an entry.
44
-
45
- ### Non-goals / do-not-touch
46
-
47
- Storybook (deliberately not chosen — a dev page is a fraction of the config surface and this repo has
48
- no story-writing habit to build on; revisit only if the harness proves insufficient); visual
49
- regression / screenshot testing; publishing the harness; any change to component source, exports, or
50
- public API; any change to the existing vitest setup; CI wiring (the harness is a local dev tool, not
51
- a gate).
52
-
53
- ### Required tests to WRITE
54
-
55
- This is dev tooling, so the meaningful assertions are about **not** affecting the product:
56
-
57
- - The published barrel (`src/index.js`) is unchanged — the existing exports regression test
58
- (`tests/notificationsExports.test.js` pattern) must still pass, and no harness module is reachable
59
- from it.
60
- - A build (`tsc -p tsconfig.build.json`) succeeds and emits no harness files into `dist/`.
61
- - `package.json` `dependencies` and `peerDependencies` are unchanged; additions are confined to
62
- `devDependencies`.
63
-
64
- No component behaviour is under test here — the existing suite covers that and must stay green.
65
-
66
- ### Risks
67
-
68
- - **Dependency addition** is the real cost and the reason this is approval-gated: Vite plus a React
69
- plugin. Keep it to the minimum; do not pull in a UI-catalog framework.
70
- - **Harness fidelity.** A mock adapter can drift from the real REST/realtime contract and produce
71
- confidence that does not transfer. Mitigation: fixtures are shaped from the actual dcm contract in
72
- `django-core-micha/docs/design/messaging-platform.md` §REST/§Realtime, and the harness is a
73
- development aid — it never replaces the tests or the independent review.
74
- - Scope creep into "a component gallery". The deliverable is a dev page, not a product.
75
-
76
- ### Preconditions
77
-
78
- Operator approval for the devDependency additions — granted 2026-07-31 as part of the MSG-3 scoping
79
- decision. This WO **runs before MSG-3**.
80
-
81
- ### Execution directive
82
-
83
- Implement through `codex exec` in the background — invoked **directly via Bash** (never the
84
- `debugger`/`*_coder` Agent wrappers) with **both** flags `--skip-git-repo-check` and
85
- `--dangerously-bypass-approvals-and-sandbox`, prompt passed as a positional argument from a file;
86
- fall back to direct Claude implementation only on Codex quota / rate-limit / non-zero exit.
87
-
88
- ### Release
89
-
90
- **No version bump, no publish.** Dev-only tooling changes nothing in the package. The next ucm
91
- publish rides whatever WO follows (MSG-3).
92
-
93
- ### Mini-handover (pastable)
94
-
95
- Orchestrator: implement `work-orders/DX-1.md` in `ui-core-micha` (main). `git pull` first, read the
96
- WO, then follow `orchestrate-codex` (Codex-first, own independent review, commit on green, **no
97
- publish**).
98
-
99
- ---
100
-
101
- ## Part B — Implementation map (Orchestrator)
102
-
103
- ### Target repo / working directory
104
-
105
- `C:\Users\biglmi\Documents\webapps\ui-core-micha` (repo root; package `@micha.bigler/ui-core-micha`,
106
- current published version 2.15.0 — **unchanged by this WO**, no publish).
107
-
108
- ### Context package
109
-
110
- **Repo conventions to mirror:**
111
- - `package.json` — current `scripts`: `build` (`tsc -p tsconfig.build.json`), `test` (`vitest run`).
112
- No `dev` script exists yet; add one. `peerDependencies`/`dependencies` must not change;
113
- `devDependencies` gains Vite + `@vitejs/plugin-react` only (or whatever minimal set a Vite+React+JSX
114
- dev server needs) — no UI-catalog framework, no Storybook.
115
- - `tsconfig.build.json` — `"include": ["src"]`, `rootDir: "./src"`, `outDir: "dist"`. The harness must
116
- live **outside** `src/` (e.g. a top-level `dev/` directory) so it is never included by this config
117
- and never emitted into `dist/`. Confirm after writing: `dist/` from a build with the harness present
118
- must be byte-identical to a build from before this WO (no new/changed files under `dist/`).
119
- - `src/index.js` — the published barrel. Do not add anything here for the harness itself; the harness
120
- imports FROM the barrel (or directly from component source, orchestrator's/Codex's call — importing
121
- from source is likely simpler and avoids a dist rebuild loop during dev) but nothing is added TO it.
122
- - `tests/notificationsExports.test.js` — the existing exports-regression pattern to confirm still
123
- passes untouched (proves the barrel didn't change).
124
- - `src/notifications/realtime.jsx` — `useRealtimeCore({ active, wsUrl })` returns `{ subscribe }`;
125
- `RealtimeContext` is the context the mock realtime provider must satisfy so components under it can
126
- call `useRealtime()` without throwing. The harness's mock realtime adapter should provide a
127
- `RealtimeContext.Provider` with an injectable `subscribe` (e.g. a manual event-dispatch harness) so
128
- a harness entry can simulate a WS frame arriving, without opening a real socket.
129
- - `src/notifications/NotificationsProvider.jsx` (read for the provider-wrapping pattern) — a
130
- representative provider-consuming surface for the "at minimum one notifications surface" harness
131
- entry requirement.
132
- - `src/i18n/notificationsTranslations.ts` / `src/i18n/chartsTranslations.ts` — the flat i18n key
133
- pattern; the harness needs `react-i18next` wired with at least these (or a minimal fixture set) so
134
- mounted components render translated text instead of raw keys.
135
- - Chart components (`ChartFrame`/`BarChart`/`LineChart`, per `tests/ChartFrame.test.jsx` etc.) — the
136
- "at minimum one charts surface" harness entry.
137
-
138
- **Invariants:**
139
- - Zero new runtime dependencies (peer or direct) — Vite/plugin additions are dev-only.
140
- - Harness is not exported, not built, not tested for behavior (only the three "does not affect the
141
- product" assertions in Required Tests below).
142
- - No change to the existing vitest test setup/config or any existing test file.
143
- - No CI wiring — this is a local dev tool.
144
-
145
- ### Required tests
146
-
147
- Per envelope: extend/confirm the exports-regression test still passes with nothing new reachable from
148
- it; a `build` succeeds and diffing `dist/` before/after shows no harness files and no content change;
149
- inspect `package.json` to confirm `dependencies`/`peerDependencies` are byte-identical and only
150
- `devDependencies` gained entries.
151
-
152
- ### Progress contract
153
-
154
- Narrate continuously: a `PLAN: <step1> | <step2> | …` line up front, then a single-line
155
- `PROGRESS: [<n>/<total>] <present-tense action>` before every relevant action (file opened, file
156
- edited, command/test run) and `PROGRESS: [<n>/<total>] done` on step completion, spaced so no gap
157
- exceeds ~2 min, stdout unbuffered, and exactly one final `RESULT: DONE|BLOCKED <reason>`.
158
-
159
- ### Preamble (must be appended verbatim to the Codex prompt)
160
-
161
- The text above is the COMPLETE spec — read nearest `AGENTS.md`, `.codex/skills/<role>/SKILL.md` (if
162
- present), and this repo's `MEMORY.md` only for conventions; stay in scope; do not touch
163
- `peerDependencies`/`dependencies`, only `devDependencies`; do not touch `src/index.js`'s exports; do
164
- not update `MEMORY.md`; do NOT `git add`/`commit`/`push` — leave the change uncommitted in the working
165
- tree for the orchestrator's independent review. WRITE and RUN the three required checks (exports test,
166
- build + dist diff, package.json dependency diff) yourself to confirm — that is your only verification
167
- run: do NOT run the full vitest suite as a "review" and do NOT run any review; the orchestrator does
168
- both after you finish (though re-running `vitest run` in full is harmless and encouraged as a sanity
169
- check since it's the existing test command, just don't treat it as satisfying the review step).
@@ -1,188 +0,0 @@
1
- # DX-2 — Declare `sideEffects` so consumers can tree-shake the kit
2
-
3
- **Target repo:** `ui-core-micha` (branch `main`)
4
- **Tier:** 3 — shared-core, and it changes what every consumer's bundler is permitted to discard.
5
-
6
- ---
7
-
8
- ## A. Envelope
9
-
10
- ### Goal
11
-
12
- `package.json` declares **no `sideEffects` field**. Without it a bundler must assume every module in the
13
- package can have an import side effect and therefore cannot drop unused exports. **Twelve consumers ship the
14
- whole kit regardless of what they import.**
15
-
16
- This is not a theory. `hram/THEME-2` switched hram from three named translation bundles to the full
17
- `uiCoreTranslations` aggregate and measured the built-size delta at **−11 bytes** — not the increase everyone
18
- expected, because the three-bundle import was already pulling all seven.
19
-
20
- ### Why this is worth a Tier-3 change
21
-
22
- Two decisions currently rest on a number that this defect makes meaningless:
23
-
24
- - **`I18N-1` measured `+28,943 B` raw / `+7,327 B` gzip** for an auth-only app switching to the aggregate.
25
- That measured a real difference in *source* reachability which the build never realises. As a decision input
26
- it is void.
27
- - **`I18N-2` is `blocked` on exactly this.** It was framed as a bundle-size optimisation via
28
- self-registration, and its stated input is a size delta that cannot be measured until the package can
29
- tree-shake at all. **This WO is its unblocker**, and it is a far smaller change than reworking how twelve
30
- consumers resolve strings.
31
-
32
- ### Scope
33
-
34
- 1. **Prove it first, per module.** Walk every module reachable from the package root and establish that
35
- importing it has **no** side effect: no top-level statement with an observable effect, no polyfill or
36
- registry mutation, no `import './x.css'` or equivalent, no module-scope singleton creation whose existence
37
- something depends on. **This is the work**; the field is one line.
38
- 2. **`package.json`** — add `"sideEffects": false` if step 1 holds for everything. If it does **not** hold for
39
- some module, add the array form listing exactly those files rather than the blanket `false`.
40
- 3. **Re-measure the delta `I18N-1` got wrong**: the built size of an auth-only app importing only
41
- `authTranslations` versus the full aggregate, against a package that can now tree-shake. Report the number.
42
- 4. Update `I18N-2`'s register note with that number, so it is either authorable or droppable on evidence.
43
-
44
- ### Non-goals / do not touch
45
-
46
- - **No `exports` map.** It would allow subpath imports and give a further size win, but it changes which
47
- import paths resolve at all — a breaking-change risk for twelve consumers in the same commit. Separate
48
- decision, and this WO's measurement is its input.
49
- - **No component, theme, chart or i18n change.** Nothing in `src/` is edited for its own sake; the only source
50
- changes permitted are ones step 1 proves are needed to make a module genuinely side-effect-free, and each
51
- must be reported rather than folded in silently.
52
- - **No consumer pin bumps.** Apps pick this up when they next bump.
53
- - **`I18N-2` itself.** This unblocks it; it does not implement it.
54
-
55
- ### Risks
56
-
57
- - **The real failure mode is a false `sideEffects: false`.** If a module *does* have an import side effect and
58
- the field says otherwise, a bundler silently drops it and the consuming app breaks at runtime in a way no
59
- test here will catch. That is why step 1 is the scope and the field is an afterthought. **If any module is
60
- uncertain, use the array form and list it** — a partial declaration that is true beats a blanket one that is
61
- nearly true.
62
- - **`side effect` includes the theme.** `createAppTheme`, the token module and the registry are the places to
63
- look hardest: a module that builds an object at import time is fine, but one that *registers* itself
64
- somewhere is not.
65
- - **Every consumer's bundle changes shape**, even though no source behaviour changes. That is the intent, and
66
- it is why this is Tier 3 rather than a chore.
67
-
68
- ### Required tests to WRITE
69
-
70
- - **A test asserting the field matches reality** is not really possible in-repo — a bundler is what enforces
71
- it. So instead: **one build-level check** that the package builds and its entry points still resolve after
72
- the declaration, plus the measurement in scope item 3 recorded as a number in the register note.
73
- - If step 1 finds a module needing a source change to become side-effect-free, that change gets a test.
74
- - Otherwise **no new unit tests** — and saying so is the correct answer for a `package.json` field.
75
-
76
- Scoped run: the existing suite, to confirm nothing regressed. Not a full-estate exercise.
77
-
78
- ### Parity guardrail
79
-
80
- No API, behaviour or visual change. Every currently-working import must keep working; what changes is only
81
- what a consumer's bundler may discard.
82
-
83
- ---
84
-
85
- ## B. Implementation map
86
-
87
- *Filled by the Orchestrator on `git pull` — see `AGENTS.md` → "Work Order".*
88
-
89
- **Repo root:** `ui-core-micha` (this is the package root — `package.json` lives here, `src/index.js` is
90
- the package entry per `"main"`/`"module"`). Build: `pnpm run build` (tsc, `tsconfig.build.json`,
91
- `rootDir: src` → `outDir: dist`). Tests: `pnpm test` (vitest run), config likely under `tests/` or
92
- `vite.config.mjs`.
93
-
94
- **Entry point to walk:** [`src/index.js`](../src/index.js) — every export re-exported from here is a
95
- module the audit must cover. Rough module groups, in the order they're exported: `theme/` (7 exports),
96
- `auth/` (AuthContext, UserMenu, apiClient, authApi, authService), `layout/` (PageLayout, SectionNav),
97
- `pages/` (7 page components), `components/` (12 components incl. charts subtree), `i18n/` (7 translation
98
- bundle modules, pure data objects), `notifications/` (7 exports incl. a `realtime` module — check for
99
- WebSocket/EventSource construction at module scope, not just component-body), `messaging/` (13 exports,
100
- same realtime-connection caution), `onboarding/` (8 exports).
101
-
102
- **Known non-trivial finding — do not silently "fix" this, report it:**
103
- [`src/theme/createAppTheme.js:1-3`](../src/theme/createAppTheme.js) has three top-level
104
- `import '@fontsource/dm-sans/400.css'` (+ `/500.css`, `/600.css`) — these ARE import-level side effects
105
- (CSS injected into the document on import, unconditionally, regardless of whether `createAppTheme` is
106
- even called). This module must be **excluded** from a blanket `sideEffects: false` — either list
107
- `src/theme/createAppTheme.js` explicitly in the array form, or (better, since it's a source-level fix
108
- consistent with the WO's "no false negatives" risk framing) move the three font-CSS imports into a
109
- separate module (e.g. `src/theme/fonts.css.js` or inline at the one leaf that needs them) so the rest of
110
- `theme/` stays tree-shakeable and only that one file is excluded. Whichever path is taken, it must be
111
- **reported explicitly** in the WO's audit output, not folded in silently (Envelope: "each must be
112
- reported rather than folded in silently").
113
-
114
- **Areas most likely to hide further side effects (audit these hardest, per the Envelope's own risk
115
- note):** `theme/` (registry singletons — `KIT_COMPONENT_SX_REGISTRY` is exported as a value; confirm it's
116
- a plain object literal built at import with no external registration call), `notifications/realtime.js`
117
- and `messaging/` (anything opening a socket/listener at module scope rather than inside a hook/effect),
118
- `auth/apiClient.js` (axios instance creation is fine — a side-effect-free object build — but check for
119
- any `axios.interceptors.*.use(...)` called at module scope outside a factory function, which would be a
120
- real side effect since it mutates a shared axios default instance).
121
-
122
- **Do-not-touch:** no `exports` map in `package.json` (Envelope non-goal). No component/theme/chart/i18n
123
- behaviour change — only source edits that make a module genuinely side-effect-free, each reported.
124
-
125
- **Progress contract:** emit `PLAN: …` first, then `PROGRESS: [n/total] <module-group>` before auditing
126
- each group above and `… done` after, and a final `RESULT: DONE` or `RESULT: BLOCKED <reason>`. No gap
127
- > ~2 min. Work from this package — open files only to verify specific claims, not a blind full-repo read.
128
-
129
- ## Preamble
130
-
131
- The text above is the COMPLETE spec — the committed WO file's content, not a plan to refine; there is
132
- no separate plan file. Read the nearest `AGENTS.md`, the relevant `.codex/skills/<role>/SKILL.md`, and
133
- the app `MEMORY.md` ONLY for conventions. Stay in scope; do not touch auth/permissions/deps/schema/CI
134
- unless the spec says so; do not update `MEMORY.md`. **Do NOT edit `WORK_ORDERS.md`** — the register row
135
- and the review verdicts are the orchestrator's alone. Do NOT `git add`/`commit`/`push` — leave every
136
- change uncommitted in the working tree for the orchestrator's independent review. WRITE the tests the
137
- "Required tests to WRITE" section calls for AND **RUN the tests you just wrote** to confirm they execute
138
- and pass — that is the ONLY test run you do (NOT the app's affected/full suite, NOT any review). The
139
- orchestrator re-runs the authoritative set + does the independent review after you finish — those are
140
- the gate; your own run does not count as the gate.
141
-
142
- Narrate continuously: a `PLAN: <step1> | <step2> | …` line up front, then a single-line
143
- `PROGRESS: [<n>/<total>] <present-tense action>` before every relevant action (and `… done` on
144
- completion), spaced so no gap exceeds ~2 min, stdout unbuffered, plus exactly one final
145
- `RESULT: DONE|BLOCKED <reason>`.
146
-
147
- ---
148
-
149
- ## C. Orchestrator only
150
-
151
- > **STOP — if you are the implementer reading this work order as your own specification, this section is NOT
152
- > addressed to you. Skip it entirely.** It tells the Orchestrator how to invoke you. **You ARE that
153
- > invocation — do NOT shell out to `codex exec`, do NOT spawn reviewers, do NOT edit `WORK_ORDERS.md`, and do
154
- > NOT `git add`/`commit`/`push`.**
155
-
156
- ### Execution directive
157
-
158
- Check `.claude/codex-status.md` first. **No line for the current date means use Codex.** A dated `unavailable`
159
- line for today means skip the attempt, implement directly in Claude and name the record — that flips
160
- authorship. Otherwise one probe, outcome written back either way.
161
-
162
- ### Review routing
163
-
164
- Tier 3: **independent `reviewer`** — mandatory, and the substantive one here: ask it to **independently
165
- re-check the side-effect audit**, module by module, rather than accept the implementer's list. That audit is
166
- the entire safety argument. **No `ui_reviewer`** — nothing renders. No `sec_reviewer`.
167
-
168
- ### Verification
169
-
170
- Nothing renders, so no gate. The verification is the audit plus the re-measured delta, both reported as
171
- findings rather than assertions.
172
-
173
- **A push to `main` here IS the npm publish** — `publish.yml` triggers on `push: branches: [main]` with `paths`
174
- covering `package.json` and `src/**`, and npm publishes cannot be undone. So decide the version deliberately
175
- before pushing: this is a **patch** by scope (no new capability, no API change), and it will go out the moment
176
- it lands.
177
-
178
- ### Register + commit
179
-
180
- One row, `DX-2`. `done` only with the independent reviewer and verdict named, plus the measured delta.
181
- Update `I18N-2`'s note in the same commit — that cross-reference is half the point of this WO.
182
-
183
- ### Mini-handover
184
-
185
- Repo: `ui-core-micha`, branch `main`. WO: `work-orders/DX-2.md`. The one-line field is trivial; **the
186
- per-module side-effect audit is the work**, and a wrong `false` breaks consumers silently at runtime. Use the
187
- array form if anything is uncertain. Re-measure the aggregate delta and write it into `I18N-2`. Tier 3,
188
- `reviewer` mandatory and asked to redo the audit. **Pushing to main publishes.** Follow `orchestrate-codex`.
@@ -1,195 +0,0 @@
1
- # DX-3 — `publish.yml` tests before it builds, so `2.41.2` cannot publish
2
-
3
- **Target repo:** `ui-core-micha` (branch `main`)
4
- **Tier:** 3 — CI is a Tier-3 surface regardless of diff size.
5
-
6
- Short-form WO: two steps swapped, then an operator-confirmed dispatch.
7
-
8
- ---
9
-
10
- ## A. Envelope
11
-
12
- ### Goal
13
-
14
- `DX-2` landed on `main` (`31675d8`, `e75192f`) and **its publish failed**, so `@micha.bigler/ui-core-micha`
15
- is still at `2.41.1` on the registry while `package.json` says `2.41.2`. Nothing DX-2 produced can be
16
- consumed until this is fixed.
17
-
18
- Cause, from run
19
- [32029216699](https://github.com/bigler-webapps/ui-core-micha/actions/runs/32029216699) —
20
- `completed/failure`:
21
-
22
- ```
23
- FAIL tests/packageTreeShaking.test.js > built package entries resolve and unused translation bundles tree-shake
24
- Error: ENOENT: no such file or directory, lstat '.../ui-core-micha/dist'
25
- Test Files 1 failed | 64 passed (65)
26
- Tests 1 failed | 510 passed (511)
27
- ```
28
-
29
- `publish.yml` runs **`Run tests` before `Build`**. `DX-2`'s new test copies the package's own `dist/` to
30
- assemble a fake installed consumer, and **`dist/` is gitignored** (`.gitignore:2`), so in a clean checkout
31
- it does not exist yet. The test is not flaky and it is not wrong — it inspects the built artifact, which is
32
- the whole point of it. **It simply cannot pass in the order the workflow runs.**
33
-
34
- It passed locally at 511/511 because a `dist/` from an earlier `pnpm run build` was lying around. That is
35
- the failure mode, not the test.
36
-
37
- ### Scope
38
-
39
- 1. **`.github/workflows/publish.yml`** — move the `Build` step **above** `Run tests`.
40
- **Both steps carry `if: steps.version_check.outputs.should_publish == 'true'`; that condition must stay
41
- on each.** Nothing else in the file changes.
42
- 2. **Publish `2.41.2`** — see the dispatch note below, which is the part most likely to be missed.
43
-
44
- ### The dispatch is required, and it is not automatic
45
-
46
- `publish.yml` triggers on `push` to `main` filtered to `package.json`, `pnpm-lock.yaml`, `src/**` and
47
- `tsconfig.build.json`. **`.github/workflows/**` is not in that list**, so landing this fix does **not**
48
- re-trigger the publish. `2.41.2` would sit unpublished until some unrelated `src/**` change happened to
49
- push it out.
50
-
51
- So: after the fix lands, **dispatch `publish.yml` on `main`**. `publish.yml` is **not** on the dispatch
52
- safe-allowlist (`weekly-routines`, `terraform-plan`), so per `AGENTS.md` name the exact workflow and inputs
53
- and **wait for an explicit operator go** before running it.
54
-
55
- `should_publish` compares `package.json` against the registry, so with `2.41.2` local and `2.41.1`
56
- published it will evaluate true and the dispatch will publish. No version bump is needed for this WO — and
57
- none should be added, because the artifact being published is DX-2's, not this WO's.
58
-
59
- ### Non-goals / do not touch
60
-
61
- - **`tests/packageTreeShaking.test.js`.** It is correct. Do not make it build `dist/` itself, do not skip it
62
- when `dist/` is absent, and above all do not delete it — a skip would silently retire the only check that
63
- the `sideEffects` declaration actually tree-shakes, which is DX-2's entire deliverable.
64
- - **The `sideEffects` array, `src/theme/fonts.js`, or anything else DX-2 landed.** Reviewed and correct.
65
- - **The trigger `paths` list.** Adding `.github/workflows/**` would make every workflow edit attempt a
66
- publish. That is a worse default than one dispatch.
67
- - **The version.** Stays `2.41.2`.
68
- - Any other workflow, any source file.
69
-
70
- ### Recorded, deliberately out of scope
71
-
72
- **`publish.yml` is the only workflow in this repo that runs tests, and it runs them only when
73
- `should_publish == 'true'`.** So ucm's suite executes in CI *only on a version bump* — a `src/**` change
74
- that does not bump the version is never tested by CI at all. That is a real gap in a shared-core package
75
- consumed by twelve apps, and it is a separate decision (a `ci.yml` for this repo, or a `pull_request`
76
- trigger), not something to fold into a two-line reorder.
77
-
78
- ### Risks
79
-
80
- - **Low, and the shape is known**: after the swap a build failure surfaces before test results instead of
81
- after. That is an improvement, not a regression — you want to know the artifact is buildable before
82
- spending 64 s on tests against it.
83
- - **The real risk is stopping at the commit.** A landed reorder with no dispatch leaves `2.41.2`
84
- unpublished and looks done. The acceptance criterion below is the registry, not the workflow file.
85
-
86
- ### Required tests to WRITE
87
-
88
- **None.** Nothing to unit-test in a step reorder, and manufacturing one would be noise. The verification is
89
- a green run plus the registry.
90
-
91
- ### Acceptance
92
-
93
- 1. A `publish.yml` run on `main` completes **green**, with `tests/packageTreeShaking.test.js` **passing**
94
- rather than skipped — 511/511.
95
- 2. **`npm view @micha.bigler/ui-core-micha version` returns `2.41.2`.** The registry is the acceptance,
96
- not the commit and not the green tile.
97
-
98
- ### Parity guardrail
99
-
100
- No source, API, behaviour or visual change. What changes is the order two CI steps run in.
101
-
102
- ---
103
-
104
- ## B. Implementation map
105
-
106
- *Filled by the Orchestrator on `git pull` — see `AGENTS.md` → "Work Order".*
107
-
108
- **Repo root:** `ui-core-micha` (workflow lives at repo root, `.github/workflows/publish.yml`).
109
-
110
- **Exact change:** in [`.github/workflows/publish.yml`](../.github/workflows/publish.yml), the step
111
- order today (verified on `git pull`, lines 112-118) is:
112
-
113
- ```yaml
114
- - name: Run tests
115
- if: steps.version_check.outputs.should_publish == 'true'
116
- run: pnpm run test
117
-
118
- - name: Build
119
- if: steps.version_check.outputs.should_publish == 'true'
120
- run: pnpm run build
121
- ```
122
-
123
- Swap so `Build` runs first, `Run tests` second — same two `if:` conditions, unchanged, one on each
124
- step. Nothing else in the file (`Check out code`, `Set up Node`, `Decide whether to publish`,
125
- `Set up pnpm`, `Show version from package.json`, `Install dependencies (pnpm)`,
126
- `Ensure recent npm for trusted publishing`, `Publish to npm`) moves or changes.
127
-
128
- **Do-not-touch (repeat of the Envelope's non-goals, stated here for the implementer):**
129
- `tests/packageTreeShaking.test.js`, the `sideEffects` array / `src/theme/fonts.js` (DX-2, already
130
- landed and reviewed), the `on: push: paths` trigger list, `package.json`'s version (stays `2.41.2`).
131
- This WO touches exactly one file.
132
-
133
- **Progress contract:** `PLAN: …` naming the single edit, `PROGRESS: [1/1] swap Build/Run-tests order
134
- in publish.yml … done`, then `RESULT: DONE`.
135
-
136
- ## Preamble
137
-
138
- The text above is the COMPLETE spec — the committed WO file's content, not a plan to refine; there is
139
- no separate plan file. Read the nearest `AGENTS.md`, the relevant `.codex/skills/<role>/SKILL.md`, and
140
- the app `MEMORY.md` ONLY for conventions. Stay in scope; do not touch auth/permissions/deps/schema/CI
141
- beyond the one named swap. Do not update `MEMORY.md`. **Do NOT edit `WORK_ORDERS.md`** — the register
142
- row and the review verdicts are the orchestrator's alone. Do NOT `git add`/`commit`/`push`, and do NOT
143
- dispatch any workflow — leave every change uncommitted in the working tree for the orchestrator's
144
- independent review. This WO's "Required tests to WRITE" is explicitly **none** — do not write or run
145
- any test; there is nothing to verify locally that the orchestrator's own read of the diff and the
146
- reviewer's pass don't already cover.
147
-
148
- Narrate continuously: a `PLAN: <step1> | …` line up front, then a single-line
149
- `PROGRESS: [<n>/<total>] <present-tense action>` before every relevant action (and `… done` on
150
- completion), spaced so no gap exceeds ~2 min, stdout unbuffered, plus exactly one final
151
- `RESULT: DONE|BLOCKED <reason>`.
152
-
153
- ---
154
-
155
- ## C. Orchestrator only
156
-
157
- > **STOP — if you are the implementer reading this work order as your own specification, this section is NOT
158
- > addressed to you. Skip it entirely.** It tells the Orchestrator how to invoke you. **You ARE that
159
- > invocation — do NOT shell out to `codex exec`, do NOT spawn reviewers, do NOT edit `WORK_ORDERS.md`, do
160
- > NOT dispatch any workflow, and do NOT `git add`/`commit`/`push`.**
161
-
162
- ### Execution directive
163
-
164
- Check `.claude/codex-status.md` first. **No line for the current date means use Codex.** A dated
165
- `unavailable` line for today means skip the attempt, implement directly in Claude and name the record —
166
- that flips authorship, which keeps the independent `reviewer` mandatory. Otherwise one probe, outcome
167
- written back either way.
168
-
169
- ### Review routing
170
-
171
- Tier 3: **independent `reviewer`** — mandatory even for two lines, because CI is the surface. **No
172
- `ui_reviewer`** (nothing renders), no `sec_reviewer`. Ask the reviewer to confirm the `if:` conditions
173
- survived the move on **both** steps — dropping one would make a step run unconditionally, which is the only
174
- way a two-line reorder can go wrong.
175
-
176
- ### Verification
177
-
178
- Acceptance criterion 2 is the verification: **read the registry.** A green tile is not a publish, and this
179
- session has now had the publish status misreported in both directions on the same package — once assumed
180
- published when it was not, once assumed unpublished when it was. `npm view`, every time.
181
-
182
- ### Register + commit
183
-
184
- One row, `DX-3`. `done` only with the reviewer's verdict named **and** the registry showing `2.41.2`. Also
185
- update `DX-2`'s note: it currently reads as fully delivered, and it was not — its publish failed. Leaving
186
- that uncorrected is how the next person concludes `2.41.2` is available when it is not.
187
-
188
- ### Mini-handover
189
-
190
- Repo: `ui-core-micha`, branch `main`. WO: `work-orders/DX-3.md`. Move `Build` above `Run tests` in
191
- `.github/workflows/publish.yml`, keeping the `if: should_publish` condition on both. Then **ask the operator
192
- to confirm a `publish.yml` dispatch on `main`** — the workflow's own path filter excludes
193
- `.github/workflows/**`, so landing the fix does not re-trigger it, and `2.41.2` stays unpublished until
194
- someone dispatches. Acceptance is `npm view` returning `2.41.2`, not a green tile. Tier 3, `reviewer`
195
- mandatory. Follow `orchestrate-codex`.