{t('actions.history')}
{#if loading}
{t('common.loading')}...
{:else if executions.length === 0}
{t('actions.noExecutions')}
{:else}
{#each executions as exec}
expandedId = expandedId === exec.id ? null : exec.id} class="w-full text-left px-2 py-1.5 rounded text-xs hover:bg-[var(--color-muted)]/50 flex items-center gap-2">
{formatDate(exec.started_at)}
{triggerLabel(exec.trigger)}
{exec.rules_succeeded}/{exec.rules_processed}
{exec.total_items_affected} {t('actions.affected')}
{formatDuration(exec.started_at, exec.finished_at)}
{#if expandedId === exec.id}
{#if exec.error}
{exec.error}
{/if} {#if exec.summary?.rule_results} {#each exec.summary.rule_results as rr}
{rr.rule_name}
{rr.items_matched} matched, {rr.items_affected} affected, {rr.items_skipped} skipped
{#if rr.error}
{rr.error}
{/if}
{/each} {/if}
{/if} {/each}
{/if}