Skip to content

Commit 46aeda8

Browse files
authored
Merge pull request #16 from GraphDone/develop
Release v0.2.2-alpha: Edge Labels and Enhanced Graph Interactions
2 parents 9ccc1c9 + cec091f commit 46aeda8

28 files changed

Lines changed: 3108 additions & 992 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: [main, development]
7+
branches: [main, develop]
88

99
# Prevent duplicate runs
1010
concurrency:
@@ -225,7 +225,7 @@ jobs:
225225
name: Build for Deployment
226226
runs-on: ubuntu-latest
227227
needs: [lint-and-typecheck, security-scan, test-core, test-server, test-web, test-mcp-server]
228-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development'
228+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
229229
steps:
230230
- name: Checkout code
231231
uses: actions/checkout@v4

docs/graphdone_ui.png

1.03 MB
Loading

packages/server/src/schema/neo4j-schema.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ export const typeDefs = gql`
147147
INTERVIEW
148148
PERFORMANCE_REVIEW
149149
TEAM_BUILDING
150+
151+
# Default Type
152+
DEFAULT
150153
VACATION_REQUEST
151154
152155
# Creative & Design
@@ -172,11 +175,13 @@ export const typeDefs = gql`
172175
}
173176
174177
enum NodeStatus {
178+
NOT_STARTED
175179
PROPOSED
176180
PLANNED
177-
ACTIVE
178181
IN_PROGRESS
182+
IN_REVIEW
179183
BLOCKED
184+
ON_HOLD
180185
COMPLETED
181186
CANCELLED
182187
}
@@ -188,6 +193,7 @@ export const typeDefs = gql`
188193
RELATES_TO
189194
IS_PART_OF
190195
FOLLOWS
196+
DEFAULT_EDGE
191197
PARALLEL_WITH
192198
DUPLICATES
193199
CONFLICTS_WITH
@@ -325,7 +331,7 @@ export const typeDefs = gql`
325331
priorityIndiv: Float! @default(value: 0.0)
326332
priorityComm: Float! @default(value: 0.0)
327333
priorityComp: Float! @default(value: 0.0)
328-
status: NodeStatus! @default(value: PROPOSED)
334+
status: NodeStatus! @default(value: NOT_STARTED)
329335
dueDate: DateTime
330336
tags: [String!]
331337
metadata: String # JSON as string

packages/web/src/App.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Admin } from './pages/Admin';
99
import { Backend } from './pages/Backend';
1010
import { LoginForm } from './pages/LoginForm';
1111
import { Signup } from './pages/Signup';
12-
import { GraphVisualization } from './components/GraphVisualization';
12+
import { InteractiveGraphVisualization } from './components/InteractiveGraphVisualization';
1313
import { AuthProvider, useAuth } from './contexts/AuthContext';
1414
import { GraphProvider } from './contexts/GraphContext';
1515
import { NotificationProvider } from './contexts/NotificationContext';
@@ -58,18 +58,22 @@ function AuthenticatedApp() {
5858
return (
5959
<NotificationProvider>
6060
<GraphProvider>
61-
<Layout>
62-
<Routes>
63-
<Route path="/" element={<Workspace />} />
64-
<Route path="/graph" element={<div className="h-screen"><GraphVisualization /></div>} />
65-
<Route path="/ontology" element={<Ontology />} />
66-
<Route path="/agents" element={<Agents />} />
67-
<Route path="/analytics" element={<Analytics />} />
68-
<Route path="/settings" element={<Settings />} />
69-
<Route path="/admin" element={<Admin />} />
70-
<Route path="/backend" element={<Backend />} />
71-
</Routes>
72-
</Layout>
61+
<Routes>
62+
<Route path="/graph" element={<div className="h-screen overflow-hidden"><InteractiveGraphVisualization /></div>} />
63+
<Route path="/*" element={
64+
<Layout>
65+
<Routes>
66+
<Route path="/" element={<Workspace />} />
67+
<Route path="/ontology" element={<Ontology />} />
68+
<Route path="/agents" element={<Agents />} />
69+
<Route path="/analytics" element={<Analytics />} />
70+
<Route path="/settings" element={<Settings />} />
71+
<Route path="/admin" element={<Admin />} />
72+
<Route path="/backend" element={<Backend />} />
73+
</Routes>
74+
</Layout>
75+
} />
76+
</Routes>
7377
</GraphProvider>
7478
</NotificationProvider>
7579
);

packages/web/src/components/ActivityFeed.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState, useMemo, useEffect } from 'react';
22
import { Clock, User, MessageSquare, AlertCircle, Filter, Search, Trash2, Eye, TrendingUp, UserPlus, Target, Flag, Bell, BellOff, ChevronDown, Calendar } from 'lucide-react';
3-
import { getStatusConfig, WorkItemStatus, getTypeConfig, WorkItemType, getPriorityConfig, STATUS_OPTIONS, PRIORITY_OPTIONS, TYPE_OPTIONS } from '../constants/workItemConstants';
3+
import { getStatusConfig, WorkItemStatus, getTypeConfig, WorkItemType, getPriorityConfig, STATUS_OPTIONS, PRIORITY_OPTIONS, TYPE_OPTIONS, WORK_ITEM_PRIORITIES, WORK_ITEM_STATUSES, WORK_ITEM_TYPES } from '../constants/workItemConstants';
44

55
interface WorkItem {
66
id: string;
@@ -389,7 +389,7 @@ const ActivityFeed: React.FC<ActivityFeedProps> = ({ filteredNodes }) => {
389389
<h2 className="text-2xl font-bold text-white mb-1">Activity Feed</h2>
390390
<div className="flex items-center space-x-3 text-sm">
391391
<div className="flex items-center space-x-2">
392-
<div className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
392+
<div className={`w-2 h-2 ${WORK_ITEM_STATUSES.COMPLETED.color.replace('text-', 'bg-')} rounded-full animate-pulse`} />
393393
<span className="text-gray-400">{filteredActivities.length} activities</span>
394394
</div>
395395
<div className="text-gray-500"></div>
@@ -619,7 +619,7 @@ const ActivityFeed: React.FC<ActivityFeedProps> = ({ filteredNodes }) => {
619619
key={activity.id}
620620
className={`bg-gray-800 rounded-lg border transition-all duration-200 cursor-pointer ${
621621
isSelected
622-
? 'border-green-500 bg-green-500/5 shadow-lg shadow-green-500/10'
622+
? `${WORK_ITEM_STATUSES.COMPLETED.borderColor} ${WORK_ITEM_STATUSES.COMPLETED.bgColor} shadow-lg shadow-green-500/10`
623623
: 'border-gray-700 hover:border-gray-600 hover:bg-gray-750'
624624
}`}
625625
onClick={() => setSelectedActivity(isSelected ? null : activity.id)}
@@ -646,8 +646,8 @@ const ActivityFeed: React.FC<ActivityFeedProps> = ({ filteredNodes }) => {
646646
) : null;
647647
})()}
648648
<span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-medium ${
649-
activity.category === 'task' ? 'bg-blue-500/10 text-blue-400 border border-blue-400/20' :
650-
activity.category === 'user' ? 'bg-purple-500/10 text-purple-400 border border-purple-400/20' :
649+
activity.category === 'task' ? `${WORK_ITEM_TYPES.TASK.bgColor} ${WORK_ITEM_TYPES.TASK.color} ${WORK_ITEM_TYPES.TASK.borderColor}` :
650+
activity.category === 'user' ? `${WORK_ITEM_TYPES.EPIC.bgColor} ${WORK_ITEM_TYPES.EPIC.color} ${WORK_ITEM_TYPES.EPIC.borderColor}` :
651651
'bg-gray-500/10 text-gray-400 border border-gray-400/20'
652652
}`}>
653653
{activity.category}
@@ -656,7 +656,7 @@ const ActivityFeed: React.FC<ActivityFeedProps> = ({ filteredNodes }) => {
656656
<div className="flex items-center space-x-3">
657657
<span className="text-xs text-gray-400 font-medium">{getTimeAgo(activity.timestamp)}</span>
658658
{isSelected && (
659-
<div className="p-1 rounded-full bg-green-500/10">
659+
<div className={`p-1 rounded-full ${WORK_ITEM_STATUSES.COMPLETED.bgColor}`}>
660660
<Eye className="h-3 w-3 text-green-400" />
661661
</div>
662662
)}
@@ -688,11 +688,11 @@ const ActivityFeed: React.FC<ActivityFeedProps> = ({ filteredNodes }) => {
688688
{activity.metadata.oldValue && activity.metadata.newValue && (
689689
<div className="flex items-center space-x-2 text-xs">
690690
<span className="text-gray-400">Changed from:</span>
691-
<span className="px-2 py-1 bg-red-500/10 text-red-400 rounded">
691+
<span className={`px-2 py-1 ${WORK_ITEM_STATUSES.BLOCKED.bgColor} ${WORK_ITEM_STATUSES.BLOCKED.color} rounded`}>
692692
{activity.metadata.oldValue}
693693
</span>
694694
<span className="text-gray-400">to:</span>
695-
<span className="px-2 py-1 bg-green-500/10 text-green-400 rounded">
695+
<span className={`px-2 py-1 ${WORK_ITEM_STATUSES.COMPLETED.bgColor} ${WORK_ITEM_STATUSES.COMPLETED.color} rounded`}>
696696
{activity.metadata.newValue}
697697
</span>
698698
</div>

packages/web/src/components/CalendarView.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState, useMemo, useCallback, useEffect } from 'react';
22
import { ChevronLeft, ChevronRight, Calendar, Clock, CheckCircle, Filter, Eye, Plus, MoreHorizontal, User, Flag, Target, CalendarDays, ChevronDown, Search } from 'lucide-react';
3-
import { getStatusConfig, WorkItemStatus, getTypeConfig, WorkItemType, getPriorityConfig, STATUS_OPTIONS, PRIORITY_OPTIONS, TYPE_OPTIONS } from '../constants/workItemConstants';
3+
import { getStatusConfig, WorkItemStatus, getTypeConfig, WorkItemType, getPriorityConfig, STATUS_OPTIONS, PRIORITY_OPTIONS, TYPE_OPTIONS, WORK_ITEM_PRIORITIES, WORK_ITEM_STATUSES } from '../constants/workItemConstants';
44

55
interface WorkItem {
66
id: string;
@@ -459,7 +459,7 @@ const CalendarViewComponent: React.FC<CalendarViewProps> = ({ filteredNodes }) =
459459
min-h-[120px] p-3 border-2 rounded-lg transition-all duration-200 cursor-pointer
460460
${isCurrentMonthDay ? 'bg-gray-700' : 'bg-gray-800/50'}
461461
${isTodayDay ? 'ring-2 ring-green-500' : ''}
462-
${isSelected ? 'ring-2 ring-blue-500 bg-blue-500/10' : ''}
462+
${isSelected ? `ring-2 ring-blue-400 ${WORK_ITEM_PRIORITIES.moderate.bgColor}` : ''}
463463
${taskCount > 0 ? priorityColor : 'border-gray-600'}
464464
hover:bg-gray-600 hover:border-gray-500
465465
`}
@@ -474,10 +474,10 @@ const CalendarViewComponent: React.FC<CalendarViewProps> = ({ filteredNodes }) =
474474
{taskCount > 0 && (
475475
<div className="flex items-center space-x-1">
476476
<div className={`w-2 h-2 rounded-full ${
477-
highestPriority >= 0.8 ? 'bg-red-500' :
478-
highestPriority >= 0.6 ? 'bg-orange-500' :
479-
highestPriority >= 0.4 ? 'bg-yellow-500' :
480-
highestPriority >= 0.2 ? 'bg-blue-500' : 'bg-gray-500'
477+
highestPriority >= 0.8 ? WORK_ITEM_PRIORITIES.critical.color.replace('text-', 'bg-') :
478+
highestPriority >= 0.6 ? WORK_ITEM_PRIORITIES.high.color.replace('text-', 'bg-') :
479+
highestPriority >= 0.4 ? WORK_ITEM_PRIORITIES.moderate.color.replace('text-', 'bg-') :
480+
highestPriority >= 0.2 ? WORK_ITEM_PRIORITIES.low.color.replace('text-', 'bg-') : 'bg-gray-500'
481481
}`} title={`Highest priority: ${Math.round(highestPriority * 100)}%`} />
482482
<span className="text-xs text-gray-400">{taskCount}</span>
483483
</div>
@@ -500,7 +500,7 @@ const CalendarViewComponent: React.FC<CalendarViewProps> = ({ filteredNodes }) =
500500
}}
501501
className={`text-xs px-2 py-1 rounded-md truncate transition-all cursor-pointer border ${
502502
selectedTask === node.id
503-
? 'border-green-500 bg-green-500/20'
503+
? `${WORK_ITEM_STATUSES.COMPLETED.borderColor} ${WORK_ITEM_STATUSES.COMPLETED.bgColor}`
504504
: `${statusConfig.bgColor} ${statusConfig.color} border-transparent hover:border-gray-400`
505505
}`}
506506
title={`${node.title}\nType: ${node.type}\nStatus: ${node.status.replace('_', ' ')}\nPriority: ${Math.round(priority * 100)}%\nDue: ${node.dueDate ? new Date(node.dueDate).toLocaleDateString() : 'No due date'}`}

packages/web/src/components/CardView.tsx

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {
99
getTypeConfig,
1010
getStatusConfig,
1111
getTypeIconElement,
12-
getStatusIconElement
12+
getStatusIconElement,
13+
getContributorColor,
14+
getDueDateColorScheme
1315
} from '../constants/workItemConstants';
1416
import { TagDisplay } from './TagDisplay';
1517
import { AnimatedPriority } from './AnimatedPriority';
@@ -60,15 +62,6 @@ const getNodePriority = (node: WorkItem) => {
6062
return node.priorityExec || 0;
6163
};
6264

63-
const getContributorColor = (name: string) => {
64-
const colors = [
65-
'bg-blue-500', 'bg-green-500', 'bg-purple-500', 'bg-pink-500',
66-
'bg-indigo-500', 'bg-yellow-500', 'bg-red-500', 'bg-teal-500',
67-
'bg-orange-500', 'bg-cyan-500', 'bg-emerald-500', 'bg-violet-500'
68-
];
69-
const hash = name.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);
70-
return colors[hash % colors.length];
71-
};
7265

7366
const getContributorAvatar = (contributor?: string) => {
7467
if (!contributor) return null;
@@ -176,26 +169,14 @@ const CardView: React.FC<CardViewProps> = ({ filteredNodes, handleEditNode, hand
176169
<div className="flex flex-col items-start justify-center mr-2">
177170
{node.dueDate ? (
178171
<div className="space-y-1 text-left">
179-
<div className={`inline-flex items-center px-2 py-1 text-xs font-medium rounded-md shadow-sm ${
180-
new Date(node.dueDate) < new Date()
181-
? 'bg-red-100 text-red-800 border border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800'
182-
: new Date(node.dueDate).getTime() - new Date().getTime() < 7 * 24 * 60 * 60 * 1000
183-
? 'bg-amber-100 text-amber-800 border border-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:border-amber-800'
184-
: 'bg-blue-100 text-blue-800 border border-blue-200 dark:bg-blue-900/30 dark:text-blue-400 dark:border-blue-800'
185-
}`}>
172+
<div className={`inline-flex items-center px-2 py-1 text-xs font-medium rounded-md shadow-sm ${getDueDateColorScheme(node.dueDate).bg} ${getDueDateColorScheme(node.dueDate).border} ${getDueDateColorScheme(node.dueDate).text}`}>
186173
{new Date(node.dueDate).toLocaleDateString('en-US', {
187174
month: 'short',
188175
day: 'numeric',
189176
year: 'numeric'
190177
})}
191178
</div>
192-
<div className={`text-xs font-medium ${
193-
new Date(node.dueDate) < new Date()
194-
? 'text-red-600 dark:text-red-400'
195-
: new Date(node.dueDate).getTime() - new Date().getTime() < 7 * 24 * 60 * 60 * 1000
196-
? 'text-amber-600 dark:text-amber-400'
197-
: 'text-blue-600 dark:text-blue-400'
198-
}`}>
179+
<div className={`text-xs font-medium ${getDueDateColorScheme(node.dueDate).textSecondary}`}>
199180
{(() => {
200181
const today = new Date();
201182
const due = new Date(node.dueDate);
@@ -218,10 +199,10 @@ const CardView: React.FC<CardViewProps> = ({ filteredNodes, handleEditNode, hand
218199
</div>
219200
) : (
220201
<div className="space-y-1 text-left">
221-
<div className="inline-flex items-center px-2 py-1 bg-gray-100 border border-gray-200 text-gray-600 text-xs font-medium rounded-md dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400">
202+
<div className={`inline-flex items-center px-2 py-1 text-xs font-medium rounded-md ${getDueDateColorScheme().bg} ${getDueDateColorScheme().border} ${getDueDateColorScheme().text}`}>
222203
No due date
223204
</div>
224-
<div className="text-xs text-gray-500 dark:text-gray-400">
205+
<div className={`text-xs ${getDueDateColorScheme().textSecondary}`}>
225206
Schedule recommended
226207
</div>
227208
</div>

0 commit comments

Comments
 (0)