From 38834c56a33acdf79bdfd746f50dd30a37b8f966 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Fri, 24 Apr 2026 14:56:12 +0200 Subject: [PATCH] fix(discovery): stop auto-firing research on Accept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accepting a row triggered a background POST to /admin/markets//research. The intent was to "warm up" the edit page, but the result was discarded (fire-and-forget), the edit page only renders research from its own form action, and the backend's 5-minute-per-market cooldown still got set — so the operator's first manual "Mit KI recherchieren" click hit "Bitte warte 5 Minuten zwischen Recherche-Aufrufen" instead. Removes the auto-fire. Research runs on user click. If we want prefetched suggestions later, that needs server-side caching + a load-time fetch, not fire-and-forget. --- web/src/routes/admin/discovery/+page.server.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/web/src/routes/admin/discovery/+page.server.ts b/web/src/routes/admin/discovery/+page.server.ts index 691575d..ff02f16 100644 --- a/web/src/routes/admin/discovery/+page.server.ts +++ b/web/src/routes/admin/discovery/+page.server.ts @@ -160,13 +160,6 @@ export const actions: Actions = { cookies, { method: 'POST', fetch } ); - // Fire research asynchronously — don't await, the edit page handles streaming suggestions. - void serverFetch(`/admin/markets/${res.data.edition_id}/research`, cookies, { - method: 'POST', - fetch - }).catch(() => { - // Silent: the edit page shows a toast if research hasn't completed. - }); redirect(303, `/admin/maerkte/${res.data.edition_id}/bearbeiten`); } catch (err) { if (err instanceof Response || (err as { status?: number })?.status === 303) throw err;