From 8cf0c26c95dcf98050ebee0a128088468d70b068 Mon Sep 17 00:00:00 2001 From: Michael Aufreiter Date: Thu, 6 Aug 2026 13:51:55 +0200 Subject: [PATCH 01/13] Improve spinner --- IMPLEMENTATION_PLAN.md | 7 +++ src/routes/components/App.svelte | 20 ++++---- .../components/SaveProgressModal.svelte | 46 +++++++------------ 3 files changed, 32 insertions(+), 41 deletions(-) diff --git a/IMPLEMENTATION_PLAN.md b/IMPLEMENTATION_PLAN.md index 1a375d8a..bd99fdf1 100644 --- a/IMPLEMENTATION_PLAN.md +++ b/IMPLEMENTATION_PLAN.md @@ -1,5 +1,12 @@ # Implementation plan +## Save progress indicator + +- Keep the save phase text stable while saving and render the current media progress percentage inside the loading spinner. +- Label the stable media phases as processing and uploading so the user can distinguish them from document saving. +- Pass progress separately from the status message so percentage updates do not cause text layout shifts. +- Use a larger circular spinner with centered text and preserve the existing text-only completion pill. + ## SvelteKit 3 prerelease migration - Upgrade to `@sveltejs/kit@3.0.0-next.12`, TypeScript 6, and SvelteKit-3-compatible prerelease versions of the Node and Vercel adapters while retaining compatible Svelte, Vite, and Vite plugin ranges. diff --git a/src/routes/components/App.svelte b/src/routes/components/App.svelte index 8e933f90..cd78ddf1 100644 --- a/src/routes/components/App.svelte +++ b/src/routes/components/App.svelte @@ -53,6 +53,7 @@ let save_progress_visible = $state(false); let save_progress_message = $state(''); let save_progress_done = $state(false); + let save_progress_percent = $state(null); let browser_data_version = $state(0); @@ -349,6 +350,7 @@ save_progress_visible = true; save_progress_done = false; + save_progress_percent = 0; save_progress_message = 'Saving…'; try { @@ -357,26 +359,19 @@ const blob_urls = collect_blob_urls(pre_check.nodes); if (blob_urls.length > 0) { - const total = blob_urls.length; - await ensure_processing(blob_urls); if (has_pending_processing()) { - save_progress_message = - total === 1 ? 'Processing media…' : `Processing ${total} media files…`; - - await wait_for_processing(({ done, total: processing_total, progress }) => { - const percent = Math.round(progress * 100); - save_progress_message = - processing_total > 1 - ? `Processing media ${done + 1}/${processing_total}… ${percent}%` - : `Processing media… ${percent}%`; + save_progress_message = 'Processing media…'; + await wait_for_processing(({ progress }) => { + save_progress_percent = Math.round(progress * 100); }); } + save_progress_message = 'Uploading media…'; mapping = await upload_pending(blob_urls, ({ phase, index, total: upload_total }) => { if (phase === 'uploading') { - save_progress_message = `Uploading media ${index}/${upload_total}…`; + save_progress_percent = Math.round((index / upload_total) * 100); } }); } @@ -538,6 +533,7 @@ visible={save_progress_visible} message={save_progress_message} done={save_progress_done} + progress={save_progress_percent} /> {/if} diff --git a/src/routes/components/SaveProgressModal.svelte b/src/routes/components/SaveProgressModal.svelte index 23c43d0d..11af991f 100644 --- a/src/routes/components/SaveProgressModal.svelte +++ b/src/routes/components/SaveProgressModal.svelte @@ -4,8 +4,9 @@ let { visible = false, message = '', - done = false - }: { visible?: boolean; message?: string; done?: boolean } = $props(); + done = false, + progress = null + }: { visible?: boolean; message?: string; done?: boolean; progress?: number | null } = $props(); let show_modal = $state(false); let delay_timer; @@ -36,40 +37,27 @@ transition:fade={{ duration: 150 }} >
{#if done} -
- - - -

{message}

-
+

{message}

{:else}
- -
+

{message}

{/if}
{/if} - - From eb458687aa3a301c2dac8fce6dde4900c3959a48 Mon Sep 17 00:00:00 2001 From: Michael Aufreiter Date: Thu, 6 Aug 2026 13:56:39 +0200 Subject: [PATCH 02/13] More minimal progress indicator for processing/uploading --- IMPLEMENTATION_PLAN.md | 4 +- .../components/SaveProgressModal.svelte | 51 +++++++++++++++---- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/IMPLEMENTATION_PLAN.md b/IMPLEMENTATION_PLAN.md index bd99fdf1..f851d341 100644 --- a/IMPLEMENTATION_PLAN.md +++ b/IMPLEMENTATION_PLAN.md @@ -2,10 +2,10 @@ ## Save progress indicator -- Keep the save phase text stable while saving and render the current media progress percentage inside the loading spinner. +- Keep the save phase text stable while saving and encode the current media progress in a compact circular loading indicator. - Label the stable media phases as processing and uploading so the user can distinguish them from document saving. - Pass progress separately from the status message so percentage updates do not cause text layout shifts. -- Use a larger circular spinner with centered text and preserve the existing text-only completion pill. +- Use a small circular progress indicator and preserve the existing text-only completion pill. ## SvelteKit 3 prerelease migration diff --git a/src/routes/components/SaveProgressModal.svelte b/src/routes/components/SaveProgressModal.svelte index 11af991f..e25b36e7 100644 --- a/src/routes/components/SaveProgressModal.svelte +++ b/src/routes/components/SaveProgressModal.svelte @@ -45,15 +45,48 @@

{message}

{:else}
- From 2fbbe9d699d1138c89c9d109980703f0319cff8a Mon Sep 17 00:00:00 2001 From: Michael Aufreiter Date: Thu, 6 Aug 2026 14:39:03 +0200 Subject: [PATCH 03/13] Avoid flicker in LinkPreview --- IMPLEMENTATION_PLAN.md | 6 + src/routes/components/LinkPreview.svelte | 189 ++++++++++++----------- 2 files changed, 103 insertions(+), 92 deletions(-) diff --git a/IMPLEMENTATION_PLAN.md b/IMPLEMENTATION_PLAN.md index f851d341..01833bf9 100644 --- a/IMPLEMENTATION_PLAN.md +++ b/IMPLEMENTATION_PLAN.md @@ -7,6 +7,12 @@ - Pass progress separately from the status message so percentage updates do not cause text layout shifts. - Use a small circular progress indicator and preserve the existing text-only completion pill. +## Internal link preview loading + +- Hide the complete internal link preview surface, including actions, while its page data is resolving. +- Render the existing preview only after resolution succeeds, or render the existing no-match/error state once resolution settles. +- Keep external link previews and the create-link state unchanged. + ## SvelteKit 3 prerelease migration - Upgrade to `@sveltejs/kit@3.0.0-next.12`, TypeScript 6, and SvelteKit-3-compatible prerelease versions of the Node and Vercel adapters while retaining compatible Svelte, Vite, and Vite plugin ranges. diff --git a/src/routes/components/LinkPreview.svelte b/src/routes/components/LinkPreview.svelte index a08f6598..14927fe0 100644 --- a/src/routes/components/LinkPreview.svelte +++ b/src/routes/components/LinkPreview.svelte @@ -62,107 +62,112 @@ } -