@@ -8,6 +8,7 @@ import { Plus } from 'lucide-vue-next'
88import { toast } from ' vue-sonner'
99import { useEventBus } from ' @/composables/useEventBus'
1010import McpInstallationsCard from ' @/components/mcp-server/McpInstallationsCard.vue'
11+ import McpStats from ' @/components/mcp-server/McpStats.vue'
1112import ClientConfigurationModal from ' @/components/gateway-config/ClientConfigurationModal.vue'
1213import UserWalkthroughPopover from ' @/components/walkthrough/UserWalkthroughPopover.vue'
1314import type { McpInstallation } from ' @/types/mcp-installations'
@@ -99,24 +100,24 @@ const checkWalkthroughSetting = async (): Promise<boolean> => {
99100 try {
100101 // Step 1: Check if walkthrough is globally enabled
101102 const globalWalkthroughEnabled = await GlobalSettingsService .shouldShowUserWalkthrough ()
102-
103+
103104 if (! globalWalkthroughEnabled ) {
104105 return false
105106 }
106107
107108 // Step 2: Check user's personal walkthrough completion status via API
108109 const userPreferences = await UserPreferencesService .getUserPreferences ()
109110 const isWalkthroughCompleted = userPreferences .walkthrough_completed || false
110-
111+
111112 if (isWalkthroughCompleted ) {
112113 // Also sync to local storage for consistency
113114 eventBus .setState (' walkthrough_completed' , true )
114115 return false
115116 }
116-
117+
117118 // Step 3: Return true if walkthrough should be shown
118119 return true
119-
120+
120121 } catch (error ) {
121122 console .error (' Error checking walkthrough setting:' , error )
122123 return false
@@ -132,10 +133,10 @@ const fetchInstallations = async (): Promise<void> => {
132133 error .value = null
133134
134135 installations .value = await McpInstallationService .getTeamInstallations (selectedTeam .value .id )
135-
136+
136137 // UPDATED: Check and show walkthrough after installations are loaded
137138 await checkAndShowWalkthrough ()
138-
139+
139140 } catch (err ) {
140141 error .value = err instanceof Error ? err .message : ' An unknown error occurred'
141142 installations .value = []
@@ -155,15 +156,15 @@ const checkAndShowWalkthrough = async (): Promise<void> => {
155156
156157 // Check if walkthrough should be shown
157158 const shouldShowWalkthrough = await checkWalkthroughSetting ()
158-
159+
159160 if (! shouldShowWalkthrough ) {
160161 showUserWalkthrough .value = false
161162 return
162163 }
163164
164165 // Wait for DOM to update with the installations list
165166 await nextTick ()
166-
167+
167168 // Add a small delay to ensure the list is fully rendered
168169 setTimeout (() => {
169170 // Verify the target element exists before showing walkthrough
@@ -177,7 +178,7 @@ const checkAndShowWalkthrough = async (): Promise<void> => {
177178 showUserWalkthrough .value = false
178179 }
179180 }, 100 )
180-
181+
181182 } catch (error ) {
182183 console .error (' Error checking and showing walkthrough:' , error )
183184 showUserWalkthrough .value = false
@@ -274,37 +275,37 @@ const handleWalkthroughFinish = async () => {
274275 try {
275276 // Step 1: Use generic preference endpoint (avoids Content-Type header issue)
276277 await UserPreferencesService .setUserPreference (' walkthrough_completed' , true )
277-
278+
278279 // Step 2: Update local storage for consistency
279280 eventBus .setState (' walkthrough_completed' , true )
280-
281+
281282 // Step 3: Hide all walkthrough UI elements
282283 showUserWalkthrough .value = false
283284 showWalkthroughStep2 .value = false
284285 showStep2ButtonHighZIndex .value = false
285286 walkthroughStep .value = 1
286-
287+
287288 // Step 4: Emit completion event for any listening components
288289 eventBus .emit (' walkthrough-completed' )
289-
290+
290291 // Optional: Show success toast
291292 toast .success (' Welcome tour completed!' )
292-
293+
293294 } catch (error ) {
294295 console .error (' Error updating walkthrough completion status:' , error )
295-
296+
296297 // Still update local storage as fallback
297298 eventBus .setState (' walkthrough_completed' , true )
298-
299+
299300 // Hide walkthrough UI
300301 showUserWalkthrough .value = false
301302 showWalkthroughStep2 .value = false
302303 showStep2ButtonHighZIndex .value = false
303304 walkthroughStep .value = 1
304-
305+
305306 // Emit completion event
306307 eventBus .emit (' walkthrough-completed' )
307-
308+
308309 // Show error toast
309310 toast .error (' Walkthrough completed, but failed to save preference' )
310311 }
@@ -408,7 +409,6 @@ onUnmounted(() => {
408409 <!-- Header -->
409410 <div class =" flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" >
410411 <div class =" flex-1" >
411- <p class =" text-muted-foreground" >{{ t('mcpInstallations.description') }}</p >
412412 </div >
413413 <div v-if =" selectedTeam" class =" flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3" >
414414 <Button
@@ -450,7 +450,9 @@ onUnmounted(() => {
450450 </div >
451451
452452 <!-- Main Content -->
453- <div v-else >
453+ <div v-else class =" space-y-6" >
454+ <McpStats />
455+
454456 <McpInstallationsCard
455457 :installations =" installations"
456458 :has-installations =" hasInstallations"
0 commit comments