zyflow 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-flow/metrics/agent-metrics.json +1 -0
- package/.claude-flow/metrics/performance.json +87 -0
- package/.claude-flow/metrics/system-metrics.json +4370 -0
- package/.claude-flow/metrics/task-metrics.json +10 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.gitleaks.toml +69 -0
- package/.hive-mind/config/queens.json +59 -0
- package/.hive-mind/config/workers.json +72 -0
- package/.hive-mind/config.json +111 -0
- package/.hive-mind/hive.db +0 -0
- package/.hive-mind/hive.db-shm +0 -0
- package/.hive-mind/hive.db-wal +0 -0
- package/.leann/indexes/zyflow/documents.ids.txt +2078 -0
- package/.leann/indexes/zyflow/documents.index +0 -0
- package/.leann/indexes/zyflow/documents.leann.meta.json +25 -0
- package/.leann/indexes/zyflow/documents.leann.passages.idx +0 -0
- package/.leann/indexes/zyflow/documents.leann.passages.jsonl +2078 -0
- package/.mcp.json +41 -0
- package/.moai-backups/20260126_231508/.mcp.json +11 -0
- package/.moai-backups/20260126_231508/backup_metadata.json +34 -0
- package/.moai-backups/20260129_145438/.mcp.json +41 -0
- package/.moai-backups/20260129_145438/backup_metadata.json +53 -0
- package/.moai-backups/20260129_145504/.mcp.json +41 -0
- package/.moai-backups/20260129_145504/backup_metadata.json +20 -0
- package/.moai-backups/20260201_140004/.mcp.json +41 -0
- package/.moai-backups/20260201_140004/backup_metadata.json +51 -0
- package/.moai-backups/backup/.mcp.json +12 -0
- package/.moai-backups/settings-backup/settings.local.json +61 -0
- package/.pre-commit-config.yaml +74 -0
- package/.prettierignore +3 -0
- package/.prettierrc +7 -0
- package/.scannerwork/.sonar_lock +0 -0
- package/.scannerwork/report-task.txt +6 -0
- package/.serena/project.yml +105 -0
- package/.shadcn-admin-ref/.env.example +1 -0
- package/.shadcn-admin-ref/.prettierignore +18 -0
- package/.shadcn-admin-ref/.prettierrc +50 -0
- package/.shadcn-admin-ref/LICENSE +21 -0
- package/.shadcn-admin-ref/components.json +21 -0
- package/.shadcn-admin-ref/cz.yaml +7 -0
- package/.shadcn-admin-ref/eslint.config.js +59 -0
- package/.shadcn-admin-ref/index.html +80 -0
- package/.shadcn-admin-ref/knip.config.ts +8 -0
- package/.shadcn-admin-ref/netlify.toml +4 -0
- package/.shadcn-admin-ref/package.json +83 -0
- package/.shadcn-admin-ref/public/images/favicon.png +0 -0
- package/.shadcn-admin-ref/public/images/favicon.svg +4 -0
- package/.shadcn-admin-ref/public/images/favicon_light.png +0 -0
- package/.shadcn-admin-ref/public/images/favicon_light.svg +1 -0
- package/.shadcn-admin-ref/public/images/shadcn-admin.png +0 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-discord.tsx +28 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-docker.tsx +33 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-facebook.tsx +25 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-figma.tsx +27 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-github.tsx +25 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-gitlab.tsx +25 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-gmail.tsx +28 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-medium.tsx +30 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-notion.tsx +28 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-skype.tsx +26 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-slack.tsx +28 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-stripe.tsx +25 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-telegram.tsx +25 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-trello.tsx +27 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-whatsapp.tsx +26 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/icon-zoom.tsx +26 -0
- package/.shadcn-admin-ref/src/assets/brand-icons/index.ts +16 -0
- package/.shadcn-admin-ref/src/assets/clerk-full-logo.tsx +41 -0
- package/.shadcn-admin-ref/src/assets/clerk-logo.tsx +23 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-dir.tsx +110 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-layout-compact.tsx +131 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-layout-default.tsx +124 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-layout-full.tsx +100 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-sidebar-floating.tsx +82 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-sidebar-inset.tsx +58 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-sidebar-sidebar.tsx +53 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-theme-dark.tsx +79 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-theme-light.tsx +78 -0
- package/.shadcn-admin-ref/src/assets/custom/icon-theme-system.tsx +116 -0
- package/.shadcn-admin-ref/src/assets/logo.tsx +24 -0
- package/.shadcn-admin-ref/src/components/coming-soon.tsx +16 -0
- package/.shadcn-admin-ref/src/components/command-menu.tsx +91 -0
- package/.shadcn-admin-ref/src/components/config-drawer.tsx +354 -0
- package/.shadcn-admin-ref/src/components/confirm-dialog.tsx +67 -0
- package/.shadcn-admin-ref/src/components/data-table/bulk-actions.tsx +213 -0
- package/.shadcn-admin-ref/src/components/data-table/column-header.tsx +74 -0
- package/.shadcn-admin-ref/src/components/data-table/faceted-filter.tsx +146 -0
- package/.shadcn-admin-ref/src/components/data-table/index.ts +6 -0
- package/.shadcn-admin-ref/src/components/data-table/pagination.tsx +130 -0
- package/.shadcn-admin-ref/src/components/data-table/toolbar.tsx +85 -0
- package/.shadcn-admin-ref/src/components/data-table/view-options.tsx +56 -0
- package/.shadcn-admin-ref/src/components/date-picker.tsx +51 -0
- package/.shadcn-admin-ref/src/components/layout/app-sidebar.tsx +37 -0
- package/.shadcn-admin-ref/src/components/layout/app-title.tsx +64 -0
- package/.shadcn-admin-ref/src/components/layout/authenticated-layout.tsx +42 -0
- package/.shadcn-admin-ref/src/components/layout/data/sidebar-data.ts +205 -0
- package/.shadcn-admin-ref/src/components/layout/header.tsx +50 -0
- package/.shadcn-admin-ref/src/components/layout/main.tsx +27 -0
- package/.shadcn-admin-ref/src/components/layout/nav-group.tsx +185 -0
- package/.shadcn-admin-ref/src/components/layout/nav-user.tsx +124 -0
- package/.shadcn-admin-ref/src/components/layout/team-switcher.tsx +86 -0
- package/.shadcn-admin-ref/src/components/layout/top-nav.tsx +67 -0
- package/.shadcn-admin-ref/src/components/layout/types.ts +44 -0
- package/.shadcn-admin-ref/src/components/learn-more.tsx +44 -0
- package/.shadcn-admin-ref/src/components/long-text.tsx +84 -0
- package/.shadcn-admin-ref/src/components/navigation-progress.tsx +25 -0
- package/.shadcn-admin-ref/src/components/password-input.tsx +42 -0
- package/.shadcn-admin-ref/src/components/profile-dropdown.tsx +75 -0
- package/.shadcn-admin-ref/src/components/search.tsx +37 -0
- package/.shadcn-admin-ref/src/components/select-dropdown.tsx +62 -0
- package/.shadcn-admin-ref/src/components/sign-out-dialog.tsx +38 -0
- package/.shadcn-admin-ref/src/components/skip-to-main.tsx +10 -0
- package/.shadcn-admin-ref/src/components/theme-switch.tsx +58 -0
- package/.shadcn-admin-ref/src/components/ui/alert-dialog.tsx +154 -0
- package/.shadcn-admin-ref/src/components/ui/alert.tsx +65 -0
- package/.shadcn-admin-ref/src/components/ui/avatar.tsx +50 -0
- package/.shadcn-admin-ref/src/components/ui/badge.tsx +45 -0
- package/.shadcn-admin-ref/src/components/ui/button.tsx +58 -0
- package/.shadcn-admin-ref/src/components/ui/calendar.tsx +210 -0
- package/.shadcn-admin-ref/src/components/ui/card.tsx +91 -0
- package/.shadcn-admin-ref/src/components/ui/checkbox.tsx +29 -0
- package/.shadcn-admin-ref/src/components/ui/collapsible.tsx +31 -0
- package/.shadcn-admin-ref/src/components/ui/command.tsx +181 -0
- package/.shadcn-admin-ref/src/components/ui/dialog.tsx +142 -0
- package/.shadcn-admin-ref/src/components/ui/dropdown-menu.tsx +254 -0
- package/.shadcn-admin-ref/src/components/ui/form.tsx +164 -0
- package/.shadcn-admin-ref/src/components/ui/input-otp.tsx +74 -0
- package/.shadcn-admin-ref/src/components/ui/input.tsx +20 -0
- package/.shadcn-admin-ref/src/components/ui/label.tsx +23 -0
- package/.shadcn-admin-ref/src/components/ui/popover.tsx +45 -0
- package/.shadcn-admin-ref/src/components/ui/radio-group.tsx +42 -0
- package/.shadcn-admin-ref/src/components/ui/scroll-area.tsx +65 -0
- package/.shadcn-admin-ref/src/components/ui/select.tsx +182 -0
- package/.shadcn-admin-ref/src/components/ui/separator.tsx +25 -0
- package/.shadcn-admin-ref/src/components/ui/sheet.tsx +136 -0
- package/.shadcn-admin-ref/src/components/ui/sidebar.tsx +728 -0
- package/.shadcn-admin-ref/src/components/ui/skeleton.tsx +13 -0
- package/.shadcn-admin-ref/src/components/ui/sonner.tsx +21 -0
- package/.shadcn-admin-ref/src/components/ui/switch.tsx +28 -0
- package/.shadcn-admin-ref/src/components/ui/table.tsx +113 -0
- package/.shadcn-admin-ref/src/components/ui/tabs.tsx +63 -0
- package/.shadcn-admin-ref/src/components/ui/textarea.tsx +17 -0
- package/.shadcn-admin-ref/src/components/ui/tooltip.tsx +60 -0
- package/.shadcn-admin-ref/src/config/fonts.ts +19 -0
- package/.shadcn-admin-ref/src/context/direction-provider.tsx +61 -0
- package/.shadcn-admin-ref/src/context/font-provider.tsx +58 -0
- package/.shadcn-admin-ref/src/context/layout-provider.tsx +85 -0
- package/.shadcn-admin-ref/src/context/search-provider.tsx +46 -0
- package/.shadcn-admin-ref/src/context/theme-provider.tsx +110 -0
- package/.shadcn-admin-ref/src/features/apps/data/apps.tsx +110 -0
- package/.shadcn-admin-ref/src/features/apps/index.tsx +179 -0
- package/.shadcn-admin-ref/src/features/auth/auth-layout.tsx +19 -0
- package/.shadcn-admin-ref/src/features/auth/forgot-password/components/forgot-password-form.tsx +82 -0
- package/.shadcn-admin-ref/src/features/auth/forgot-password/index.tsx +44 -0
- package/.shadcn-admin-ref/src/features/auth/otp/components/otp-form.tsx +100 -0
- package/.shadcn-admin-ref/src/features/auth/otp/index.tsx +44 -0
- package/.shadcn-admin-ref/src/features/auth/sign-in/assets/dashboard-dark.png +0 -0
- package/.shadcn-admin-ref/src/features/auth/sign-in/assets/dashboard-light.png +0 -0
- package/.shadcn-admin-ref/src/features/auth/sign-in/components/user-auth-form.tsx +150 -0
- package/.shadcn-admin-ref/src/features/auth/sign-in/index.tsx +51 -0
- package/.shadcn-admin-ref/src/features/auth/sign-in/sign-in-2.tsx +69 -0
- package/.shadcn-admin-ref/src/features/auth/sign-up/components/sign-up-form.tsx +143 -0
- package/.shadcn-admin-ref/src/features/auth/sign-up/index.tsx +57 -0
- package/.shadcn-admin-ref/src/features/chats/components/new-chat.tsx +127 -0
- package/.shadcn-admin-ref/src/features/chats/data/chat-types.ts +4 -0
- package/.shadcn-admin-ref/src/features/chats/data/convo.json +309 -0
- package/.shadcn-admin-ref/src/features/chats/index.tsx +349 -0
- package/.shadcn-admin-ref/src/features/dashboard/components/analytics-chart.tsx +77 -0
- package/.shadcn-admin-ref/src/features/dashboard/components/analytics.tsx +189 -0
- package/.shadcn-admin-ref/src/features/dashboard/components/overview.tsx +82 -0
- package/.shadcn-admin-ref/src/features/dashboard/components/recent-sales.tsx +83 -0
- package/.shadcn-admin-ref/src/features/dashboard/index.tsx +220 -0
- package/.shadcn-admin-ref/src/features/errors/forbidden.tsx +25 -0
- package/.shadcn-admin-ref/src/features/errors/general-error.tsx +36 -0
- package/.shadcn-admin-ref/src/features/errors/maintenance-error.tsx +19 -0
- package/.shadcn-admin-ref/src/features/errors/not-found-error.tsx +25 -0
- package/.shadcn-admin-ref/src/features/errors/unauthorized-error.tsx +25 -0
- package/.shadcn-admin-ref/src/features/settings/account/account-form.tsx +173 -0
- package/.shadcn-admin-ref/src/features/settings/account/index.tsx +14 -0
- package/.shadcn-admin-ref/src/features/settings/appearance/appearance-form.tsx +162 -0
- package/.shadcn-admin-ref/src/features/settings/appearance/index.tsx +14 -0
- package/.shadcn-admin-ref/src/features/settings/components/content-section.tsx +22 -0
- package/.shadcn-admin-ref/src/features/settings/components/sidebar-nav.tsx +84 -0
- package/.shadcn-admin-ref/src/features/settings/display/display-form.tsx +121 -0
- package/.shadcn-admin-ref/src/features/settings/display/index.tsx +13 -0
- package/.shadcn-admin-ref/src/features/settings/index.tsx +74 -0
- package/.shadcn-admin-ref/src/features/settings/notifications/index.tsx +13 -0
- package/.shadcn-admin-ref/src/features/settings/notifications/notifications-form.tsx +220 -0
- package/.shadcn-admin-ref/src/features/settings/profile/index.tsx +13 -0
- package/.shadcn-admin-ref/src/features/settings/profile/profile-form.tsx +177 -0
- package/.shadcn-admin-ref/src/features/tasks/components/data-table-bulk-actions.tsx +193 -0
- package/.shadcn-admin-ref/src/features/tasks/components/data-table-row-actions.tsx +83 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-columns.tsx +123 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-dialogs.tsx +72 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-import-dialog.tsx +110 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-multi-delete-dialog.tsx +95 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-mutate-drawer.tsx +212 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-primary-buttons.tsx +21 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-provider.tsx +36 -0
- package/.shadcn-admin-ref/src/features/tasks/components/tasks-table.tsx +197 -0
- package/.shadcn-admin-ref/src/features/tasks/data/data.tsx +77 -0
- package/.shadcn-admin-ref/src/features/tasks/data/schema.ts +13 -0
- package/.shadcn-admin-ref/src/features/tasks/data/tasks.ts +29 -0
- package/.shadcn-admin-ref/src/features/tasks/index.tsx +41 -0
- package/.shadcn-admin-ref/src/features/users/components/data-table-bulk-actions.tsx +139 -0
- package/.shadcn-admin-ref/src/features/users/components/data-table-row-actions.tsx +63 -0
- package/.shadcn-admin-ref/src/features/users/components/users-action-dialog.tsx +326 -0
- package/.shadcn-admin-ref/src/features/users/components/users-columns.tsx +138 -0
- package/.shadcn-admin-ref/src/features/users/components/users-delete-dialog.tsx +81 -0
- package/.shadcn-admin-ref/src/features/users/components/users-dialogs.tsx +51 -0
- package/.shadcn-admin-ref/src/features/users/components/users-invite-dialog.tsx +150 -0
- package/.shadcn-admin-ref/src/features/users/components/users-multi-delete-dialog.tsx +95 -0
- package/.shadcn-admin-ref/src/features/users/components/users-primary-buttons.tsx +21 -0
- package/.shadcn-admin-ref/src/features/users/components/users-provider.tsx +36 -0
- package/.shadcn-admin-ref/src/features/users/components/users-table.tsx +194 -0
- package/.shadcn-admin-ref/src/features/users/data/data.ts +35 -0
- package/.shadcn-admin-ref/src/features/users/data/schema.ts +32 -0
- package/.shadcn-admin-ref/src/features/users/data/users.ts +33 -0
- package/.shadcn-admin-ref/src/features/users/index.tsx +47 -0
- package/.shadcn-admin-ref/src/hooks/use-dialog-state.tsx +18 -0
- package/.shadcn-admin-ref/src/hooks/use-mobile.tsx +19 -0
- package/.shadcn-admin-ref/src/hooks/use-table-url-state.ts +219 -0
- package/.shadcn-admin-ref/src/lib/cookies.ts +43 -0
- package/.shadcn-admin-ref/src/lib/handle-server-error.ts +24 -0
- package/.shadcn-admin-ref/src/lib/show-submitted-data.tsx +15 -0
- package/.shadcn-admin-ref/src/lib/utils.ts +60 -0
- package/.shadcn-admin-ref/src/main.tsx +107 -0
- package/.shadcn-admin-ref/src/routeTree.gen.ts +719 -0
- package/.shadcn-admin-ref/src/routes/(auth)/forgot-password.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(auth)/otp.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(auth)/sign-in-2.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(auth)/sign-in.tsx +12 -0
- package/.shadcn-admin-ref/src/routes/(auth)/sign-up.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(errors)/401.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(errors)/403.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(errors)/404.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(errors)/500.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/(errors)/503.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/__root.tsx +30 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/apps/index.tsx +17 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/chats/index.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/errors/$error.tsx +45 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/help-center/index.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/index.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/route.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/account.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/appearance.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/display.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/index.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/notifications.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/settings/route.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/tasks/index.tsx +23 -0
- package/.shadcn-admin-ref/src/routes/_authenticated/users/index.tsx +32 -0
- package/.shadcn-admin-ref/src/routes/clerk/(auth)/route.tsx +60 -0
- package/.shadcn-admin-ref/src/routes/clerk/(auth)/sign-in.tsx +14 -0
- package/.shadcn-admin-ref/src/routes/clerk/(auth)/sign-up.tsx +9 -0
- package/.shadcn-admin-ref/src/routes/clerk/_authenticated/route.tsx +6 -0
- package/.shadcn-admin-ref/src/routes/clerk/_authenticated/user-management.tsx +184 -0
- package/.shadcn-admin-ref/src/routes/clerk/route.tsx +135 -0
- package/.shadcn-admin-ref/src/stores/auth-store.ts +53 -0
- package/.shadcn-admin-ref/src/styles/index.css +87 -0
- package/.shadcn-admin-ref/src/styles/theme.css +102 -0
- package/.shadcn-admin-ref/src/tanstack-table.d.ts +10 -0
- package/.shadcn-admin-ref/src/vite-env.d.ts +1 -0
- package/.swarm/memory.db +0 -0
- package/.swarm/memory.db-shm +0 -0
- package/.swarm/memory.db-wal +0 -0
- package/.zyflow/cli-settings.json +30 -0
- package/.zyflow/db.sqlite +0 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765491505852.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765491622627.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765491794652.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765491890392.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494002879.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494183887.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494342052.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494387244.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494387245.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765494606176.json +10 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765495967542.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765495967629.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765497861143.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765497861870.json +20 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765498021377.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765498021660.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765503255525.json +13 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765503256018.json +13 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765504009102.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765504492051.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765504946437.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1633-1765504946640.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1634-1765505950215.json +16 -0
- package/.zyflow/logs/add-gitdiagram-integration/1634-1765505950948.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1635-1765505971712.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1635-1765505971976.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1636-1765505986208.json +18 -0
- package/.zyflow/logs/add-gitdiagram-integration/1636-1765505986620.json +16 -0
- package/.zyflow/logs/integrate-claude-flow/3580-1765996816612.json +10 -0
- package/.zyflow/logs/integrate-claude-flow/3580-1766014825819.json +10 -0
- package/.zyflow/logs/integrate-claude-flow/3580-1766015183794.json +12 -0
- package/.zyflow/logs/integrate-claude-flow/3580-1766015474608.json +12 -0
- package/.zyflow/logs/integrate-claude-flow/3581-1766016502824.json +63 -0
- package/.zyflow/logs/integrate-claude-flow/3581-1766016576008.json +60 -0
- package/.zyflow/logs/integrate-claude-flow/3582-1766022737754.json +110 -0
- package/.zyflow/logs/integrate-claude-flow/3582-1766022809327.json +135 -0
- package/.zyflow/sessions.json +242 -0
- package/.zyflow/settings.json +6 -0
- package/.zyflow/tasks.db +0 -0
- package/.zyflow/tasks.db-shm +0 -0
- package/.zyflow/tasks.db-wal +0 -0
- package/.zyflow/zyflow.sqlite +0 -0
- package/Dockerfile +82 -0
- package/LICENSE +21 -0
- package/README.md +506 -0
- package/claude-flow +34 -0
- package/components.json +21 -0
- package/config/ports.ts +28 -0
- package/docker-compose.yml +52 -0
- package/eslint.config.js +34 -0
- package/index.html +19 -0
- package/logs/mcp-error.log +55 -0
- package/logs/mcp-out.log +0 -0
- package/logs/pm2-error.log +0 -0
- package/logs/pm2-out.log +265 -0
- package/logs/py-error.log +22 -0
- package/logs/py-out.log +0 -0
- package/logs/server-error.log +11000 -0
- package/logs/server-out.log +8117 -0
- package/logs/vite-error.log +404 -0
- package/logs/vite-out.log +311 -0
- package/mcp-server/agent-tools.ts +375 -0
- package/mcp-server/cli-models.ts +193 -0
- package/mcp-server/context.ts +110 -0
- package/mcp-server/diagram-tools.ts +341 -0
- package/mcp-server/index.ts +2014 -0
- package/mcp-server/integration-tools.ts +909 -0
- package/mcp-server/moai-spec-tools.ts +416 -0
- package/mcp-server/parser.ts +422 -0
- package/mcp-server/post-task-runner.ts +253 -0
- package/mcp-server/post-task-types.ts +426 -0
- package/mcp-server/quarantine-manager.ts +479 -0
- package/mcp-server/report-generator.ts +386 -0
- package/mcp-server/task-tools.ts +619 -0
- package/mcp-server/trigger-config.ts +288 -0
- package/mcp-server/trigger-router.ts +305 -0
- package/mcp-server/triggers/event-listener.ts +331 -0
- package/mcp-server/triggers/git-hooks.ts +283 -0
- package/mcp-server/triggers/scheduler.ts +289 -0
- package/mcp-server/types.ts +55 -0
- package/memory/claude-flow@alpha-data.json +5 -0
- package/nginx/zyflow.conf +144 -0
- package/openspec/config.yaml +78 -0
- package/openspec-backup.tar.gz +0 -0
- package/package.json +154 -0
- package/packages/gitdiagram-core/.claude-flow/metrics/agent-metrics.json +1 -0
- package/packages/gitdiagram-core/.claude-flow/metrics/performance.json +87 -0
- package/packages/gitdiagram-core/.claude-flow/metrics/task-metrics.json +10 -0
- package/packages/gitdiagram-core/package.json +41 -0
- package/packages/gitdiagram-core/src/file-tree.ts +272 -0
- package/packages/gitdiagram-core/src/generator.ts +283 -0
- package/packages/gitdiagram-core/src/index.ts +78 -0
- package/packages/gitdiagram-core/src/llm-adapter.ts +235 -0
- package/packages/gitdiagram-core/src/mermaid-utils.ts +304 -0
- package/packages/gitdiagram-core/src/prompts.ts +281 -0
- package/packages/zyflow-parser/package.json +34 -0
- package/packages/zyflow-parser/src/index.ts +26 -0
- package/packages/zyflow-parser/src/moai-parser.ts +603 -0
- package/packages/zyflow-parser/src/moai-types.ts +110 -0
- package/packages/zyflow-remote-plugin/.claude-flow/metrics/agent-metrics.json +1 -0
- package/packages/zyflow-remote-plugin/.claude-flow/metrics/performance.json +87 -0
- package/packages/zyflow-remote-plugin/.claude-flow/metrics/task-metrics.json +10 -0
- package/packages/zyflow-remote-plugin/package.json +31 -0
- package/packages/zyflow-remote-plugin/src/index.ts +71 -0
- package/packages/zyflow-remote-plugin/src/remote-config.ts +232 -0
- package/packages/zyflow-remote-plugin/src/router.ts +535 -0
- package/packages/zyflow-remote-plugin/src/ssh-config-parser.ts +123 -0
- package/packages/zyflow-remote-plugin/src/ssh-manager.ts +598 -0
- package/packages/zyflow-remote-plugin/src/types.ts +149 -0
- package/plugin/manifest.json +26 -0
- package/plugin/package.json +13 -0
- package/public/favicon.svg +4 -0
- package/server/adk/agents/error-analyzer.ts +223 -0
- package/server/adk/agents/fix-generator.ts +187 -0
- package/server/adk/agents/pr-agent.ts +264 -0
- package/server/adk/agents/validator.ts +187 -0
- package/server/adk/config.ts +43 -0
- package/server/adk/index.ts +69 -0
- package/server/adk/integration.ts +297 -0
- package/server/adk/orchestrator.ts +405 -0
- package/server/adk/tools/build-tools.ts +290 -0
- package/server/adk/tools/file-tools.ts +351 -0
- package/server/adk/tools/git-tools.ts +280 -0
- package/server/adk/tools/github-tools.ts +249 -0
- package/server/agents/agent-monitor.ts +416 -0
- package/server/agents/alert-integration.ts +312 -0
- package/server/agents/error-analyzer.ts +472 -0
- package/server/agents/error-detector.ts +442 -0
- package/server/agents/fix-generator.ts +421 -0
- package/server/agents/fix-validator.ts +428 -0
- package/server/agents/merge-policy.ts +362 -0
- package/server/agents/pr-workflow.ts +476 -0
- package/server/agents/prompts/error-analysis.ts +393 -0
- package/server/ai/gemini-client.ts +499 -0
- package/server/ai/index.ts +317 -0
- package/server/ai/types.ts +137 -0
- package/server/app.ts +3693 -0
- package/server/archive-manager.ts +604 -0
- package/server/backlog/index.ts +7 -0
- package/server/backlog/migration.ts +331 -0
- package/server/backlog/parser.ts +323 -0
- package/server/backlog/sync.ts +325 -0
- package/server/change-log.ts +868 -0
- package/server/claude-flow/index.ts +12 -0
- package/server/claude-flow/prompt-builder.ts +407 -0
- package/server/claude-flow/types.ts +33 -0
- package/server/cli-adapter/index.ts +11 -0
- package/server/cli-adapter/process-manager.ts +612 -0
- package/server/cli-adapter/profile-manager.ts +286 -0
- package/server/cli-adapter/routes.ts +561 -0
- package/server/cli-adapter/types.ts +226 -0
- package/server/config.d.ts +18 -0
- package/server/config.js +79 -0
- package/server/config.ts +262 -0
- package/server/flow-sync.ts +543 -0
- package/server/git/change-workflow.ts +446 -0
- package/server/git/commands.ts +370 -0
- package/server/git/github.ts +247 -0
- package/server/git/index.ts +1202 -0
- package/server/git/status.ts +322 -0
- package/server/index.ts +136 -0
- package/server/integrations/crypto.ts +142 -0
- package/server/integrations/db/client.ts +169 -0
- package/server/integrations/db/schema.ts +167 -0
- package/server/integrations/env-parser.ts +365 -0
- package/server/integrations/index.ts +101 -0
- package/server/integrations/keychain.ts +239 -0
- package/server/integrations/local/file-utils.ts +383 -0
- package/server/integrations/local/index.ts +64 -0
- package/server/integrations/local/resolver.ts +439 -0
- package/server/integrations/local/types.ts +122 -0
- package/server/integrations/routes.ts +1100 -0
- package/server/integrations/service-patterns.ts +771 -0
- package/server/integrations/services/accounts.ts +356 -0
- package/server/integrations/services/env-import.ts +279 -0
- package/server/integrations/services/projects.ts +552 -0
- package/server/integrations/services/system-import.ts +1110 -0
- package/server/migrations/ears-generator.ts +491 -0
- package/server/migrations/gherkin-generator.ts +605 -0
- package/server/migrations/index.ts +73 -0
- package/server/migrations/migrate-spec-format.ts +492 -0
- package/server/migrations/openspec-parser.ts +542 -0
- package/server/migrations/tag-generator.ts +474 -0
- package/server/moai-specs.ts +487 -0
- package/server/moai-watcher.ts +145 -0
- package/server/parser-debug.ts +37 -0
- package/server/parser-utils.ts +316 -0
- package/server/parser.d.ts +17 -0
- package/server/parser.js +221 -0
- package/server/parser.ts +342 -0
- package/server/remote-watcher.ts +367 -0
- package/server/replay-engine.ts +915 -0
- package/server/routes/alerts.ts +1028 -0
- package/server/routes/changes.ts +812 -0
- package/server/routes/docs.ts +898 -0
- package/server/routes/flow.ts +2814 -0
- package/server/routes/global-chat.ts +162 -0
- package/server/routes/leann.ts +327 -0
- package/server/routes/projects.ts +1282 -0
- package/server/routes/search.ts +266 -0
- package/server/routes/specs.ts +482 -0
- package/server/routes/webhooks.ts +579 -0
- package/server/server/parser.js +265 -0
- package/server/services/githubActionsPoller.ts +797 -0
- package/server/services/slackNotifier.ts +476 -0
- package/server/src/types/index.js +1 -0
- package/server/sync-tasks.ts +741 -0
- package/server/tasks/cli/commands.ts +269 -0
- package/server/tasks/cli/index.ts +152 -0
- package/server/tasks/core/search.ts +81 -0
- package/server/tasks/core/task.ts +307 -0
- package/server/tasks/db/client.ts +1008 -0
- package/server/tasks/db/schema.ts +572 -0
- package/server/tasks/index.ts +24 -0
- package/server/tasks.db +0 -0
- package/server/types/archive.ts +136 -0
- package/server/types/change-log.ts +643 -0
- package/server/types/spec.ts +188 -0
- package/server/unified-spec-scanner.ts +753 -0
- package/server/utils/crypto.ts +179 -0
- package/server/utils/webhook-verify.ts +216 -0
- package/server/watcher.ts +132 -0
- package/server/websocket.ts +99 -0
- package/server-output.log +6 -0
- package/sonar-project.properties +18 -0
- package/src/App.tsx +386 -0
- package/src/api/client.ts +346 -0
- package/src/api/error-interceptor.ts +366 -0
- package/src/api/errors.ts +123 -0
- package/src/api/flow.ts +233 -0
- package/src/api/offline-queue.ts +351 -0
- package/src/api/retry-logic.ts +233 -0
- package/src/components/OfflineModeBanner.tsx +159 -0
- package/src/components/SSEStatusIndicator.tsx +194 -0
- package/src/components/agent/AgentChat.tsx +243 -0
- package/src/components/agent/AgentPage.tsx +182 -0
- package/src/components/agent/AgentSidebar.tsx +231 -0
- package/src/components/agent/index.ts +7 -0
- package/src/components/alerts/AlertCenter.tsx +239 -0
- package/src/components/alerts/AlertDashboard.tsx +211 -0
- package/src/components/alerts/AlertDetail.tsx +474 -0
- package/src/components/alerts/AlertList.tsx +113 -0
- package/src/components/alerts/AlertSettings.tsx +336 -0
- package/src/components/alerts/index.ts +5 -0
- package/src/components/chat/ChatPanel.tsx +642 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/cli/AddCustomCLIDialog.tsx +210 -0
- package/src/components/cli/CLISelector.tsx +187 -0
- package/src/components/cli/index.ts +8 -0
- package/src/components/dashboard/ArchivedChangeList.tsx +102 -0
- package/src/components/dashboard/ArchivedChangeViewer.tsx +184 -0
- package/src/components/dashboard/ArchivedChangesPage.tsx +31 -0
- package/src/components/dashboard/ChangeList.tsx +86 -0
- package/src/components/dashboard/ThemeToggle.tsx +33 -0
- package/src/components/diagram/DiagramViewer.tsx +256 -0
- package/src/components/diagram/MermaidRenderer.tsx +163 -0
- package/src/components/diagram/ProjectDiagramTab.tsx +161 -0
- package/src/components/diagram/index.ts +13 -0
- package/src/components/errors/ErrorBoundary.tsx +276 -0
- package/src/components/errors/ErrorFallback.tsx +198 -0
- package/src/components/errors/ErrorToast.tsx +221 -0
- package/src/components/flow/BacklogView.tsx +1142 -0
- package/src/components/flow/ChangeDetail.tsx +475 -0
- package/src/components/flow/ChangeItem.tsx +230 -0
- package/src/components/flow/ChangeList.tsx +92 -0
- package/src/components/flow/ExecutionHistoryDialog.tsx +224 -0
- package/src/components/flow/FlowContent.tsx +212 -0
- package/src/components/flow/FlowPage.tsx +9 -0
- package/src/components/flow/PipelineBar.tsx +214 -0
- package/src/components/flow/ProjectDashboard.tsx +222 -0
- package/src/components/flow/SpecDetail.tsx +138 -0
- package/src/components/flow/SpecDetailTabs.tsx +176 -0
- package/src/components/flow/SpecItem.tsx +93 -0
- package/src/components/flow/SpecProgressBar.tsx +47 -0
- package/src/components/flow/StageContent.tsx +620 -0
- package/src/components/flow/StandaloneTasks.tsx +960 -0
- package/src/components/flow/TaskExecutionDialog.tsx +1204 -0
- package/src/components/flow/index.ts +9 -0
- package/src/components/flow/task-execution/AgentSlider.tsx +37 -0
- package/src/components/flow/task-execution/ConsensusSettings.tsx +129 -0
- package/src/components/flow/task-execution/ExecutionOutput.tsx +398 -0
- package/src/components/flow/task-execution/ModelSelector.tsx +134 -0
- package/src/components/flow/task-execution/ProviderSelector.tsx +137 -0
- package/src/components/flow/task-execution/RecommendationBanner.tsx +71 -0
- package/src/components/flow/task-execution/StatusBadge.tsx +43 -0
- package/src/components/flow/task-execution/StrategySelector.tsx +48 -0
- package/src/components/flow/task-execution/SwarmSummary.tsx +55 -0
- package/src/components/flow/task-execution/index.ts +14 -0
- package/src/components/flow/task-execution/types.ts +56 -0
- package/src/components/git/ChangeWorkflowDialog.tsx +582 -0
- package/src/components/git/ConflictResolutionDialog.tsx +398 -0
- package/src/components/git/GitBranchSelector.tsx +212 -0
- package/src/components/git/GitCommitDialog.tsx +254 -0
- package/src/components/git/GitStatusBadge.tsx +148 -0
- package/src/components/git/GitSyncButton.tsx +128 -0
- package/src/components/git/RemoteStatusBanner.tsx +143 -0
- package/src/components/git/index.ts +9 -0
- package/src/components/integrations/EnvImportDialog.tsx +524 -0
- package/src/components/integrations/EnvironmentDialog.tsx +227 -0
- package/src/components/integrations/IntegrationBadges.tsx +91 -0
- package/src/components/integrations/IntegrationsSettings.tsx +55 -0
- package/src/components/integrations/ProjectIntegrations.tsx +481 -0
- package/src/components/integrations/ServiceAccountDialog.tsx +422 -0
- package/src/components/integrations/ServiceAccountList.tsx +305 -0
- package/src/components/integrations/SystemImportDialog.tsx +436 -0
- package/src/components/integrations/TestAccountDialog.tsx +162 -0
- package/src/components/integrations/index.ts +6 -0
- package/src/components/layout/AppSidebar.tsx +284 -0
- package/src/components/layout/FlowSidebar.tsx +435 -0
- package/src/components/layout/GlobalCommandPalette.tsx +410 -0
- package/src/components/layout/MenuBar.tsx +227 -0
- package/src/components/layout/StatusBar.tsx +226 -0
- package/src/components/monitoring/ErrorDashboard.tsx +274 -0
- package/src/components/monitoring/ErrorDetailPanel.tsx +200 -0
- package/src/components/monitoring/ErrorFilters.tsx +219 -0
- package/src/components/monitoring/ErrorHistoryList.tsx +141 -0
- package/src/components/monitoring/ErrorStats.tsx +249 -0
- package/src/components/remote/RemoteFileBrowser.tsx +249 -0
- package/src/components/remote/RemoteServerDialog.tsx +234 -0
- package/src/components/remote/RemoteServerList.tsx +366 -0
- package/src/components/remote/index.ts +7 -0
- package/src/components/settings/CLISettings.tsx +522 -0
- package/src/components/settings/CustomCLIDialog.tsx +548 -0
- package/src/components/settings/IntegrationsSettings.tsx +51 -0
- package/src/components/settings/ProjectSettings.tsx +441 -0
- package/src/components/settings/ProjectsSettings.tsx +541 -0
- package/src/components/settings/SearchSettings.tsx +272 -0
- package/src/components/settings/SettingsPage.tsx +68 -0
- package/src/components/settings/index.ts +5 -0
- package/src/components/swarm/ExecutionPanel.tsx +284 -0
- package/src/components/swarm/LogViewer.tsx +196 -0
- package/src/components/swarm/ProgressIndicator.tsx +111 -0
- package/src/components/swarm/index.ts +3 -0
- package/src/components/tasks/ArchiveTable.tsx +203 -0
- package/src/components/tasks/KanbanBoard.tsx +264 -0
- package/src/components/tasks/TaskCard.tsx +138 -0
- package/src/components/tasks/TaskColumn.tsx +81 -0
- package/src/components/tasks/TaskDialog.tsx +274 -0
- package/src/components/tasks/index.ts +5 -0
- package/src/components/tasks/types.ts +43 -0
- package/src/components/ui/alert-dialog.tsx +154 -0
- package/src/components/ui/alert.tsx +65 -0
- package/src/components/ui/badge.tsx +45 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +91 -0
- package/src/components/ui/checkbox.tsx +29 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/command.tsx +184 -0
- package/src/components/ui/confirm-dialog.tsx +55 -0
- package/src/components/ui/dialog.tsx +142 -0
- package/src/components/ui/dropdown-menu.tsx +254 -0
- package/src/components/ui/input.tsx +20 -0
- package/src/components/ui/label.tsx +22 -0
- package/src/components/ui/markdown.tsx +100 -0
- package/src/components/ui/progress.tsx +27 -0
- package/src/components/ui/resizable-sidebar.tsx +156 -0
- package/src/components/ui/resizable.tsx +54 -0
- package/src/components/ui/right-resizable-sidebar.tsx +158 -0
- package/src/components/ui/scroll-area.tsx +64 -0
- package/src/components/ui/select.tsx +185 -0
- package/src/components/ui/separator.tsx +25 -0
- package/src/components/ui/sheet.tsx +136 -0
- package/src/components/ui/sidebar.tsx +726 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +56 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/tabs.tsx +63 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/tooltip.tsx +60 -0
- package/src/config/api.ts +83 -0
- package/src/constants/error-codes.ts +255 -0
- package/src/constants/stages.ts +27 -0
- package/src/context/ErrorContext.tsx +185 -0
- package/src/context/theme-provider.tsx +63 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/hooks/useAI.ts +206 -0
- package/src/hooks/useAgentSession.ts +431 -0
- package/src/hooks/useAlerts.ts +935 -0
- package/src/hooks/useArchivedChanges.ts +39 -0
- package/src/hooks/useAsyncError.ts +45 -0
- package/src/hooks/useChangeGit.ts +727 -0
- package/src/hooks/useChanges.ts +20 -0
- package/src/hooks/useClaude.ts +130 -0
- package/src/hooks/useDocs.ts +182 -0
- package/src/hooks/useErrorDashboard.ts +243 -0
- package/src/hooks/useErrorHandler.ts +150 -0
- package/src/hooks/useExecutionHistory.ts +55 -0
- package/src/hooks/useFlowChanges.ts +850 -0
- package/src/hooks/useFlowItems.ts +205 -0
- package/src/hooks/useGit.ts +427 -0
- package/src/hooks/useHideCompletedSpecs.ts +15 -0
- package/src/hooks/useInstance.ts +40 -0
- package/src/hooks/useIntegrations.ts +737 -0
- package/src/hooks/useLeannStatus.ts +93 -0
- package/src/hooks/useNetworkStatus.ts +167 -0
- package/src/hooks/useProjects.ts +353 -0
- package/src/hooks/useRemoteServers.ts +383 -0
- package/src/hooks/useSSEConnection.ts +346 -0
- package/src/hooks/useSpecs.ts +39 -0
- package/src/hooks/useSwarm.ts +462 -0
- package/src/hooks/useTasks.ts +137 -0
- package/src/hooks/useURLSync.ts +122 -0
- package/src/hooks/useWebSocket.ts +262 -0
- package/src/lib/utils.ts +121 -0
- package/src/main.tsx +22 -0
- package/src/stores/errorStore.ts +301 -0
- package/src/stores/offlineStore.ts +266 -0
- package/src/stores/sseStore.ts +247 -0
- package/src/stores/useHideCompletedStore.ts +21 -0
- package/src/styles/index.css +87 -0
- package/src/styles/theme.css +102 -0
- package/src/types/ai.ts +191 -0
- package/src/types/errors.ts +253 -0
- package/src/types/flow.ts +382 -0
- package/src/types/index.ts +614 -0
- package/src/utils/error-logger.ts +399 -0
- package/src/utils/error-statistics.ts +305 -0
- package/src/utils/logger.ts +280 -0
- package/src/utils/task-routing.ts +795 -0
- package/src/vite-env.d.ts +1 -0
- package/test-results/.last-run.json +4 -0
- package/tmp/check-docker-final.ts +48 -0
- package/tmp/check-docker-tasks.ts +58 -0
- package/tmp/check-docker-tasks2.ts +48 -0
- package/tmp/check-docker-tasks3.ts +42 -0
- package/tmp/check-mobile-tasks.ts +57 -0
- package/tmp/check-zywiki-tasks.ts +49 -0
- package/tmp/sync-mobile.ts +11 -0
- package/tmp/sync-zywiki.ts +68 -0
- package/tmp/test-docker-parser.ts +15 -0
- package/tmp/test-mobile-parser.ts +28 -0
- package/tmp/test-parser.ts +27 -0
- package/tmp/test-unnumbered.ts +35 -0
- package/zyflow.db +0 -0
|
@@ -0,0 +1,960 @@
|
|
|
1
|
+
import { useState, useMemo } from 'react'
|
|
2
|
+
import { Loader2, ListTodo, Plus, GripVertical, MoreVertical, Pencil, Trash2, Archive, ArrowRight, RotateCcw, Search, X, Calendar, User, RefreshCw, CheckCircle, FileUp } from 'lucide-react'
|
|
3
|
+
import { Card, CardContent } from '@/components/ui/card'
|
|
4
|
+
import { Button } from '@/components/ui/button'
|
|
5
|
+
import { Badge } from '@/components/ui/badge'
|
|
6
|
+
import { Input } from '@/components/ui/input'
|
|
7
|
+
import { ScrollArea } from '@/components/ui/scroll-area'
|
|
8
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
|
|
9
|
+
import { toast } from 'sonner'
|
|
10
|
+
import {
|
|
11
|
+
Dialog,
|
|
12
|
+
DialogContent,
|
|
13
|
+
DialogDescription,
|
|
14
|
+
DialogHeader,
|
|
15
|
+
DialogTitle,
|
|
16
|
+
} from '@/components/ui/dialog'
|
|
17
|
+
import {
|
|
18
|
+
DropdownMenu,
|
|
19
|
+
DropdownMenuContent,
|
|
20
|
+
DropdownMenuItem,
|
|
21
|
+
DropdownMenuSeparator,
|
|
22
|
+
DropdownMenuTrigger,
|
|
23
|
+
DropdownMenuSub,
|
|
24
|
+
DropdownMenuSubContent,
|
|
25
|
+
DropdownMenuSubTrigger,
|
|
26
|
+
} from '@/components/ui/dropdown-menu'
|
|
27
|
+
import {
|
|
28
|
+
AlertDialog,
|
|
29
|
+
AlertDialogAction,
|
|
30
|
+
AlertDialogCancel,
|
|
31
|
+
AlertDialogContent,
|
|
32
|
+
AlertDialogDescription,
|
|
33
|
+
AlertDialogFooter,
|
|
34
|
+
AlertDialogHeader,
|
|
35
|
+
AlertDialogTitle,
|
|
36
|
+
} from '@/components/ui/alert-dialog'
|
|
37
|
+
import {
|
|
38
|
+
DndContext,
|
|
39
|
+
DragOverlay,
|
|
40
|
+
pointerWithin,
|
|
41
|
+
KeyboardSensor,
|
|
42
|
+
PointerSensor,
|
|
43
|
+
useSensor,
|
|
44
|
+
useSensors,
|
|
45
|
+
type DragStartEvent,
|
|
46
|
+
type DragEndEvent,
|
|
47
|
+
type DragOverEvent,
|
|
48
|
+
} from '@dnd-kit/core'
|
|
49
|
+
import {
|
|
50
|
+
SortableContext,
|
|
51
|
+
sortableKeyboardCoordinates,
|
|
52
|
+
useSortable,
|
|
53
|
+
verticalListSortingStrategy,
|
|
54
|
+
} from '@dnd-kit/sortable'
|
|
55
|
+
import { useDroppable } from '@dnd-kit/core'
|
|
56
|
+
import { CSS } from '@dnd-kit/utilities'
|
|
57
|
+
import { useFlowTasks, useUpdateFlowTask, useCreateFlowTask, useMigrationPreview, useMigrateAllToBacklog } from '@/hooks/useFlowChanges'
|
|
58
|
+
import { cn } from '@/lib/utils'
|
|
59
|
+
import { TaskDialog } from '@/components/tasks/TaskDialog'
|
|
60
|
+
import type { FlowTask, FlowTaskStatus } from '@/types'
|
|
61
|
+
|
|
62
|
+
interface StandaloneTasksProps {
|
|
63
|
+
projectId: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 칸반 보드에 표시할 컬럼 (review, archived 제외)
|
|
67
|
+
const STATUS_ORDER: FlowTaskStatus[] = ['todo', 'in-progress', 'done']
|
|
68
|
+
|
|
69
|
+
const STATUS_LABELS: Record<FlowTaskStatus, string> = {
|
|
70
|
+
todo: 'To Do',
|
|
71
|
+
'in-progress': 'In Progress',
|
|
72
|
+
review: 'Review',
|
|
73
|
+
done: 'Done',
|
|
74
|
+
archived: 'Archived',
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const PRIORITY_COLORS: Record<string, string> = {
|
|
78
|
+
high: 'bg-red-500',
|
|
79
|
+
medium: 'bg-yellow-500',
|
|
80
|
+
low: 'bg-green-500',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function StandaloneTasks({ projectId: _projectId }: StandaloneTasksProps) {
|
|
84
|
+
const { data: tasks, isLoading, refetch } = useFlowTasks({ standalone: true, includeArchived: true })
|
|
85
|
+
const updateTask = useUpdateFlowTask()
|
|
86
|
+
const createTask = useCreateFlowTask()
|
|
87
|
+
|
|
88
|
+
// Migration hooks
|
|
89
|
+
const { data: migrationPreview } = useMigrationPreview()
|
|
90
|
+
const migrateToBacklog = useMigrateAllToBacklog()
|
|
91
|
+
|
|
92
|
+
// Tab state
|
|
93
|
+
const [activeTab, setActiveTab] = useState<'active' | 'archived'>('active')
|
|
94
|
+
|
|
95
|
+
// Search state
|
|
96
|
+
const [searchQuery, setSearchQuery] = useState('')
|
|
97
|
+
|
|
98
|
+
// Refresh state
|
|
99
|
+
const [isRefreshing, setIsRefreshing] = useState(false)
|
|
100
|
+
const [showRefreshSuccess, setShowRefreshSuccess] = useState(false)
|
|
101
|
+
|
|
102
|
+
// Drag state
|
|
103
|
+
const [activeTask, setActiveTask] = useState<FlowTask | null>(null)
|
|
104
|
+
|
|
105
|
+
// Dialog states
|
|
106
|
+
const [editDialogOpen, setEditDialogOpen] = useState(false)
|
|
107
|
+
const [createDialogOpen, setCreateDialogOpen] = useState(false)
|
|
108
|
+
const [selectedTask, setSelectedTask] = useState<FlowTask | null>(null)
|
|
109
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false)
|
|
110
|
+
const [taskToDelete, setTaskToDelete] = useState<FlowTask | null>(null)
|
|
111
|
+
const [createDefaultStatus, setCreateDefaultStatus] = useState<FlowTaskStatus>('todo')
|
|
112
|
+
const [viewDialogOpen, setViewDialogOpen] = useState(false)
|
|
113
|
+
const [viewTask, setViewTask] = useState<FlowTask | null>(null)
|
|
114
|
+
const [migrationDialogOpen, setMigrationDialogOpen] = useState(false)
|
|
115
|
+
|
|
116
|
+
// projectId는 향후 확장용으로 유지
|
|
117
|
+
void _projectId
|
|
118
|
+
|
|
119
|
+
// DnD sensors
|
|
120
|
+
const sensors = useSensors(
|
|
121
|
+
useSensor(PointerSensor, {
|
|
122
|
+
activationConstraint: {
|
|
123
|
+
distance: 8,
|
|
124
|
+
},
|
|
125
|
+
}),
|
|
126
|
+
useSensor(KeyboardSensor, {
|
|
127
|
+
coordinateGetter: sortableKeyboardCoordinates,
|
|
128
|
+
})
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
const handleMoveTask = async (task: FlowTask, newStatus: FlowTaskStatus) => {
|
|
132
|
+
await updateTask.mutateAsync({ id: task.id, status: newStatus })
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const handleArchiveTask = async (task: FlowTask) => {
|
|
136
|
+
await updateTask.mutateAsync({ id: task.id, status: 'archived' })
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const handleRestoreTask = async (task: FlowTask) => {
|
|
140
|
+
await updateTask.mutateAsync({ id: task.id, status: 'done' })
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const handleEditTask = (task: FlowTask) => {
|
|
144
|
+
setSelectedTask(task)
|
|
145
|
+
setEditDialogOpen(true)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const handleViewTask = (task: FlowTask) => {
|
|
149
|
+
setViewTask(task)
|
|
150
|
+
setViewDialogOpen(true)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const handleDeleteTask = (task: FlowTask) => {
|
|
154
|
+
setTaskToDelete(task)
|
|
155
|
+
setDeleteDialogOpen(true)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const confirmDelete = async () => {
|
|
159
|
+
if (!taskToDelete) return
|
|
160
|
+
await updateTask.mutateAsync({ id: taskToDelete.id, status: 'archived' })
|
|
161
|
+
setDeleteDialogOpen(false)
|
|
162
|
+
setTaskToDelete(null)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const handleSaveTask = async (data: {
|
|
166
|
+
id?: number
|
|
167
|
+
title: string
|
|
168
|
+
description?: string
|
|
169
|
+
status: FlowTaskStatus
|
|
170
|
+
priority: 'low' | 'medium' | 'high'
|
|
171
|
+
tags?: string[]
|
|
172
|
+
assignee?: string
|
|
173
|
+
}) => {
|
|
174
|
+
if (data.id) {
|
|
175
|
+
await updateTask.mutateAsync({
|
|
176
|
+
id: data.id,
|
|
177
|
+
title: data.title,
|
|
178
|
+
description: data.description,
|
|
179
|
+
status: data.status,
|
|
180
|
+
priority: data.priority,
|
|
181
|
+
})
|
|
182
|
+
} else {
|
|
183
|
+
await createTask.mutateAsync({
|
|
184
|
+
title: data.title,
|
|
185
|
+
description: data.description,
|
|
186
|
+
priority: data.priority,
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const handleAddTask = (status: FlowTaskStatus = 'todo') => {
|
|
192
|
+
setCreateDefaultStatus(status)
|
|
193
|
+
setSelectedTask(null)
|
|
194
|
+
setCreateDialogOpen(true)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const handleRefresh = async () => {
|
|
198
|
+
setIsRefreshing(true)
|
|
199
|
+
setShowRefreshSuccess(false)
|
|
200
|
+
|
|
201
|
+
try {
|
|
202
|
+
await refetch()
|
|
203
|
+
|
|
204
|
+
// 성공 아이콘 표시
|
|
205
|
+
setShowRefreshSuccess(true)
|
|
206
|
+
toast.success('작업 목록이 새로고침되었습니다.')
|
|
207
|
+
|
|
208
|
+
// 1.5초 후 성공 아이콘 숨기기
|
|
209
|
+
setTimeout(() => {
|
|
210
|
+
setShowRefreshSuccess(false)
|
|
211
|
+
}, 1500)
|
|
212
|
+
} catch (error) {
|
|
213
|
+
console.error('Failed to refresh tasks:', error)
|
|
214
|
+
toast.error('작업 목록을 새로고침하는데 실패했습니다.')
|
|
215
|
+
} finally {
|
|
216
|
+
setIsRefreshing(false)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const handleMigration = async () => {
|
|
221
|
+
try {
|
|
222
|
+
const result = await migrateToBacklog.mutateAsync()
|
|
223
|
+
setMigrationDialogOpen(false)
|
|
224
|
+
|
|
225
|
+
if (result.migratedCount > 0) {
|
|
226
|
+
toast.success(`${result.migratedCount}개의 작업이 Backlog로 마이그레이션되었습니다.`)
|
|
227
|
+
} else {
|
|
228
|
+
toast.info('마이그레이션할 작업이 없습니다.')
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
await refetch()
|
|
232
|
+
} catch (error) {
|
|
233
|
+
console.error('Migration failed:', error)
|
|
234
|
+
toast.error('마이그레이션에 실패했습니다.')
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// DnD handlers
|
|
239
|
+
const handleDragStart = (event: DragStartEvent) => {
|
|
240
|
+
const { active } = event
|
|
241
|
+
const task = (tasks ?? []).find((t) => t.id === active.id)
|
|
242
|
+
if (task) {
|
|
243
|
+
setActiveTask(task)
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const handleDragOver = (_event: DragOverEvent) => {
|
|
248
|
+
// Could be used for visual feedback when hovering over columns
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const handleDragEnd = async (event: DragEndEvent) => {
|
|
252
|
+
const { active, over } = event
|
|
253
|
+
setActiveTask(null)
|
|
254
|
+
|
|
255
|
+
if (!over) return
|
|
256
|
+
|
|
257
|
+
const activeId = active.id
|
|
258
|
+
const overId = over.id
|
|
259
|
+
|
|
260
|
+
// Find the task being dragged
|
|
261
|
+
const task = (tasks ?? []).find((t) => t.id === activeId)
|
|
262
|
+
if (!task) return
|
|
263
|
+
|
|
264
|
+
// Check if dropped on a column (empty area or column itself)
|
|
265
|
+
const overData = over.data.current
|
|
266
|
+
if (overData?.type === 'column') {
|
|
267
|
+
const newStatus = overData.status as FlowTaskStatus
|
|
268
|
+
if (task.status !== newStatus) {
|
|
269
|
+
await updateTask.mutateAsync({ id: task.id, status: newStatus })
|
|
270
|
+
}
|
|
271
|
+
return
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Check if dropped on another task
|
|
275
|
+
const overTask = (tasks ?? []).find((t) => t.id === overId)
|
|
276
|
+
if (overTask) {
|
|
277
|
+
// Different column - move to that column
|
|
278
|
+
if (task.status !== overTask.status) {
|
|
279
|
+
await updateTask.mutateAsync({ id: task.id, status: overTask.status })
|
|
280
|
+
} else if (task.id !== overTask.id) {
|
|
281
|
+
// Same column - reorder (update order field)
|
|
282
|
+
// For now, just swap order values
|
|
283
|
+
const taskOrder = task.order
|
|
284
|
+
const overTaskOrder = overTask.order
|
|
285
|
+
await Promise.all([
|
|
286
|
+
updateTask.mutateAsync({ id: task.id, order: overTaskOrder }),
|
|
287
|
+
updateTask.mutateAsync({ id: overTask.id, order: taskOrder }),
|
|
288
|
+
])
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// 활성 작업과 아카이브 분리 (검색 필터 적용)
|
|
294
|
+
// Note: hooks must be called before any conditional returns
|
|
295
|
+
const activeTasks = useMemo(() => {
|
|
296
|
+
const filterBySearch = (task: FlowTask) => {
|
|
297
|
+
if (!searchQuery.trim()) return true
|
|
298
|
+
const query = searchQuery.toLowerCase()
|
|
299
|
+
const tags = task.tags ? (typeof task.tags === 'string' ? JSON.parse(task.tags) : task.tags) as string[] : []
|
|
300
|
+
return (
|
|
301
|
+
task.title.toLowerCase().includes(query) ||
|
|
302
|
+
task.description?.toLowerCase().includes(query) ||
|
|
303
|
+
tags.some(tag => tag.toLowerCase().includes(query)) ||
|
|
304
|
+
task.assignee?.toLowerCase().includes(query) ||
|
|
305
|
+
String(task.id).includes(query)
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
return (tasks ?? []).filter((t) => t.status !== 'archived').filter(filterBySearch)
|
|
309
|
+
}, [tasks, searchQuery])
|
|
310
|
+
|
|
311
|
+
const archivedTasks = useMemo(() => {
|
|
312
|
+
const filterBySearch = (task: FlowTask) => {
|
|
313
|
+
if (!searchQuery.trim()) return true
|
|
314
|
+
const query = searchQuery.toLowerCase()
|
|
315
|
+
const tags = task.tags ? (typeof task.tags === 'string' ? JSON.parse(task.tags) : task.tags) as string[] : []
|
|
316
|
+
return (
|
|
317
|
+
task.title.toLowerCase().includes(query) ||
|
|
318
|
+
task.description?.toLowerCase().includes(query) ||
|
|
319
|
+
tags.some(tag => tag.toLowerCase().includes(query)) ||
|
|
320
|
+
task.assignee?.toLowerCase().includes(query) ||
|
|
321
|
+
String(task.id).includes(query)
|
|
322
|
+
)
|
|
323
|
+
}
|
|
324
|
+
return (tasks ?? []).filter((t) => t.status === 'archived').filter(filterBySearch)
|
|
325
|
+
}, [tasks, searchQuery])
|
|
326
|
+
|
|
327
|
+
// 칸반 뷰용 상태별 분류 (3컬럼: To Do, In Progress, Done)
|
|
328
|
+
const tasksByStatus = useMemo(() => STATUS_ORDER.reduce(
|
|
329
|
+
(acc, status) => {
|
|
330
|
+
acc[status] = activeTasks
|
|
331
|
+
.filter((t) => t.status === status)
|
|
332
|
+
.sort((a, b) => a.order - b.order)
|
|
333
|
+
return acc
|
|
334
|
+
},
|
|
335
|
+
{} as Record<FlowTaskStatus, FlowTask[]>
|
|
336
|
+
), [activeTasks])
|
|
337
|
+
|
|
338
|
+
if (isLoading) {
|
|
339
|
+
return (
|
|
340
|
+
<div className="flex flex-col items-center justify-center py-12 text-muted-foreground">
|
|
341
|
+
<Loader2 className="h-8 w-8 mb-4 animate-spin opacity-50" />
|
|
342
|
+
<p>로딩 중...</p>
|
|
343
|
+
</div>
|
|
344
|
+
)
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return (
|
|
348
|
+
<div className="w-full max-w-[1600px] mx-auto space-y-6 px-4">
|
|
349
|
+
{/* Header */}
|
|
350
|
+
<div className="flex items-center justify-between">
|
|
351
|
+
<div>
|
|
352
|
+
<h1 className="text-2xl font-bold flex items-center gap-2">
|
|
353
|
+
<ListTodo className="h-6 w-6" />
|
|
354
|
+
Inbox
|
|
355
|
+
</h1>
|
|
356
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
357
|
+
Change에 속하지 않는 독립적인 작업들
|
|
358
|
+
</p>
|
|
359
|
+
</div>
|
|
360
|
+
<div className="flex items-center gap-2">
|
|
361
|
+
{/* 검색 */}
|
|
362
|
+
<div className="relative">
|
|
363
|
+
<Search className="absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
|
364
|
+
<Input
|
|
365
|
+
type="text"
|
|
366
|
+
placeholder="검색..."
|
|
367
|
+
value={searchQuery}
|
|
368
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
369
|
+
className="pl-8 pr-8 w-48"
|
|
370
|
+
/>
|
|
371
|
+
{searchQuery && (
|
|
372
|
+
<button
|
|
373
|
+
onClick={() => setSearchQuery('')}
|
|
374
|
+
className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
|
|
375
|
+
>
|
|
376
|
+
<X className="h-4 w-4" />
|
|
377
|
+
</button>
|
|
378
|
+
)}
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
{/* 새로고침 버튼 */}
|
|
382
|
+
<Button
|
|
383
|
+
variant="outline"
|
|
384
|
+
size="icon"
|
|
385
|
+
onClick={handleRefresh}
|
|
386
|
+
disabled={isRefreshing || isLoading}
|
|
387
|
+
title="새로고침"
|
|
388
|
+
className="relative"
|
|
389
|
+
>
|
|
390
|
+
{showRefreshSuccess ? (
|
|
391
|
+
<CheckCircle className="h-4 w-4 text-green-500" />
|
|
392
|
+
) : (
|
|
393
|
+
<RefreshCw className={`h-4 w-4 ${isRefreshing ? 'animate-spin' : ''}`} />
|
|
394
|
+
)}
|
|
395
|
+
</Button>
|
|
396
|
+
|
|
397
|
+
{activeTab === 'active' && (
|
|
398
|
+
<>
|
|
399
|
+
{(migrationPreview?.count ?? 0) > 0 && (
|
|
400
|
+
<Button
|
|
401
|
+
variant="outline"
|
|
402
|
+
onClick={() => setMigrationDialogOpen(true)}
|
|
403
|
+
className="gap-2"
|
|
404
|
+
>
|
|
405
|
+
<FileUp className="h-4 w-4" />
|
|
406
|
+
Backlog로 이전
|
|
407
|
+
<Badge variant="secondary" className="text-xs">
|
|
408
|
+
{migrationPreview?.count}
|
|
409
|
+
</Badge>
|
|
410
|
+
</Button>
|
|
411
|
+
)}
|
|
412
|
+
<Button onClick={() => handleAddTask('todo')}>
|
|
413
|
+
<Plus className="h-4 w-4 mr-2" />
|
|
414
|
+
작업 추가
|
|
415
|
+
</Button>
|
|
416
|
+
</>
|
|
417
|
+
)}
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
{/* Tabs */}
|
|
422
|
+
<Tabs value={activeTab} onValueChange={(v) => setActiveTab(v as 'active' | 'archived')}>
|
|
423
|
+
<TabsList>
|
|
424
|
+
<TabsTrigger value="active" className="gap-2">
|
|
425
|
+
작업
|
|
426
|
+
<Badge variant="secondary" className="text-xs">
|
|
427
|
+
{activeTasks.length}
|
|
428
|
+
</Badge>
|
|
429
|
+
</TabsTrigger>
|
|
430
|
+
<TabsTrigger value="archived" className="gap-2">
|
|
431
|
+
<Archive className="h-4 w-4" />
|
|
432
|
+
아카이브
|
|
433
|
+
<Badge variant="secondary" className="text-xs">
|
|
434
|
+
{archivedTasks.length}
|
|
435
|
+
</Badge>
|
|
436
|
+
</TabsTrigger>
|
|
437
|
+
</TabsList>
|
|
438
|
+
|
|
439
|
+
<TabsContent value="active" className="mt-4">
|
|
440
|
+
{/* Kanban Board with DnD */}
|
|
441
|
+
<DndContext
|
|
442
|
+
sensors={sensors}
|
|
443
|
+
collisionDetection={pointerWithin}
|
|
444
|
+
onDragStart={handleDragStart}
|
|
445
|
+
onDragOver={handleDragOver}
|
|
446
|
+
onDragEnd={handleDragEnd}
|
|
447
|
+
>
|
|
448
|
+
<div className="grid grid-cols-3 gap-4 min-h-[500px]">
|
|
449
|
+
{STATUS_ORDER.map((status) => (
|
|
450
|
+
<KanbanColumn
|
|
451
|
+
key={status}
|
|
452
|
+
status={status}
|
|
453
|
+
tasks={tasksByStatus[status]}
|
|
454
|
+
onMove={handleMoveTask}
|
|
455
|
+
onArchive={handleArchiveTask}
|
|
456
|
+
onEdit={handleEditTask}
|
|
457
|
+
onDelete={handleDeleteTask}
|
|
458
|
+
onView={handleViewTask}
|
|
459
|
+
onAddTask={() => handleAddTask(status)}
|
|
460
|
+
/>
|
|
461
|
+
))}
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
{/* Drag Overlay */}
|
|
465
|
+
<DragOverlay>
|
|
466
|
+
{activeTask ? (
|
|
467
|
+
<div className="opacity-80">
|
|
468
|
+
<KanbanCardContent
|
|
469
|
+
task={activeTask}
|
|
470
|
+
currentStatus={activeTask.status}
|
|
471
|
+
/>
|
|
472
|
+
</div>
|
|
473
|
+
) : null}
|
|
474
|
+
</DragOverlay>
|
|
475
|
+
</DndContext>
|
|
476
|
+
</TabsContent>
|
|
477
|
+
|
|
478
|
+
<TabsContent value="archived" className="mt-4">
|
|
479
|
+
{/* Archived Tasks List */}
|
|
480
|
+
<div className="rounded-lg bg-muted/50 p-4 min-h-[500px]">
|
|
481
|
+
{archivedTasks.length === 0 ? (
|
|
482
|
+
<div className="flex flex-col items-center justify-center py-12 text-muted-foreground">
|
|
483
|
+
<Archive className="h-12 w-12 mb-4 opacity-30" />
|
|
484
|
+
<p>아카이브된 작업이 없습니다</p>
|
|
485
|
+
</div>
|
|
486
|
+
) : (
|
|
487
|
+
<div className="grid gap-2">
|
|
488
|
+
{archivedTasks.map((task) => (
|
|
489
|
+
<ArchivedTaskCard
|
|
490
|
+
key={task.id}
|
|
491
|
+
task={task}
|
|
492
|
+
onRestore={() => handleRestoreTask(task)}
|
|
493
|
+
onEdit={() => handleEditTask(task)}
|
|
494
|
+
/>
|
|
495
|
+
))}
|
|
496
|
+
</div>
|
|
497
|
+
)}
|
|
498
|
+
</div>
|
|
499
|
+
</TabsContent>
|
|
500
|
+
</Tabs>
|
|
501
|
+
|
|
502
|
+
{/* Edit Task Dialog */}
|
|
503
|
+
<TaskDialog
|
|
504
|
+
open={editDialogOpen}
|
|
505
|
+
onOpenChange={setEditDialogOpen}
|
|
506
|
+
task={selectedTask}
|
|
507
|
+
onSave={handleSaveTask}
|
|
508
|
+
/>
|
|
509
|
+
|
|
510
|
+
{/* Create Task Dialog */}
|
|
511
|
+
<TaskDialog
|
|
512
|
+
open={createDialogOpen}
|
|
513
|
+
onOpenChange={setCreateDialogOpen}
|
|
514
|
+
task={null}
|
|
515
|
+
defaultStatus={createDefaultStatus}
|
|
516
|
+
onSave={handleSaveTask}
|
|
517
|
+
/>
|
|
518
|
+
|
|
519
|
+
{/* Delete Confirmation Dialog */}
|
|
520
|
+
<AlertDialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
|
|
521
|
+
<AlertDialogContent>
|
|
522
|
+
<AlertDialogHeader>
|
|
523
|
+
<AlertDialogTitle>작업 삭제</AlertDialogTitle>
|
|
524
|
+
<AlertDialogDescription>
|
|
525
|
+
"{taskToDelete?.title}" 작업을 삭제하시겠습니까?
|
|
526
|
+
삭제된 작업은 아카이브로 이동됩니다.
|
|
527
|
+
</AlertDialogDescription>
|
|
528
|
+
</AlertDialogHeader>
|
|
529
|
+
<AlertDialogFooter>
|
|
530
|
+
<AlertDialogCancel>취소</AlertDialogCancel>
|
|
531
|
+
<AlertDialogAction onClick={confirmDelete} className="bg-destructive text-destructive-foreground">
|
|
532
|
+
삭제
|
|
533
|
+
</AlertDialogAction>
|
|
534
|
+
</AlertDialogFooter>
|
|
535
|
+
</AlertDialogContent>
|
|
536
|
+
</AlertDialog>
|
|
537
|
+
|
|
538
|
+
{/* View Task Detail Dialog */}
|
|
539
|
+
<Dialog open={viewDialogOpen} onOpenChange={setViewDialogOpen}>
|
|
540
|
+
<DialogContent className="max-w-lg [&>button]:h-8 [&>button]:w-8 [&>button]:right-3 [&>button>svg]:h-5 [&>button>svg]:w-5">
|
|
541
|
+
<DialogHeader>
|
|
542
|
+
<DialogTitle className="flex items-center gap-2">
|
|
543
|
+
<span
|
|
544
|
+
className={cn('w-2.5 h-2.5 rounded-full', PRIORITY_COLORS[viewTask?.priority ?? 'medium'])}
|
|
545
|
+
/>
|
|
546
|
+
<span className="text-muted-foreground font-mono text-sm">#{viewTask?.id}</span>
|
|
547
|
+
<Badge variant="outline">
|
|
548
|
+
{STATUS_LABELS[viewTask?.status as FlowTaskStatus] ?? viewTask?.status}
|
|
549
|
+
</Badge>
|
|
550
|
+
</DialogTitle>
|
|
551
|
+
<DialogDescription className="sr-only">
|
|
552
|
+
작업 상세 정보
|
|
553
|
+
</DialogDescription>
|
|
554
|
+
</DialogHeader>
|
|
555
|
+
<div className="space-y-4">
|
|
556
|
+
<div>
|
|
557
|
+
<h3 className="font-semibold text-lg">{viewTask?.title}</h3>
|
|
558
|
+
</div>
|
|
559
|
+
{viewTask?.description && (
|
|
560
|
+
<div className="bg-muted/50 rounded-lg p-4">
|
|
561
|
+
<p className="text-sm whitespace-pre-wrap">{viewTask.description}</p>
|
|
562
|
+
</div>
|
|
563
|
+
)}
|
|
564
|
+
{viewTask?.tags && (
|
|
565
|
+
<div className="flex flex-wrap gap-1">
|
|
566
|
+
{(typeof viewTask.tags === 'string' ? JSON.parse(viewTask.tags) : viewTask.tags).map((tag: string) => (
|
|
567
|
+
<Badge key={tag} variant="secondary" className="text-xs">
|
|
568
|
+
{tag}
|
|
569
|
+
</Badge>
|
|
570
|
+
))}
|
|
571
|
+
</div>
|
|
572
|
+
)}
|
|
573
|
+
<div className="flex items-center justify-between text-xs text-muted-foreground pt-2 border-t">
|
|
574
|
+
<div className="flex items-center gap-4">
|
|
575
|
+
{viewTask?.assignee && (
|
|
576
|
+
<span className="flex items-center gap-1">
|
|
577
|
+
<User className="h-3 w-3" />
|
|
578
|
+
{viewTask.assignee}
|
|
579
|
+
</span>
|
|
580
|
+
)}
|
|
581
|
+
<span className="flex items-center gap-1">
|
|
582
|
+
<Calendar className="h-3 w-3" />
|
|
583
|
+
{viewTask?.createdAt ? new Date(viewTask.createdAt).toLocaleDateString('ko-KR') : '-'}
|
|
584
|
+
</span>
|
|
585
|
+
</div>
|
|
586
|
+
<Button
|
|
587
|
+
size="sm"
|
|
588
|
+
variant="outline"
|
|
589
|
+
onClick={() => {
|
|
590
|
+
setViewDialogOpen(false)
|
|
591
|
+
if (viewTask) handleEditTask(viewTask)
|
|
592
|
+
}}
|
|
593
|
+
>
|
|
594
|
+
<Pencil className="h-3 w-3 mr-1" />
|
|
595
|
+
편집
|
|
596
|
+
</Button>
|
|
597
|
+
</div>
|
|
598
|
+
</div>
|
|
599
|
+
</DialogContent>
|
|
600
|
+
</Dialog>
|
|
601
|
+
|
|
602
|
+
{/* Migration Dialog */}
|
|
603
|
+
<AlertDialog open={migrationDialogOpen} onOpenChange={setMigrationDialogOpen}>
|
|
604
|
+
<AlertDialogContent>
|
|
605
|
+
<AlertDialogHeader>
|
|
606
|
+
<AlertDialogTitle>Inbox → Backlog 마이그레이션</AlertDialogTitle>
|
|
607
|
+
<AlertDialogDescription asChild>
|
|
608
|
+
<div className="space-y-3">
|
|
609
|
+
<p>
|
|
610
|
+
현재 Inbox에 있는 <strong>{migrationPreview?.count ?? 0}개</strong>의
|
|
611
|
+
작업을 Backlog 파일로 변환합니다.
|
|
612
|
+
</p>
|
|
613
|
+
<div className="bg-muted rounded-lg p-3 text-sm">
|
|
614
|
+
<p className="font-medium mb-2">변환 대상:</p>
|
|
615
|
+
<ul className="list-disc list-inside space-y-1 text-muted-foreground max-h-32 overflow-y-auto">
|
|
616
|
+
{migrationPreview?.tasks.slice(0, 5).map((task) => (
|
|
617
|
+
<li key={task.id} className="truncate">
|
|
618
|
+
{task.title}
|
|
619
|
+
</li>
|
|
620
|
+
))}
|
|
621
|
+
{(migrationPreview?.count ?? 0) > 5 && (
|
|
622
|
+
<li className="text-muted-foreground/70">
|
|
623
|
+
외 {(migrationPreview?.count ?? 0) - 5}개...
|
|
624
|
+
</li>
|
|
625
|
+
)}
|
|
626
|
+
</ul>
|
|
627
|
+
</div>
|
|
628
|
+
<p className="text-xs text-muted-foreground">
|
|
629
|
+
변환 후 작업들은 <code className="bg-muted px-1 rounded">backlog/</code>{' '}
|
|
630
|
+
폴더에 마크다운 파일로 저장됩니다.
|
|
631
|
+
</p>
|
|
632
|
+
</div>
|
|
633
|
+
</AlertDialogDescription>
|
|
634
|
+
</AlertDialogHeader>
|
|
635
|
+
<AlertDialogFooter>
|
|
636
|
+
<AlertDialogCancel>취소</AlertDialogCancel>
|
|
637
|
+
<AlertDialogAction
|
|
638
|
+
onClick={handleMigration}
|
|
639
|
+
disabled={migrateToBacklog.isPending}
|
|
640
|
+
>
|
|
641
|
+
{migrateToBacklog.isPending ? (
|
|
642
|
+
<>
|
|
643
|
+
<Loader2 className="h-4 w-4 mr-2 animate-spin" />
|
|
644
|
+
마이그레이션 중...
|
|
645
|
+
</>
|
|
646
|
+
) : (
|
|
647
|
+
<>
|
|
648
|
+
<FileUp className="h-4 w-4 mr-2" />
|
|
649
|
+
마이그레이션
|
|
650
|
+
</>
|
|
651
|
+
)}
|
|
652
|
+
</AlertDialogAction>
|
|
653
|
+
</AlertDialogFooter>
|
|
654
|
+
</AlertDialogContent>
|
|
655
|
+
</AlertDialog>
|
|
656
|
+
</div>
|
|
657
|
+
)
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/* Archived Task Card Component */
|
|
661
|
+
interface ArchivedTaskCardProps {
|
|
662
|
+
task: FlowTask
|
|
663
|
+
onRestore: () => void
|
|
664
|
+
onEdit: () => void
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function ArchivedTaskCard({ task, onRestore, onEdit }: ArchivedTaskCardProps) {
|
|
668
|
+
const tags = task.tags ? (typeof task.tags === 'string' ? JSON.parse(task.tags) : task.tags) as string[] : []
|
|
669
|
+
|
|
670
|
+
return (
|
|
671
|
+
<Card className="py-0 gap-0 opacity-75 hover:opacity-100 transition-opacity">
|
|
672
|
+
<CardContent className="!px-4 !py-3">
|
|
673
|
+
<div className="flex items-center gap-4">
|
|
674
|
+
<div className="flex-1 min-w-0">
|
|
675
|
+
<div className="flex items-center gap-2">
|
|
676
|
+
<span
|
|
677
|
+
className={cn('w-2 h-2 rounded-full', PRIORITY_COLORS[task.priority])}
|
|
678
|
+
title={task.priority}
|
|
679
|
+
/>
|
|
680
|
+
<span className="text-xs text-muted-foreground font-mono">
|
|
681
|
+
#{task.id}
|
|
682
|
+
</span>
|
|
683
|
+
<p className="text-sm font-medium truncate">{task.title}</p>
|
|
684
|
+
</div>
|
|
685
|
+
{task.description && (
|
|
686
|
+
<p className="text-xs text-muted-foreground mt-1 truncate">
|
|
687
|
+
{task.description}
|
|
688
|
+
</p>
|
|
689
|
+
)}
|
|
690
|
+
{tags.length > 0 && (
|
|
691
|
+
<div className="flex flex-wrap gap-1 mt-2">
|
|
692
|
+
{tags.map((tag) => (
|
|
693
|
+
<Badge key={tag} variant="secondary" className="text-xs px-1.5 py-0">
|
|
694
|
+
{tag}
|
|
695
|
+
</Badge>
|
|
696
|
+
))}
|
|
697
|
+
</div>
|
|
698
|
+
)}
|
|
699
|
+
</div>
|
|
700
|
+
<div className="flex items-center gap-2">
|
|
701
|
+
<Button variant="outline" size="sm" onClick={onRestore}>
|
|
702
|
+
<RotateCcw className="h-3 w-3 mr-1" />
|
|
703
|
+
복원
|
|
704
|
+
</Button>
|
|
705
|
+
<Button variant="ghost" size="sm" onClick={onEdit}>
|
|
706
|
+
<Pencil className="h-3 w-3" />
|
|
707
|
+
</Button>
|
|
708
|
+
</div>
|
|
709
|
+
</div>
|
|
710
|
+
</CardContent>
|
|
711
|
+
</Card>
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/* Kanban Column Component */
|
|
716
|
+
interface KanbanColumnProps {
|
|
717
|
+
status: FlowTaskStatus
|
|
718
|
+
tasks: FlowTask[]
|
|
719
|
+
onMove: (task: FlowTask, newStatus: FlowTaskStatus) => void
|
|
720
|
+
onArchive: (task: FlowTask) => void
|
|
721
|
+
onEdit: (task: FlowTask) => void
|
|
722
|
+
onDelete: (task: FlowTask) => void
|
|
723
|
+
onView: (task: FlowTask) => void
|
|
724
|
+
onAddTask: () => void
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
function KanbanColumn({ status, tasks, onMove, onArchive, onEdit, onDelete, onView, onAddTask }: KanbanColumnProps) {
|
|
728
|
+
const { setNodeRef, isOver } = useDroppable({
|
|
729
|
+
id: status,
|
|
730
|
+
data: { type: 'column', status },
|
|
731
|
+
})
|
|
732
|
+
|
|
733
|
+
return (
|
|
734
|
+
<div
|
|
735
|
+
ref={setNodeRef}
|
|
736
|
+
className={cn(
|
|
737
|
+
"flex flex-col h-full rounded-lg bg-muted/50 transition-colors",
|
|
738
|
+
isOver && "ring-2 ring-primary ring-offset-2"
|
|
739
|
+
)}
|
|
740
|
+
>
|
|
741
|
+
{/* Column Header */}
|
|
742
|
+
<div className="flex items-center justify-between p-3 border-b">
|
|
743
|
+
<div className="flex items-center gap-2">
|
|
744
|
+
<h3 className="font-semibold text-sm">{STATUS_LABELS[status]}</h3>
|
|
745
|
+
<span className="text-xs text-muted-foreground bg-muted px-1.5 py-0.5 rounded">
|
|
746
|
+
{tasks.length}
|
|
747
|
+
</span>
|
|
748
|
+
</div>
|
|
749
|
+
<Button variant="ghost" size="sm" className="h-6 w-6 p-0" onClick={onAddTask}>
|
|
750
|
+
<Plus className="h-4 w-4" />
|
|
751
|
+
</Button>
|
|
752
|
+
</div>
|
|
753
|
+
|
|
754
|
+
{/* Column Content */}
|
|
755
|
+
<div className="flex-1 overflow-hidden min-h-[100px]">
|
|
756
|
+
<ScrollArea className="h-full p-2">
|
|
757
|
+
<SortableContext
|
|
758
|
+
items={tasks.map((t) => t.id)}
|
|
759
|
+
strategy={verticalListSortingStrategy}
|
|
760
|
+
>
|
|
761
|
+
{tasks.map((task) => (
|
|
762
|
+
<SortableKanbanCard
|
|
763
|
+
key={task.id}
|
|
764
|
+
task={task}
|
|
765
|
+
currentStatus={status}
|
|
766
|
+
onMove={(newStatus) => onMove(task, newStatus)}
|
|
767
|
+
onArchive={() => onArchive(task)}
|
|
768
|
+
onEdit={() => onEdit(task)}
|
|
769
|
+
onDelete={() => onDelete(task)}
|
|
770
|
+
onView={() => onView(task)}
|
|
771
|
+
/>
|
|
772
|
+
))}
|
|
773
|
+
</SortableContext>
|
|
774
|
+
{tasks.length === 0 && (
|
|
775
|
+
<div className="text-center py-8 text-muted-foreground text-sm">
|
|
776
|
+
No tasks
|
|
777
|
+
</div>
|
|
778
|
+
)}
|
|
779
|
+
</ScrollArea>
|
|
780
|
+
</div>
|
|
781
|
+
</div>
|
|
782
|
+
)
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/* Sortable Kanban Card Wrapper */
|
|
786
|
+
interface SortableKanbanCardProps {
|
|
787
|
+
task: FlowTask
|
|
788
|
+
currentStatus: FlowTaskStatus
|
|
789
|
+
onMove: (newStatus: FlowTaskStatus) => void
|
|
790
|
+
onArchive: () => void
|
|
791
|
+
onEdit: () => void
|
|
792
|
+
onDelete: () => void
|
|
793
|
+
onView: () => void
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function SortableKanbanCard({ task, currentStatus, onMove, onArchive, onEdit, onDelete, onView }: SortableKanbanCardProps) {
|
|
797
|
+
const {
|
|
798
|
+
attributes,
|
|
799
|
+
listeners,
|
|
800
|
+
setNodeRef,
|
|
801
|
+
transform,
|
|
802
|
+
transition,
|
|
803
|
+
isDragging,
|
|
804
|
+
} = useSortable({
|
|
805
|
+
id: task.id,
|
|
806
|
+
data: { type: 'task', task },
|
|
807
|
+
})
|
|
808
|
+
|
|
809
|
+
const style = {
|
|
810
|
+
transform: CSS.Transform.toString(transform),
|
|
811
|
+
transition,
|
|
812
|
+
opacity: isDragging ? 0.5 : 1,
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
return (
|
|
816
|
+
<div ref={setNodeRef} style={style}>
|
|
817
|
+
<KanbanCardContent
|
|
818
|
+
task={task}
|
|
819
|
+
currentStatus={currentStatus}
|
|
820
|
+
onMove={onMove}
|
|
821
|
+
onArchive={onArchive}
|
|
822
|
+
onEdit={onEdit}
|
|
823
|
+
onDelete={onDelete}
|
|
824
|
+
onView={onView}
|
|
825
|
+
dragHandleProps={{ ...attributes, ...listeners }}
|
|
826
|
+
/>
|
|
827
|
+
</div>
|
|
828
|
+
)
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/* Kanban Card Content Component */
|
|
832
|
+
interface KanbanCardContentProps {
|
|
833
|
+
task: FlowTask
|
|
834
|
+
currentStatus: FlowTaskStatus
|
|
835
|
+
onMove?: (newStatus: FlowTaskStatus) => void
|
|
836
|
+
onArchive?: () => void
|
|
837
|
+
onEdit?: () => void
|
|
838
|
+
onDelete?: () => void
|
|
839
|
+
onView?: () => void
|
|
840
|
+
dragHandleProps?: Record<string, unknown>
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
function KanbanCardContent({ task, currentStatus, onMove, onArchive, onEdit, onDelete, onView, dragHandleProps }: KanbanCardContentProps) {
|
|
844
|
+
const tags = task.tags ? (typeof task.tags === 'string' ? JSON.parse(task.tags) : task.tags) as string[] : []
|
|
845
|
+
const moveOptions = STATUS_ORDER.filter(s => s !== currentStatus)
|
|
846
|
+
|
|
847
|
+
return (
|
|
848
|
+
<Card className="mb-1.5 py-0 gap-0">
|
|
849
|
+
<CardContent className="!px-2.5 !py-3.5">
|
|
850
|
+
<div className="flex items-start gap-2">
|
|
851
|
+
{/* Drag Handle */}
|
|
852
|
+
<button
|
|
853
|
+
className="mt-1 cursor-grab text-muted-foreground hover:text-foreground active:cursor-grabbing touch-none"
|
|
854
|
+
{...dragHandleProps}
|
|
855
|
+
>
|
|
856
|
+
<GripVertical className="h-4 w-4" />
|
|
857
|
+
</button>
|
|
858
|
+
|
|
859
|
+
<div className="flex-1 min-w-0">
|
|
860
|
+
{/* Header: Priority & ID & Menu */}
|
|
861
|
+
<div className="flex items-center justify-between">
|
|
862
|
+
<div className="flex items-center gap-2">
|
|
863
|
+
<span
|
|
864
|
+
className={cn('w-2 h-2 rounded-full', PRIORITY_COLORS[task.priority])}
|
|
865
|
+
title={task.priority}
|
|
866
|
+
/>
|
|
867
|
+
<span className="text-xs text-muted-foreground font-mono">
|
|
868
|
+
#{task.id}
|
|
869
|
+
</span>
|
|
870
|
+
</div>
|
|
871
|
+
|
|
872
|
+
{onEdit && onDelete && (
|
|
873
|
+
<DropdownMenu>
|
|
874
|
+
<DropdownMenuTrigger asChild>
|
|
875
|
+
<Button variant="ghost" size="sm" className="h-6 w-6 p-0">
|
|
876
|
+
<MoreVertical className="h-3 w-3" />
|
|
877
|
+
</Button>
|
|
878
|
+
</DropdownMenuTrigger>
|
|
879
|
+
<DropdownMenuContent align="end">
|
|
880
|
+
<DropdownMenuItem onClick={onEdit}>
|
|
881
|
+
<Pencil className="mr-2 h-3 w-3" />
|
|
882
|
+
Edit
|
|
883
|
+
</DropdownMenuItem>
|
|
884
|
+
|
|
885
|
+
{onMove && (
|
|
886
|
+
<DropdownMenuSub>
|
|
887
|
+
<DropdownMenuSubTrigger>
|
|
888
|
+
<ArrowRight className="mr-2 h-3 w-3" />
|
|
889
|
+
Move to
|
|
890
|
+
</DropdownMenuSubTrigger>
|
|
891
|
+
<DropdownMenuSubContent>
|
|
892
|
+
{moveOptions.map((targetStatus) => (
|
|
893
|
+
<DropdownMenuItem
|
|
894
|
+
key={targetStatus}
|
|
895
|
+
onClick={() => onMove(targetStatus)}
|
|
896
|
+
>
|
|
897
|
+
{STATUS_LABELS[targetStatus]}
|
|
898
|
+
</DropdownMenuItem>
|
|
899
|
+
))}
|
|
900
|
+
</DropdownMenuSubContent>
|
|
901
|
+
</DropdownMenuSub>
|
|
902
|
+
)}
|
|
903
|
+
|
|
904
|
+
{task.status === 'done' && onArchive && (
|
|
905
|
+
<DropdownMenuItem onClick={onArchive}>
|
|
906
|
+
<Archive className="mr-2 h-3 w-3" />
|
|
907
|
+
Archive
|
|
908
|
+
</DropdownMenuItem>
|
|
909
|
+
)}
|
|
910
|
+
<DropdownMenuSeparator />
|
|
911
|
+
<DropdownMenuItem className="text-destructive" onClick={onDelete}>
|
|
912
|
+
<Trash2 className="mr-2 h-3 w-3" />
|
|
913
|
+
Delete
|
|
914
|
+
</DropdownMenuItem>
|
|
915
|
+
</DropdownMenuContent>
|
|
916
|
+
</DropdownMenu>
|
|
917
|
+
)}
|
|
918
|
+
</div>
|
|
919
|
+
|
|
920
|
+
{/* Title - clickable */}
|
|
921
|
+
<button
|
|
922
|
+
className="text-sm font-medium mt-1 break-words text-left hover:text-primary transition-colors w-full"
|
|
923
|
+
onClick={onView}
|
|
924
|
+
>
|
|
925
|
+
{task.title}
|
|
926
|
+
</button>
|
|
927
|
+
|
|
928
|
+
{/* Description */}
|
|
929
|
+
{task.description && (
|
|
930
|
+
<p
|
|
931
|
+
className="text-xs text-muted-foreground mt-1 line-clamp-2 cursor-pointer hover:text-foreground transition-colors"
|
|
932
|
+
onClick={onView}
|
|
933
|
+
>
|
|
934
|
+
{task.description}
|
|
935
|
+
</p>
|
|
936
|
+
)}
|
|
937
|
+
|
|
938
|
+
{/* Tags */}
|
|
939
|
+
{tags.length > 0 && (
|
|
940
|
+
<div className="flex flex-wrap gap-1 mt-2">
|
|
941
|
+
{tags.map((tag) => (
|
|
942
|
+
<Badge key={tag} variant="secondary" className="text-xs px-1.5 py-0">
|
|
943
|
+
{tag}
|
|
944
|
+
</Badge>
|
|
945
|
+
))}
|
|
946
|
+
</div>
|
|
947
|
+
)}
|
|
948
|
+
|
|
949
|
+
{/* Assignee */}
|
|
950
|
+
{task.assignee && (
|
|
951
|
+
<p className="text-xs text-muted-foreground mt-2">
|
|
952
|
+
@{task.assignee}
|
|
953
|
+
</p>
|
|
954
|
+
)}
|
|
955
|
+
</div>
|
|
956
|
+
</div>
|
|
957
|
+
</CardContent>
|
|
958
|
+
</Card>
|
|
959
|
+
)
|
|
960
|
+
}
|