Skip to content

Feature/kb and labels as annotations#71

Merged
XanderVertegaal merged 32 commits into
developfrom
feature/kb-and-labels-as-annotations
Feb 20, 2026
Merged

Feature/kb and labels as annotations#71
XanderVertegaal merged 32 commits into
developfrom
feature/kb-and-labels-as-annotations

Conversation

@XanderVertegaal
Copy link
Copy Markdown
Contributor

@XanderVertegaal XanderVertegaal commented Feb 1, 2026

This PR builds on #63 and includes the latest version of develop. It develops the original PR's idea of using KnowledgeBaseAnnotations, bound by a AnnotationSession, instead of a KnowledgeBase model that is appended to a Problem directly. I think this is a good change which fits the researcher's vision that user annotations will mainly consist of additions/edits of knowledge base items and proof trees.

AnnotationSessions also have a "notes" field aimed at remarks or justifications. I first implemented that too, but noticed that any notes given when adding a label are overwritten when a label is removed. This would have been easier to implement with the 'Event'/'Change' structure you proposed in an earlier PR review.

@XanderVertegaal XanderVertegaal marked this pull request as ready for review February 1, 2026 14:54
@XanderVertegaal XanderVertegaal added the enhancement New feature or request label Feb 1, 2026
Copy link
Copy Markdown
Contributor

@jgonggrijp jgonggrijp left a comment

Choose a reason for hiding this comment

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

I have read the code with attention, but did not try out the feature.

There is a lot of code and I could not completely oversee the larger structure of it, but most of it looks reasonable to me. I made a relatively large number of comments, but they are all about technical details. I really appreciate the extensive testing of two of the modules.

This PR builds on #63 and includes the latest version of develop. It develops the original PR's idea of using KnowledgeBaseAnnotations, bound by a AnnotationSession, instead of a KnowledgeBase model that is appended to a Problem directly. I think this is a good change which fits the researcher's vision that user annotations will mainly consist of additions/edits of knowledge base items and proof trees.

I suspect this AnnotationSession might end up being a temporary placeholder for what is essentially a proof. This works for now, though.

AnnotationSessions also have a "notes" field aimed at remarks or justifications. I first implemented that too, but noticed that any notes given when adding a label are overwritten when a label is removed. This would have been easier to implement with the 'Event'/'Change' structure you proposed in an earlier PR review.

This reads a bit like an open end for a follow-up branch. What do you want to do in that follow-up? Drop the feature? Have another try at making it work? Switch to an event based data model? In the latter case, I don't think this branch should be merged as is.

Comment thread backend/annotation/models.py
Comment thread backend/annotation/serializers.py Outdated
Comment thread backend/annotation/serializers.py Outdated
Comment thread backend/annotation/serializers.py Outdated
Comment thread backend/annotation/serializers.py Outdated
Comment thread frontend/src/app/util.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I saw tests in manage-labels-modal.component.spec.ts that were mostly testing the behavior of the functions in this module. It would be better to have those tests in a dedicated util.spec.ts, because that makes them easier to find when debugging these functions.

@XanderVertegaal XanderVertegaal merged commit e2de793 into develop Feb 20, 2026
1 check passed
@XanderVertegaal XanderVertegaal deleted the feature/kb-and-labels-as-annotations branch February 20, 2026 20:23
@XanderVertegaal XanderVertegaal mentioned this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants