From fc4ed188d73892b7d26b7616cf5d4f21878850a0 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 16 May 2026 23:28:11 +0200 Subject: [PATCH] feat(repo): add Octokit request timeouts and retry UI Before, every GitHub call awaited indefinitely with no AbortSignal, so a "lie-fi" connection (technically online, effectively dead) left FluxNote stuck on the skeleton loader and the freshness badge spinning forever. Inject an 8s AbortSignal.timeout via octokit.hook.before (20s override on the recursive tree fetch), classify failures in the userRepo store as auth vs network, and surface a "Couldn't reach GitHub" retry button when no cached content is available. --- src/components/FluxNote.vue | 14 +++++- src/modules/repo/services/octo.spec.ts | 62 ++++++++++++++++++++++++ src/modules/repo/services/octo.ts | 13 ++++- src/modules/repo/services/repo.ts | 7 ++- src/modules/repo/store/userRepo.store.ts | 44 ++++++++++++++--- 5 files changed, 130 insertions(+), 10 deletions(-) create mode 100644 src/modules/repo/services/octo.spec.ts diff --git a/src/components/FluxNote.vue b/src/components/FluxNote.vue index 723ac87..370bb64 100644 --- a/src/components/FluxNote.vue +++ b/src/components/FluxNote.vue @@ -73,6 +73,10 @@ watch( { immediate: true } ) +const retryLoad = () => { + store.setUserRepo(props.user, props.repo) +} + onMounted(() => visitRepo()) onUnmounted(() => { @@ -102,6 +106,13 @@ onUnmounted(() => { +
+

Couldn't reach GitHub. Check your connection.

+ +