From 8a9e7bd9ebf4a1ba718b6397673044d0c65335f0 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 16 Mar 2026 12:08:25 +0100 Subject: [PATCH] fix: resolve all 47 svelte-check errors and 10 a11y warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause 1 — OpenAPI types: add @Schema(requiredMode=REQUIRED) to non-nullable fields on Person, Tag, Document, AppUser, UserGroup; regenerate api.ts so required fields are no longer optional. Root cause 2 — Stale types: api.ts regenerated, picking up the Tag endpoint fix from commit 62189d8 (List instead of List). Root cause 3 — openapi-fetch error pattern: replace `if (apiError)` (broken when error type is never/undefined) with `if (!result.response.ok)` across all +page.server.ts files. Cast error via `unknown` to satisfy TS. Root cause 4 — FormData casts: add `as string` / `as string[]` to FormData.get() / FormData.getAll() calls in admin/+page.server.ts. Standalone fixes: - +page.server.ts: return error field so home page template compiles - documents/[id]/+page.svelte: type loadFile param, remove invalid iframe `type` - conversations: type documents as Document[] instead of unknown[] - persons/[id]: non-null assert person data after ok-check a11y: aria-label on all icon-only buttons in TagInput and admin page, replace invalid