allenai / pawls

Software that makes labeling PDFs easy.
https://pawls.apps.allenai.org
Apache License 2.0
380 stars 74 forks source link

Deleting Relation Endpoints Leads to Dangling Relations #213

Open MikeG112 opened 11 months ago

MikeG112 commented 11 months ago

Hi, thanks for producing this nice tool!

I believe I've spotted a bug, though I may misunderstand intended functionality.

The bug has to do with the UI. If one constructs a relation between two annotations, the UI allows for either of the endpoints of the relation to be deleted (via the garbage can icon). I expected that e.g. deleting one annotation in a relation with two distinct endpoints would result also in the relation being deleted, but it does not. Furthermore, the UI doesn't support deleting the dangling relation; so from the perspective of the UI, the relation is left permanently dangling (AFAICT).

To reproduce:

  1. Produce two annotations from the UI.
  2. Construct one relation between the annotations from the UI.
  3. Delete one of those annotations from the UI.
  4. Note that the relations sidebar still contains the relation in question, now with a dangling endpoint.

If the expected behavior I've described is what's intended, I believe I've implemented the fix in PR #212 . Thanks!