From 2f58e8a1a9a730cccb6dc4a46dadbd855cb8a6b4 Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Sun, 7 Dec 2025 01:29:36 +0000 Subject: [PATCH] Show loading indicator before listing sessions --- .../src/components/instance-welcome-view.tsx | 52 ++++++++++++------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/packages/ui/src/components/instance-welcome-view.tsx b/packages/ui/src/components/instance-welcome-view.tsx index d0f0bc6a..214481c3 100644 --- a/packages/ui/src/components/instance-welcome-view.tsx +++ b/packages/ui/src/components/instance-welcome-view.tsx @@ -1,5 +1,5 @@ import { Component, createSignal, Show, For, createEffect, onMount, onCleanup, createMemo } from "solid-js" -import { Trash2 } from "lucide-solid" +import { Loader2, Trash2 } from "lucide-solid" import type { Instance } from "../types/instance" import { getParentSessions, createSession, setActiveParentSession, deleteSession, loading } from "../stores/sessions" @@ -26,6 +26,7 @@ const InstanceWelcomeView: Component = (props) => { ) const parentSessions = () => getParentSessions(props.instance.id) + const isFetchingSessions = createMemo(() => Boolean(loading().fetchingSessions.get(props.instance.id))) const isSessionDeleting = (sessionId: string) => { const deleting = loading().deletingSession.get(props.instance.id) return deleting ? deleting.has(sessionId) : false @@ -255,25 +256,38 @@ const InstanceWelcomeView: Component = (props) => { 0} fallback={ -
-
- - - + +
+ + + +
+

No Previous Sessions

+

Create a new session below to get started

+ + + +
+ } + > +
+
+ +
+

Loading Sessions

+

Fetching your previous sessions...

-

No Previous Sessions

-

Create a new session below to get started

- - - -
+
} >