From 69f69febb250505bd476b47a9b129dea32b12996 Mon Sep 17 00:00:00 2001 From: neon <18559658+neonsolstice@users.noreply.github.com> Date: Mon, 18 May 2026 03:31:38 +0000 Subject: [PATCH] feat(book): add highlights tab with filters, export, and pagination --- .../book/components/detail/BookDetailTabs.vue | 1 + .../components/detail/tabs/HighlightCard.vue | 177 +++++++++++ .../detail/tabs/HighlightChapterGroup.vue | 45 +++ .../detail/tabs/HighlightNoteEditor.vue | 47 +++ .../detail/tabs/HighlightsExportMenu.vue | 132 +++++++++ .../detail/tabs/HighlightsFilterBar.vue | 126 ++++++++ .../components/detail/tabs/HighlightsTab.vue | 191 ++++++++++++ .../__tests__/HighlightNoteEditor.spec.ts | 66 +++++ .../__tests__/HighlightsExportMenu.spec.ts | 126 ++++++++ .../__tests__/HighlightsFilterBar.spec.ts | 110 +++++++ .../composables/useBookHighlights.test.ts | 279 ++++++++++++++++++ .../book/composables/useBookHighlights.ts | 184 ++++++++++++ .../src/features/book/lib/book-detail-tabs.ts | 2 +- client/src/views/BookDetailView.vue | 12 + packages/types/src/annotation.ts | 27 ++ packages/types/src/index.ts | 1 + .../annotation/annotation.controller.test.ts | 41 ++- .../annotation/annotation.controller.ts | 8 +- .../annotation/annotation.repository.test.ts | 144 +++++++++ .../annotation/annotation.repository.ts | 130 +++++++- .../annotation/annotation.service.test.ts | 183 ++++++++++++ .../modules/annotation/annotation.service.ts | 65 +++- .../annotation/dto/annotation-query.dto.ts | 51 ++++ 23 files changed, 2141 insertions(+), 7 deletions(-) create mode 100644 client/src/features/book/components/detail/tabs/HighlightCard.vue create mode 100644 client/src/features/book/components/detail/tabs/HighlightChapterGroup.vue create mode 100644 client/src/features/book/components/detail/tabs/HighlightNoteEditor.vue create mode 100644 client/src/features/book/components/detail/tabs/HighlightsExportMenu.vue create mode 100644 client/src/features/book/components/detail/tabs/HighlightsFilterBar.vue create mode 100644 client/src/features/book/components/detail/tabs/HighlightsTab.vue create mode 100644 client/src/features/book/components/detail/tabs/__tests__/HighlightNoteEditor.spec.ts create mode 100644 client/src/features/book/components/detail/tabs/__tests__/HighlightsExportMenu.spec.ts create mode 100644 client/src/features/book/components/detail/tabs/__tests__/HighlightsFilterBar.spec.ts create mode 100644 client/src/features/book/composables/useBookHighlights.test.ts create mode 100644 client/src/features/book/composables/useBookHighlights.ts create mode 100644 packages/types/src/annotation.ts create mode 100644 server/src/modules/annotation/dto/annotation-query.dto.ts diff --git a/client/src/features/book/components/detail/BookDetailTabs.vue b/client/src/features/book/components/detail/BookDetailTabs.vue index 29a4928f4..6523bf521 100644 --- a/client/src/features/book/components/detail/BookDetailTabs.vue +++ b/client/src/features/book/components/detail/BookDetailTabs.vue @@ -18,6 +18,7 @@ const tabs = computed<{ label: string; tab: BookDetailTab }[]>(() => { } result.push({ label: 'Files', tab: 'files' }) result.push({ label: 'Reading Log', tab: 'reading-log' }) + result.push({ label: 'Highlights', tab: 'highlights' }) return result }) diff --git a/client/src/features/book/components/detail/tabs/HighlightCard.vue b/client/src/features/book/components/detail/tabs/HighlightCard.vue new file mode 100644 index 000000000..3e322f8f6 --- /dev/null +++ b/client/src/features/book/components/detail/tabs/HighlightCard.vue @@ -0,0 +1,177 @@ + + + diff --git a/client/src/features/book/components/detail/tabs/HighlightChapterGroup.vue b/client/src/features/book/components/detail/tabs/HighlightChapterGroup.vue new file mode 100644 index 000000000..a02c0b789 --- /dev/null +++ b/client/src/features/book/components/detail/tabs/HighlightChapterGroup.vue @@ -0,0 +1,45 @@ + + + diff --git a/client/src/features/book/components/detail/tabs/HighlightNoteEditor.vue b/client/src/features/book/components/detail/tabs/HighlightNoteEditor.vue new file mode 100644 index 000000000..1254503e8 --- /dev/null +++ b/client/src/features/book/components/detail/tabs/HighlightNoteEditor.vue @@ -0,0 +1,47 @@ + + +