diff --git a/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx b/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx index ba41620e..6a14b971 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx @@ -6,7 +6,7 @@ import { RadioIcon, RedoIcon, UndoIcon, RocketIcon, PenLine, AlertTriangle, Down import { useParams, useRouter } from "next/navigation"; import { ProgressBar, ProgressStep } from "@/components/ui/progress-bar"; import { useUser } from '@auth0/nextjs-auth0'; -import { useState } from "react"; +import { useState, useEffect } from "react"; interface TopBarProps { localProjectName: string; @@ -125,6 +125,16 @@ export function TopBar({ }, 2000); // Reset after 2 seconds }; + // After successful community publish, briefly show success and then close modal + useEffect(() => { + if (communityPublishSuccess) { + const timer = setTimeout(() => { + onShareModalClose(); + }, 1200); + return () => clearTimeout(timer); + } + }, [communityPublishSuccess, onShareModalClose]); + const { user } = useUser(); const getUserDisplayName = () => { @@ -827,13 +837,13 @@ export function TopBar({ Cancel diff --git a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx index 58d30519..e8daa088 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx @@ -1653,7 +1653,7 @@ export function WorkflowEditor({ setCommunityPublishing(true); try { - const response = await fetch('/api/community-assistants', { + const response = await fetch('/api/assistant-templates', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ diff --git a/apps/rowboat/app/projects/components/build-assistant-section.tsx b/apps/rowboat/app/projects/components/build-assistant-section.tsx index c19e0bd9..de313ac1 100644 --- a/apps/rowboat/app/projects/components/build-assistant-section.tsx +++ b/apps/rowboat/app/projects/components/build-assistant-section.tsx @@ -16,7 +16,6 @@ import { Tabs, Tab } from "@/components/ui/tabs"; import { Project } from "@/src/entities/models/project"; import { z } from "zod"; import Link from 'next/link'; -import { CommunitySection } from '@/components/community/CommunitySection'; import { AssistantSection } from '@/components/common/AssistantSection'; import { UnifiedTemplatesSection } from '@/components/common/UnifiedTemplatesSection'; diff --git a/apps/rowboat/components/common/UnifiedTemplatesSection.tsx b/apps/rowboat/components/common/UnifiedTemplatesSection.tsx index b20b2be4..3adf3613 100644 --- a/apps/rowboat/components/common/UnifiedTemplatesSection.tsx +++ b/apps/rowboat/components/common/UnifiedTemplatesSection.tsx @@ -227,8 +227,8 @@ export function UnifiedTemplatesSection({
- {/* Type Filter Pills */} -
+ {/* Type Filter Segmented Control */} +
{[ { key: 'all', label: 'All', count: allTemplates.length }, { key: 'prebuilt', label: 'Library', count: prebuiltTemplates.length }, @@ -237,10 +237,11 @@ export function UnifiedTemplatesSection({