feat(chronik): deep-link mentions and comments to the specific comment #301

Merged
marcel merged 11 commits from feat/issue-300-chronik-mention-deep-link into main 2026-04-21 19:06:19 +02:00
Showing only changes of commit a15e4e139b - Show all commits

View File

@@ -174,6 +174,18 @@ describe('ChronikRow', () => {
expect(link).not.toBeNull();
});
it('links to commentId-only URL when commentId is set but annotationId is absent', async () => {
const item: ActivityFeedItemDTO = {
...baseItem,
kind: 'COMMENT_ADDED',
commentId: 'comment-7'
// annotationId absent — comment on a non-annotation block
};
render(ChronikRow, { item });
const link = document.querySelector('a[href="/documents/doc-1?commentId=comment-7"]');
expect(link).not.toBeNull();
});
// --- robustness: title rendering for edge cases ---
it('still renders the row link when documentTitle is an empty string', async () => {
// Felix: verbText.indexOf(docTitle) returned 0 for empty titles — the span