feat: AI flow builder, visibility model, dashboard tabs, fork UI (#88)

- AI flow builder: scaffold → branch detail → assemble → review flow
- Generate All one-click branch generation with stop/cancel
- Regenerate scaffold suggestions button
- 3-action review screen: Start Flow, Open in Editor, Build Another
- Fix Publish button gated behind !isDirty
- Fix visibility column enforcement in tree access filter
- Add ?visibility filter and author_name to GET /trees
- Dashboard tabbed flows: My Flows / My Team / Public / All
- Create button in My Flows tab, window focus reload (stale data fix)
- Fork UI with optional reason modal
- Fix account_id nullability in User type and schema
- Keep is_public and visibility in sync on updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit was merged in pull request #88.
This commit is contained in:
chihlasm
2026-02-24 07:40:44 -05:00
committed by GitHub
parent 97cd297f46
commit ed4ab059bf
41 changed files with 1909 additions and 315 deletions

View File

@@ -1,33 +1,24 @@
import { useEffect, useState } from 'react'
import { Sparkles } from 'lucide-react'
const MESSAGES = [
'Analyzing your flow requirements...',
'Building decision paths...',
'Generating troubleshooting logic...',
'Crafting resolution steps...',
'Structuring the flow...',
]
export function GeneratingAnimation() {
const [messageIndex, setMessageIndex] = useState(0)
useEffect(() => {
const interval = setInterval(() => {
setMessageIndex((prev) => (prev + 1) % MESSAGES.length)
}, 3000)
return () => clearInterval(interval)
}, [])
interface GeneratingAnimationProps {
branchContext?: { current: number; total: number }
}
export function GeneratingAnimation({ branchContext }: GeneratingAnimationProps) {
return (
<div className="flex flex-col items-center justify-center gap-4 py-12">
<div className="relative">
<div className="h-12 w-12 animate-spin rounded-full border-4 border-border border-t-primary" />
<Sparkles className="absolute left-1/2 top-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2 text-primary" />
</div>
<p className="text-sm text-muted-foreground animate-pulse">
{MESSAGES[messageIndex]}
</p>
<div className="flex flex-col items-center justify-center gap-4 py-10">
{/* Spinner */}
<div className="h-8 w-8 animate-spin rounded-full border-2 border-border border-t-primary" />
{/* Branch context (Generate All mode) */}
{branchContext ? (
<>
<p className="text-xs font-label uppercase tracking-wide text-muted-foreground">
Branch {branchContext.current} of {branchContext.total}
</p>
<p className="text-sm text-muted-foreground">Generating branch detail...</p>
</>
) : (
<p className="text-sm text-muted-foreground">Generating...</p>
)}
</div>
)
}