From 2c5f7ac12d9c373f91cfefa5005f80c7457671e6 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 8 Jun 2026 12:54:12 +0200 Subject: [PATCH] =?UTF-8?q?fix(review):=20address=20PR=20#787=20review=20b?= =?UTF-8?q?lockers=20=E2=80=94=20db-orm=20diagram,=20C4=20diagram,=20UUID?= =?UTF-8?q?=20link=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - db-orm.puml: replace geschichten_documents with journey_items, add type column to geschichten, bump schema version to V72 - l3-backend-3g-supporting.puml: update GeschichteController and GeschichteService descriptions to mention STORY/JOURNEY subtypes and JourneyItem - geschichten/[id]/+page.svelte: replace raw UUID fallback with m.geschichten_document_link_placeholder() i18n key - messages/{de,en,es}.json: add geschichten_document_link_placeholder translation Co-Authored-By: Claude Sonnet 4.6 --- .../architecture/c4/l3-backend-3g-supporting.puml | 4 ++-- docs/architecture/db/db-orm.puml | 15 ++++++++++----- frontend/messages/de.json | 1 + frontend/messages/en.json | 1 + frontend/messages/es.json | 1 + frontend/src/routes/geschichten/[id]/+page.svelte | 2 +- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/architecture/c4/l3-backend-3g-supporting.puml b/docs/architecture/c4/l3-backend-3g-supporting.puml index c1558c89..ea08f206 100644 --- a/docs/architecture/c4/l3-backend-3g-supporting.puml +++ b/docs/architecture/c4/l3-backend-3g-supporting.puml @@ -16,8 +16,8 @@ System_Boundary(backend, "API Backend (Spring Boot)") { Component(notifCtrl, "NotificationController", "Spring MVC — /api/notifications", "REST and SSE endpoints for notification stream, history with filtering, read/unread state, and per-user preference management.") Component(notifSvc, "NotificationService", "Spring Service", "Creates REPLY and MENTION notifications, optionally sends email, marks as read, and pushes events to connected clients via SseEmitterRegistry.") Component(sseRegistry, "SseEmitterRegistry", "Spring Component", "In-memory ConcurrentHashMap of Spring SseEmitter instances per user. Handles registration, deregistration, and JSON event broadcasts.") - Component(geschCtrl, "GeschichteController", "Spring MVC — /api/geschichten", "CRUD for publishable stories that link persons and documents. Requires BLOG_WRITE permission for write operations.") - Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Sanitizes HTML body with an allowlist policy.") + Component(geschCtrl, "GeschichteController", "Spring MVC — /api/geschichten", "CRUD for publishable stories (STORY) and reading journeys (JOURNEY). Returns GeschichteSummary projections for list; full Geschichte with JourneyItems for detail. Requires BLOG_WRITE permission for write operations.") + Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Supports two subtypes: STORY (prose) and JOURNEY (ordered JourneyItem sequence). Sanitizes HTML body with an allowlist policy.") Component(exHandler, "GlobalExceptionHandler", "Spring @RestControllerAdvice", "Converts DomainException, validation errors, and generic exceptions to ErrorResponse JSON with machine-readable ErrorCode and HTTP status.") } diff --git a/docs/architecture/db/db-orm.puml b/docs/architecture/db/db-orm.puml index 48578048..4f71c08a 100644 --- a/docs/architecture/db/db-orm.puml +++ b/docs/architecture/db/db-orm.puml @@ -1,6 +1,6 @@ @startuml db-orm -' Schema source: Flyway V1–V69 (excl. V37, V43 — intentionally removed) -' Schema as of: V69 (2026-05-27) +' Schema source: Flyway V1–V72 (excl. V37, V43 — intentionally removed) +' Schema as of: V72 (2026-06-08) ' ⚠ This is a versioned snapshot. Update when the schema changes significantly. hide circle @@ -359,6 +359,7 @@ package "Supporting" { title : VARCHAR(255) NOT NULL body : TEXT status : VARCHAR(32) NOT NULL + type : VARCHAR(32) NOT NULL author_id : UUID <> created_at : TIMESTAMP NOT NULL updated_at : TIMESTAMP NOT NULL @@ -370,9 +371,13 @@ package "Supporting" { person_id : UUID <> } - entity geschichten_documents { + entity journey_items { + id : UUID <> + -- geschichte_id : UUID <> document_id : UUID <> + position : INTEGER NOT NULL + note : TEXT } } @@ -436,7 +441,7 @@ audit_log }o--o| documents : document_id geschichten }o--o| app_users : author_id geschichten_persons }o--|| geschichten : geschichte_id geschichten_persons }o--|| persons : person_id -geschichten_documents }o--|| geschichten : geschichte_id -geschichten_documents }o--|| documents : document_id +journey_items }o--|| geschichten : geschichte_id (ON DELETE CASCADE) +journey_items }o--o| documents : document_id (ON DELETE SET NULL) @enduml diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 32f6e464..da8b0672 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "veröffentlicht am {date}", "geschichten_persons_section": "Personen in dieser Geschichte", "geschichten_documents_section": "Erwähnte Dokumente", + "geschichten_document_link_placeholder": "Dokument öffnen", "geschichten_card_heading": "Geschichten", "geschichten_card_write_action": "+ Geschichte schreiben", "geschichten_card_attach_action": "+ Geschichte anhängen", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 435860e1..ab47f6f9 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "published on {date}", "geschichten_persons_section": "People in this story", "geschichten_documents_section": "Referenced documents", + "geschichten_document_link_placeholder": "Open document", "geschichten_card_heading": "Stories", "geschichten_card_write_action": "+ Write a story", "geschichten_card_attach_action": "+ Attach a story", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 88e2affb..abe21231 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "publicada el {date}", "geschichten_persons_section": "Personas en esta historia", "geschichten_documents_section": "Documentos mencionados", + "geschichten_document_link_placeholder": "Abrir documento", "geschichten_card_heading": "Historias", "geschichten_card_write_action": "+ Escribir historia", "geschichten_card_attach_action": "+ Adjuntar historia", diff --git a/frontend/src/routes/geschichten/[id]/+page.svelte b/frontend/src/routes/geschichten/[id]/+page.svelte index d3028fae..fdf07036 100644 --- a/frontend/src/routes/geschichten/[id]/+page.svelte +++ b/frontend/src/routes/geschichten/[id]/+page.svelte @@ -109,7 +109,7 @@ async function handleDelete() { href="/documents/{item.documentId}" class="block rounded border border-line bg-surface px-4 py-3 font-serif text-base text-ink hover:bg-muted" > - {item.note ?? item.documentId} + {item.note ?? m.geschichten_document_link_placeholder()} {/each}