Commit Graph

2392 Commits

Author SHA1 Message Date
Marcel
dd54ba9e74 test(viewer): more usePdfRenderer state branch coverage
renderCurrentPage early-returns when canvasEl/textLayerEl null,
init() idempotent on second call, zoomIn after floor, goToPage(1)
no-op.

5 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
f96a7fdb72 test(documents): cover ocr-status DONE/no-job/network-error branches
ocr-status DONE without restart polling, no jobId path, fetch
network error caught.

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
961727c3f2 test(routes): cover bulk-edit-all success path + hasAdvancedFilters branches
bulk-edit-all populates the selection store on 200 response,
senderId/from/to truthy paths trigger showAdvanced.

4 new tests covering ~8 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
108dc3104d test(admin): cover all import + thumbnail status branches
FAILED import-status with error message, RUNNING thumbnail with
progress count, RUNNING thumbnail without progress (total=0),
trigger thumbnail backfill, trigger import from idle.

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
f989fa00d4 test(discussion): expand CommentThread coverage further
Whitespace-only quotedText not seeded, no onCountChange not provided,
fetch network error during reload, non-OK reload response, own
comment with edit/delete affordances.

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
a53c656077 test(annotation): expand AnnotationLayer prop-combo coverage
Pointer hover events, multiple annotations with activeAnnotationId,
dimmed-overrides-faded, canDraw delete button, blockNumbers map.

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
d37473d905 test(persons): cover personType icon paths + life-date branches
INSTITUTION/GROUP/UNKNOWN personType icons, birthYear-only and
deathYear-only life-date display.

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
b9ae5df8f4 test(geschichten): cover authorName + publishedAt branches
authorName email fallback when no first/last names, undefined-author
empty result, publishedAt missing, body empty no-excerpt, single
person filter render-without-throw.

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
f6554c1e53 test(documents): cover ocr-status RUNNING path + various doc-prop branches
ocr-status returning RUNNING + jobId triggers pollOcrJob, full
OCR-relevant doc fields, geschichten undefined fallback.

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
363bc83054 test(documents): hit fetch and ocr-status branches in documents/[id] page
Transcription-block fetch failure, fetched blocks rendering,
localStorage overwrite, ocr-status 500 path.

4 new tests covering ~15 branches in transcribe-mode flow.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
2e618bfc80 test(routes): expand home page coverage for ?? fallback branches
Adds minimal-data render (default ?? fallbacks), reader-only
minimal data, isReader+canBlogWrite drafts module, full data shape
populated.

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
e5eedc17d0 test(viewer): cover PdfViewer outdated-annotation notice + fetch errors
Outdated notice when fileHash mismatches, no notice when matching,
fetch error gracefully ignored, non-OK response ignored.

4 new tests covering ~8 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
5ccc4c5e88 test(relationship): expand AddRelationshipForm coverage
use:enhance vs callback form variant rendering, self-relation
error, submit disabled on missing related person, submit disabled
on yearError.

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
2bb290ebe8 test(tag): expand TagParentPicker keyboard + excludeIds coverage
ArrowUp wrap-around, Escape close, Enter without selection no-op,
keydown without dropdown no-throw, Enter with active selection
selects, excludeIds filter works, parentId fallback as subtitle.

7 new tests covering ~12 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
aa0c91cf76 test(transcription): expand TranscriptionEditView coverage
Adds activeAnnotationId reactive sync, mark-all-reviewed onclick,
all-blocks-rendered, next-block CTA, active vs inactive training
label chip styles.

6 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
2694db3f28 test(genealogy): expand StammbaumTree node-rendering branch coverage
Adds selected-node primary fill, birth/death year combinations,
node click and Enter/Space/other-key handling, dashed/solid spouse
line, single-parent connector, focus ring on focus + blur, aria
labels and aria-expanded reflection, accent stripe on selected node.

13 new tests covering ~30 branches in the node-render path.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
6050773da5 test(discussion): expand MentionEditor coverage further
Adds mousedown-to-select flow, Enter-to-select with highlighted
result, fetch network throw handling.

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
0972f2691b test(admin): expand admin/invites page coverage
Status color paths (exhausted/expired/revoked), new-invite form
toggle, loadError banner.

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
c1f515ddc4 test(primitives): cover Pagination bridge-page and totalPages=0 branches
Bridge-page-replaces-ellipsis paths (left and right), totalPages=0
hide-the-nav.

3 new tests covering ~5 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
95d875e27c test(admin): cover OcrModelsTable null/em-dash branches
cer/accuracy null → em-dash, cer/accuracy set → percentage,
corrected-lines raw number, multiple rows.

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
d82ce1a48e test(documents): more documents/[id] page coverage with full data shapes
Document with all metadata populated (sender, receivers, tags,
location, scriptType, trainingLabels, geschichten, inferredRelationship,
canBlogWrite, canWrite); URL-driven transcribe mode rendering.

2 new tests covering ~10 branches from prop-driven conditionals.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
96f2b99dec test(routes): add documents page input event handlers + bulk store
Adds search input typing, focus/blur events, and rendering with
bulkSelectionStore containing items.

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
8be1c0e55a test(admin): expand TagTreeNode coverage
Color dot hidden at depth>0 and when color is null, document count
badge omitted at 0, toggle click mutates collapseMap.

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
71940fc99a test(viewer): add more PdfViewer prop combinations
flashAnnotationId, blockNumbers, activeAnnotationId, combined with
transcribeMode, onAnnotationClick wired in.

5 new tests covering ~10 prop-combo branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
57f4d12808 test(notification): expand NotificationDropdown coverage
Adds MENTION verb text, REPLY verb/glyph, multiple notifications
rendering.

3 new tests covering ~5 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
74b2ada2f4 test(admin): expand admin/tags/[id] page coverage
Adds color picker hidden for child tags, form-success default
hidden state, mergeSuccess null render-without-throw.

3 new tests covering ~5 branches.

Refs #496.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 21:50:28 +02:00
Marcel
31c14fd5e3 test(admin): expand admin/groups/[id] page coverage
Adds banner-hidden defaults, all-8-permission-checkboxes count,
empty permissions array.

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
9812a2ff23 test(documents): expand documents/[id]/edit page coverage
Adds doc.title, originalFilename fallback, cancel link href,
form.error pass-through.

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
a58d283eb0 test(persons): expand CoCorrespondentsList coverage
Adds single-word name (one-initial) and leading-space edge cases
for the initials function.

2 new 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
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