From b3647be4342020a49d0089d74806a4d078794d25 Mon Sep 17 00:00:00 2001 From: mariosemes Date: Thu, 26 Mar 2026 23:04:22 +0100 Subject: [PATCH] Add Test All Stores button with live per-store results Click 'Test All' to enter a search query, then each enabled store is tested sequentially. A 'Test Result' column appears showing: - Spinner while testing - Green checkmark with product count and duration on success - Red X with error on failure - Disabled stores show dash Tests run one at a time so results stream in visibly. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/client/src/routes/admin/+page.svelte | 113 ++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/src/client/src/routes/admin/+page.svelte b/src/client/src/routes/admin/+page.svelte index 6ca60c5..f8df5d4 100644 --- a/src/client/src/routes/admin/+page.svelte +++ b/src/client/src/routes/admin/+page.svelte @@ -1,11 +1,17 @@
@@ -52,6 +109,9 @@

Stores

+ @@ -68,6 +128,24 @@
{/if} + + {#if showTestPrompt} +
+

Enter a search term to test all enabled stores:

+
{ e.preventDefault(); runTestAll(); }} class="flex gap-2"> + + + +
+
+ {/if} +
{#if loading} @@ -92,11 +170,15 @@ URL Category Status + {#if testResults.size > 0} + Test Result + {/if} Actions {#each stores as store} + {@const test = getTestResult(store.id)} {store.name} @@ -123,6 +205,35 @@ {store.enabled ? 'Active' : 'Disabled'} + {#if testResults.size > 0} + + {#if !test || test.status === 'pending'} + + {:else if test.status === 'testing'} + + + + + + Testing... + + {:else if test.status === 'success'} + + + + + {test.resultCount} products · {test.duration}ms + + {:else} + + + + + Failed + + {/if} + + {/if}