Commit Graph

1526 Commits

Author SHA1 Message Date
Marcel
3205fab33b test(admin): expand admin/users/[id] page coverage
Adds banner-hidden defaults (success/error), empty groups list,
groups field undefined fallback to [].

4 new tests covering ~6 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
4c0eee8da3 test(admin): expand admin/groups/new page coverage
Adds unsaved-warning hidden by default, oninput dirty marker, form
error banner hidden when form is undefined.

3 new tests covering ~6 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
b38d555791 test(viewer): more usePdfRenderer state coverage
Mixed zoomIn/zoomOut return-to-start, zoomOut at floor no-op,
init() resolves and sets pdfjsReady, loadDocument with bogus URL
sets error and flips loading off.

4 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a2d432be49 test(briefwechsel): expand briefwechsel page coverage
Adds timeline rendering with documents, persistRecentPerson save
path, malformed-localStorage parse fallback.

3 new tests covering ~6 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
39c8413c46 test(routes): hit truthy/falsy data.X || '' branches in documents page
Adds two tests that pass all filter props as truthy and as falsy
defaults, covering the seed-from-data-or-default branches.

2 new tests covering ~14 branches (all data.X || '' chains).

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
12733cb699 test(document): expand FileSwitcherStrip coverage
Adds prev/next button click safety, ArrowRight + ArrowLeft + ArrowDown
keyboard navigation through chips with wrap-around.

5 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
ef88584a97 test(briefwechsel): expand CorrespondenzPersonBar coverage
Adds receiver-focus triggers correspondents fetch, advanced-filter
chevron rotation in both states.

3 new tests covering ~6 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
d89279842c test(routes): cover home greeting hour branches
Adds fake-timer tests for morning (h<12), day (12<=h<18), and
evening (h>=18) branches plus the empty-firstName fallback.

4 new tests covering the greeting time-of-day branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
8aedbab0c7 test(documents): expand documents/[id] page coverage further
Sender/receivers populated, filePath set, full user object,
Escape vs other keys keydown handler, deep-link comment query.

6 new tests targeting ~14 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a09e25186f test(admin): expand admin/users/new page coverage
Adds unsaved-warning hidden by default, oninput dirty marker,
form-error banner hidden when form.error undefined.

3 new tests targeting ~6 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
b7f2841375 test(primitives): cover DistributionBar zero-total branch
Adds 0/0 zero-total NaN-guard branch and 5/0 outOnly branch.

2 tests covering ~4 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
c6a7e56119 test(admin): cover all admin/system status branches
Adds backfill success banner, RUNNING import-status rendering,
DONE import-status with processed count, FAILED thumbnail-status
with error message, DONE thumbnail-status with retry button.

5 new tests covering state-machine branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
52ac6b874e test(person): cover PersonTypeahead branches
Label + asterisk per required, placeholder prop, initialName seeding,
hidden value input, large/compact class branches, listbox initial
hidden, focus opens listbox with restrictToCorrespondentsOf, ARIA
expanded toggle, Escape keypress safe, fetch error/non-ok branches,
FieldLabelBadge presence, autofocus prop.

17 tests covering ~30 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
16f5410c6f test(transcription): cover TranscriptionEditView branches
Empty-state coach, review progress counter, mark-all-reviewed
button visibility/disabled state, OcrTrigger conditional, training
labels visible/hidden by canWrite, label toggle callback, blocks
sorted by sortOrder.

12 tests covering ~30 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
9837d3b502 test(document): cover WhoWhenSection date and location branches
Date invalid state, error visibility before/after input, hidden ISO
output, location with initialLocation, location hidden in editMode,
FieldLabelBadge in editMode, required indicator.

7 tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
0d3b5cda7e test(routes): expand documents page coverage
Adds bulk-edit-all click → backend error code branch, fetch throw
fallback message, data.error pass-through to DocumentList, sort/dir
defaults, OR tag operator branch, zoom range pass-through.

7 new tests targeting ~14 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
7206439cec test(admin): expand EntityNav coverage
Active-section icon coloring, flyout trigger click, Escape key
handler on document, user/invite count badge rendering.

5 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
99ca003f66 test(viewer): expand usePdfRenderer state coverage
Adds renderCurrentPage no-op when pdfjsLib uninitialized, prerender
no-op when pdfDoc null, destroy safe without document, setElements
no-throw, isLoaded false initially, accumulating zoomIn calls.

7 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
0f9ffc4c39 test(admin): expand admin/system page coverage
Adds backfill-versions and backfill-file-hashes click handlers,
verifies initial fetch hits import-status and thumbnail-status.

3 new tests targeting ~10 branches in the page component.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a93034a8d7 test(discussion): expand CommentThread coverage
Adds onCountChange-after-reload (loadOnMount=true), null currentUserId
isOwn behavior, replies flattened in display.

3 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
c9a14b6e90 test(genealogy): cover StammbaumSidePanel branches
Heading from displayName, birth/death years rendering with all
branch combinations, close button, Escape keypress closing,
non-Escape ignored, person detail link, empty placeholder, error
banner on fetch failure, AddRelationshipForm visibility toggle.

12 tests covering ~25 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
f9b62982f6 test(viewer): cover PdfViewer empty and loaded state branches
Empty state when url is empty (no controls, placeholder shown),
loaded state with controls, annotationsDimmed branch, transcribeMode
flag, documentFileHash filtering branch.

6 tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
8a22eeaa16 test(annotation): add full pointer-drag cycles for AnnotationEditOverlay
Adds full drag cycles (down + move + up) for all 8 handles, full
move-area cycle, non-primary pointermove and pointerup ignored,
no-movement pointerup early-return path.

12 new tests covering ~24 additional branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
dc4169fb90 test(documents): expand documents/[id] page coverage
Adds doc.title in document title, originalFilename fallback,
'Dokument' default fallback, canWrite=true render, geschichten +
inferredRelationship rendering, doc.id empty handling, task=transcribe
URL parameter render.

7 new tests targeting ~25 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
fd83a62a1c test(routes): expand documents page coverage
Adds canWrite=false hides bulk-edit and new-doc CTAs, no-results
empty state, populated document list, q from server, render-without-
throwing for date / tag / sender filters preselected.

7 new tests targeting ~15 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
6d45aaadf8 test(persons): expand persons/[id] page coverage
Co-correspondents derived from received-document senders, self-skip
branch when sender == current person, GeschichtenCard rendered when
geschichten array is non-empty, 5-entry cap on co-correspondents.

4 new tests covering ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
87c7b2f58d test(routes): expand AppNav coverage for active links and mobile overlay
Active-link styling per pathname (documents, persons, stammbaum,
geschichten, admin), mobile backdrop click closes nav, Escape
keypress on overlay closes nav.

7 new tests targeting ~14 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a25408d4d7 test(routes): expand aktivitaeten page coverage
loadError branches (FuerDichBox skipped vs shown), first-run vs
filter-empty empty-state variants, timeline rendering when feed
has items, FilterPills + FuerDichBox conditional render.

7 tests covering ~12 branches in the page file.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
0926545fc4 test(routes): expand home page coverage
Adds reader stats rendering and reader grid layout when isReader=true.

2 new tests targeting reader-mode branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
70c2dc22cf test(briefwechsel): cover ConversationFilterBar branches
Two persontypeaheads + two date inputs, swap button visible/invisible
based on both persons set, sort label DESC vs ASC, chevron rotation,
onapplyFilters / ontoggleSort / onswapPersons callbacks fire.

11 tests covering ~20 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
78c01d4561 test(genealogy): expand StammbaumCard coverage
Adds direct-relationship sorting, yearRange formatting (both years,
only fromYear), inferred-relationships disclosure rendering, 5-item
cap on derived relationships.

5 new tests targeting ~15 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
6bb520f822 test(routes): expand register coverage for password and form branches
Adds password show/hide toggle (independent for both fields), pwHint
visible after typing, pwValid green hint for 8+ chars, pwMismatch
red hint, pwMatch green hint, form.error rendering, notifyOnMention
checkbox toggle.

7 new tests targeting ~25 branches in the register flow.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
d1aa0dc9f0 test(discussion): cover CommentThread branches
Empty hint, populated comment list, singular vs plural label,
canComment toggle, showCompose flag with empty/non-empty messages,
quotedText pre-fills textarea, onCountChange on mount, URL routing
for annotation/block/document comment endpoints.

12 tests covering ~25 branches in CommentThread.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
6b4a5ba0da test(discussion): cover MentionEditor branches
Textarea props (placeholder, rows, disabled), popup not shown
initially, popup opens on @ + query, empty results from API,
HTTP error → empty popup, Enter submits when popup closed,
Shift+Enter does not submit, Escape closes popup, Arrow{Up,Down}
navigation, Enter with no results.

12 tests covering ~30 branches in MentionEditor.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
7fae13ff4e test(annotation): expand AnnotationLayer coverage
Container style branches (cursor with/without canDraw, touch-action),
drawing pointer flow (canDraw=false skips, pointerdown on existing
annotation skips, no preview when not drawing, pointermove without
draw, pointerup without draw).

7 new tests, +14 covered branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
1bcce359e1 test(routes): expand DropZone coverage for drag/drop branches
Adds drag-over and drag-leave styling, drop with no files, multiple
invalid files, mixed valid+invalid files, non-Enter keydown ignore,
window-level dragenter/dragleave with and without 'Files' types,
counter underflow guard.

16 tests, +9 covered branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
41a42c77bb test(annotation): expand AnnotationEditOverlay coverage
Adds keyboard navigation (Arrow{Up,Down,Left,Right}, shiftKey step,
non-arrow no-op, edge clamping at all four sides), pointer drag
flows (move-area + each of the 8 handles), early-return branches
for non-primary pointers and pointer events without active drag.

28 tests, +20 covered branches over previous 7-test version.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
ac43ef2243 test(activity): cover ChronikEmptyState branches
Three variants (first-run, filter-empty, inbox-zero), title vs body
visibility, data-variant attribute, accent vs ink-3 icon coloring.

5 tests, ~15 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
23bae62248 test(activity): cover DashboardActivityFeed branches
Caption + show-all link, empty/non-empty conditional, actor avatar
vs question-mark fallback, rollup count badge presence, youMentioned
badge, verbMap entries (TEXT_SAVED, FILE_UPLOADED), unknown-kind
fallback, rollup time range, actor name vs initials fallback,
document href construction.

13 tests, ~50 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
c0d0638f2b test(activity): cover ChronikFuerDichBox branches
Inbox-zero state, count badge, MENTION vs REPLY glyphs and verbs,
onMarkRead callback per dismiss, onMarkAllRead callback, comment
deep-link href construction.

8 tests, ~30 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
22e4b98229 test(activity): cover ChronikFilterPills branches
Radiogroup with label, all five filter pills, aria-checked for active
filter, tabindex matrix (0 active vs -1 inactive), onChange callback
when clicked.

5 tests, ~15 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a8577fabc4 test(activity): cover ChronikErrorCard and ChronikTimeline
ChronikErrorCard: default vs supplied message, retry callback wiring,
role=alert.

ChronikTimeline: empty render, today bucket grouping, older bucket
grouping, multi-bucket grouping when items span time ranges.

8 tests, ~20 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
cd26296969 test(dashboard): cover DashboardResumeStrip branches
Empty card vs populated strip, title rendering, thumbnail image vs
fallback icon, progress bar aria-valuenow, document detail link,
collaborators stack rendering, safeColor fallback to default when hex
invalid.

9 tests covering ~25 of DashboardResumeStrip's branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
c42585d5d8 test(dashboard): cover ReaderDraftsModule branches
Heading, empty placeholder, per-draft row rendering, draft edit link
href, meta line with relative time.

5 tests, ~10 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
84c9cdab2f test(dashboard): cover ReaderRecentDocs branches
Heading + all-docs link, New badge gated on createdAt == updatedAt,
sender displayName vs lastName fallback vs em-dash, document detail
link.

8 tests covering ~16 of the recent-docs section's branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
2f700f80f7 test(dashboard): cover ReaderHeaderBar and ReaderRecentStories
ReaderHeaderBar: time-of-day greeting matrix (Morgen/Mittag/Abend),
welcome with name, stats counts, em-dash for null counts, three
section links.

ReaderRecentStories: empty early return, populated story rows, all-
stories link, story-detail link, body excerpt visibility.

12 tests, ~30 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
8e6bce7d01 test(transcription): cover TranscriptionColumn branches
Empty placeholder, heading + per-doc rendering, weekly-pulse visibility
gated on weeklyCount > 0, block-progress label vs em-dash branch,
task=transcribe link, missing-documentDate handling.

8 tests, ~20 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
2beead7b71 test(routes): cover DocumentList branches
Empty state (default + term-specific), error banner, year groups
default sort, sender-group sort, undated/unknown-sender labels, total
count display. Mocks $app/navigation since the empty-state CTA calls
goto.

8 tests covering ~30 of DocumentList's branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
37726a8585 test(ocr): cover TrainingHistory branches
Empty placeholder, all four status pill branches (QUEUED/DONE/FAILED/
RUNNING), error-detail disclosure on FAILED, Personalisiert vs Basis
type label, COLLAPSED_COUNT visible runs, person columns visibility
toggle, em-dash CER fallback.

11 tests covering ~25 of TrainingHistory's branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
a08d537fd6 test(dashboard): cover ReaderPersonChips branches
Section landmark with aria-label, empty placeholder, per-person chip
with link to detail, document-count chip visibility branch, displayName
vs lastName fallback, all-persons footer link.

7 tests, ~16 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00