5.4 KiB
| phase | plan | type |
|---|---|---|
| 25-template-explorer-ui | 2 | execute |
Purpose: Complete the template explorer with filtering and search capabilities, replace existing template selection. Output: Fully functional template explorer with sidebar filters, search, and WelcomeModal integration.
<execution_context> ~/.claude/get-shit-done/workflows/execute-phase.md ~/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.mdFrom Plan 01: @src/types/quickstart.ts (TemplateMetadata types) @src/components/quickstart/TemplateCard.tsx @src/components/quickstart/TemplateExplorerView.tsx
Integration points: @src/components/quickstart/WelcomeModal.tsx
Existing patterns:
- Icon-based filter buttons from ModelSearchDialog (Phase 23)
- Search input styling from existing modals
-
Layout change:
- Header stays at top (back button + title)
- Below header: flex row with sidebar (w-48 flex-shrink-0) + main grid area
- Sidebar has: search input, category filters, tags section
-
Search input:
- Text input with search icon (magnifying glass)
- Placeholder: "Search templates..."
- Filters templates by name and description match
- Debounce with 200ms delay using useRef/setTimeout pattern
-
Category filters:
- "All" button (default selected)
- Category buttons: Product, Style, Composition, Community
- Use icon buttons similar to provider filter in ModelSearchDialog
- Single-select (only one category active at a time)
- Apply bg-blue-500/20 border-blue-500/50 for selected state
-
Tags section (below categories):
- "Tags" label (text-xs text-neutral-500 uppercase)
- Show all unique tags from displayed templates
- Small pill buttons, multi-select
- Selected tags use blue styling, unselected use neutral
-
Filtering logic:
- Search: filter by name OR description containing search term (case-insensitive)
- Category: filter by category match (or all if "All" selected)
- Tags: filter by ANY tag match (OR logic, inclusive)
- Apply all filters: search AND category AND tags
-
Empty state:
- Show "No templates match your filters" message
- Include button to clear all filters npm run build succeeds, filter logic is correct Sidebar with search, category filters, and tag filters working; templates filter correctly; empty state displayed when no matches
-
Update QuickstartView type in quickstart.ts:
- Change "templates" to "explorer" (optional, can keep "templates" for simplicity)
-
In WelcomeModal.tsx:
- Import TemplateExplorerView (not QuickstartTemplatesView)
- Replace QuickstartTemplatesView render with TemplateExplorerView
- Keep same props: onBack, onWorkflowSelected
- Widen modal for explorer: change max-w-3xl to max-w-4xl to accommodate sidebar
-
The modal should expand to show the new layout comfortably:
- Explorer has sidebar + grid, needs more horizontal space
- Consider adding max-h-[80vh] with overflow handling
-
Remove QuickstartTemplatesView.tsx import (keep file for now, can clean up later) npm run build succeeds, WelcomeModal shows TemplateExplorerView WelcomeModal uses TemplateExplorerView, modal sized appropriately for sidebar layout
<success_criteria>
- All tasks completed
- All verification checks pass
- Template explorer replaces old template view
- Filtering works correctly with search, categories, and tags
- UI is responsive and visually consistent
- Phase 25 complete </success_criteria>