-
Notifications
You must be signed in to change notification settings - Fork 169
Description
Describe the bug
When a curation session is active, curation items appear in the main editor view and the annotation sidebar even when viewing the normal annotation page. These curation items should only be visible on the dedicated curation page.
To Reproduce
Steps to reproduce the behavior:
- Start a curation session by opening the
CurationPage(Project → Curate). - Keep the curation session active.
- Navigate to the regular annotation page for any document in the same project.
- Observe that curation items are shown in the editor UI and in the annotation/metadata sidebar.
Expected behavior
Curation items (curation suggestions / curation-only renderings) must only be visible on the dedicated curation page. When viewing the normal annotation page while a curation session exists, the editor and annotation sidebar must not show curation items.
Please complete the following information:
- Version and build ID: 39.7
Additional context
-
Root cause summary: the DIAM Svelte component / websocket client does not reliably know whether it was instantiated for the curation page vs. the annotation page (WebSocket handlers don’t have Wicket page state). As a result the client subscribes / renders curation updates even on the annotation page.
-
Relevant files:
- server Svelte instantiation:
inception-diam-editor/src/main/java/de/tudarmstadt/ukp/inception/diam/sidebar/DiamAnnotationBrowser.java - document-metadata sidebar:
inception-layer-docmetadata/src/main/java/de/tudarmstadt/ukp/inception/annotation/layer/document/sidebar/DocumentMetadataAnnotationSelectionPanel.java - Svelte loader:
inception-support/src/main/java/de/tudarmstadt/ukp/inception/support/svelte/SvelteBehavior.java
- server Svelte instantiation:
-
Suggested fix (recommended):
- Add an explicit
isCurationPageboolean to the props passed when instantiating the Svelte component inDiamAnnotationBrowser(compute via page class name and/orCurationSessionService.existsSession(...)). - Ensure the DIAM client reads
props.isCurationPageand:- only subscribes to curation-specific WS channels when
true, and - filters incoming WebSocket updates and AJAX-driven rendering based on the flag.
- only subscribes to curation-specific WS channels when
- (Optional) Include the flag in AJAX calls so server-side handlers can be aware of the UI context.
- Add an explicit
-
Rationale: Websocket handlers do not have Wicket request/page state; an explicit prop is the simplest, least-invasive way to tell the client whether it should render/subscribe to curation items.