@parhelia/core 0.1.12468 → 0.1.12477
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/dist/config/config.js +2 -21
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +0 -2
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +4 -20
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContentTree.js +7 -19
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/PictureCropper.js +41 -45
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.js +8 -97
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/AgentTerminalStatusBar.js +0 -65
- package/dist/editor/ai/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/Agents.js +0 -19
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiResponseMessage.js +0 -5
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/ContentInspectorPopover.d.ts +0 -1
- package/dist/editor/ai/ContentInspectorPopover.js +8 -22
- package/dist/editor/ai/ContentInspectorPopover.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.d.ts +0 -2
- package/dist/editor/ai/ToolCallDisplay.js +11 -54
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +3 -32
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +20 -55
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/editor/ai/dialogs/agentDialogTypes.d.ts +4 -7
- package/dist/editor/ai/dialogs/agentDialogTypes.js.map +1 -1
- package/dist/editor/ai/types.d.ts +0 -2
- package/dist/editor/services/agentService.d.ts +0 -27
- package/dist/editor/services/agentService.js +2 -11
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.js +3 -54
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/serviceHelper.js +2 -5
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/settings/About.js +4 -40
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.d.ts +1 -7
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +3 -3
- package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +84 -165
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +0 -1
- package/dist/editor/settings/panels/index.js +0 -1
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/sidebar/NavigationPanelItem.js +1 -1
- package/dist/editor/sidebar/NavigationPanelItem.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceButton.js +1 -1
- package/dist/editor/sidebar/WorkspaceButton.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.js +4 -24
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/tree-indicators/types.d.ts +0 -10
- package/dist/editor/ui/Splitter.d.ts +0 -1
- package/dist/editor/ui/Splitter.js +1 -7
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/licensing/LicenseContext.js +4 -40
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/licensing/LicenseOverlay.js +1 -1
- package/dist/licensing/LicenseOverlay.js.map +1 -1
- package/dist/licensing/types.d.ts +1 -3
- package/dist/licensing/types.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/task-board/TaskBoardWorkspace.js +354 -165
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/assigneeDisplay.js +3 -1
- package/dist/task-board/assigneeDisplay.js.map +1 -1
- package/dist/task-board/components/CreateProjectDialog.js +1 -2
- package/dist/task-board/components/CreateProjectDialog.js.map +1 -1
- package/dist/task-board/components/ProjectDashboard.js +1 -2
- package/dist/task-board/components/ProjectDashboard.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.d.ts +0 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +12 -146
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/task-board/components/TaskAgentPanel.d.ts +0 -1
- package/dist/task-board/components/TaskAgentPanel.js +2 -2
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskAssigneePicker.js +2 -2
- package/dist/task-board/components/TaskAssigneePicker.js.map +1 -1
- package/dist/task-board/components/TaskBoardMyTasksSidebar.js +1 -1
- package/dist/task-board/components/TaskBoardMyTasksSidebar.js.map +1 -1
- package/dist/task-board/components/TaskDetailDialog.d.ts +0 -1
- package/dist/task-board/components/TaskDetailDialog.js +2 -2
- package/dist/task-board/components/TaskDetailDialog.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.d.ts +0 -1
- package/dist/task-board/components/TaskDetailPanel.js +8 -23
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/TaskRow.js +2 -3
- package/dist/task-board/components/TaskRow.js.map +1 -1
- package/dist/task-board/components/WizardTaskDetailsPanel.js +1 -2
- package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
- package/dist/task-board/services/taskService.d.ts +1 -17
- package/dist/task-board/services/taskService.js +0 -56
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskExecutionRecords.js +0 -2
- package/dist/task-board/taskExecutionRecords.js.map +1 -1
- package/dist/task-board/types.d.ts +1 -78
- package/dist/task-board/utils/taskDependencyOrdering.d.ts +0 -6
- package/dist/task-board/utils/taskDependencyOrdering.js +1 -138
- package/dist/task-board/utils/taskDependencyOrdering.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +2 -5
- package/dist/task-board/views/DependencyGraphView.js +69 -261
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/task-board/views/KanbanView.js +1 -8
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ListView.js +1 -1
- package/dist/task-board/views/ListView.js.map +1 -1
- package/dist/task-board/views/WizardView.js +24 -30
- package/dist/task-board/views/WizardView.js.map +1 -1
- package/dist/tour/Tour.js +47 -0
- package/dist/tour/Tour.js.map +1 -1
- package/package.json +1 -1
- package/dist/editor/settings/panels/PersistentLogsPanel.d.ts +0 -2
- package/dist/editor/settings/panels/PersistentLogsPanel.js +0 -244
- package/dist/editor/settings/panels/PersistentLogsPanel.js.map +0 -1
- package/dist/task-board/components/ProjectExecutionUserPicker.d.ts +0 -14
- package/dist/task-board/components/ProjectExecutionUserPicker.js +0 -65
- package/dist/task-board/components/ProjectExecutionUserPicker.js.map +0 -1
- package/dist/task-board/components/TaskboardPersistentLogPanel.d.ts +0 -11
- package/dist/task-board/components/TaskboardPersistentLogPanel.js +0 -141
- package/dist/task-board/components/TaskboardPersistentLogPanel.js.map +0 -1
- package/dist/task-board/persistentLogCopy.d.ts +0 -7
- package/dist/task-board/persistentLogCopy.js +0 -80
- package/dist/task-board/persistentLogCopy.js.map +0 -1
- package/dist/task-board/persistentLogLabels.d.ts +0 -38
- package/dist/task-board/persistentLogLabels.js +0 -189
- package/dist/task-board/persistentLogLabels.js.map +0 -1
- package/dist/task-board/useTaskBoardAgentPanelState.d.ts +0 -34
- package/dist/task-board/useTaskBoardAgentPanelState.js +0 -283
- package/dist/task-board/useTaskBoardAgentPanelState.js.map +0 -1
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
export type ProjectStatus = "Planning" | "Active" | "Finished" | "Archived";
|
|
2
2
|
export type ProjectPermission = "Owner" | "Editor" | "Viewer";
|
|
3
3
|
export type ProjectMemberType = "User" | "Role";
|
|
4
|
-
export type ProjectDependencyType = "BlockedBy";
|
|
5
4
|
export type TaskStatus = "Todo" | "Waiting" | "InProgress" | "Review" | "Done";
|
|
6
5
|
export type TaskExecutionState = "Done" | "Waiting" | "Unassigned" | "AgentNotStarted" | "Starting" | "Working" | "Questions" | "WaitingForApproval" | "WaitingForInput" | "WaitingForUser" | "WaitingForDependency" | "WaitingForCapacity" | "WaitingForBudget" | "WaitingForToolApproval" | "AgentError";
|
|
7
6
|
export type TaskAttentionReason = "none" | "blocked" | "approval" | "input" | "failed" | "budget";
|
|
8
|
-
export type TaskAssigneeType = "
|
|
7
|
+
export type TaskAssigneeType = "Human" | "Agent" | "Role";
|
|
9
8
|
export type TaskPriority = "Low" | "Medium" | "High" | "Critical";
|
|
10
9
|
export type TaskType = "Task" | "Plan";
|
|
11
|
-
export type GraphOrientation = "vertical" | "horizontal";
|
|
12
10
|
export type DefaultAgentMode = "supervised" | "autonomous";
|
|
13
11
|
export type Project = {
|
|
14
12
|
projectId: string;
|
|
@@ -20,8 +18,6 @@ export type Project = {
|
|
|
20
18
|
costUsed: number;
|
|
21
19
|
defaultAgentMode?: DefaultAgentMode | string | null;
|
|
22
20
|
createdBy: string;
|
|
23
|
-
executionUserId?: string | null;
|
|
24
|
-
executionUserDisplayName?: string | null;
|
|
25
21
|
createdAt: string;
|
|
26
22
|
updatedAt: string;
|
|
27
23
|
};
|
|
@@ -96,14 +92,6 @@ export type ProjectMember = {
|
|
|
96
92
|
addedBy: string;
|
|
97
93
|
addedAt: string;
|
|
98
94
|
};
|
|
99
|
-
export type ProjectDependency = {
|
|
100
|
-
projectDependencyId: string;
|
|
101
|
-
projectId: string;
|
|
102
|
-
dependsOnProjectId: string;
|
|
103
|
-
dependencyType: ProjectDependencyType;
|
|
104
|
-
createdBy: string;
|
|
105
|
-
createdAt: string;
|
|
106
|
-
};
|
|
107
95
|
export type ProjectPropertyValueType = "string" | "itemCollectionRef";
|
|
108
96
|
export type ProjectProperty = {
|
|
109
97
|
propertyId: string;
|
|
@@ -147,7 +135,6 @@ export type TaskItem = {
|
|
|
147
135
|
executionVersion?: number;
|
|
148
136
|
executionUpdatedAt?: string;
|
|
149
137
|
executionError?: string | null;
|
|
150
|
-
executionBlockedByProjectIds?: string[];
|
|
151
138
|
waitingOnDialogId?: string | null;
|
|
152
139
|
waitingOnToolCallId?: string | null;
|
|
153
140
|
executionStartedAt?: string | null;
|
|
@@ -166,7 +153,6 @@ export type TaskExecutionRecord = {
|
|
|
166
153
|
attentionReason: TaskAttentionReason;
|
|
167
154
|
agentId?: string | null;
|
|
168
155
|
blockedByTaskIds: string[];
|
|
169
|
-
blockedByProjectIds?: string[];
|
|
170
156
|
waitingOnDialogId?: string | null;
|
|
171
157
|
waitingOnToolCallId?: string | null;
|
|
172
158
|
resultData?: string | null;
|
|
@@ -174,54 +160,6 @@ export type TaskExecutionRecord = {
|
|
|
174
160
|
updatedAt: string;
|
|
175
161
|
version: number;
|
|
176
162
|
};
|
|
177
|
-
export type TaskboardPersistentLogEntry = {
|
|
178
|
-
logId: string;
|
|
179
|
-
agentId?: string | null;
|
|
180
|
-
projectId?: string | null;
|
|
181
|
-
taskId?: string | null;
|
|
182
|
-
runId?: string | null;
|
|
183
|
-
sessionId?: string | null;
|
|
184
|
-
userId?: string | null;
|
|
185
|
-
parentAgentId?: string | null;
|
|
186
|
-
messageId?: string | null;
|
|
187
|
-
toolCallId?: string | null;
|
|
188
|
-
eventType: string;
|
|
189
|
-
stage?: string | null;
|
|
190
|
-
status?: string | null;
|
|
191
|
-
source?: string | null;
|
|
192
|
-
seq?: number | null;
|
|
193
|
-
summary?: string | null;
|
|
194
|
-
payloadPreview?: string | null;
|
|
195
|
-
resultPreview?: string | null;
|
|
196
|
-
metadataJson?: string | null;
|
|
197
|
-
durationMs?: number | null;
|
|
198
|
-
success?: boolean | null;
|
|
199
|
-
error?: string | null;
|
|
200
|
-
createdAt: string;
|
|
201
|
-
};
|
|
202
|
-
export type TaskboardPersistentLogsResponse = {
|
|
203
|
-
projectId: string;
|
|
204
|
-
taskId?: string | null;
|
|
205
|
-
logs: TaskboardPersistentLogEntry[];
|
|
206
|
-
};
|
|
207
|
-
export type PersistentLogsAdminFilters = {
|
|
208
|
-
agentId?: string | null;
|
|
209
|
-
projectId?: string | null;
|
|
210
|
-
taskId?: string | null;
|
|
211
|
-
runId?: string | null;
|
|
212
|
-
eventType?: string | null;
|
|
213
|
-
stage?: string | null;
|
|
214
|
-
status?: string | null;
|
|
215
|
-
source?: string | null;
|
|
216
|
-
searchTerm?: string | null;
|
|
217
|
-
success?: boolean | null;
|
|
218
|
-
limit?: number;
|
|
219
|
-
};
|
|
220
|
-
export type PersistentLogsAdminResponse = {
|
|
221
|
-
loggingEnabled: boolean;
|
|
222
|
-
limit: number;
|
|
223
|
-
logs: TaskboardPersistentLogEntry[];
|
|
224
|
-
};
|
|
225
163
|
export type TaskComment = {
|
|
226
164
|
commentId: string;
|
|
227
165
|
taskId: string;
|
|
@@ -250,7 +188,6 @@ export type TaskGraphLayoutViewport = {
|
|
|
250
188
|
export type GraphLayoutSnapshot = {
|
|
251
189
|
nodes: TaskGraphLayoutNode[];
|
|
252
190
|
viewport?: TaskGraphLayoutViewport | null;
|
|
253
|
-
orientation?: GraphOrientation | null;
|
|
254
191
|
updatedAt?: string | null;
|
|
255
192
|
};
|
|
256
193
|
export type TaskGraphLayout = GraphLayoutSnapshot & {
|
|
@@ -316,8 +253,6 @@ export type UpdateProjectRequest = {
|
|
|
316
253
|
costLimit?: number | null;
|
|
317
254
|
status?: ProjectStatus;
|
|
318
255
|
defaultAgentMode?: DefaultAgentMode | string | null;
|
|
319
|
-
executionUserId?: string | null;
|
|
320
|
-
executionUserDisplayName?: string | null;
|
|
321
256
|
};
|
|
322
257
|
export type AddMemberRequest = {
|
|
323
258
|
projectId: string;
|
|
@@ -394,17 +329,6 @@ export type RemoveTaskDependencyRequest = {
|
|
|
394
329
|
dependsOnTaskId?: string;
|
|
395
330
|
dependencyType?: TaskDependencyType;
|
|
396
331
|
};
|
|
397
|
-
export type AddProjectDependencyRequest = {
|
|
398
|
-
projectId: string;
|
|
399
|
-
dependsOnProjectId: string;
|
|
400
|
-
dependencyType?: ProjectDependencyType;
|
|
401
|
-
};
|
|
402
|
-
export type RemoveProjectDependencyRequest = {
|
|
403
|
-
projectDependencyId?: string;
|
|
404
|
-
projectId?: string;
|
|
405
|
-
dependsOnProjectId?: string;
|
|
406
|
-
dependencyType?: ProjectDependencyType;
|
|
407
|
-
};
|
|
408
332
|
export type UploadTaskAttachmentRequest = {
|
|
409
333
|
taskId: string;
|
|
410
334
|
fileName: string;
|
|
@@ -419,7 +343,6 @@ export type SaveTaskGraphLayoutRequest = {
|
|
|
419
343
|
projectId: string;
|
|
420
344
|
nodes: TaskGraphLayoutNode[];
|
|
421
345
|
viewport?: TaskGraphLayoutViewport | null;
|
|
422
|
-
orientation?: GraphOrientation | null;
|
|
423
346
|
};
|
|
424
347
|
export type UpsertProjectTemplateRequest = {
|
|
425
348
|
projectTemplateId?: string | null;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { TaskDependency, TaskItem } from "../types";
|
|
2
2
|
export declare function compareWizardTasks(a: TaskItem, b: TaskItem): number;
|
|
3
|
-
type OrderedTaskHierarchyEntry = {
|
|
4
|
-
task: TaskItem;
|
|
5
|
-
depth: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function orderTasksByBlockedDependenciesWithDepth(tasks: readonly TaskItem[], dependencies: readonly TaskDependency[]): OrderedTaskHierarchyEntry[];
|
|
8
3
|
export declare function orderTasksByBlockedDependencies(tasks: readonly TaskItem[], dependencies: readonly TaskDependency[]): TaskItem[];
|
|
9
|
-
export {};
|
|
@@ -3,7 +3,7 @@ export function compareWizardTasks(a, b) {
|
|
|
3
3
|
return a.sortOrder - b.sortOrder;
|
|
4
4
|
return a.createdAt.localeCompare(b.createdAt);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
export function orderTasksByBlockedDependencies(tasks, dependencies) {
|
|
7
7
|
const baseOrder = [...tasks].sort(compareWizardTasks);
|
|
8
8
|
if (baseOrder.length <= 1) {
|
|
9
9
|
return baseOrder;
|
|
@@ -61,141 +61,4 @@ function buildBaseDependencyOrder(tasks, dependencies) {
|
|
|
61
61
|
...baseOrder.filter((task) => !orderedTaskIds.has(task.taskId)),
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
|
-
export function orderTasksByBlockedDependenciesWithDepth(tasks, dependencies) {
|
|
65
|
-
const baseOrder = buildBaseDependencyOrder(tasks, dependencies);
|
|
66
|
-
if (baseOrder.length === 0) {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
const taskIds = new Set(baseOrder.map((task) => task.taskId));
|
|
70
|
-
const baseIndexByTaskId = new Map(baseOrder.map((task, index) => [task.taskId, index]));
|
|
71
|
-
const childrenByParentId = new Map();
|
|
72
|
-
for (const task of baseOrder) {
|
|
73
|
-
const parentTaskId = task.parentTaskId &&
|
|
74
|
-
task.parentTaskId !== task.taskId &&
|
|
75
|
-
taskIds.has(task.parentTaskId)
|
|
76
|
-
? task.parentTaskId
|
|
77
|
-
: null;
|
|
78
|
-
const siblings = childrenByParentId.get(parentTaskId) ?? [];
|
|
79
|
-
siblings.push(task);
|
|
80
|
-
childrenByParentId.set(parentTaskId, siblings);
|
|
81
|
-
}
|
|
82
|
-
const blockedDependencies = dependencies.filter((dependency) => dependency.dependencyType === "BlockedBy" &&
|
|
83
|
-
dependency.taskId !== dependency.dependsOnTaskId &&
|
|
84
|
-
taskIds.has(dependency.taskId) &&
|
|
85
|
-
taskIds.has(dependency.dependsOnTaskId));
|
|
86
|
-
const subtreeTaskIdsCache = new Map();
|
|
87
|
-
const subtreeTaskIdsInProgress = new Set();
|
|
88
|
-
const getSubtreeTaskIds = (taskId) => {
|
|
89
|
-
const cached = subtreeTaskIdsCache.get(taskId);
|
|
90
|
-
if (cached) {
|
|
91
|
-
return cached;
|
|
92
|
-
}
|
|
93
|
-
if (subtreeTaskIdsInProgress.has(taskId)) {
|
|
94
|
-
return new Set([taskId]);
|
|
95
|
-
}
|
|
96
|
-
subtreeTaskIdsInProgress.add(taskId);
|
|
97
|
-
const subtreeTaskIds = new Set([taskId]);
|
|
98
|
-
for (const child of childrenByParentId.get(taskId) ?? []) {
|
|
99
|
-
for (const childTaskId of getSubtreeTaskIds(child.taskId)) {
|
|
100
|
-
subtreeTaskIds.add(childTaskId);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
subtreeTaskIdsInProgress.delete(taskId);
|
|
104
|
-
subtreeTaskIdsCache.set(taskId, subtreeTaskIds);
|
|
105
|
-
return subtreeTaskIds;
|
|
106
|
-
};
|
|
107
|
-
const compareByBaseOrder = (a, b) => (baseIndexByTaskId.get(a) ?? Number.MAX_SAFE_INTEGER) -
|
|
108
|
-
(baseIndexByTaskId.get(b) ?? Number.MAX_SAFE_INTEGER);
|
|
109
|
-
const orderSiblingBranches = (parentTaskId) => {
|
|
110
|
-
const siblings = childrenByParentId.get(parentTaskId) ?? [];
|
|
111
|
-
if (siblings.length <= 1) {
|
|
112
|
-
return siblings;
|
|
113
|
-
}
|
|
114
|
-
const siblingIds = new Set(siblings.map((task) => task.taskId));
|
|
115
|
-
const branchOwnerByTaskId = new Map();
|
|
116
|
-
for (const sibling of siblings) {
|
|
117
|
-
for (const subtreeTaskId of getSubtreeTaskIds(sibling.taskId)) {
|
|
118
|
-
branchOwnerByTaskId.set(subtreeTaskId, sibling.taskId);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
const inDegree = new Map();
|
|
122
|
-
const outgoing = new Map();
|
|
123
|
-
const seenEdges = new Set();
|
|
124
|
-
for (const sibling of siblings) {
|
|
125
|
-
inDegree.set(sibling.taskId, 0);
|
|
126
|
-
outgoing.set(sibling.taskId, []);
|
|
127
|
-
}
|
|
128
|
-
for (const dependency of blockedDependencies) {
|
|
129
|
-
const blockedBranchId = branchOwnerByTaskId.get(dependency.taskId);
|
|
130
|
-
const blockerBranchId = branchOwnerByTaskId.get(dependency.dependsOnTaskId);
|
|
131
|
-
if (!blockedBranchId ||
|
|
132
|
-
!blockerBranchId ||
|
|
133
|
-
blockedBranchId === blockerBranchId ||
|
|
134
|
-
!siblingIds.has(blockedBranchId) ||
|
|
135
|
-
!siblingIds.has(blockerBranchId)) {
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
const edgeKey = `${blockerBranchId}->${blockedBranchId}`;
|
|
139
|
-
if (seenEdges.has(edgeKey))
|
|
140
|
-
continue;
|
|
141
|
-
seenEdges.add(edgeKey);
|
|
142
|
-
outgoing.get(blockerBranchId)?.push(blockedBranchId);
|
|
143
|
-
inDegree.set(blockedBranchId, (inDegree.get(blockedBranchId) ?? 0) + 1);
|
|
144
|
-
}
|
|
145
|
-
const ready = siblings
|
|
146
|
-
.filter((task) => (inDegree.get(task.taskId) ?? 0) === 0)
|
|
147
|
-
.map((task) => task.taskId);
|
|
148
|
-
const orderedBranchIds = [];
|
|
149
|
-
while (ready.length > 0) {
|
|
150
|
-
ready.sort(compareByBaseOrder);
|
|
151
|
-
const nextBranchId = ready.shift();
|
|
152
|
-
if (!nextBranchId)
|
|
153
|
-
break;
|
|
154
|
-
orderedBranchIds.push(nextBranchId);
|
|
155
|
-
for (const dependentBranchId of outgoing.get(nextBranchId) ?? []) {
|
|
156
|
-
const nextInDegree = (inDegree.get(dependentBranchId) ?? 0) - 1;
|
|
157
|
-
inDegree.set(dependentBranchId, nextInDegree);
|
|
158
|
-
if (nextInDegree === 0) {
|
|
159
|
-
ready.push(dependentBranchId);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (orderedBranchIds.length !== siblings.length) {
|
|
164
|
-
return [...siblings].sort((a, b) => compareByBaseOrder(a.taskId, b.taskId));
|
|
165
|
-
}
|
|
166
|
-
const siblingById = new Map(siblings.map((task) => [task.taskId, task]));
|
|
167
|
-
return orderedBranchIds
|
|
168
|
-
.map((taskId) => siblingById.get(taskId))
|
|
169
|
-
.filter((task) => !!task);
|
|
170
|
-
};
|
|
171
|
-
const orderedEntries = [];
|
|
172
|
-
const seenTaskIds = new Set();
|
|
173
|
-
const appendBranch = (task, depth, lineage) => {
|
|
174
|
-
if (seenTaskIds.has(task.taskId)) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
seenTaskIds.add(task.taskId);
|
|
178
|
-
orderedEntries.push({ task, depth });
|
|
179
|
-
if (lineage.has(task.taskId)) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const nextLineage = new Set(lineage);
|
|
183
|
-
nextLineage.add(task.taskId);
|
|
184
|
-
for (const child of orderSiblingBranches(task.taskId)) {
|
|
185
|
-
appendBranch(child, depth + 1, nextLineage);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
for (const rootTask of orderSiblingBranches(null)) {
|
|
189
|
-
appendBranch(rootTask, 0, new Set());
|
|
190
|
-
}
|
|
191
|
-
for (const task of baseOrder) {
|
|
192
|
-
if (!seenTaskIds.has(task.taskId)) {
|
|
193
|
-
appendBranch(task, 0, new Set());
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return orderedEntries;
|
|
197
|
-
}
|
|
198
|
-
export function orderTasksByBlockedDependencies(tasks, dependencies) {
|
|
199
|
-
return orderTasksByBlockedDependenciesWithDepth(tasks, dependencies).map(({ task }) => task);
|
|
200
|
-
}
|
|
201
64
|
//# sourceMappingURL=taskDependencyOrdering.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskDependencyOrdering.js","sourceRoot":"","sources":["../../../src/task-board/utils/taskDependencyOrdering.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,CAAW,EAAE,CAAW;IACzD,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAAE,OAAO,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;IAClE,OAAO,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CA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AAK,MAAM,eAAe,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;YAC9D,MAAM,YAAY,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAC9D,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;YAC5C,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;gBACvB,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;gBACpD,IAAI,aAAa,EAAE,CAAC;oBAClB,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,+DAA+D;IAC/D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,OAAO;QACL,GAAG,OAAO;QACV,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@xyflow/react/dist/style.css";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GraphLayoutSnapshot, TaskDependency, TaskItem, ProjectPermission } from "../types";
|
|
3
3
|
export declare function DependencyGraphView(props: {
|
|
4
4
|
projectId?: string;
|
|
5
5
|
layoutKey?: string;
|
|
@@ -19,9 +19,8 @@ export declare function DependencyGraphView(props: {
|
|
|
19
19
|
showExecutionStateBadges?: boolean;
|
|
20
20
|
emptyStateTitle?: string;
|
|
21
21
|
emptyStateDescription?: string;
|
|
22
|
-
orientation?:
|
|
22
|
+
orientation?: "vertical" | "horizontal";
|
|
23
23
|
autoLayoutStrategy?: "allEdges" | "hierarchy";
|
|
24
|
-
showOrientationToggle?: boolean;
|
|
25
24
|
/** Debounce before persisting layout (API or parent callback). Use 0 for immediate sync (e.g. project template draft). */
|
|
26
25
|
layoutSaveDebounceMs?: number;
|
|
27
26
|
/** When set, shows a create-dependent-task action near the right handle of each node. */
|
|
@@ -40,6 +39,4 @@ export declare function DependencyGraphView(props: {
|
|
|
40
39
|
miniMapWidth?: number;
|
|
41
40
|
/** MiniMap (overview) height in px. */
|
|
42
41
|
miniMapHeight?: number;
|
|
43
|
-
/** When false, the overview minimap is not rendered (e.g. narrow mobile layouts). */
|
|
44
|
-
showMiniMap?: boolean;
|
|
45
42
|
}): import("react/jsx-runtime").JSX.Element;
|