perf: skip feed index fetch when navigating from activity feed

Write the activity summary to sessionStorage on click in ActivityFeed,
then read it synchronously at module init in ActivityDetailLoader so the
page renders immediately without the "Loading activity…" blank screen
or the 2 round-trip index fetch.

Direct URL / bookmark / shared link falls through to the existing slow
path unchanged.
This commit is contained in:
Davide Scaini
2026-05-19 19:44:20 +02:00
parent 1f6239e7d2
commit 29c6e399c0
2 changed files with 17 additions and 7 deletions
+1
View File
@@ -350,6 +350,7 @@
<a
href={a.detail_url ? `${import.meta.env.BASE_URL}activity/${a.id}/` : `${import.meta.env.BASE_URL}activity/local/?id=${a.id}`}
class="before:absolute before:inset-0 before:content-[''] truncate"
on:click={() => { try { sessionStorage.setItem(`bincio:activity:${a.id}`, JSON.stringify(a)); } catch {} }}
>{a.title}</a>
</h3>
</div>