From 90592c26680dd6d57bbccd69b8be6dc4cb5b0932 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:20:44 -0600 Subject: [PATCH 1/2] fix: auto-submit share page and improve error/loading UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Auto-submit when URL is valid and platform is allowed (no tap needed) - Show "Adding to feed…" loading state while submitting - Show dedicated error state with "Try again" button on failure - Remove fromShortcut branch — auto-submit supersedes the shortcut flow - Fix .err CSS alias for error icon wrap styling --- src/routes/share/+page.svelte | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/routes/share/+page.svelte b/src/routes/share/+page.svelte index 0bae578..e6be64e 100644 --- a/src/routes/share/+page.svelte +++ b/src/routes/share/+page.svelte @@ -15,7 +15,6 @@ import ExportIcon from 'phosphor-svelte/lib/ExportIcon'; const shareUrl = $derived($page.data.shareUrl as string); - const fromShortcut = $derived($page.data.fromShortcut as boolean); const platform = $derived(platformLabel(shareUrl)); const isValid = $derived(isSupportedUrl(shareUrl)); const detectedPlatform = $derived(shareUrl ? detectPlatform(shareUrl) : null); @@ -36,6 +35,14 @@ let success = $state(false); let clipId = $state(''); let contentType = $state(''); + let autoSubmitted = $state(false); + + $effect(() => { + if (isValid && platformAllowed && !autoSubmitted) { + autoSubmitted = true; + handleSubmit(); + } + }); async function handleSubmit() { error = ''; @@ -105,30 +112,26 @@

Added!

Your clip is downloading.

- {:else} + {:else if loading}
- {#if fromShortcut} -

Couldn't add automatically

-

- The shortcut wasn't able to add this clip. Tap below to add it manually. -

- {:else} -

Add to feed

- {/if} +

Adding to feed…

{#if platform} {platform} {/if}

{shareUrl}

- - {#if error} -

{error}

+ {:else if error} +
+ +
+

Couldn't add clip

+

{error}

+ {#if platform} + {platform} {/if} - - +

{shareUrl}

+ Cancel {/if} @@ -175,7 +178,8 @@ animation: pop 0.3s cubic-bezier(0.32, 0.72, 0, 1); } - .icon-wrap.error { + .icon-wrap.error, + .icon-wrap.err { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); } From 22ef7d60d552cd8f16335339e6d9d391a6c442e0 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:22:09 -0600 Subject: [PATCH 2/2] fix: favorites reel back-button handling and disable auto-scroll - Defer onReelPopState so SvelteKit updates page.state before we check it; prevents reel from closing when a sheet on top dismisses via back button - Disable autoScroll in favorites reel (was incorrectly inherited from prefs) --- src/routes/(app)/favorites/+page.svelte | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/routes/(app)/favorites/+page.svelte b/src/routes/(app)/favorites/+page.svelte index 5d5d3bf..f4f8c1a 100644 --- a/src/routes/(app)/favorites/+page.svelte +++ b/src/routes/(app)/favorites/+page.svelte @@ -27,18 +27,20 @@ let reelContainer: HTMLDivElement | null = $state(null); let showViewers = $state(false); - // History management — push a state entry when the reel opens so the - // Android back gesture (and browser back button) closes it instead of - // navigating away from the favorites page entirely. + // Push a history entry when reel opens so back gesture closes it, not navigates away. let reelClosedViaBack = false; let reelDismissed = false; function onReelPopState() { - reelClosedViaBack = true; - closeReel(); + // Defer so page.state is updated before we inspect it. If favReel is still + // set, a sheet on top closed — don't dismiss the reel. If gone, close it. + setTimeout(() => { + if (page.state.favReel || viewMode !== 'reel') return; + reelClosedViaBack = true; + closeReel(); + }, 0); } - // Close viewers sheet when scrolling to a different clip $effect(() => { // eslint-disable-next-line sonarjs/void-use -- read activeIndex to re-run on scroll void activeIndex; @@ -46,7 +48,6 @@ }); const currentUserId = $derived(page.data.user?.id ?? ''); - const autoScroll = $derived(page.data.user?.autoScroll ?? false); const gifEnabled = $derived(!!page.data.gifEnabled); const renderWindow = 2; @@ -138,7 +139,6 @@ if (slot) slot.scrollIntoView({ behavior: 'smooth' }); } - // IntersectionObserver to track active clip in reel mode $effect(() => { if (viewMode !== 'reel' || !reelContainer) return; // eslint-disable-next-line sonarjs/void-use -- re-run when clips change @@ -234,7 +234,7 @@ {currentUserId} active={i === activeIndex} index={i} - {autoScroll} + autoScroll={false} {gifEnabled} canEditCaption={clip.addedBy === currentUserId} seenByOthers={clip.seenByOthers}