From a8175db63e02e2d0cfab35ea2e58e7103a2ce110 Mon Sep 17 00:00:00 2001 From: jay Date: Mon, 8 Jun 2026 08:47:30 -0400 Subject: [PATCH] Back button: move inline-right; show on deep-linked source views; clean ?source * Position the in-feed Back button to the right of the view title (inline with it) instead of stacked above; the accent underline moves under the title text. * Deep-linking a source feed from an article page (/?source=) now seeds the back history so the Back button appears (returns to Highlights). * Strip the ?source= param after consuming it (replaceState) so it can't linger and make the browser back/forward behave oddly. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/routes/+page.svelte | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index a80ebab..2b69dd6 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -341,6 +341,10 @@ const srcParam = typeof location !== 'undefined' && new URLSearchParams(location.search).get('source'); if (srcParam && /^\d+$/.test(srcParam)) { await select('source:' + srcParam); + // Seed the back history so the in-feed Back returns to Highlights, and + // strip the ?source= param so it can't linger and confuse browser back. + navStack = [{ key: 'today', source: null }]; + if (typeof history !== 'undefined') history.replaceState(null, '', location.pathname); } else { await select('today'); } @@ -373,14 +377,16 @@ {:else} {#key selected}
+
+

{viewLabel}

+ {#if viewSubtitle}

{viewSubtitle}

{/if} +
{#if navStack.length} {/if} -

{viewLabel}

- {#if viewSubtitle}

{viewSubtitle}

{/if}
{#if selected === 'today'} @@ -448,9 +454,14 @@