feat: roll out illustrative empty states across 8 pages with 2 new guide entries

- TreeLibraryPage: split empty state into no-flows (illustration + CTA) vs no-filter-results
- MyAnalyticsPage/TeamAnalyticsPage: add zero-sessions empty state with illustration
- SessionHistoryPage: split into no-sessions (illustration) vs no-filter-results
- StepLibraryBrowser: illustrative empty state when no steps exist
- ScriptTemplateList: replace plain empty state with ScriptIllustration
- MySharesPage: replace icon-based empty state with ShareIllustration
- IntegrationsPage: add IntegrationIllustration above setup form
- Add script-templates and psa-setup guides to guides data
- Add EmptyState vitest tests (7 tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-17 01:21:11 -04:00
parent 85d1ed8028
commit dfdc6cae9c
10 changed files with 324 additions and 43 deletions

View File

@@ -3,6 +3,7 @@ import { useNavigate, useSearchParams } from 'react-router-dom'
import { X, RotateCcw, Play, FileUp } from 'lucide-react'
import { PageMeta } from '@/components/common/PageMeta'
import { Button } from '@/components/ui/Button'
import { FlowIllustration } from '@/components/common/EmptyStateIllustrations'
import { treesApi } from '@/api/trees'
import { categoriesApi } from '@/api/categories'
import { foldersApi } from '@/api/folders'
@@ -496,14 +497,29 @@ export function TreeLibraryPage() {
<Spinner />
</div>
) : trees.length === 0 ? (
<EmptyState
title="No flows found"
description={
(searchQuery || hasActiveFilters)
? 'Try adjusting your filters.'
: 'Create your first flow to get started.'
}
/>
(searchQuery || hasActiveFilters) ? (
<EmptyState
title="No flows match your filters"
description="Try adjusting your search or filters."
action={
<Button variant="secondary" onClick={clearAllFilters}>
Clear Filters
</Button>
}
/>
) : (
<EmptyState
illustration={<FlowIllustration />}
title="Build your first troubleshooting flow"
description="Flows guide your team through proven resolution paths, capturing every decision along the way."
action={
canCreateTrees ? (
<CreateFlowDropdown aiEnabled={aiEnabled} label="Create a Flow" />
) : undefined
}
learnMoreLink="/guides/creating-flows"
/>
)
) : (
<>
{treeLibraryView === 'grid' && (