@agile-vibe-coding/avc 0.1.1 → 0.2.3
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/cli/agent-loader.js +21 -0
- package/cli/agents/agent-selector.md +129 -0
- package/cli/agents/architecture-recommender.md +418 -0
- package/cli/agents/database-deep-dive.md +470 -0
- package/cli/agents/database-recommender.md +634 -0
- package/cli/agents/doc-distributor.md +176 -0
- package/cli/agents/documentation-updater.md +203 -0
- package/cli/agents/epic-story-decomposer.md +280 -0
- package/cli/agents/feature-context-generator.md +91 -0
- package/cli/agents/gap-checker-epic.md +52 -0
- package/cli/agents/impact-checker-story.md +51 -0
- package/cli/agents/migration-guide-generator.md +305 -0
- package/cli/agents/mission-scope-generator.md +79 -0
- package/cli/agents/mission-scope-validator.md +112 -0
- package/cli/agents/project-context-extractor.md +107 -0
- package/cli/agents/project-documentation-creator.json +226 -0
- package/cli/agents/project-documentation-creator.md +595 -0
- package/cli/agents/question-prefiller.md +269 -0
- package/cli/agents/refiner-epic.md +39 -0
- package/cli/agents/refiner-story.md +42 -0
- package/cli/agents/solver-epic-api.json +15 -0
- package/cli/agents/solver-epic-api.md +39 -0
- package/cli/agents/solver-epic-backend.json +15 -0
- package/cli/agents/solver-epic-backend.md +39 -0
- package/cli/agents/solver-epic-cloud.json +15 -0
- package/cli/agents/solver-epic-cloud.md +39 -0
- package/cli/agents/solver-epic-data.json +15 -0
- package/cli/agents/solver-epic-data.md +39 -0
- package/cli/agents/solver-epic-database.json +15 -0
- package/cli/agents/solver-epic-database.md +39 -0
- package/cli/agents/solver-epic-developer.json +15 -0
- package/cli/agents/solver-epic-developer.md +39 -0
- package/cli/agents/solver-epic-devops.json +15 -0
- package/cli/agents/solver-epic-devops.md +39 -0
- package/cli/agents/solver-epic-frontend.json +15 -0
- package/cli/agents/solver-epic-frontend.md +39 -0
- package/cli/agents/solver-epic-mobile.json +15 -0
- package/cli/agents/solver-epic-mobile.md +39 -0
- package/cli/agents/solver-epic-qa.json +15 -0
- package/cli/agents/solver-epic-qa.md +39 -0
- package/cli/agents/solver-epic-security.json +15 -0
- package/cli/agents/solver-epic-security.md +39 -0
- package/cli/agents/solver-epic-solution-architect.json +15 -0
- package/cli/agents/solver-epic-solution-architect.md +39 -0
- package/cli/agents/solver-epic-test-architect.json +15 -0
- package/cli/agents/solver-epic-test-architect.md +39 -0
- package/cli/agents/solver-epic-ui.json +15 -0
- package/cli/agents/solver-epic-ui.md +39 -0
- package/cli/agents/solver-epic-ux.json +15 -0
- package/cli/agents/solver-epic-ux.md +39 -0
- package/cli/agents/solver-story-api.json +15 -0
- package/cli/agents/solver-story-api.md +39 -0
- package/cli/agents/solver-story-backend.json +15 -0
- package/cli/agents/solver-story-backend.md +39 -0
- package/cli/agents/solver-story-cloud.json +15 -0
- package/cli/agents/solver-story-cloud.md +39 -0
- package/cli/agents/solver-story-data.json +15 -0
- package/cli/agents/solver-story-data.md +39 -0
- package/cli/agents/solver-story-database.json +15 -0
- package/cli/agents/solver-story-database.md +39 -0
- package/cli/agents/solver-story-developer.json +15 -0
- package/cli/agents/solver-story-developer.md +39 -0
- package/cli/agents/solver-story-devops.json +15 -0
- package/cli/agents/solver-story-devops.md +39 -0
- package/cli/agents/solver-story-frontend.json +15 -0
- package/cli/agents/solver-story-frontend.md +39 -0
- package/cli/agents/solver-story-mobile.json +15 -0
- package/cli/agents/solver-story-mobile.md +39 -0
- package/cli/agents/solver-story-qa.json +15 -0
- package/cli/agents/solver-story-qa.md +39 -0
- package/cli/agents/solver-story-security.json +15 -0
- package/cli/agents/solver-story-security.md +39 -0
- package/cli/agents/solver-story-solution-architect.json +15 -0
- package/cli/agents/solver-story-solution-architect.md +39 -0
- package/cli/agents/solver-story-test-architect.json +15 -0
- package/cli/agents/solver-story-test-architect.md +39 -0
- package/cli/agents/solver-story-ui.json +15 -0
- package/cli/agents/solver-story-ui.md +39 -0
- package/cli/agents/solver-story-ux.json +15 -0
- package/cli/agents/solver-story-ux.md +39 -0
- package/cli/agents/story-doc-enricher.md +133 -0
- package/cli/agents/suggestion-business-analyst.md +88 -0
- package/cli/agents/suggestion-deployment-architect.md +263 -0
- package/cli/agents/suggestion-product-manager.md +129 -0
- package/cli/agents/suggestion-security-specialist.md +156 -0
- package/cli/agents/suggestion-technical-architect.md +269 -0
- package/cli/agents/suggestion-ux-researcher.md +93 -0
- package/cli/agents/task-subtask-decomposer.md +188 -0
- package/cli/agents/validator-documentation.json +152 -0
- package/cli/agents/validator-documentation.md +453 -0
- package/cli/agents/validator-epic-api.json +93 -0
- package/cli/agents/validator-epic-api.md +137 -0
- package/cli/agents/validator-epic-backend.json +93 -0
- package/cli/agents/validator-epic-backend.md +130 -0
- package/cli/agents/validator-epic-cloud.json +93 -0
- package/cli/agents/validator-epic-cloud.md +137 -0
- package/cli/agents/validator-epic-data.json +93 -0
- package/cli/agents/validator-epic-data.md +130 -0
- package/cli/agents/validator-epic-database.json +93 -0
- package/cli/agents/validator-epic-database.md +137 -0
- package/cli/agents/validator-epic-developer.json +74 -0
- package/cli/agents/validator-epic-developer.md +153 -0
- package/cli/agents/validator-epic-devops.json +74 -0
- package/cli/agents/validator-epic-devops.md +153 -0
- package/cli/agents/validator-epic-frontend.json +74 -0
- package/cli/agents/validator-epic-frontend.md +153 -0
- package/cli/agents/validator-epic-mobile.json +93 -0
- package/cli/agents/validator-epic-mobile.md +130 -0
- package/cli/agents/validator-epic-qa.json +93 -0
- package/cli/agents/validator-epic-qa.md +130 -0
- package/cli/agents/validator-epic-security.json +74 -0
- package/cli/agents/validator-epic-security.md +154 -0
- package/cli/agents/validator-epic-solution-architect.json +74 -0
- package/cli/agents/validator-epic-solution-architect.md +156 -0
- package/cli/agents/validator-epic-test-architect.json +93 -0
- package/cli/agents/validator-epic-test-architect.md +130 -0
- package/cli/agents/validator-epic-ui.json +93 -0
- package/cli/agents/validator-epic-ui.md +130 -0
- package/cli/agents/validator-epic-ux.json +93 -0
- package/cli/agents/validator-epic-ux.md +130 -0
- package/cli/agents/validator-selector.md +211 -0
- package/cli/agents/validator-story-api.json +104 -0
- package/cli/agents/validator-story-api.md +152 -0
- package/cli/agents/validator-story-backend.json +104 -0
- package/cli/agents/validator-story-backend.md +152 -0
- package/cli/agents/validator-story-cloud.json +104 -0
- package/cli/agents/validator-story-cloud.md +152 -0
- package/cli/agents/validator-story-data.json +104 -0
- package/cli/agents/validator-story-data.md +152 -0
- package/cli/agents/validator-story-database.json +104 -0
- package/cli/agents/validator-story-database.md +152 -0
- package/cli/agents/validator-story-developer.json +104 -0
- package/cli/agents/validator-story-developer.md +152 -0
- package/cli/agents/validator-story-devops.json +104 -0
- package/cli/agents/validator-story-devops.md +152 -0
- package/cli/agents/validator-story-frontend.json +104 -0
- package/cli/agents/validator-story-frontend.md +152 -0
- package/cli/agents/validator-story-mobile.json +104 -0
- package/cli/agents/validator-story-mobile.md +152 -0
- package/cli/agents/validator-story-qa.json +104 -0
- package/cli/agents/validator-story-qa.md +152 -0
- package/cli/agents/validator-story-security.json +104 -0
- package/cli/agents/validator-story-security.md +152 -0
- package/cli/agents/validator-story-solution-architect.json +104 -0
- package/cli/agents/validator-story-solution-architect.md +152 -0
- package/cli/agents/validator-story-test-architect.json +104 -0
- package/cli/agents/validator-story-test-architect.md +152 -0
- package/cli/agents/validator-story-ui.json +104 -0
- package/cli/agents/validator-story-ui.md +152 -0
- package/cli/agents/validator-story-ux.json +104 -0
- package/cli/agents/validator-story-ux.md +152 -0
- package/cli/ansi-colors.js +21 -0
- package/cli/build-docs.js +29 -8
- package/cli/ceremony-history.js +369 -0
- package/cli/command-logger.js +49 -12
- package/cli/components/static-output.js +63 -0
- package/cli/console-output-manager.js +94 -0
- package/cli/docs-sync.js +306 -0
- package/cli/epic-story-validator.js +1174 -0
- package/cli/evaluation-prompts.js +1008 -0
- package/cli/execution-context.js +195 -0
- package/cli/generate-summary-table.js +340 -0
- package/cli/index.js +0 -0
- package/cli/init-model-config.js +697 -0
- package/cli/init.js +1311 -274
- package/cli/kanban-server-manager.js +228 -0
- package/cli/llm-claude.js +83 -1
- package/cli/llm-gemini.js +85 -0
- package/cli/llm-mock.js +233 -0
- package/cli/llm-openai.js +233 -0
- package/cli/llm-provider.js +240 -3
- package/cli/llm-token-limits.js +102 -0
- package/cli/llm-verifier.js +454 -0
- package/cli/message-constants.js +58 -0
- package/cli/message-manager.js +334 -0
- package/cli/message-types.js +96 -0
- package/cli/messaging-api.js +297 -0
- package/cli/model-pricing.js +169 -0
- package/cli/model-query-engine.js +468 -0
- package/cli/model-recommendation-analyzer.js +495 -0
- package/cli/model-selector.js +269 -0
- package/cli/output-buffer.js +107 -0
- package/cli/process-manager.js +73 -2
- package/cli/repl-ink.js +4988 -1217
- package/cli/repl-old.js +4 -4
- package/cli/seed-processor.js +792 -0
- package/cli/sprint-planning-processor.js +1813 -0
- package/cli/template-processor.js +2102 -105
- package/cli/templates/project.md +25 -8
- package/cli/templates/vitepress-config.mts.template +5 -4
- package/cli/token-tracker.js +520 -0
- package/cli/tools/generate-story-validators.js +317 -0
- package/cli/tools/generate-validators.js +669 -0
- package/cli/update-checker.js +19 -17
- package/cli/update-notifier.js +4 -4
- package/cli/validation-router.js +605 -0
- package/cli/verification-tracker.js +563 -0
- package/kanban/README.md +386 -0
- package/kanban/client/README.md +205 -0
- package/kanban/client/components.json +20 -0
- package/kanban/client/dist/assets/index-CiD8PS2e.js +306 -0
- package/kanban/client/dist/assets/index-nLh0m82Q.css +1 -0
- package/kanban/client/dist/index.html +16 -0
- package/kanban/client/dist/vite.svg +1 -0
- package/kanban/client/index.html +15 -0
- package/kanban/client/package-lock.json +9442 -0
- package/kanban/client/package.json +44 -0
- package/kanban/client/postcss.config.js +6 -0
- package/kanban/client/public/vite.svg +1 -0
- package/kanban/client/src/App.jsx +622 -0
- package/kanban/client/src/components/ProjectFileEditorPopup.jsx +117 -0
- package/kanban/client/src/components/ceremony/AskArchPopup.jsx +416 -0
- package/kanban/client/src/components/ceremony/AskModelPopup.jsx +616 -0
- package/kanban/client/src/components/ceremony/CeremonyWorkflowModal.jsx +946 -0
- package/kanban/client/src/components/ceremony/EpicStorySelectionModal.jsx +254 -0
- package/kanban/client/src/components/ceremony/SponsorCallModal.jsx +619 -0
- package/kanban/client/src/components/ceremony/SprintPlanningModal.jsx +704 -0
- package/kanban/client/src/components/ceremony/steps/ArchitectureStep.jsx +150 -0
- package/kanban/client/src/components/ceremony/steps/CompleteStep.jsx +154 -0
- package/kanban/client/src/components/ceremony/steps/DatabaseStep.jsx +202 -0
- package/kanban/client/src/components/ceremony/steps/DeploymentStep.jsx +123 -0
- package/kanban/client/src/components/ceremony/steps/MissionStep.jsx +106 -0
- package/kanban/client/src/components/ceremony/steps/ReviewAnswersStep.jsx +125 -0
- package/kanban/client/src/components/ceremony/steps/RunningStep.jsx +228 -0
- package/kanban/client/src/components/kanban/CardDetailModal.jsx +559 -0
- package/kanban/client/src/components/kanban/EpicSection.jsx +146 -0
- package/kanban/client/src/components/kanban/FilterToolbar.jsx +222 -0
- package/kanban/client/src/components/kanban/GroupingSelector.jsx +57 -0
- package/kanban/client/src/components/kanban/KanbanBoard.jsx +211 -0
- package/kanban/client/src/components/kanban/KanbanCard.jsx +138 -0
- package/kanban/client/src/components/kanban/KanbanColumn.jsx +90 -0
- package/kanban/client/src/components/kanban/RefineWorkItemPopup.jsx +789 -0
- package/kanban/client/src/components/layout/LoadingScreen.jsx +82 -0
- package/kanban/client/src/components/process/ProcessMonitorBar.jsx +80 -0
- package/kanban/client/src/components/settings/AgentEditorPopup.jsx +171 -0
- package/kanban/client/src/components/settings/AgentsTab.jsx +353 -0
- package/kanban/client/src/components/settings/ApiKeysTab.jsx +113 -0
- package/kanban/client/src/components/settings/CeremonyModelsTab.jsx +98 -0
- package/kanban/client/src/components/settings/CostThresholdsTab.jsx +94 -0
- package/kanban/client/src/components/settings/ModelPricingTab.jsx +204 -0
- package/kanban/client/src/components/settings/ServersTab.jsx +121 -0
- package/kanban/client/src/components/settings/SettingsModal.jsx +84 -0
- package/kanban/client/src/components/stats/CostModal.jsx +353 -0
- package/kanban/client/src/components/ui/badge.jsx +27 -0
- package/kanban/client/src/components/ui/dialog.jsx +121 -0
- package/kanban/client/src/components/ui/tabs.jsx +85 -0
- package/kanban/client/src/hooks/__tests__/useGrouping.test.js +232 -0
- package/kanban/client/src/hooks/useGrouping.js +118 -0
- package/kanban/client/src/hooks/useWebSocket.js +120 -0
- package/kanban/client/src/lib/__tests__/api.test.js +196 -0
- package/kanban/client/src/lib/__tests__/status-grouping.test.js +94 -0
- package/kanban/client/src/lib/api.js +401 -0
- package/kanban/client/src/lib/status-grouping.js +144 -0
- package/kanban/client/src/lib/utils.js +11 -0
- package/kanban/client/src/main.jsx +10 -0
- package/kanban/client/src/store/__tests__/kanbanStore.test.js +164 -0
- package/kanban/client/src/store/ceremonyStore.js +172 -0
- package/kanban/client/src/store/filterStore.js +201 -0
- package/kanban/client/src/store/kanbanStore.js +115 -0
- package/kanban/client/src/store/processStore.js +65 -0
- package/kanban/client/src/store/sprintPlanningStore.js +33 -0
- package/kanban/client/src/styles/globals.css +59 -0
- package/kanban/client/tailwind.config.js +77 -0
- package/kanban/client/vite.config.js +28 -0
- package/kanban/client/vitest.config.js +28 -0
- package/kanban/dev-start.sh +47 -0
- package/kanban/package.json +12 -0
- package/kanban/server/index.js +516 -0
- package/kanban/server/routes/ceremony.js +305 -0
- package/kanban/server/routes/costs.js +157 -0
- package/kanban/server/routes/processes.js +50 -0
- package/kanban/server/routes/settings.js +303 -0
- package/kanban/server/routes/websocket.js +276 -0
- package/kanban/server/routes/work-items.js +347 -0
- package/kanban/server/services/CeremonyService.js +1190 -0
- package/kanban/server/services/FileSystemScanner.js +95 -0
- package/kanban/server/services/FileWatcher.js +144 -0
- package/kanban/server/services/HierarchyBuilder.js +196 -0
- package/kanban/server/services/ProcessRegistry.js +122 -0
- package/kanban/server/services/WorkItemReader.js +123 -0
- package/kanban/server/services/WorkItemRefineService.js +510 -0
- package/kanban/server/start.js +49 -0
- package/kanban/server/utils/kanban-logger.js +132 -0
- package/kanban/server/utils/markdown.js +91 -0
- package/kanban/server/utils/status-grouping.js +107 -0
- package/kanban/server/workers/sponsor-call-worker.js +84 -0
- package/kanban/server/workers/sprint-planning-worker.js +130 -0
- package/package.json +18 -5
- package/cli/agents/documentation.md +0 -302
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { motion } from 'framer-motion';
|
|
2
|
+
import { Package, Target, Link2, AlertCircle } from 'lucide-react';
|
|
3
|
+
import { getStatusMetadata } from '../../lib/status-grouping';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Work item type metadata
|
|
8
|
+
*/
|
|
9
|
+
const TYPE_METADATA = {
|
|
10
|
+
epic: { color: 'indigo', icon: '🏛️', label: 'Epic' },
|
|
11
|
+
story: { color: 'blue', icon: '📖', label: 'Story' },
|
|
12
|
+
task: { color: 'emerald', icon: '⚙️', label: 'Task' },
|
|
13
|
+
subtask: { color: 'gray', icon: '📝', label: 'Subtask' },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Kanban Card Component
|
|
18
|
+
* Displays a work item as a card with status badge, type badge, and metadata
|
|
19
|
+
*/
|
|
20
|
+
export function KanbanCard({ workItem, onClick }) {
|
|
21
|
+
const statusMeta = getStatusMetadata(workItem.status);
|
|
22
|
+
const typeMeta = TYPE_METADATA[workItem.type] || TYPE_METADATA.task;
|
|
23
|
+
|
|
24
|
+
const isBlocked = workItem.status === 'blocked';
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<motion.div
|
|
28
|
+
initial={{ opacity: 0, y: 20 }}
|
|
29
|
+
animate={{ opacity: 1, y: 0 }}
|
|
30
|
+
exit={{ opacity: 0, y: -20 }}
|
|
31
|
+
transition={{ duration: 0.2, ease: 'easeOut' }}
|
|
32
|
+
whileHover={{ scale: 1.02, y: -2 }}
|
|
33
|
+
whileTap={{ scale: 0.98 }}
|
|
34
|
+
onClick={onClick}
|
|
35
|
+
className={cn(
|
|
36
|
+
'group cursor-pointer bg-white rounded-lg border shadow-sm',
|
|
37
|
+
'hover:shadow-lg transition-all duration-200',
|
|
38
|
+
isBlocked ? 'border-red-300' : 'border-slate-200'
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{/* Card Header */}
|
|
42
|
+
<div className="p-3 pb-2 border-b border-slate-100">
|
|
43
|
+
<div className="flex items-center justify-between gap-2">
|
|
44
|
+
{/* Status Badge */}
|
|
45
|
+
<div
|
|
46
|
+
className={cn(
|
|
47
|
+
'px-2 py-1 rounded-full text-xs font-medium',
|
|
48
|
+
statusMeta?.color === 'gray' && 'bg-gray-100 text-gray-700',
|
|
49
|
+
statusMeta?.color === 'slate' && 'bg-slate-100 text-slate-700',
|
|
50
|
+
statusMeta?.color === 'blue' && 'bg-blue-100 text-blue-700',
|
|
51
|
+
statusMeta?.color === 'yellow' && 'bg-yellow-100 text-yellow-700',
|
|
52
|
+
statusMeta?.color === 'amber' && 'bg-amber-100 text-amber-700',
|
|
53
|
+
statusMeta?.color === 'purple' && 'bg-purple-100 text-purple-700',
|
|
54
|
+
statusMeta?.color === 'violet' && 'bg-violet-100 text-violet-700',
|
|
55
|
+
statusMeta?.color === 'green' && 'bg-green-100 text-green-700',
|
|
56
|
+
statusMeta?.color === 'red' && 'bg-red-100 text-red-700'
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
{statusMeta?.icon} {statusMeta?.label}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
{/* Type Badge */}
|
|
63
|
+
<div
|
|
64
|
+
className={cn(
|
|
65
|
+
'px-2 py-1 rounded border text-xs font-medium',
|
|
66
|
+
typeMeta.color === 'indigo' &&
|
|
67
|
+
'border-indigo-300 bg-indigo-50 text-indigo-700',
|
|
68
|
+
typeMeta.color === 'blue' &&
|
|
69
|
+
'border-blue-300 bg-blue-50 text-blue-700',
|
|
70
|
+
typeMeta.color === 'emerald' &&
|
|
71
|
+
'border-emerald-300 bg-emerald-50 text-emerald-700',
|
|
72
|
+
typeMeta.color === 'gray' &&
|
|
73
|
+
'border-gray-300 bg-gray-50 text-gray-700'
|
|
74
|
+
)}
|
|
75
|
+
>
|
|
76
|
+
{typeMeta.label}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
{/* Card Content */}
|
|
82
|
+
<div className="p-3 pb-2">
|
|
83
|
+
{/* Blocked indicator */}
|
|
84
|
+
{isBlocked && (
|
|
85
|
+
<div className="flex items-center gap-2 mb-2 text-red-600 text-sm">
|
|
86
|
+
<AlertCircle className="w-4 h-4" />
|
|
87
|
+
<span className="font-medium">Blocked</span>
|
|
88
|
+
</div>
|
|
89
|
+
)}
|
|
90
|
+
|
|
91
|
+
{/* Title */}
|
|
92
|
+
<h4 className="font-semibold text-base text-slate-900 mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors">
|
|
93
|
+
{workItem.name}
|
|
94
|
+
</h4>
|
|
95
|
+
|
|
96
|
+
{/* Metadata */}
|
|
97
|
+
<div className="space-y-1 text-sm text-slate-600">
|
|
98
|
+
{/* Parent Epic */}
|
|
99
|
+
{workItem.epicName && workItem.type !== 'epic' && (
|
|
100
|
+
<div className="flex items-center gap-2">
|
|
101
|
+
<Package className="w-4 h-4 flex-shrink-0" />
|
|
102
|
+
<span className="truncate">Epic: {workItem.epicName}</span>
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
{/* Children count */}
|
|
107
|
+
{workItem.children && workItem.children.length > 0 && (
|
|
108
|
+
<div className="flex items-center gap-2">
|
|
109
|
+
<Target className="w-4 h-4 flex-shrink-0" />
|
|
110
|
+
<span>
|
|
111
|
+
{workItem.children.length}{' '}
|
|
112
|
+
{workItem.children.length === 1 ? 'child' : 'children'} •{' '}
|
|
113
|
+
{workItem.children.filter((c) => c.status === 'completed').length}{' '}
|
|
114
|
+
completed
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
)}
|
|
118
|
+
|
|
119
|
+
{/* Dependencies */}
|
|
120
|
+
{workItem.dependencies && workItem.dependencies.length > 0 && (
|
|
121
|
+
<div className="flex items-center gap-2">
|
|
122
|
+
<Link2 className="w-4 h-4 flex-shrink-0" />
|
|
123
|
+
<span>
|
|
124
|
+
{workItem.dependencies.length}{' '}
|
|
125
|
+
{workItem.dependencies.length === 1 ? 'dependency' : 'dependencies'}
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
128
|
+
)}
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
{/* Card Footer */}
|
|
133
|
+
<div className="px-3 py-2 border-t border-slate-100">
|
|
134
|
+
<span className="text-xs text-slate-400">{workItem.id}</span>
|
|
135
|
+
</div>
|
|
136
|
+
</motion.div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { motion } from 'framer-motion';
|
|
2
|
+
import { KanbanCard } from './KanbanCard';
|
|
3
|
+
import { getStatusMetadata, getColumnMetadata } from '../../lib/status-grouping';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Kanban Column Component
|
|
8
|
+
* Displays a column with grouped statuses and work items
|
|
9
|
+
*/
|
|
10
|
+
export function KanbanColumn({ columnName, statuses, workItems, onCardClick }) {
|
|
11
|
+
const columnMeta = getColumnMetadata(columnName);
|
|
12
|
+
|
|
13
|
+
// Count items by specific status within the column
|
|
14
|
+
const statusCounts = statuses.reduce((acc, status) => {
|
|
15
|
+
acc[status] = workItems.filter((item) => item.status === status).length;
|
|
16
|
+
return acc;
|
|
17
|
+
}, {});
|
|
18
|
+
|
|
19
|
+
const totalCount = workItems.length;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
className={cn(
|
|
24
|
+
'flex flex-col rounded-lg p-4 min-w-[320px] max-w-[380px]',
|
|
25
|
+
columnMeta?.bgColor || 'bg-slate-100'
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
{/* Column Header */}
|
|
29
|
+
<div className="flex items-center justify-between mb-3">
|
|
30
|
+
<h3 className="text-lg font-semibold text-slate-900">{columnName}</h3>
|
|
31
|
+
<span
|
|
32
|
+
className={cn(
|
|
33
|
+
'text-sm px-3 py-1 rounded-full font-medium',
|
|
34
|
+
columnMeta?.color === 'slate' && 'bg-slate-200 text-slate-700',
|
|
35
|
+
columnMeta?.color === 'blue' && 'bg-blue-200 text-blue-700',
|
|
36
|
+
columnMeta?.color === 'yellow' && 'bg-yellow-200 text-yellow-700',
|
|
37
|
+
columnMeta?.color === 'purple' && 'bg-purple-200 text-purple-700',
|
|
38
|
+
columnMeta?.color === 'green' && 'bg-green-200 text-green-700'
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{totalCount} {totalCount === 1 ? 'item' : 'items'}
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{/* Status Breakdown (if multiple statuses in column) */}
|
|
46
|
+
{statuses.length > 1 && totalCount > 0 && (
|
|
47
|
+
<div className="text-xs text-slate-600 mb-3 flex flex-wrap gap-2">
|
|
48
|
+
{statuses.map((status) => {
|
|
49
|
+
const count = statusCounts[status];
|
|
50
|
+
const statusMeta = getStatusMetadata(status);
|
|
51
|
+
if (count === 0) return null;
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<span key={status} className="flex items-center gap-1">
|
|
55
|
+
<span>{statusMeta?.icon}</span>
|
|
56
|
+
<span>
|
|
57
|
+
{statusMeta?.label}: {count}
|
|
58
|
+
</span>
|
|
59
|
+
</span>
|
|
60
|
+
);
|
|
61
|
+
})}
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{/* Cards Container */}
|
|
66
|
+
<div className="flex flex-col gap-3 overflow-y-auto flex-1 min-h-0">
|
|
67
|
+
{workItems.length === 0 ? (
|
|
68
|
+
<motion.div
|
|
69
|
+
initial={{ opacity: 0 }}
|
|
70
|
+
animate={{ opacity: 1 }}
|
|
71
|
+
className="flex items-center justify-center py-8 text-slate-400 text-sm"
|
|
72
|
+
>
|
|
73
|
+
No items
|
|
74
|
+
</motion.div>
|
|
75
|
+
) : (
|
|
76
|
+
workItems.map((item, index) => (
|
|
77
|
+
<motion.div
|
|
78
|
+
key={item.id}
|
|
79
|
+
initial={{ opacity: 0, y: 20 }}
|
|
80
|
+
animate={{ opacity: 1, y: 0 }}
|
|
81
|
+
transition={{ duration: 0.2, delay: index * 0.05 }}
|
|
82
|
+
>
|
|
83
|
+
<KanbanCard workItem={item} onClick={() => onCardClick?.(item)} />
|
|
84
|
+
</motion.div>
|
|
85
|
+
))
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|