(showBoundaries = !showBoundaries)} onHistory={() => (showHistory ? (showHistory = false) : openHistory())} onaccount={openAccount} user={auth.user} {filtersOn} /> {#if showSignIn} (showSignIn = false)} />{/if}
{#if moods.length} {/if} {#if showBoundaries} (showBoundaries = false)} /> {/if} {#if showHistory}

History

Stories you've opened, plus any you swapped away — so an accidental Replace stays recoverable. {auth.user ? 'Synced to your account, across devices.' : 'Kept on this device only.'} Remove anything you don't want to keep.

{#if historyItems.length} {:else}

Nothing yet — stories you open or swap away will appear here.

{/if} {#if historyItems.length || dismissed.size} {/if}
{/if} {#if notice}

{notice}

{/if} {#if loading}

Gathering the good news…

{:else if error}

{error}

{:else} {#key selected}

{viewLabel}

{#if viewSubtitle}

{viewSubtitle}

{/if}
{#if selected === 'today'} {#if brief?.items?.length}
select('tag:' + t)} onview={recordHistory} onimageerror={heroImageFailed} /> {#if restArticles.length}
{#each restArticles as a (a.id)} select('tag:' + t)} onview={recordHistory} /> {/each}
{/if}

✦ that's the good news for today ✦

{:else}

No highlights yet today — try a calmer filter, or check back soon.

{/if} {:else if feed.length}
{#each feed as a (a.id)} select('tag:' + t)} onview={recordHistory} /> {/each}
{:else} {#if selected === 'saved'}

Nothing saved yet — tap Save on any story to keep it here.

{:else}

Nothing here right now — try another, or ease a boundary.

{/if} {/if} {/key} {#if families.length}

Explore Upbeat Bytes

{#each families as f (f.name)} {@const tags = f.tags.filter((t) => t.count > 0)} {#if tags.length}

{f.name}

{f.description}

{#each tags as t (t.key)} {/each}
{/if} {/each}
{/if} {/if}
select('today')} onBrowse={browse} onYou={openAccount} user={auth.user} />