Skip to content

#5114 - Relation suggestions hidden even when stacking is enabled#6008

Merged
reckart merged 2 commits into
release/40.xfrom
bugfix/5114-Relation-suggestions-hidden-even-when-stacking-is-enabled
May 6, 2026
Merged

#5114 - Relation suggestions hidden even when stacking is enabled#6008
reckart merged 2 commits into
release/40.xfrom
bugfix/5114-Relation-suggestions-hidden-even-when-stacking-is-enabled

Conversation

@reckart
Copy link
Copy Markdown
Member

@reckart reckart commented May 5, 2026

What's in the PR

  • Relation suggestion visibility now compares the suggested label against existing relations at the same (source, target) position instead of hiding the whole group as soon as any labeled relation exists there
  • Suggestions whose label differs from existing relations stay visible when the layer's overlap mode allows stacking (ANY_OVERLAP / STACKING_ONLY)
  • Duplicate-label suggestions and label-less suggestions are still hidden, and different-label suggestions remain hidden when stacking is disabled
  • Added test coverage in RelationSuggestionVisibilityCalculationTest for: free position, duplicate label, different label without stacking, different label with stacking (the bug case), duplicate label with stacking, and rejected-learning-record matching/non-matching labels

How to test manually

  • See issue description

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

- Relation suggestion visibility now compares the suggested label against existing relations at the same (source, target) position instead of hiding the whole group as soon as any labeled relation exists there
- Suggestions whose label differs from existing relations stay visible when the layer's overlap mode allows stacking (`ANY_OVERLAP` / `STACKING_ONLY`)
- Duplicate-label suggestions and label-less suggestions are still hidden, and different-label suggestions remain hidden when stacking is disabled
- Added test coverage in `RelationSuggestionVisibilityCalculationTest` for: free position, duplicate label, different label without stacking, different label with stacking (the bug case), duplicate label with stacking, and rejected-learning-record matching/non-matching labels
@reckart reckart added this to the 40.4 milestone May 5, 2026
@reckart reckart self-assigned this May 5, 2026
@reckart reckart added this to Kanban May 5, 2026
@github-project-automation github-project-automation Bot moved this to 🔖 To do in Kanban May 5, 2026
@reckart reckart requested a review from Copilot May 5, 2026 18:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes relation suggestion visibility so that, when the relation layer allows stacking, suggestions with a different label than existing relations at the same (source,target) endpoints remain visible (while duplicates remain hidden), and extends unit tests to cover these cases.

Changes:

  • Refined relation overlap/duplicate detection to compare suggestion labels against existing relations at the same RelationPosition, allowing different-label suggestions when stacking is enabled.
  • Kept hiding for label-less suggestions and same-label duplicates; continued respecting correction-suggestion semantics.
  • Added/expanded unit tests covering free positions, duplicate labels, different-label behavior with/without stacking, and learning-record rejection label matching.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
inception/inception-layer-relation/src/main/java/de/tudarmstadt/ukp/inception/annotation/layer/relation/recommender/ArcSuggestionSupport_ImplBase.java Updates relation suggestion visibility logic to be label-aware and stacking-aware per (source,target) position.
inception/inception-recommendation/src/test/java/de/tudarmstadt/ukp/inception/recommendation/relation/RelationSuggestionVisibilityCalculationTest.java Adds targeted tests for visibility behavior across stacking modes, labels, and rejected learning records.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

- Fix `RelationSuggestionSupport.acceptSuggestion` overwriting an existing relation's label when stacking is enabled: skip the candidate-upsert search for non-correction suggestions on stacking-enabled layers so the suggestion creates a new stacked relation instead.
- Added tests
@reckart reckart force-pushed the bugfix/5114-Relation-suggestions-hidden-even-when-stacking-is-enabled branch from 025f51c to f7e2691 Compare May 6, 2026 06:55
@reckart reckart requested a review from Copilot May 6, 2026 18:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@reckart reckart merged commit ecdb5af into release/40.x May 6, 2026
8 checks passed
@reckart reckart deleted the bugfix/5114-Relation-suggestions-hidden-even-when-stacking-is-enabled branch May 6, 2026 18:44
@github-project-automation github-project-automation Bot moved this from 🔖 To do to 🍹 Done in Kanban May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🍹 Done

Development

Successfully merging this pull request may close these issues.

2 participants