feat(#50): document & annotation comments #57
Reference in New Issue
Block a user
Delete Branch "feature/50-document-comments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #50
Summary
DocumentCommententity,CommentRepository,CommentService(with flat reply-to-root resolution, authorship checks, admin override),CommentController(8 endpoints for general + annotation comments),COMMENT_NOT_FOUNDerror codeCommentThreadcomponent (post/reply/edit/delete, relative timestamps, „bearbeitet" label),AnnotationCommentPanel(floating panel on desktop, bottom-sheet modal on mobile), annotation comment count pill (bottom-right, bold, drop shadow), auto-open panel on annotation creation, confirm dialog before deleting annotation with comments, hover effect on annotation overlays, „Diskussion" section in document detail sidebarTest plan
./mvnw test)🤖 Generated with Claude Code
Wrap the panel in {#key activeAnnotationId} so Svelte destroys and recreates it on every annotation change, triggering onMount and loading the correct comments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>- Add aria-label="Kommentare anzeigen" to annotation container div so getByRole('button', { name: /annotation löschen/i }) no longer matches the container (its name was previously inherited from the child delete button, causing the test to click the wrong element) - Wrap the server-side comments fetch in a .catch and try/catch so a network error or non-JSON response never crashes the document load Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>