fix: entity graph gaps, ANNOTATE_ALL on transcription blocks, CSRF on client fetch #648

Merged
marcel merged 14 commits from worktree-feat+issue-286-notification-bell-form-actions into main 2026-05-20 20:36:16 +02:00
Showing only changes of commit 978a2b3cdb - Show all commits

View File

@@ -39,12 +39,13 @@ function handleViewAll() {
action="/aktivitaeten?/mark-all-read"
method="POST"
use:enhance={() => {
errorMessage = null;
optimisticMarkAllRead();
return async ({ result, update }) => {
if (result.type === 'failure') {
errorMessage = (result.data as { error?: string } | undefined)?.error ?? m.notification_error_generic();
if (result.type === 'failure' || result.type === 'error') {
errorMessage = (result as { data?: { error?: string } }).data?.error ?? m.notification_error_generic();
await update({ reset: false, invalidateAll: false });
}
await update({ reset: false, invalidateAll: false });
};
}}
>
@@ -60,7 +61,7 @@ function handleViewAll() {
<!-- Error banner (shown when a dismiss or mark-all action fails) -->
{#if errorMessage}
<p class="px-4 py-2 text-sm text-red-600">{errorMessage}</p>
<p role="alert" class="px-4 py-2 text-sm text-red-600">{errorMessage}</p>
{/if}
<!-- Notification list -->
@@ -93,11 +94,14 @@ function handleViewAll() {
method="POST"
class="contents"
use:enhance={() => {
errorMessage = null;
optimisticMarkRead(notification.id);
return async ({ result, update }) => {
if (result.type === 'failure') {
errorMessage = (result.data as { error?: string } | undefined)?.error ?? m.notification_error_generic();
if (result.type === 'failure' || result.type === 'error') {
errorMessage = (result as { data?: { error?: string } }).data?.error ?? m.notification_error_generic();
await update({ reset: false, invalidateAll: false });
} else {
// Navigate away — no need to update the store since we're leaving the page
onClose();
goto(
buildCommentHref(
@@ -107,7 +111,6 @@ function handleViewAll() {
)
);
}
await update({ reset: false, invalidateAll: false });
};
}}
>