Skip to content

Curation items may be shown on annotation page #5922

@reckart

Description

@reckart

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:

  1. Start a curation session by opening the CurationPage (Project → Curate).
  2. Keep the curation session active.
  3. Navigate to the regular annotation page for any document in the same project.
  4. 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
  • Suggested fix (recommended):

    1. Add an explicit isCurationPage boolean to the props passed when instantiating the Svelte component in DiamAnnotationBrowser (compute via page class name and/or CurationSessionService.existsSession(...)).
    2. Ensure the DIAM client reads props.isCurationPage and:
      • only subscribes to curation-specific WS channels when true, and
      • filters incoming WebSocket updates and AJAX-driven rendering based on the flag.
    3. (Optional) Include the flag in AJAX calls so server-side handlers can be aware of the UI context.
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions