{#if visible.length > 0}
{#each visible as msg, i (history.length - visible.length + i)}
{msg.text}
{/each}
{/if}