feat: default to Getting Started category for new users in templates modal (#8599)

## Summary

Updates the templates modal to default to the "Getting Started" category
for new users.

## Changes

- Add `initialCategory` prop to `WorkflowTemplateSelectorDialog`
component
- Integrate `useNewUserService` in the dialog composable to detect
first-time users
- New users automatically see the "basics-getting-started" category
- Existing users continue to see "all" templates as default
- Allow explicit category override via options parameter

## Testing

- Added unit tests covering all scenarios (new user, non-new user,
undetermined, explicit override)
- 6 tests pass

Fixes COM-9146

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8599-feat-default-to-Getting-Started-category-for-new-users-in-templates-modal-2fd6d73d365081d4a5fad2abdb768269)
by [Unito](https://www.unito.io)
This commit is contained in:
Christian Byrne
2026-02-07 20:30:10 -08:00
committed by GitHub
parent 1b73b5b31e
commit 3eccf3ec61
3 changed files with 148 additions and 4 deletions

View File

@@ -422,8 +422,9 @@ import { createGridStyle } from '@/utils/gridUtil'
const { t } = useI18n()
const { onClose: originalOnClose } = defineProps<{
const { onClose: originalOnClose, initialCategory = 'all' } = defineProps<{
onClose: () => void
initialCategory?: string
}>()
// Track session time for telemetry
@@ -547,7 +548,7 @@ const allTemplates = computed(() => {
})
// Navigation
const selectedNavItem = ref<string | null>('all')
const selectedNavItem = ref<string | null>(initialCategory)
// Filter templates based on selected navigation item
const navigationFilteredTemplates = computed(() => {