refactor(ux): consolidate BMAD skills, update design system, and clean up Prisma generated client

This commit is contained in:
Sepehr Ramezani
2026-04-19 19:21:27 +02:00
parent 5296c4da2c
commit 25529a24b8
2476 changed files with 127934 additions and 101962 deletions

View File

@@ -4,7 +4,7 @@ import { useState, useEffect } from 'react'
import { Dialog, DialogContent } from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Sparkles, X, Search, ArrowRight, Eye } from 'lucide-react'
import { Sparkles, X, Search, ArrowRight, Eye, GitMerge } from 'lucide-react'
import { cn } from '@/lib/utils'
import { useLanguage } from '@/lib/i18n/LanguageProvider'
@@ -35,6 +35,7 @@ interface ConnectionsOverlayProps {
noteId: string
onOpenNote?: (noteId: string) => void
onCompareNotes?: (noteIds: string[]) => void
onMergeNotes?: (noteIds: string[]) => void
}
export function ConnectionsOverlay({
@@ -42,7 +43,8 @@ export function ConnectionsOverlay({
onClose,
noteId,
onOpenNote,
onCompareNotes
onCompareNotes,
onMergeNotes
}: ConnectionsOverlayProps) {
const { t } = useLanguage()
const [connections, setConnections] = useState<ConnectionData[]>([])
@@ -256,6 +258,21 @@ export function ConnectionsOverlay({
{t('memoryEcho.editorSection.compare')}
</Button>
)}
{onMergeNotes && (
<Button
size="sm"
variant="ghost"
onClick={() => {
onMergeNotes([noteId, conn.noteId])
onClose()
}}
className="flex-1"
>
<GitMerge className="h-4 w-4 mr-2" />
{t('memoryEcho.editorSection.merge')}
</Button>
)}
</div>
</div>
)
@@ -295,19 +312,35 @@ export function ConnectionsOverlay({
{/* Footer - Action */}
<div className="px-6 py-4 border-t dark:border-zinc-700">
<Button
className="w-full bg-amber-600 hover:bg-amber-700 text-white"
onClick={() => {
if (onCompareNotes && connections.length > 0) {
const noteIds = connections.slice(0, Math.min(3, connections.length)).map(c => c.noteId)
onCompareNotes([noteId, ...noteIds])
}
onClose()
}}
disabled={connections.length === 0}
>
{t('memoryEcho.overlay.viewAll')}
</Button>
<div className="flex items-center gap-2">
<Button
className="flex-1 bg-amber-600 hover:bg-amber-700 text-white"
onClick={() => {
if (onCompareNotes && connections.length > 0) {
const noteIds = connections.slice(0, Math.min(3, connections.length)).map(c => c.noteId)
onCompareNotes([noteId, ...noteIds])
}
onClose()
}}
disabled={connections.length === 0}
>
{t('memoryEcho.overlay.viewAll')}
</Button>
{onMergeNotes && connections.length > 0 && (
<Button
className="flex-1 bg-purple-600 hover:bg-purple-700 text-white"
onClick={() => {
const allIds = connections.slice(0, Math.min(3, connections.length)).map(c => c.noteId)
onMergeNotes([noteId, ...allIds])
onClose()
}}
>
<GitMerge className="h-4 w-4 mr-2" />
{t('memoryEcho.editorSection.mergeAll')}
</Button>
)}
</div>
</div>
</DialogContent>
</Dialog>