@semiont/react-ui 0.2.34-build.90 → 0.2.34-build.92
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.
- package/dist/{EventBusContext-BmzEcGHZ.d.mts → EventBusContext-DMI4uwYk.d.mts} +2 -2
- package/dist/{PdfAnnotationCanvas.client-VLNA5O5M.mjs → PdfAnnotationCanvas.client-HNYRKFDS.mjs} +10 -9
- package/dist/PdfAnnotationCanvas.client-HNYRKFDS.mjs.map +1 -0
- package/dist/{ar-4ZEORRW2.mjs → ar-MDB7HC5S.mjs} +45 -49
- package/dist/ar-MDB7HC5S.mjs.map +1 -0
- package/dist/{bn-SEDE5BQJ.mjs → bn-3SAV2ZEM.mjs} +45 -49
- package/dist/bn-3SAV2ZEM.mjs.map +1 -0
- package/dist/{chunk-C63BARI7.mjs → chunk-3FIQXKQF.mjs} +31 -31
- package/dist/{chunk-D7NBW4RV.mjs → chunk-JH7BXE2P.mjs} +45 -49
- package/dist/chunk-JH7BXE2P.mjs.map +1 -0
- package/dist/{chunk-M7SZRRIE.mjs → chunk-MWQ5CNKW.mjs} +13 -13
- package/dist/chunk-MWQ5CNKW.mjs.map +1 -0
- package/dist/{chunk-ULIET3MW.mjs → chunk-YI5IX5ZA.mjs} +1 -1
- package/dist/{chunk-ULIET3MW.mjs.map → chunk-YI5IX5ZA.mjs.map} +1 -1
- package/dist/{cs-7W4WF5WD.mjs → cs-AWCETEUV.mjs} +45 -49
- package/dist/cs-AWCETEUV.mjs.map +1 -0
- package/dist/{da-75XGBCBK.mjs → da-UZZHXYLC.mjs} +45 -49
- package/dist/da-UZZHXYLC.mjs.map +1 -0
- package/dist/{de-ODJVFLHM.mjs → de-LQFWN6S5.mjs} +45 -49
- package/dist/de-LQFWN6S5.mjs.map +1 -0
- package/dist/{el-C4PM4WB3.mjs → el-IWOETBJ7.mjs} +45 -49
- package/dist/el-IWOETBJ7.mjs.map +1 -0
- package/dist/{en-KJCJQ4OO.mjs → en-XWEPVTB4.mjs} +2 -6
- package/dist/{es-WD33R7QL.mjs → es-726NTS53.mjs} +45 -49
- package/dist/es-726NTS53.mjs.map +1 -0
- package/dist/{fa-2BP6V56P.mjs → fa-BVEJZT5S.mjs} +45 -49
- package/dist/fa-BVEJZT5S.mjs.map +1 -0
- package/dist/{fi-USRRW24J.mjs → fi-JBNCGGA6.mjs} +45 -49
- package/dist/fi-JBNCGGA6.mjs.map +1 -0
- package/dist/{fr-EC5S6WVF.mjs → fr-OLH7PNGI.mjs} +45 -49
- package/dist/fr-OLH7PNGI.mjs.map +1 -0
- package/dist/{he-7TBVIKAA.mjs → he-KOJQ4HMA.mjs} +45 -49
- package/dist/he-KOJQ4HMA.mjs.map +1 -0
- package/dist/{hi-FO4VIZLA.mjs → hi-BKJFZXAY.mjs} +45 -49
- package/dist/hi-BKJFZXAY.mjs.map +1 -0
- package/dist/{id-7U7GGVWY.mjs → id-DPLHJVNP.mjs} +45 -49
- package/dist/id-DPLHJVNP.mjs.map +1 -0
- package/dist/index.css +80 -80
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +216 -207
- package/dist/index.mjs +812 -759
- package/dist/index.mjs.map +1 -1
- package/dist/{it-Y4OPL6I2.mjs → it-JXHAM7NL.mjs} +45 -49
- package/dist/it-JXHAM7NL.mjs.map +1 -0
- package/dist/{ja-PK7SQL55.mjs → ja-DQRAO3PU.mjs} +45 -49
- package/dist/ja-DQRAO3PU.mjs.map +1 -0
- package/dist/{ko-L25PXMYD.mjs → ko-6IFCOP6F.mjs} +45 -49
- package/dist/ko-6IFCOP6F.mjs.map +1 -0
- package/dist/{ms-STH777QM.mjs → ms-KF5S2TLL.mjs} +45 -49
- package/dist/ms-KF5S2TLL.mjs.map +1 -0
- package/dist/{nl-Y7LECDDR.mjs → nl-2GUUZLQM.mjs} +45 -49
- package/dist/nl-2GUUZLQM.mjs.map +1 -0
- package/dist/{no-KEKCEWU6.mjs → no-2IBCZGEF.mjs} +45 -49
- package/dist/no-2IBCZGEF.mjs.map +1 -0
- package/dist/{pl-7A7OC75O.mjs → pl-ZEUBJ7YU.mjs} +45 -49
- package/dist/pl-ZEUBJ7YU.mjs.map +1 -0
- package/dist/{pt-35HTM7RA.mjs → pt-WLAFIZWQ.mjs} +45 -49
- package/dist/pt-WLAFIZWQ.mjs.map +1 -0
- package/dist/{ro-VAWL5KQA.mjs → ro-K56IXFGU.mjs} +45 -49
- package/dist/ro-K56IXFGU.mjs.map +1 -0
- package/dist/{sv-7ZK5EQEB.mjs → sv-VFJLMJRY.mjs} +45 -49
- package/dist/sv-VFJLMJRY.mjs.map +1 -0
- package/dist/test-utils.d.mts +2 -2
- package/dist/test-utils.mjs +3 -3
- package/dist/{th-UDWZ4X34.mjs → th-RICLQ2GW.mjs} +45 -49
- package/dist/th-RICLQ2GW.mjs.map +1 -0
- package/dist/{tr-4WMPK3UX.mjs → tr-SALXWE2M.mjs} +45 -49
- package/dist/tr-SALXWE2M.mjs.map +1 -0
- package/dist/{uk-SSLASQYJ.mjs → uk-3U3T3O2E.mjs} +45 -49
- package/dist/uk-3U3T3O2E.mjs.map +1 -0
- package/dist/{vi-IF42Z5PU.mjs → vi-LIVNZXOB.mjs} +45 -49
- package/dist/vi-LIVNZXOB.mjs.map +1 -0
- package/dist/{zh-HRQTNTAI.mjs → zh-KDUAZPX3.mjs} +45 -49
- package/dist/zh-KDUAZPX3.mjs.map +1 -0
- package/package.json +1 -1
- package/src/components/AnnotateReferencesProgressWidget.tsx +113 -0
- package/src/components/CodeMirrorRenderer.tsx +9 -27
- package/src/components/Toolbar.tsx +2 -2
- package/src/components/annotation/AnnotateToolbar.tsx +9 -9
- package/src/components/annotation/__tests__/AnnotateToolbar.test.tsx +17 -17
- package/src/components/image-annotation/AnnotationOverlay.tsx +13 -11
- package/src/components/image-annotation/SvgDrawingCanvas.tsx +8 -4
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +11 -9
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +1 -1
- package/src/components/resource/AnnotateView.tsx +17 -12
- package/src/components/resource/BrowseView.tsx +19 -50
- package/src/components/resource/ResourceViewer.tsx +28 -24
- package/src/components/resource/__tests__/BrowseView.test.tsx +27 -27
- package/src/components/resource/panels/AssessmentEntry.tsx +1 -1
- package/src/components/resource/panels/AssessmentPanel.tsx +16 -16
- package/src/components/resource/panels/{DetectSection.css → AssistSection.css} +79 -79
- package/src/components/resource/panels/{DetectSection.tsx → AssistSection.tsx} +46 -46
- package/src/components/resource/panels/CommentEntry.tsx +1 -1
- package/src/components/resource/panels/CommentsPanel.tsx +16 -16
- package/src/components/resource/panels/HighlightEntry.tsx +1 -1
- package/src/components/resource/panels/HighlightPanel.tsx +14 -14
- package/src/components/resource/panels/ReferenceEntry.tsx +5 -5
- package/src/components/resource/panels/ReferencesPanel.tsx +90 -103
- package/src/components/resource/panels/ResourceInfoPanel.tsx +2 -2
- package/src/components/resource/panels/TagEntry.tsx +1 -1
- package/src/components/resource/panels/TaggingPanel.tsx +53 -53
- package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +12 -22
- package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +12 -12
- package/src/components/resource/panels/__tests__/{DetectSection.test.tsx → AssistSection.test.tsx} +109 -108
- package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +8 -8
- package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +3 -3
- package/src/components/resource/panels/__tests__/{HighlightPanel.detectionProgress.test.tsx → HighlightPanel.annotationProgress.test.tsx} +56 -56
- package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +98 -95
- package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +3 -3
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +16 -16
- package/src/components/settings/SettingsPanel.tsx +29 -1
- package/src/features/resource-compose/components/ResourceComposePage.tsx +3 -0
- package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +36 -26
- package/src/features/resource-viewer/__tests__/AnnotationDeletionIntegration.test.tsx +26 -16
- package/src/features/resource-viewer/__tests__/{DetectionProgressDismissal.test.tsx → AnnotationProgressDismissal.test.tsx} +48 -38
- package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +59 -49
- package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +55 -33
- package/src/features/resource-viewer/__tests__/GenerationFlowIntegration.test.tsx +38 -36
- package/src/features/resource-viewer/__tests__/ResolutionFlowIntegration.test.tsx +41 -31
- package/src/features/resource-viewer/__tests__/ResourceMutations.test.tsx +10 -10
- package/src/features/resource-viewer/__tests__/ToastNotifications.test.tsx +196 -0
- package/src/features/resource-viewer/__tests__/{detection-progress-flow.test.tsx → annotation-progress-flow.test.tsx} +51 -28
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +56 -51
- package/src/styles/core/buttons.css +3 -3
- package/src/styles/core/forms.css +2 -2
- package/src/styles/index.css +1 -1
- package/src/styles/motivations/motivation-assessment.css +9 -9
- package/src/styles/motivations/motivation-comment.css +9 -9
- package/src/styles/motivations/motivation-highlight.css +9 -9
- package/src/styles/motivations/motivation-reference.css +9 -9
- package/src/styles/motivations/motivation-tag.css +9 -9
- package/src/styles/utilities/focus-extended.css +6 -6
- package/translations/ar.json +44 -44
- package/translations/bn.json +44 -44
- package/translations/cs.json +44 -44
- package/translations/da.json +44 -44
- package/translations/de.json +44 -44
- package/translations/el.json +44 -44
- package/translations/en.json +44 -44
- package/translations/es.json +44 -44
- package/translations/fa.json +44 -44
- package/translations/fi.json +44 -44
- package/translations/fr.json +44 -44
- package/translations/he.json +44 -44
- package/translations/hi.json +44 -44
- package/translations/id.json +44 -44
- package/translations/it.json +44 -44
- package/translations/ja.json +44 -44
- package/translations/ko.json +44 -44
- package/translations/ms.json +44 -44
- package/translations/nl.json +44 -44
- package/translations/no.json +44 -44
- package/translations/pl.json +44 -44
- package/translations/pt.json +44 -44
- package/translations/ro.json +44 -44
- package/translations/sv.json +44 -44
- package/translations/th.json +44 -44
- package/translations/tr.json +44 -44
- package/translations/uk.json +44 -44
- package/translations/vi.json +44 -44
- package/translations/zh.json +44 -44
- package/dist/PdfAnnotationCanvas.client-VLNA5O5M.mjs.map +0 -1
- package/dist/ar-4ZEORRW2.mjs.map +0 -1
- package/dist/bn-SEDE5BQJ.mjs.map +0 -1
- package/dist/chunk-D7NBW4RV.mjs.map +0 -1
- package/dist/chunk-M7SZRRIE.mjs.map +0 -1
- package/dist/cs-7W4WF5WD.mjs.map +0 -1
- package/dist/da-75XGBCBK.mjs.map +0 -1
- package/dist/de-ODJVFLHM.mjs.map +0 -1
- package/dist/el-C4PM4WB3.mjs.map +0 -1
- package/dist/es-WD33R7QL.mjs.map +0 -1
- package/dist/fa-2BP6V56P.mjs.map +0 -1
- package/dist/fi-USRRW24J.mjs.map +0 -1
- package/dist/fr-EC5S6WVF.mjs.map +0 -1
- package/dist/he-7TBVIKAA.mjs.map +0 -1
- package/dist/hi-FO4VIZLA.mjs.map +0 -1
- package/dist/id-7U7GGVWY.mjs.map +0 -1
- package/dist/it-Y4OPL6I2.mjs.map +0 -1
- package/dist/ja-PK7SQL55.mjs.map +0 -1
- package/dist/ko-L25PXMYD.mjs.map +0 -1
- package/dist/ms-STH777QM.mjs.map +0 -1
- package/dist/nl-Y7LECDDR.mjs.map +0 -1
- package/dist/no-KEKCEWU6.mjs.map +0 -1
- package/dist/pl-7A7OC75O.mjs.map +0 -1
- package/dist/pt-35HTM7RA.mjs.map +0 -1
- package/dist/ro-VAWL5KQA.mjs.map +0 -1
- package/dist/sv-7ZK5EQEB.mjs.map +0 -1
- package/dist/th-UDWZ4X34.mjs.map +0 -1
- package/dist/tr-4WMPK3UX.mjs.map +0 -1
- package/dist/uk-SSLASQYJ.mjs.map +0 -1
- package/dist/vi-IF42Z5PU.mjs.map +0 -1
- package/dist/zh-HRQTNTAI.mjs.map +0 -1
- package/src/components/DetectionProgressWidget.tsx +0 -113
- /package/dist/{chunk-C63BARI7.mjs.map → chunk-3FIQXKQF.mjs.map} +0 -0
- /package/dist/{en-KJCJQ4OO.mjs.map → en-XWEPVTB4.mjs.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Layer 2 Integration Test: HighlightPanel +
|
|
2
|
+
* Layer 2 Integration Test: HighlightPanel + AssistSection
|
|
3
3
|
*
|
|
4
|
-
* Tests the integration between HighlightPanel and
|
|
5
|
-
* Verifies that
|
|
4
|
+
* Tests the integration between HighlightPanel and AssistSection components.
|
|
5
|
+
* Verifies that progress prop is correctly passed down the component tree.
|
|
6
6
|
*
|
|
7
7
|
* This is a Layer 2 test because it:
|
|
8
|
-
* - Tests multiple real React components together (HighlightPanel +
|
|
9
|
-
* - Uses real EventBus for
|
|
8
|
+
* - Tests multiple real React components together (HighlightPanel + AssistSection)
|
|
9
|
+
* - Uses real EventBus for attend:click events
|
|
10
10
|
* - Mocks API and external dependencies
|
|
11
11
|
* - Tests the data flow between parent and child components
|
|
12
12
|
*/
|
|
@@ -27,14 +27,14 @@ const mockT = vi.fn((key: string) => {
|
|
|
27
27
|
const translations: Record<string, string> = {
|
|
28
28
|
title: 'Highlights',
|
|
29
29
|
noHighlights: 'No highlights yet',
|
|
30
|
-
|
|
30
|
+
annotateHighlights: 'Annotate Highlights',
|
|
31
31
|
instructions: 'Instructions',
|
|
32
32
|
optional: '(optional)',
|
|
33
33
|
instructionsPlaceholder: 'Enter custom instructions...',
|
|
34
34
|
densityLabel: 'Density',
|
|
35
35
|
densitySparse: 'Sparse',
|
|
36
36
|
densityDense: 'Dense',
|
|
37
|
-
|
|
37
|
+
annotate: 'Annotate',
|
|
38
38
|
};
|
|
39
39
|
return translations[key] || key;
|
|
40
40
|
});
|
|
@@ -48,7 +48,7 @@ vi.mock('../../../../contexts/useEventSubscription', () => ({
|
|
|
48
48
|
useEventSubscriptions: vi.fn(),
|
|
49
49
|
}));
|
|
50
50
|
|
|
51
|
-
describe('HighlightPanel +
|
|
51
|
+
describe('HighlightPanel + AssistSection Integration', () => {
|
|
52
52
|
let mockAnnotations: Annotation[];
|
|
53
53
|
|
|
54
54
|
beforeEach(() => {
|
|
@@ -74,13 +74,13 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
describe('Detection Progress Prop Passing', () => {
|
|
77
|
-
it('should pass
|
|
77
|
+
it('should pass progress to AssistSection when provided', () => {
|
|
78
78
|
renderWithProviders(
|
|
79
79
|
<HighlightPanel
|
|
80
80
|
annotations={mockAnnotations}
|
|
81
81
|
pendingAnnotation={null}
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
isAssisting={true}
|
|
83
|
+
progress={{
|
|
84
84
|
status: 'analyzing',
|
|
85
85
|
percentage: 30,
|
|
86
86
|
message: 'Analyzing text for highlights...',
|
|
@@ -89,49 +89,49 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
89
89
|
/>
|
|
90
90
|
);
|
|
91
91
|
|
|
92
|
-
// Verify
|
|
92
|
+
// Verify AssistSection received and rendered the progress
|
|
93
93
|
expect(screen.getByText('Analyzing text for highlights...')).toBeInTheDocument();
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
it('should pass null
|
|
96
|
+
it('should pass null progress to AssistSection', () => {
|
|
97
97
|
renderWithProviders(
|
|
98
98
|
<HighlightPanel
|
|
99
99
|
annotations={mockAnnotations}
|
|
100
100
|
pendingAnnotation={null}
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
isAssisting={false}
|
|
102
|
+
progress={null}
|
|
103
103
|
annotateMode={true}
|
|
104
104
|
/>
|
|
105
105
|
);
|
|
106
106
|
|
|
107
|
-
// Form should be visible (meaning
|
|
107
|
+
// Form should be visible (meaning progress was null)
|
|
108
108
|
expect(screen.getByPlaceholderText('Enter custom instructions...')).toBeInTheDocument();
|
|
109
|
-
expect(screen.getByRole('button', { name: /✨
|
|
109
|
+
expect(screen.getByRole('button', { name: /✨ Annotate/ })).toBeInTheDocument();
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
it('should pass undefined
|
|
112
|
+
it('should pass undefined progress to AssistSection', () => {
|
|
113
113
|
renderWithProviders(
|
|
114
114
|
<HighlightPanel
|
|
115
115
|
annotations={mockAnnotations}
|
|
116
116
|
pendingAnnotation={null}
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
isAssisting={false}
|
|
118
|
+
progress={undefined}
|
|
119
119
|
annotateMode={true}
|
|
120
120
|
/>
|
|
121
121
|
);
|
|
122
122
|
|
|
123
|
-
// Form should be visible (meaning
|
|
123
|
+
// Form should be visible (meaning progress was undefined)
|
|
124
124
|
expect(screen.getByPlaceholderText('Enter custom instructions...')).toBeInTheDocument();
|
|
125
|
-
expect(screen.getByRole('button', { name: /✨
|
|
125
|
+
expect(screen.getByRole('button', { name: /✨ Annotate/ })).toBeInTheDocument();
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
it('should keep progress visible after detection completes (
|
|
128
|
+
it('should keep progress visible after detection completes (isAssisting=false)', () => {
|
|
129
129
|
renderWithProviders(
|
|
130
130
|
<HighlightPanel
|
|
131
131
|
annotations={mockAnnotations}
|
|
132
132
|
pendingAnnotation={null}
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
isAssisting={false}
|
|
134
|
+
progress={{
|
|
135
135
|
status: 'complete',
|
|
136
136
|
percentage: 100,
|
|
137
137
|
message: 'Complete! Created 14 highlights',
|
|
@@ -146,13 +146,13 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
146
146
|
expect(screen.queryByPlaceholderText('Enter custom instructions...')).not.toBeInTheDocument();
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
it('should pass progress with request parameters to
|
|
149
|
+
it('should pass progress with request parameters to AssistSection', () => {
|
|
150
150
|
renderWithProviders(
|
|
151
151
|
<HighlightPanel
|
|
152
152
|
annotations={mockAnnotations}
|
|
153
153
|
pendingAnnotation={null}
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
isAssisting={true}
|
|
155
|
+
progress={{
|
|
156
156
|
status: 'analyzing',
|
|
157
157
|
message: 'Analyzing...',
|
|
158
158
|
requestParams: [
|
|
@@ -171,32 +171,32 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
171
171
|
});
|
|
172
172
|
|
|
173
173
|
describe('Annotate Mode Toggling', () => {
|
|
174
|
-
it('should render
|
|
174
|
+
it('should render AssistSection when annotateMode is true', () => {
|
|
175
175
|
renderWithProviders(
|
|
176
176
|
<HighlightPanel
|
|
177
177
|
annotations={mockAnnotations}
|
|
178
178
|
pendingAnnotation={null}
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
isAssisting={false}
|
|
180
|
+
progress={null}
|
|
181
181
|
annotateMode={true}
|
|
182
182
|
/>
|
|
183
183
|
);
|
|
184
184
|
|
|
185
|
-
expect(screen.getByText('
|
|
185
|
+
expect(screen.getByText('Annotate Highlights')).toBeInTheDocument();
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
it('should NOT render
|
|
188
|
+
it('should NOT render AssistSection when annotateMode is false', () => {
|
|
189
189
|
renderWithProviders(
|
|
190
190
|
<HighlightPanel
|
|
191
191
|
annotations={mockAnnotations}
|
|
192
192
|
pendingAnnotation={null}
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
isAssisting={false}
|
|
194
|
+
progress={null}
|
|
195
195
|
annotateMode={false}
|
|
196
196
|
/>
|
|
197
197
|
);
|
|
198
198
|
|
|
199
|
-
expect(screen.queryByText('
|
|
199
|
+
expect(screen.queryByText('Annotate Highlights')).not.toBeInTheDocument();
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
it('should hide progress when switching to browse mode (annotateMode=false)', () => {
|
|
@@ -204,8 +204,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
204
204
|
<HighlightPanel
|
|
205
205
|
annotations={mockAnnotations}
|
|
206
206
|
pendingAnnotation={null}
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
isAssisting={true}
|
|
208
|
+
progress={{
|
|
209
209
|
status: 'analyzing',
|
|
210
210
|
message: 'Analyzing...',
|
|
211
211
|
}}
|
|
@@ -220,8 +220,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
220
220
|
<HighlightPanel
|
|
221
221
|
annotations={mockAnnotations}
|
|
222
222
|
pendingAnnotation={null}
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
isAssisting={true}
|
|
224
|
+
progress={{
|
|
225
225
|
status: 'analyzing',
|
|
226
226
|
message: 'Analyzing...',
|
|
227
227
|
}}
|
|
@@ -235,13 +235,13 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
235
235
|
});
|
|
236
236
|
|
|
237
237
|
describe('State Combinations', () => {
|
|
238
|
-
it('should handle
|
|
238
|
+
it('should handle isAssisting=true with no progress (starting state)', () => {
|
|
239
239
|
renderWithProviders(
|
|
240
240
|
<HighlightPanel
|
|
241
241
|
annotations={mockAnnotations}
|
|
242
242
|
pendingAnnotation={null}
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
isAssisting={true}
|
|
244
|
+
progress={null}
|
|
245
245
|
annotateMode={true}
|
|
246
246
|
/>
|
|
247
247
|
);
|
|
@@ -250,13 +250,13 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
250
250
|
expect(screen.getByPlaceholderText('Enter custom instructions...')).toBeInTheDocument();
|
|
251
251
|
});
|
|
252
252
|
|
|
253
|
-
it('should handle
|
|
253
|
+
it('should handle isAssisting=false with progress (final state)', () => {
|
|
254
254
|
renderWithProviders(
|
|
255
255
|
<HighlightPanel
|
|
256
256
|
annotations={mockAnnotations}
|
|
257
257
|
pendingAnnotation={null}
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
isAssisting={false}
|
|
259
|
+
progress={{
|
|
260
260
|
status: 'complete',
|
|
261
261
|
message: 'Done!',
|
|
262
262
|
}}
|
|
@@ -275,8 +275,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
275
275
|
<HighlightPanel
|
|
276
276
|
annotations={mockAnnotations}
|
|
277
277
|
pendingAnnotation={null}
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
isAssisting={true}
|
|
279
|
+
progress={{
|
|
280
280
|
status: 'started',
|
|
281
281
|
percentage: 0,
|
|
282
282
|
message: 'Starting...',
|
|
@@ -292,8 +292,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
292
292
|
<HighlightPanel
|
|
293
293
|
annotations={mockAnnotations}
|
|
294
294
|
pendingAnnotation={null}
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
isAssisting={true}
|
|
296
|
+
progress={{
|
|
297
297
|
status: 'analyzing',
|
|
298
298
|
percentage: 50,
|
|
299
299
|
message: 'Analyzing...',
|
|
@@ -310,8 +310,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
310
310
|
<HighlightPanel
|
|
311
311
|
annotations={mockAnnotations}
|
|
312
312
|
pendingAnnotation={null}
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
isAssisting={false}
|
|
314
|
+
progress={{
|
|
315
315
|
status: 'complete',
|
|
316
316
|
percentage: 100,
|
|
317
317
|
message: 'Complete!',
|
|
@@ -331,8 +331,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
331
331
|
<HighlightPanel
|
|
332
332
|
annotations={mockAnnotations}
|
|
333
333
|
pendingAnnotation={null}
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
isAssisting={true}
|
|
335
|
+
progress={{
|
|
336
336
|
status: 'analyzing',
|
|
337
337
|
message: 'Analyzing...',
|
|
338
338
|
}}
|
|
@@ -350,8 +350,8 @@ describe('HighlightPanel + DetectSection Integration', () => {
|
|
|
350
350
|
<HighlightPanel
|
|
351
351
|
annotations={[]}
|
|
352
352
|
pendingAnnotation={null}
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
isAssisting={false}
|
|
354
|
+
progress={null}
|
|
355
355
|
annotateMode={true}
|
|
356
356
|
/>
|
|
357
357
|
);
|