@semiont/react-ui 0.2.35-build.101 → 0.2.35-build.103

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 (208) hide show
  1. package/dist/{EventBusContext-DMI4uwYk.d.mts → EventBusContext-BsIUjdWP.d.mts} +4 -4
  2. package/dist/{PdfAnnotationCanvas.client-HNYRKFDS.mjs → PdfAnnotationCanvas.client-COQREPXU.mjs} +7 -7
  3. package/dist/PdfAnnotationCanvas.client-COQREPXU.mjs.map +1 -0
  4. package/dist/ar-7SUXNE34.mjs +376 -0
  5. package/dist/ar-7SUXNE34.mjs.map +1 -0
  6. package/dist/bn-XOET3DOI.mjs +376 -0
  7. package/dist/bn-XOET3DOI.mjs.map +1 -0
  8. package/dist/{chunk-YI5IX5ZA.mjs → chunk-2HGWOLVN.mjs} +1 -1
  9. package/dist/{chunk-YI5IX5ZA.mjs.map → chunk-2HGWOLVN.mjs.map} +1 -1
  10. package/dist/{chunk-3FIQXKQF.mjs → chunk-Q2KV6Y2J.mjs} +28 -28
  11. package/dist/{chunk-MWQ5CNKW.mjs → chunk-ZPV43WN2.mjs} +11 -11
  12. package/dist/chunk-ZPV43WN2.mjs.map +1 -0
  13. package/dist/cs-X63DXX7L.mjs +376 -0
  14. package/dist/cs-X63DXX7L.mjs.map +1 -0
  15. package/dist/da-OWTCV57A.mjs +376 -0
  16. package/dist/da-OWTCV57A.mjs.map +1 -0
  17. package/dist/de-77BMFDVF.mjs +376 -0
  18. package/dist/de-77BMFDVF.mjs.map +1 -0
  19. package/dist/el-FIBNLH2V.mjs +376 -0
  20. package/dist/el-FIBNLH2V.mjs.map +1 -0
  21. package/dist/fa-3N4CIWE6.mjs +376 -0
  22. package/dist/fa-3N4CIWE6.mjs.map +1 -0
  23. package/dist/fi-JOM3M7Z4.mjs +376 -0
  24. package/dist/fi-JOM3M7Z4.mjs.map +1 -0
  25. package/dist/fr-56QSXS7E.mjs +376 -0
  26. package/dist/fr-56QSXS7E.mjs.map +1 -0
  27. package/dist/he-SNAXPJEK.mjs +376 -0
  28. package/dist/he-SNAXPJEK.mjs.map +1 -0
  29. package/dist/hi-CRBRD5TB.mjs +376 -0
  30. package/dist/hi-CRBRD5TB.mjs.map +1 -0
  31. package/dist/id-BRCVLICF.mjs +376 -0
  32. package/dist/id-BRCVLICF.mjs.map +1 -0
  33. package/dist/index.d.mts +164 -164
  34. package/dist/index.mjs +195 -195
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/it-M2Z27BNB.mjs +376 -0
  37. package/dist/it-M2Z27BNB.mjs.map +1 -0
  38. package/dist/ja-TZUKW7HD.mjs +376 -0
  39. package/dist/ja-TZUKW7HD.mjs.map +1 -0
  40. package/dist/ko-NKBGGOL6.mjs +376 -0
  41. package/dist/ko-NKBGGOL6.mjs.map +1 -0
  42. package/dist/ms-XFXPN6RX.mjs +376 -0
  43. package/dist/ms-XFXPN6RX.mjs.map +1 -0
  44. package/dist/nl-MVYXAS5C.mjs +379 -0
  45. package/dist/nl-MVYXAS5C.mjs.map +1 -0
  46. package/dist/no-XOLO4JPV.mjs +376 -0
  47. package/dist/no-XOLO4JPV.mjs.map +1 -0
  48. package/dist/pl-TRWLMMC4.mjs +376 -0
  49. package/dist/pl-TRWLMMC4.mjs.map +1 -0
  50. package/dist/pt-M3TE24UI.mjs +376 -0
  51. package/dist/pt-M3TE24UI.mjs.map +1 -0
  52. package/dist/ro-QBFG2T64.mjs +376 -0
  53. package/dist/ro-QBFG2T64.mjs.map +1 -0
  54. package/dist/sv-IUECBXWX.mjs +376 -0
  55. package/dist/sv-IUECBXWX.mjs.map +1 -0
  56. package/dist/test-utils.d.mts +2 -2
  57. package/dist/test-utils.mjs +2 -2
  58. package/dist/th-US7KIN5Q.mjs +376 -0
  59. package/dist/th-US7KIN5Q.mjs.map +1 -0
  60. package/dist/tr-DWJ2FFUK.mjs +376 -0
  61. package/dist/tr-DWJ2FFUK.mjs.map +1 -0
  62. package/dist/uk-M4ZE4DPZ.mjs +376 -0
  63. package/dist/uk-M4ZE4DPZ.mjs.map +1 -0
  64. package/dist/vi-FERZNPSH.mjs +376 -0
  65. package/dist/vi-FERZNPSH.mjs.map +1 -0
  66. package/dist/zh-3J2I3WYK.mjs +376 -0
  67. package/dist/zh-3J2I3WYK.mjs.map +1 -0
  68. package/package.json +1 -1
  69. package/src/components/AnnotateReferencesProgressWidget.tsx +5 -5
  70. package/src/components/CodeMirrorRenderer.tsx +5 -5
  71. package/src/components/Toolbar.tsx +2 -2
  72. package/src/components/annotation/AnnotateToolbar.tsx +9 -9
  73. package/src/components/annotation/__tests__/AnnotateToolbar.test.tsx +17 -17
  74. package/src/components/image-annotation/AnnotationOverlay.tsx +10 -10
  75. package/src/components/image-annotation/SvgDrawingCanvas.tsx +4 -4
  76. package/src/components/navigation/CollapsibleResourceNavigation.tsx +7 -7
  77. package/src/components/navigation/ObservableLink.tsx +3 -3
  78. package/src/components/navigation/SimpleNavigation.tsx +2 -2
  79. package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +8 -8
  80. package/src/components/resource/AnnotateView.tsx +12 -12
  81. package/src/components/resource/BrowseView.tsx +9 -9
  82. package/src/components/resource/ResourceViewer.tsx +23 -23
  83. package/src/components/resource/__tests__/BrowseView.test.tsx +27 -27
  84. package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +1 -1
  85. package/src/components/resource/panels/AssessmentEntry.tsx +2 -2
  86. package/src/components/resource/panels/AssessmentPanel.tsx +7 -7
  87. package/src/components/resource/panels/AssistSection.tsx +5 -5
  88. package/src/components/resource/panels/CommentEntry.tsx +2 -2
  89. package/src/components/resource/panels/CommentsPanel.tsx +7 -7
  90. package/src/components/resource/panels/HighlightEntry.tsx +2 -2
  91. package/src/components/resource/panels/HighlightPanel.tsx +5 -5
  92. package/src/components/resource/panels/ReferenceEntry.tsx +8 -8
  93. package/src/components/resource/panels/ReferencesPanel.tsx +10 -10
  94. package/src/components/resource/panels/ResourceInfoPanel.tsx +6 -6
  95. package/src/components/resource/panels/TagEntry.tsx +2 -2
  96. package/src/components/resource/panels/TaggingPanel.tsx +8 -8
  97. package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +2 -2
  98. package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +4 -4
  99. package/src/components/resource/panels/__tests__/AssistSection.test.tsx +4 -4
  100. package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +8 -8
  101. package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +3 -3
  102. package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +1 -1
  103. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +3 -3
  104. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +9 -9
  105. package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +5 -5
  106. package/src/features/admin-devops/components/AdminDevOpsPage.tsx +1 -1
  107. package/src/features/admin-security/components/AdminSecurityPage.tsx +1 -1
  108. package/src/features/admin-users/components/AdminUsersPage.tsx +1 -1
  109. package/src/features/moderate-entity-tags/components/EntityTagsPage.tsx +1 -1
  110. package/src/features/moderate-recent/components/RecentDocumentsPage.tsx +1 -1
  111. package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +1 -1
  112. package/src/features/resource-compose/components/ResourceComposePage.tsx +1 -1
  113. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +1 -1
  114. package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +26 -26
  115. package/src/features/resource-viewer/__tests__/AnnotationDeletionIntegration.test.tsx +21 -21
  116. package/src/features/resource-viewer/__tests__/AnnotationProgressDismissal.test.tsx +23 -23
  117. package/src/features/resource-viewer/__tests__/{ResolutionFlowIntegration.test.tsx → BindFlowIntegration.test.tsx} +49 -49
  118. package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +18 -18
  119. package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +19 -19
  120. package/src/features/resource-viewer/__tests__/ResourceMutations.test.tsx +19 -19
  121. package/src/features/resource-viewer/__tests__/ToastNotifications.test.tsx +13 -13
  122. package/src/features/resource-viewer/__tests__/{GenerationFlowIntegration.test.tsx → YieldFlowIntegration.test.tsx} +34 -34
  123. package/src/features/resource-viewer/__tests__/annotation-progress-flow.test.tsx +11 -11
  124. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +55 -55
  125. package/translations/ar.json +298 -298
  126. package/translations/bn.json +298 -298
  127. package/translations/cs.json +295 -295
  128. package/translations/da.json +282 -282
  129. package/translations/de.json +281 -281
  130. package/translations/el.json +298 -298
  131. package/translations/fa.json +298 -298
  132. package/translations/fi.json +298 -298
  133. package/translations/fr.json +279 -279
  134. package/translations/he.json +298 -298
  135. package/translations/hi.json +298 -298
  136. package/translations/id.json +295 -295
  137. package/translations/it.json +299 -299
  138. package/translations/ja.json +298 -298
  139. package/translations/ko.json +298 -298
  140. package/translations/ms.json +296 -296
  141. package/translations/nl.json +299 -296
  142. package/translations/no.json +292 -292
  143. package/translations/pl.json +297 -297
  144. package/translations/pt.json +294 -294
  145. package/translations/ro.json +298 -298
  146. package/translations/sv.json +293 -293
  147. package/translations/th.json +298 -298
  148. package/translations/tr.json +298 -298
  149. package/translations/uk.json +298 -298
  150. package/translations/vi.json +298 -298
  151. package/translations/zh.json +298 -298
  152. package/dist/PdfAnnotationCanvas.client-HNYRKFDS.mjs.map +0 -1
  153. package/dist/ar-MDB7HC5S.mjs +0 -376
  154. package/dist/ar-MDB7HC5S.mjs.map +0 -1
  155. package/dist/bn-3SAV2ZEM.mjs +0 -376
  156. package/dist/bn-3SAV2ZEM.mjs.map +0 -1
  157. package/dist/chunk-MWQ5CNKW.mjs.map +0 -1
  158. package/dist/cs-AWCETEUV.mjs +0 -376
  159. package/dist/cs-AWCETEUV.mjs.map +0 -1
  160. package/dist/da-UZZHXYLC.mjs +0 -376
  161. package/dist/da-UZZHXYLC.mjs.map +0 -1
  162. package/dist/de-LQFWN6S5.mjs +0 -376
  163. package/dist/de-LQFWN6S5.mjs.map +0 -1
  164. package/dist/el-IWOETBJ7.mjs +0 -376
  165. package/dist/el-IWOETBJ7.mjs.map +0 -1
  166. package/dist/fa-BVEJZT5S.mjs +0 -376
  167. package/dist/fa-BVEJZT5S.mjs.map +0 -1
  168. package/dist/fi-JBNCGGA6.mjs +0 -376
  169. package/dist/fi-JBNCGGA6.mjs.map +0 -1
  170. package/dist/fr-OLH7PNGI.mjs +0 -376
  171. package/dist/fr-OLH7PNGI.mjs.map +0 -1
  172. package/dist/he-KOJQ4HMA.mjs +0 -376
  173. package/dist/he-KOJQ4HMA.mjs.map +0 -1
  174. package/dist/hi-BKJFZXAY.mjs +0 -376
  175. package/dist/hi-BKJFZXAY.mjs.map +0 -1
  176. package/dist/id-DPLHJVNP.mjs +0 -376
  177. package/dist/id-DPLHJVNP.mjs.map +0 -1
  178. package/dist/it-JXHAM7NL.mjs +0 -376
  179. package/dist/it-JXHAM7NL.mjs.map +0 -1
  180. package/dist/ja-DQRAO3PU.mjs +0 -376
  181. package/dist/ja-DQRAO3PU.mjs.map +0 -1
  182. package/dist/ko-6IFCOP6F.mjs +0 -376
  183. package/dist/ko-6IFCOP6F.mjs.map +0 -1
  184. package/dist/ms-KF5S2TLL.mjs +0 -376
  185. package/dist/ms-KF5S2TLL.mjs.map +0 -1
  186. package/dist/nl-2GUUZLQM.mjs +0 -376
  187. package/dist/nl-2GUUZLQM.mjs.map +0 -1
  188. package/dist/no-2IBCZGEF.mjs +0 -376
  189. package/dist/no-2IBCZGEF.mjs.map +0 -1
  190. package/dist/pl-ZEUBJ7YU.mjs +0 -376
  191. package/dist/pl-ZEUBJ7YU.mjs.map +0 -1
  192. package/dist/pt-WLAFIZWQ.mjs +0 -376
  193. package/dist/pt-WLAFIZWQ.mjs.map +0 -1
  194. package/dist/ro-K56IXFGU.mjs +0 -376
  195. package/dist/ro-K56IXFGU.mjs.map +0 -1
  196. package/dist/sv-VFJLMJRY.mjs +0 -376
  197. package/dist/sv-VFJLMJRY.mjs.map +0 -1
  198. package/dist/th-RICLQ2GW.mjs +0 -376
  199. package/dist/th-RICLQ2GW.mjs.map +0 -1
  200. package/dist/tr-SALXWE2M.mjs +0 -376
  201. package/dist/tr-SALXWE2M.mjs.map +0 -1
  202. package/dist/uk-3U3T3O2E.mjs +0 -376
  203. package/dist/uk-3U3T3O2E.mjs.map +0 -1
  204. package/dist/vi-LIVNZXOB.mjs +0 -376
  205. package/dist/vi-LIVNZXOB.mjs.map +0 -1
  206. package/dist/zh-KDUAZPX3.mjs +0 -376
  207. package/dist/zh-KDUAZPX3.mjs.map +0 -1
  208. /package/dist/{chunk-3FIQXKQF.mjs.map → chunk-Q2KV6Y2J.mjs.map} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Tests the COMPLETE annotation deletion flow with real component composition:
5
5
  * - EventBusProvider (REAL)
6
6
  * - ApiClientProvider (REAL, with MOCKED client)
7
- * - useAnnotationFlow (REAL) — single registration point for useResolutionFlow
7
+ * - useMarkFlow (REAL) — single registration point for useBindFlow
8
8
  * - useEventSubscriptions (REAL)
9
9
  *
10
10
  * This test focuses on ARCHITECTURE and EVENT WIRING:
@@ -15,18 +15,18 @@
15
15
  *
16
16
  * CRITICAL: This test prevents regressions where:
17
17
  * - Multiple deletion paths exist (event-driven vs direct)
18
- * - useResolutionFlow called in more than one hook (causes duplicate subscriptions)
18
+ * - useBindFlow called in more than one hook (causes duplicate subscriptions)
19
19
  * - Auth token missing from API calls (401 errors)
20
20
  *
21
- * ARCHITECTURE: useResolutionFlow is called ONLY in useAnnotationFlow.
22
- * useAnnotationFlow handles all detection state (manual annotation selection
23
- * and AI-driven SSE detection) plus all API operations via useResolutionFlow.
21
+ * ARCHITECTURE: useBindFlow is called ONLY in useMarkFlow.
22
+ * useMarkFlow handles all detection state (manual annotation selection
23
+ * and AI-driven SSE detection) plus all API operations via useBindFlow.
24
24
  */
25
25
 
26
26
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
27
27
  import { render, waitFor } from '@testing-library/react';
28
28
  import { act } from 'react';
29
- import { useAnnotationFlow } from '../../../hooks/useAnnotationFlow';
29
+ import { useMarkFlow } from '../../../hooks/useMarkFlow';
30
30
  import { EventBusProvider, useEventBus, resetEventBusForTesting } from '../../../contexts/EventBusContext';
31
31
 
32
32
  // Mock Toast module to prevent "useToast must be used within a ToastProvider" errors
@@ -70,9 +70,9 @@ describe('Annotation Deletion - Feature Integration', () => {
70
70
 
71
71
  function TestComponent() {
72
72
  eventBusInstance = useEventBus();
73
- // useAnnotationFlow is the single registration point for useResolutionFlow
74
- // (handles annotate:delete annotate:create annotate:detect-request, etc.)
75
- useAnnotationFlow(testUri);
73
+ // useMarkFlow is the single registration point for useBindFlow
74
+ // (handles mark:delete mark:create annotate:detect-request, etc.)
75
+ useMarkFlow(testUri);
76
76
  return null;
77
77
  }
78
78
 
@@ -89,14 +89,14 @@ describe('Annotation Deletion - Feature Integration', () => {
89
89
  return {
90
90
  emitDelete: (annotationId: string) => {
91
91
  act(() => {
92
- eventBusInstance!.get('annotate:delete').next({ annotationId });
92
+ eventBusInstance!.get('mark:delete').next({ annotationId });
93
93
  });
94
94
  },
95
95
  eventBus: eventBusInstance!,
96
96
  };
97
97
  }
98
98
 
99
- it('should call deleteAnnotation API exactly ONCE when annotate:deleteevent is emitted', async () => {
99
+ it('should call deleteAnnotation API exactly ONCE when mark:deleteevent is emitted', async () => {
100
100
  const { emitDelete } = renderAnnotationFlow();
101
101
  const annotationId = 'annotation-123';
102
102
 
@@ -133,12 +133,12 @@ describe('Annotation Deletion - Feature Integration', () => {
133
133
  expect(callArgs[1].auth).toBe(accessToken(testToken));
134
134
  });
135
135
 
136
- it('should emit annotate:deleted event on successful deletion', async () => {
136
+ it('should emit mark:deleted event on successful deletion', async () => {
137
137
  const { emitDelete, eventBus } = renderAnnotationFlow();
138
138
  const deletedListener = vi.fn();
139
139
 
140
140
  // Subscribe to success event
141
- eventBus.get('annotate:deleted').subscribe(deletedListener);
141
+ eventBus.get('mark:deleted').subscribe(deletedListener);
142
142
 
143
143
  emitDelete('annotation-789');
144
144
 
@@ -155,7 +155,7 @@ describe('Annotation Deletion - Feature Integration', () => {
155
155
  });
156
156
  });
157
157
 
158
- it('should emit annotate:delete-failed event on API error', async () => {
158
+ it('should emit mark:delete-failed event on API error', async () => {
159
159
  // Make API call fail
160
160
  deleteAnnotationSpy.mockRejectedValue(new Error('Network error'));
161
161
 
@@ -163,7 +163,7 @@ describe('Annotation Deletion - Feature Integration', () => {
163
163
  const failedListener = vi.fn();
164
164
 
165
165
  // Subscribe to failure event
166
- eventBus.get('annotate:delete-failed').subscribe(failedListener);
166
+ eventBus.get('mark:delete-failed').subscribe(failedListener);
167
167
 
168
168
  emitDelete('annotation-error');
169
169
 
@@ -202,13 +202,13 @@ describe('Annotation Deletion - Feature Integration', () => {
202
202
  expect(deleteAnnotationSpy.mock.calls[1][0]).toContain('annotation-2');
203
203
  });
204
204
 
205
- it('ARCHITECTURE: useResolutionFlow is called in useAnnotationFlow (single registration point)', async () => {
205
+ it('ARCHITECTURE: useBindFlow is called in useMarkFlow (single registration point)', async () => {
206
206
  /**
207
207
  * This test validates that there's only ONE event-driven deletion path:
208
- * - useAnnotationFlow calls useResolutionFlow (the single registration point)
209
- * - useResolutionFlow subscribes to annotation:delete
208
+ * - useMarkFlow calls useBindFlow (the single registration point)
209
+ * - useBindFlow subscribes to annotation:delete
210
210
  *
211
- * If this test fails with 2 API calls, it means useResolutionFlow was added
211
+ * If this test fails with 2 API calls, it means useBindFlow was added
212
212
  * to a second hook, causing duplicate subscriptions (ARCHITECTURE VIOLATION).
213
213
  */
214
214
 
@@ -229,8 +229,8 @@ describe('Annotation Deletion - Feature Integration', () => {
229
229
  * that bypassed the event bus.
230
230
  *
231
231
  * The correct pattern is event-driven only:
232
- * - UI emits annotate:deleteevent
233
- * - useResolutionFlow handles it
232
+ * - UI emits mark:deleteevent
233
+ * - useBindFlow handles it
234
234
  * - No direct function calls
235
235
  */
236
236
 
@@ -8,20 +8,20 @@
8
8
  * 4. BUG: Progress modal stays visible showing "Processing: Location" indefinitely
9
9
  *
10
10
  * ROOT CAUSE:
11
- * - useAnnotationFlow.ts (line 54-62): annotate:assist-finished clears `assistingMotivation` but keeps `progress`
11
+ * - useMarkFlow.ts (line 54-62): mark:assist-finished clears `assistingMotivation` but keeps `progress`
12
12
  * - AssistSection.tsx (line 214): Shows progress UI whenever `progress` is not null
13
13
  * - No mechanism to auto-dismiss or manually close the progress display
14
14
  *
15
15
  * FIX OPTIONS:
16
16
  * A) Auto-dismiss after timeout (3s after completion)
17
17
  * B) Add "Close" button to progress display
18
- * C) Clear progress on next annotate:assist-request (already works but not ideal UX)
18
+ * C) Clear progress on next mark:assist-request (already works but not ideal UX)
19
19
  */
20
20
 
21
21
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
22
22
  import { render, screen, waitFor } from '@testing-library/react';
23
23
  import { act } from 'react';
24
- import { useAnnotationFlow } from '../../../hooks/useAnnotationFlow';
24
+ import { useMarkFlow } from '../../../hooks/useMarkFlow';
25
25
  import { EventBusProvider, resetEventBusForTesting, useEventBus } from '../../../contexts/EventBusContext';
26
26
  import { ApiClientProvider } from '../../../contexts/ApiClientContext';
27
27
  import { AuthTokenProvider } from '../../../contexts/AuthTokenContext';
@@ -65,7 +65,7 @@ describe('Detection Progress Dismissal Bug', () => {
65
65
 
66
66
  function TestHarness() {
67
67
  eventBusInstance = useEventBus();
68
- const { assistingMotivation, progress } = useAnnotationFlow(rUri);
68
+ const { assistingMotivation, progress } = useMarkFlow(rUri);
69
69
 
70
70
  return (
71
71
  <div>
@@ -91,9 +91,9 @@ describe('Detection Progress Dismissal Bug', () => {
91
91
  expect(screen.getByTestId('detecting')).toHaveTextContent('none');
92
92
  expect(screen.getByTestId('progress')).toHaveTextContent('no progress');
93
93
 
94
- // User clicks detect button (emits annotate:assist-request)
94
+ // User clicks detect button (emits mark:assist-request)
95
95
  act(() => {
96
- eventBusInstance.get('annotate:assist-request').next({
96
+ eventBusInstance.get('mark:assist-request').next({
97
97
  motivation: 'linking',
98
98
  options: { entityTypes: ['Location'] }
99
99
  });
@@ -106,7 +106,7 @@ describe('Detection Progress Dismissal Bug', () => {
106
106
 
107
107
  // SSE sends progress update
108
108
  act(() => {
109
- eventBusInstance.get('annotate:progress').next({
109
+ eventBusInstance.get('mark:progress').next({
110
110
  status: 'scanning',
111
111
  message: 'Processing: Location',
112
112
  currentEntityType: 'Location',
@@ -118,9 +118,9 @@ describe('Detection Progress Dismissal Bug', () => {
118
118
  expect(screen.getByTestId('progress')).toHaveTextContent('Processing: Location');
119
119
  });
120
120
 
121
- // Detection completes (SSE finishes, backend emits annotate:assist-finished)
121
+ // Detection completes (SSE finishes, backend emits mark:assist-finished)
122
122
  act(() => {
123
- eventBusInstance.get('annotate:assist-finished').next({ motivation: 'linking' });
123
+ eventBusInstance.get('mark:assist-finished').next({ motivation: 'linking' });
124
124
  });
125
125
 
126
126
  // assistingMotivation cleared immediately
@@ -138,7 +138,7 @@ describe('Detection Progress Dismissal Bug', () => {
138
138
 
139
139
  function TestHarness() {
140
140
  eventBusInstance = useEventBus();
141
- const { progress } = useAnnotationFlow(rUri);
141
+ const { progress } = useMarkFlow(rUri);
142
142
 
143
143
  return (
144
144
  <div data-testid="progress">
@@ -159,15 +159,15 @@ describe('Detection Progress Dismissal Bug', () => {
159
159
 
160
160
  // First detection with stuck progress
161
161
  act(() => {
162
- eventBusInstance.get('annotate:assist-request').next({ motivation: 'linking', options: {} });
162
+ eventBusInstance.get('mark:assist-request').next({ motivation: 'linking', options: {} });
163
163
  });
164
164
 
165
165
  act(() => {
166
- eventBusInstance.get('annotate:progress').next({ message: 'Old progress stuck here' });
166
+ eventBusInstance.get('mark:progress').next({ message: 'Old progress stuck here' });
167
167
  });
168
168
 
169
169
  act(() => {
170
- eventBusInstance.get('annotate:assist-finished').next({ motivation: 'linking' });
170
+ eventBusInstance.get('mark:assist-finished').next({ motivation: 'linking' });
171
171
  });
172
172
 
173
173
  await waitFor(() => {
@@ -176,7 +176,7 @@ describe('Detection Progress Dismissal Bug', () => {
176
176
 
177
177
  // WORKAROUND: Start new detection clears old progress
178
178
  act(() => {
179
- eventBusInstance.get('annotate:assist-request').next({ motivation: 'highlighting', options: {} });
179
+ eventBusInstance.get('mark:assist-request').next({ motivation: 'highlighting', options: {} });
180
180
  });
181
181
 
182
182
  await waitFor(() => {
@@ -191,7 +191,7 @@ describe('Detection Progress Dismissal Bug', () => {
191
191
 
192
192
  function TestHarness() {
193
193
  eventBusInstance = useEventBus();
194
- const { progress } = useAnnotationFlow(rUri);
194
+ const { progress } = useMarkFlow(rUri);
195
195
 
196
196
  return (
197
197
  <div data-testid="progress">
@@ -212,18 +212,18 @@ describe('Detection Progress Dismissal Bug', () => {
212
212
 
213
213
  // Show progress
214
214
  act(() => {
215
- eventBusInstance.get('annotate:assist-request').next({ motivation: 'linking', options: {} });
215
+ eventBusInstance.get('mark:assist-request').next({ motivation: 'linking', options: {} });
216
216
  });
217
217
 
218
218
  act(() => {
219
- eventBusInstance.get('annotate:progress').next({
219
+ eventBusInstance.get('mark:progress').next({
220
220
  status: 'complete',
221
221
  message: 'Complete! Created 5 annotations'
222
222
  });
223
223
  });
224
224
 
225
225
  act(() => {
226
- eventBusInstance.get('annotate:assist-finished').next({ motivation: 'linking' });
226
+ eventBusInstance.get('mark:assist-finished').next({ motivation: 'linking' });
227
227
  });
228
228
 
229
229
  // Progress visible initially
@@ -242,7 +242,7 @@ describe('Detection Progress Dismissal Bug', () => {
242
242
  it('FIXED: SSE emits final completion chunk data as annotate:assist-progress', async () => {
243
243
  /**
244
244
  * This test verifies that SSE emits the final chunk as annotate:assist-progress
245
- * BEFORE emitting annotate:assist-finished.
245
+ * BEFORE emitting mark:assist-finished.
246
246
  *
247
247
  * This ensures the UI can display the final completion message with status:'complete'.
248
248
  */
@@ -251,7 +251,7 @@ describe('Detection Progress Dismissal Bug', () => {
251
251
 
252
252
  function TestHarness() {
253
253
  eventBusInstance = useEventBus();
254
- const { progress } = useAnnotationFlow(rUri);
254
+ const { progress } = useMarkFlow(rUri);
255
255
 
256
256
  return (
257
257
  <div>
@@ -273,7 +273,7 @@ describe('Detection Progress Dismissal Bug', () => {
273
273
 
274
274
  // Start detection (triggers SSE stream creation)
275
275
  act(() => {
276
- eventBusInstance.get('annotate:assist-request').next({
276
+ eventBusInstance.get('mark:assist-request').next({
277
277
  motivation: 'linking',
278
278
  options: { entityTypes: ['Location'] }
279
279
  });
@@ -281,7 +281,7 @@ describe('Detection Progress Dismissal Bug', () => {
281
281
 
282
282
  // Simulate SSE scanning chunk
283
283
  act(() => {
284
- eventBusInstance.get('annotate:progress').next({
284
+ eventBusInstance.get('mark:progress').next({
285
285
  status: 'scanning',
286
286
  message: 'Processing: Location',
287
287
  });
@@ -293,7 +293,7 @@ describe('Detection Progress Dismissal Bug', () => {
293
293
 
294
294
  // Simulate SSE emitting final chunk as annotate:assist-progress
295
295
  act(() => {
296
- eventBusInstance.get('annotate:progress').next({
296
+ eventBusInstance.get('mark:progress').next({
297
297
  status: 'complete',
298
298
  message: 'Complete! Found 5 entities',
299
299
  foundCount: 5,
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Layer 3: Feature Integration Test - Resolution Flow (search modal & body update)
3
3
  *
4
- * Tests the UNCOVERED half of useResolutionFlow:
5
- * - resolve:link → emits resolve:search-requested
6
- * - resolve:search-requested → opens search modal with pendingReferenceId
4
+ * Tests the UNCOVERED half of useBindFlow:
5
+ * - bind:link → emits bind:search-requested
6
+ * - bind:search-requested → opens search modal with pendingReferenceId
7
7
  * - onCloseSearchModal → closes modal
8
- * - resolve:update-body → calls updateAnnotationBody API
9
- * - resolve:update-body → emits resolve:body-updated on success
10
- * - resolve:update-body → emits resolve:body-update-failed on error
8
+ * - bind:update-body → calls updateAnnotationBody API
9
+ * - bind:update-body → emits bind:body-updated on success
10
+ * - bind:update-body → emits bind:body-update-failed on error
11
11
  * - auth token passed to updateAnnotationBody
12
12
  *
13
- * The deletion half of useResolutionFlow is covered by AnnotationDeletionIntegration.test.tsx.
13
+ * The deletion half of useBindFlow is covered by AnnotationDeletionIntegration.test.tsx.
14
14
  *
15
15
  * Uses real providers (EventBus, ApiClient, AuthToken) with mocked API boundary.
16
16
  */
@@ -18,7 +18,7 @@
18
18
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
19
19
  import { render, waitFor } from '@testing-library/react';
20
20
  import { act } from 'react';
21
- import { useResolutionFlow } from '../../../hooks/useResolutionFlow';
21
+ import { useBindFlow } from '../../../hooks/useBindFlow';
22
22
  import { EventBusProvider, useEventBus, resetEventBusForTesting } from '../../../contexts/EventBusContext';
23
23
  import { ApiClientProvider } from '../../../contexts/ApiClientContext';
24
24
  import { AuthTokenProvider } from '../../../contexts/AuthTokenContext';
@@ -55,13 +55,13 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
55
55
 
56
56
  // ─── Render helper ──────────────────────────────────────────────────────────
57
57
 
58
- function renderResolutionFlow() {
58
+ function renderBindFlow() {
59
59
  let eventBusInstance: ReturnType<typeof useEventBus> | null = null;
60
- let lastState: ReturnType<typeof useResolutionFlow> | null = null;
60
+ let lastState: ReturnType<typeof useBindFlow> | null = null;
61
61
 
62
62
  function TestComponent() {
63
63
  eventBusInstance = useEventBus();
64
- lastState = useResolutionFlow(testUri);
64
+ lastState = useBindFlow(testUri);
65
65
  return null;
66
66
  }
67
67
 
@@ -84,19 +84,19 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
84
84
  // ─── Initial state ──────────────────────────────────────────────────────────
85
85
 
86
86
  it('starts with search modal closed and no pending reference', () => {
87
- const { getState } = renderResolutionFlow();
87
+ const { getState } = renderBindFlow();
88
88
  expect(getState().searchModalOpen).toBe(false);
89
89
  expect(getState().pendingReferenceId).toBeNull();
90
90
  });
91
91
 
92
- // ─── resolve:link ─────────────────────────────────────────────────────────
92
+ // ─── bind:link ─────────────────────────────────────────────────────────
93
93
 
94
- it('resolve:link emits resolve:search-requested with referenceId and searchTerm', () => {
95
- const { getEventBus } = renderResolutionFlow();
94
+ it('bind:link emits bind:search-requested with referenceId and searchTerm', () => {
95
+ const { getEventBus } = renderBindFlow();
96
96
  const searchRequestedSpy = vi.fn();
97
97
 
98
- const subscription = getEventBus().get('resolve:search-requested').subscribe(searchRequestedSpy);
99
- act(() => { getEventBus().get('resolve:link').next({ annotationUri: 'ann-uri-123', searchTerm: 'climate change' }); });
98
+ const subscription = getEventBus().get('bind:search-requested').subscribe(searchRequestedSpy);
99
+ act(() => { getEventBus().get('bind:link').next({ annotationUri: 'ann-uri-123', searchTerm: 'climate change' }); });
100
100
  subscription.unsubscribe();
101
101
 
102
102
  expect(searchRequestedSpy).toHaveBeenCalledTimes(1);
@@ -106,35 +106,35 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
106
106
  });
107
107
  });
108
108
 
109
- // ─── resolve:search-requested ────────────────────────────────────────────
109
+ // ─── bind:search-requested ────────────────────────────────────────────
110
110
 
111
- it('resolve:search-requested opens the search modal', async () => {
112
- const { getState, getEventBus } = renderResolutionFlow();
111
+ it('bind:search-requested opens the search modal', async () => {
112
+ const { getState, getEventBus } = renderBindFlow();
113
113
 
114
114
  expect(getState().searchModalOpen).toBe(false);
115
115
 
116
- act(() => { getEventBus().get('resolve:search-requested').next({ referenceId: 'ref-abc', searchTerm: 'oceans' }); });
116
+ act(() => { getEventBus().get('bind:search-requested').next({ referenceId: 'ref-abc', searchTerm: 'oceans' }); });
117
117
 
118
118
  await waitFor(() => {
119
119
  expect(getState().searchModalOpen).toBe(true);
120
120
  });
121
121
  });
122
122
 
123
- it('resolve:search-requested sets pendingReferenceId', async () => {
124
- const { getState, getEventBus } = renderResolutionFlow();
123
+ it('bind:search-requested sets pendingReferenceId', async () => {
124
+ const { getState, getEventBus } = renderBindFlow();
125
125
 
126
- act(() => { getEventBus().get('resolve:search-requested').next({ referenceId: 'ref-xyz', searchTerm: 'forests' }); });
126
+ act(() => { getEventBus().get('bind:search-requested').next({ referenceId: 'ref-xyz', searchTerm: 'forests' }); });
127
127
 
128
128
  await waitFor(() => {
129
129
  expect(getState().pendingReferenceId).toBe('ref-xyz');
130
130
  });
131
131
  });
132
132
 
133
- it('resolve:link → resolve:search-requested chain opens modal end-to-end', async () => {
134
- const { getState, getEventBus } = renderResolutionFlow();
133
+ it('bind:link → bind:search-requested chain opens modal end-to-end', async () => {
134
+ const { getState, getEventBus } = renderBindFlow();
135
135
 
136
136
  // Simulate the full user journey: user clicks "Link Document" on a reference entry
137
- act(() => { getEventBus().get('resolve:link').next({ annotationUri: 'ann-full-chain', searchTerm: 'biodiversity' }); });
137
+ act(() => { getEventBus().get('bind:link').next({ annotationUri: 'ann-full-chain', searchTerm: 'biodiversity' }); });
138
138
 
139
139
  await waitFor(() => {
140
140
  expect(getState().searchModalOpen).toBe(true);
@@ -145,9 +145,9 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
145
145
  // ─── onCloseSearchModal ──────────────────────────────────────────────────────
146
146
 
147
147
  it('onCloseSearchModal closes the search modal', async () => {
148
- const { getState, getEventBus } = renderResolutionFlow();
148
+ const { getState, getEventBus } = renderBindFlow();
149
149
 
150
- act(() => { getEventBus().get('resolve:search-requested').next({ referenceId: 'ref-close', searchTerm: 'test' }); });
150
+ act(() => { getEventBus().get('bind:search-requested').next({ referenceId: 'ref-close', searchTerm: 'test' }); });
151
151
 
152
152
  await waitFor(() => expect(getState().searchModalOpen).toBe(true));
153
153
 
@@ -159,9 +159,9 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
159
159
  });
160
160
 
161
161
  it('onCloseSearchModal does not clear pendingReferenceId (preserves for re-open)', async () => {
162
- const { getState, getEventBus } = renderResolutionFlow();
162
+ const { getState, getEventBus } = renderBindFlow();
163
163
 
164
- act(() => { getEventBus().get('resolve:search-requested').next({ referenceId: 'ref-persist', searchTerm: 'test' }); });
164
+ act(() => { getEventBus().get('bind:search-requested').next({ referenceId: 'ref-persist', searchTerm: 'test' }); });
165
165
  await waitFor(() => expect(getState().searchModalOpen).toBe(true));
166
166
 
167
167
  act(() => { getState().onCloseSearchModal(); });
@@ -171,12 +171,12 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
171
171
  expect(getState().pendingReferenceId).toBe('ref-persist');
172
172
  });
173
173
 
174
- // ─── resolve:update-body ──────────────────────────────────────────────────
174
+ // ─── bind:update-body ──────────────────────────────────────────────────
175
175
 
176
- it('resolve:update-body calls updateAnnotationBody API', async () => {
177
- const { getEventBus } = renderResolutionFlow();
176
+ it('bind:update-body calls updateAnnotationBody API', async () => {
177
+ const { getEventBus } = renderBindFlow();
178
178
 
179
- act(() => { getEventBus().get('resolve:update-body').next({
179
+ act(() => { getEventBus().get('bind:update-body').next({
180
180
  annotationUri: 'http://localhost:4000/resources/test-resource/annotations/ann-body-1',
181
181
  resourceId: 'linked-resource-id',
182
182
  operations: [{ op: 'add', item: { id: 'linked-resource-id' } }],
@@ -187,10 +187,10 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
187
187
  });
188
188
  });
189
189
 
190
- it('resolve:update-body passes auth token to API call', async () => {
191
- const { getEventBus } = renderResolutionFlow();
190
+ it('bind:update-body passes auth token to API call', async () => {
191
+ const { getEventBus } = renderBindFlow();
192
192
 
193
- act(() => { getEventBus().get('resolve:update-body').next({
193
+ act(() => { getEventBus().get('bind:update-body').next({
194
194
  annotationUri: 'http://localhost:4000/resources/test-resource/annotations/ann-auth',
195
195
  resourceId: 'resource-id',
196
196
  operations: [{ op: 'replace', newItem: { id: 'resource-id' } }],
@@ -205,13 +205,13 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
205
205
  expect(callArgs[2].auth).toBe(accessToken(testToken));
206
206
  });
207
207
 
208
- it('resolve:update-body emits resolve:body-updated on success', async () => {
209
- const { getEventBus } = renderResolutionFlow();
208
+ it('bind:update-body emits bind:body-updated on success', async () => {
209
+ const { getEventBus } = renderBindFlow();
210
210
  const bodyUpdatedSpy = vi.fn();
211
211
 
212
- const subscription = getEventBus().get('resolve:body-updated').subscribe(bodyUpdatedSpy);
212
+ const subscription = getEventBus().get('bind:body-updated').subscribe(bodyUpdatedSpy);
213
213
 
214
- act(() => { getEventBus().get('resolve:update-body').next({
214
+ act(() => { getEventBus().get('bind:update-body').next({
215
215
  annotationUri: 'http://localhost:4000/resources/test-resource/annotations/ann-success',
216
216
  resourceId: 'resource-id',
217
217
  operations: [{ op: 'add', item: { id: 'resource-id' } }],
@@ -228,15 +228,15 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
228
228
  });
229
229
  });
230
230
 
231
- it('resolve:update-body emits resolve:body-update-failed on API error', async () => {
231
+ it('bind:update-body emits bind:body-update-failed on API error', async () => {
232
232
  updateAnnotationBodySpy.mockRejectedValue(new Error('Update failed'));
233
233
 
234
- const { getEventBus } = renderResolutionFlow();
234
+ const { getEventBus } = renderBindFlow();
235
235
  const bodyUpdateFailedSpy = vi.fn();
236
236
 
237
- const subscription = getEventBus().get('resolve:body-update-failed').subscribe(bodyUpdateFailedSpy);
237
+ const subscription = getEventBus().get('bind:body-update-failed').subscribe(bodyUpdateFailedSpy);
238
238
 
239
- act(() => { getEventBus().get('resolve:update-body').next({
239
+ act(() => { getEventBus().get('bind:update-body').next({
240
240
  annotationUri: 'http://localhost:4000/resources/test-resource/annotations/ann-fail',
241
241
  resourceId: 'resource-id',
242
242
  operations: [{ op: 'remove', item: { id: 'old-id' } }],
@@ -253,10 +253,10 @@ describe('Resolution Flow - Search Modal & Body Update Integration', () => {
253
253
  });
254
254
  });
255
255
 
256
- it('resolve:update-body called ONCE — no duplicate subscriptions', async () => {
257
- const { getEventBus } = renderResolutionFlow();
256
+ it('bind:update-body called ONCE — no duplicate subscriptions', async () => {
257
+ const { getEventBus } = renderBindFlow();
258
258
 
259
- act(() => { getEventBus().get('resolve:update-body').next({
259
+ act(() => { getEventBus().get('bind:update-body').next({
260
260
  annotationUri: 'http://localhost:4000/resources/test-resource/annotations/ann-dedup',
261
261
  resourceId: 'resource-id',
262
262
  operations: [{ op: 'add', item: { id: 'resource-id' } }],
@@ -2,18 +2,18 @@
2
2
  * FAILING TEST: Reproduces the bug where detection events fire but state doesn't update
3
3
  *
4
4
  * Based on console logs from production:
5
- * ✅ annotate:assist-request emitted
5
+ * ✅ mark:assist-request emitted
6
6
  * ✅ annotate:assist-progress emitted
7
7
  * ❌ assistingMotivation remains null
8
8
  * ❌ progress remains null
9
9
  *
10
- * UPDATED: Now tests useAnnotationFlow hook instead of DetectionFlowContainer
10
+ * UPDATED: Now tests useMarkFlow hook instead of DetectionFlowContainer
11
11
  */
12
12
 
13
13
  import { describe, it, expect, vi, beforeEach } from 'vitest';
14
14
  import { render, screen, waitFor } from '@testing-library/react';
15
15
  import { act } from 'react';
16
- import { useAnnotationFlow } from '../../../hooks/useAnnotationFlow';
16
+ import { useMarkFlow } from '../../../hooks/useMarkFlow';
17
17
  import { EventBusProvider, useEventBus, resetEventBusForTesting } from '../../../contexts/EventBusContext';
18
18
  import { ApiClientProvider } from '../../../contexts/ApiClientContext';
19
19
  import { AuthTokenProvider } from '../../../contexts/AuthTokenContext';
@@ -45,17 +45,17 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
45
45
  vi.restoreAllMocks();
46
46
  });
47
47
 
48
- it('SHOULD update state when annotate:assist-request event is emitted', async () => {
48
+ it('SHOULD update state when mark:assist-request event is emitted', async () => {
49
49
  let eventBusInstance: any;
50
50
  let currentState: any;
51
51
 
52
52
  // Component to capture EventBus and hook state
53
53
  function TestComponent() {
54
54
  eventBusInstance = useEventBus();
55
- const state = useAnnotationFlow('http://localhost:8080/resources/test' as any);
55
+ const state = useMarkFlow('http://localhost:8080/resources/test' as any);
56
56
  currentState = state;
57
57
 
58
- console.log('[TEST] useAnnotationFlow state:', {
58
+ console.log('[TEST] useMarkFlow state:', {
59
59
  assistingMotivation: state.assistingMotivation,
60
60
  progress: state.progress,
61
61
  });
@@ -82,17 +82,17 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
82
82
  expect(screen.getByTestId('detecting')).toHaveTextContent('null');
83
83
  expect(screen.getByTestId('progress')).toHaveTextContent('null');
84
84
 
85
- console.log('[TEST] Emitting annotate:assist-request event...');
85
+ console.log('[TEST] Emitting mark:assist-request event...');
86
86
 
87
- // Emit annotate:assist-request event (exactly like production)
87
+ // Emit mark:assist-request event (exactly like production)
88
88
  act(() => {
89
- eventBusInstance.get('annotate:assist-request').next({
89
+ eventBusInstance.get('mark:assist-request').next({
90
90
  motivation: 'linking',
91
91
  options: { entityTypes: ['Location'] }
92
92
  });
93
93
  });
94
94
 
95
- console.log('[TEST] After annotate:assist-request, checking state...');
95
+ console.log('[TEST] After mark:assist-request, checking state...');
96
96
 
97
97
  // THIS SHOULD PASS but currently FAILS
98
98
  await waitFor(() => {
@@ -109,7 +109,7 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
109
109
 
110
110
  function TestComponent() {
111
111
  eventBusInstance = useEventBus();
112
- const state = useAnnotationFlow('http://localhost:8080/resources/test' as any);
112
+ const state = useMarkFlow('http://localhost:8080/resources/test' as any);
113
113
  currentState = state;
114
114
 
115
115
  return (
@@ -134,7 +134,7 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
134
134
 
135
135
  // Emit annotate:assist-progress event (exactly like production)
136
136
  act(() => {
137
- eventBusInstance.get('annotate:progress').next({
137
+ eventBusInstance.get('mark:progress').next({
138
138
  status: 'started',
139
139
  resourceId: 'test',
140
140
  totalEntityTypes: 1,
@@ -162,7 +162,7 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
162
162
 
163
163
  function TestComponent() {
164
164
  eventBusInstance = useEventBus();
165
- const state = useAnnotationFlow('http://localhost:8080/resources/f45fd44f9cb0b0fe1b7980d3d034bc61' as any);
165
+ const state = useMarkFlow('http://localhost:8080/resources/f45fd44f9cb0b0fe1b7980d3d034bc61' as any);
166
166
 
167
167
  stateSnapshots.push({
168
168
  assistingMotivation: state.assistingMotivation,
@@ -192,18 +192,18 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
192
192
 
193
193
  // Exactly like production logs
194
194
  act(() => {
195
- console.log('[EventBus] emit: annotate:assist-request {motivation: "linking", options: {...}}');
196
- eventBusInstance.get('annotate:assist-request').next({
195
+ console.log('[EventBus] emit: mark:assist-request {motivation: "linking", options: {...}}');
196
+ eventBusInstance.get('mark:assist-request').next({
197
197
  motivation: 'linking',
198
198
  options: { entityTypes: ['Location'] }
199
199
  });
200
200
  });
201
201
 
202
- console.log('After annotate:assist-request:', stateSnapshots[stateSnapshots.length - 1]);
202
+ console.log('After mark:assist-request:', stateSnapshots[stateSnapshots.length - 1]);
203
203
 
204
204
  act(() => {
205
205
  console.log('[EventBus] emit: annotate:assist-progress {status: "started", ...}');
206
- eventBusInstance.get('annotate:progress').next({
206
+ eventBusInstance.get('mark:progress').next({
207
207
  status: 'started',
208
208
  resourceId: 'f45fd44f9cb0b0fe1b7980d3d034bc61',
209
209
  totalEntityTypes: 1,
@@ -216,7 +216,7 @@ describe('REPRODUCING BUG: Detection state not updating', () => {
216
216
 
217
217
  act(() => {
218
218
  console.log('[EventBus] emit: annotate:assist-progress {status: "scanning", ...}');
219
- eventBusInstance.get('annotate:progress').next({
219
+ eventBusInstance.get('mark:progress').next({
220
220
  status: 'scanning',
221
221
  resourceId: 'f45fd44f9cb0b0fe1b7980d3d034bc61',
222
222
  currentEntityType: 'Location',