Skip to content

Commit 21aaff0

Browse files
committed
Merge development branch - resolve GraphVisualization conflict
2 parents 667d4fb + 2c9efa5 commit 21aaff0

21 files changed

Lines changed: 2721 additions & 765 deletions

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,19 @@ export const typeDefs = gql`
182182
}
183183
184184
enum EdgeType {
185-
DEPENDENCY
185+
DEPENDS_ON
186186
BLOCKS
187+
ENABLES
187188
RELATES_TO
189+
PART_OF
190+
FOLLOWS
191+
PARALLEL_WITH
192+
DUPLICATES
193+
CONFLICTS_WITH
194+
VALIDATES
195+
196+
# Legacy support (deprecated)
197+
DEPENDENCY
188198
CONTAINS
189199
}
190200
@@ -256,6 +266,7 @@ export const typeDefs = gql`
256266
status: NodeStatus! @default(value: PROPOSED)
257267
dueDate: DateTime
258268
assignedTo: String
269+
tags: [String!]
259270
metadata: String # JSON as string
260271
261272
# Data isolation fields

packages/server/src/scripts/seed.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ async function seed() {
9797
priorityIndiv: $priorityIndiv,
9898
priorityComm: $priorityComm,
9999
priorityComp: $priorityComp,
100+
tags: $tags,
100101
createdAt: datetime(),
101102
updatedAt: datetime()
102103
})`,
@@ -108,20 +109,21 @@ async function seed() {
108109
priorityExec: Math.random(),
109110
priorityIndiv: Math.random(),
110111
priorityComm: Math.random(),
111-
priorityComp: Math.random()
112+
priorityComp: Math.random(),
113+
tags: []
112114
}
113115
);
114116
}
115117
console.log(`✅ Created ${workItems.length} work items`);
116118

117119
// Create edges (relationships between work items)
118120
const edges = [
119-
{ source: 'wi-1', target: 'wi-2', type: 'DEPENDENCY' },
120-
{ source: 'wi-2', target: 'wi-3', type: 'DEPENDENCY' },
121-
{ source: 'wi-5', target: 'wi-6', type: 'CONTAINS' },
122-
{ source: 'wi-5', target: 'wi-7', type: 'CONTAINS' },
123-
{ source: 'wi-5', target: 'wi-8', type: 'CONTAINS' },
124-
{ source: 'wi-12', target: 'wi-5', type: 'DEPENDENCY' }
121+
{ source: 'wi-1', target: 'wi-2', type: 'DEPENDS_ON' },
122+
{ source: 'wi-2', target: 'wi-3', type: 'DEPENDS_ON' },
123+
{ source: 'wi-5', target: 'wi-6', type: 'PART_OF' },
124+
{ source: 'wi-5', target: 'wi-7', type: 'PART_OF' },
125+
{ source: 'wi-5', target: 'wi-8', type: 'PART_OF' },
126+
{ source: 'wi-12', target: 'wi-5', type: 'DEPENDS_ON' }
125127
];
126128

127129
for (const edge of edges) {

packages/web/src/components/CreateNodeModal.tsx

Lines changed: 116 additions & 64 deletions
Large diffs are not rendered by default.

packages/web/src/components/DeleteNodeModal.tsx

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,41 @@ export function DeleteNodeModal({ isOpen, onClose, nodeId, nodeTitle, nodeType }
1717
const { showSuccess, showError } = useNotifications();
1818

1919
const [deleteWorkItem, { loading: deletingNode }] = useMutation(DELETE_WORK_ITEM, {
20-
refetchQueries: [{
21-
query: GET_WORK_ITEMS,
22-
variables: {
23-
where: {
24-
teamId: currentTeam?.id || 'default-team'
20+
refetchQueries: [
21+
{
22+
query: GET_WORK_ITEMS,
23+
variables: {
24+
options: { limit: 100 }
2525
}
26+
},
27+
{
28+
query: GET_WORK_ITEMS,
29+
variables: {
30+
where: {
31+
teamId: currentTeam?.id || 'team-1'
32+
}
33+
}
34+
}
35+
],
36+
awaitRefetchQueries: true,
37+
update: (cache, { data }) => {
38+
if (data?.deleteWorkItems?.nodesDeleted > 0) {
39+
// Evict all workItems queries to ensure complete refresh across all views
40+
cache.evict({ fieldName: 'workItems' });
41+
cache.gc();
2642
}
27-
}],
43+
}
2844
});
2945

3046
const handleDelete = async () => {
3147
try {
48+
3249
await deleteWorkItem({
3350
variables: {
3451
where: { id: nodeId }
3552
}
3653
});
54+
3755

3856
showSuccess(
3957
'Node Deleted Successfully!',
@@ -122,15 +140,15 @@ export function DeleteNodeModal({ isOpen, onClose, nodeId, nodeTitle, nodeType }
122140
<button
123141
type="button"
124142
onClick={onClose}
125-
className="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors"
143+
className="px-4 py-2 text-base font-medium text-white bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600 border border-green-600 dark:border-green-500 rounded-lg transition-colors"
126144
>
127145
Cancel
128146
</button>
129147
<button
130148
type="button"
131149
onClick={handleDelete}
132150
disabled={deletingNode}
133-
className="px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 disabled:bg-red-400 dark:bg-red-500 dark:hover:bg-red-600 dark:disabled:bg-red-400 rounded-lg transition-colors flex items-center space-x-2"
151+
className="px-4 py-2 text-base font-medium text-white bg-red-700 hover:bg-red-800 disabled:bg-red-400 dark:bg-red-600 dark:hover:bg-red-700 dark:disabled:bg-red-400 rounded-lg transition-colors flex items-center space-x-2"
134152
>
135153
<Trash2 className="h-4 w-4" />
136154
<span>{deletingNode ? 'Deleting...' : 'Delete Node'}</span>

0 commit comments

Comments
 (0)