From 2f42f4eb98954e34d3bd6900e053071d8be16d66 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sun, 8 Feb 2026 21:38:46 +0100 Subject: [PATCH] feat: enhance loading state and organization selection UI on welcome page --- app/welcome/page.tsx | 95 +++++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/app/welcome/page.tsx b/app/welcome/page.tsx index c16dff5..666b541 100644 --- a/app/welcome/page.tsx +++ b/app/welcome/page.tsx @@ -368,50 +368,73 @@ function WelcomeContent() { className={cardClass} > {orgsLoading ? ( -
-

Loading your workspaces...

+
+
+

Loading your organizations...

) : organizations && organizations.length > 0 ? ( <> -
-
- +
+
+
-

- Choose your workspace +

+ Choose your organization

-

- Continue with an existing workspace or create a new one. +

+ Continue with an existing one or create a new organization.

-
- {organizations.map((org) => ( - - ))} +
+ {organizations.map((org, index) => { + const isCurrent = user?.org_id === org.organization_id + const initial = (org.organization_name || 'O').charAt(0).toUpperCase() + return ( + handleSelectWorkspace(org)} + disabled={!!switchingOrgId} + initial={{ opacity: 0, y: 8 }} + animate={{ opacity: 1, y: 0 }} + transition={{ delay: index * 0.04, duration: 0.2 }} + className={`w-full flex items-center gap-3 rounded-xl border px-4 py-3.5 text-left transition-all duration-200 disabled:opacity-60 ${ + isCurrent + ? 'border-brand-orange/60 bg-brand-orange/5 dark:bg-brand-orange/10 shadow-sm' + : 'border-neutral-200 dark:border-neutral-700 bg-neutral-50/80 dark:bg-neutral-800/50 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:border-neutral-300 dark:hover:border-neutral-600 hover:shadow-sm' + }`} + > +
+ {initial} +
+ + {org.organization_name || 'Organization'} + + {isCurrent && ( + Current + )} + +
+ ) + })} +
+
+
- ) : (