发布

  • [OPIK-3610] [FE] Add review capability to completed annotation queues (#4818)

    frostbyte_neo 发布于 2026-01-21 10:04:32 +00:00

    • [OPIK-3610] [FE] Add review capability to completed annotation queues

    Implements the ability for users to review their completed annotations after finishing an annotation queue.

    Key Changes:

    • Added 'Review annotations' button to completion view
    • Implemented handleReviewAnnotations in SMEFlowContext
    • Updated button label logic in AnnotationView for review mode
    • Simplified view management logic to prevent flickering
    • Added comprehensive unit tests for new functionality

    Technical Details:

    • CompletionView now includes button to navigate back to first item
    • Button labels correctly show 'Update + next'/'Update + complete' when reviewing
    • Explicit view transitions in handleSubmit when completing last item
    • Simplified useEffect for initial view selection

    Implements OPIK-3610: Add review capability to completed annotation queues

    • Revision 2: Fix navigation to specific queue and add unsaved changes warning
    • Update ReturnToAnnotationQueueButton to navigate to specific annotation queue details page instead of queue list
    • Add useNavigationBlocker integration to warn users about unsaved changes before leaving
    • Update SMEFlowContext to track unsaved changes across all items (current + cached)
    • Add comprehensive tests for ReturnToAnnotationQueueButton covering navigation and unsaved changes validation
    • Revision 3: Optimize ReturnToAnnotationQueueButton with useMemo

    Memoize the useNavigationBlocker config object to prevent unnecessary recreations on every render. The config now only updates when hasAnyUnsavedChanges changes, improving performance.

    下载附件