Files
familienarchiv/frontend/src/lib/geschichte
Marcel 6ab7abb9df
Some checks failed
CI / Unit & Component Tests (push) Failing after 3m41s
CI / OCR Service Tests (push) Successful in 43s
CI / Backend Unit Tests (push) Failing after 3m30s
CI / Unit & Component Tests (pull_request) Failing after 3m32s
CI / OCR Service Tests (pull_request) Successful in 40s
CI / Backend Unit Tests (pull_request) Failing after 3m17s
fix(tests): fix 3 pre-existing vitest-browser spec failures
Three distinct root causes:

1. hilfe/transkription: Wikipedia link test was checking .textContent but
   the accessible text had moved to aria-label in a prior commit.

2. documents/[id]/edit: vi.spyOn on a Svelte 5 compiled .svelte.ts service
   object does not reliably track calls in vitest-browser mode; replaced
   with a plain closure-based mock.

3. GeschichteEditor: TipTap's onMount steals focus and its ProseMirror
   view interferes with Playwright CDP event dispatch. Three workarounds:
   - blur: dispatchEvent(new FocusEvent('blur')) bypasses focus-state check
   - save buttons: dispatchEvent(new MouseEvent('click')) from in-browser JS
     context reliably triggers Svelte 5 onclick vs. Playwright CDP click
   - trailing-space fill: input.value + dispatchEvent('input') works where
     userEvent.fill('value ') silently fails to update bind:value

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:27:24 +02:00
..

geschichte (frontend)

UI for family stories: the rich-text editor, story cards, and story list view.

What this domain owns

Components: GeschichteEditor.svelte, GeschichtenCard.svelte.

What this domain does NOT own

  • Comment/discussion UI — shared via shared/discussion/ (same component used for document comments)
  • Person display — person/PersonChip.svelte is used inside story content (cross-domain import)
  • Document display — document references in stories use components from document/

Key components

Component Used in Notes
GeschichteEditor.svelte /geschichten/new, /geschichten/[id]/edit Rich-text editor with person/document @-mentions and inline embeds
GeschichtenCard.svelte /geschichten (list), dashboard Story preview card with cover image and publish status

Audience note

The /geschichten route primarily serves readers (younger family members on mobile). Cards must have ≥ 44 px touch targets. Status must not rely on color alone.

Cross-domain imports

  • person/PersonChip.svelte — inline person references in story content
  • document/DocumentThumbnail.svelte — inline document references
  • shared/discussion/ — comment thread below published stories

Backend counterpart

backend/src/main/java/org/raddatz/familienarchiv/geschichte/README.md