@burdenoff/microfe-planmagnet 2026.930.8 → 2026.930.9
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/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +126 -120
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +83 -75
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/dependency/DependencyGraph.d.ts +43 -0
- package/dist/planmagnet/dependency/DependencyGraph.d.ts.map +1 -0
- package/dist/planmagnet/dependency/DependencyGraph.js +225 -0
- package/dist/planmagnet/dependency/DependencyGraph.js.map +1 -0
- package/dist/planmagnet/dependency/DependencyPanel.d.ts.map +1 -1
- package/dist/planmagnet/dependency/DependencyPanel.js +136 -90
- package/dist/planmagnet/dependency/DependencyPanel.js.map +1 -1
- package/dist/planmagnet/dependency/GanttChart.d.ts +40 -0
- package/dist/planmagnet/dependency/GanttChart.d.ts.map +1 -0
- package/dist/planmagnet/dependency/GanttChart.js +326 -0
- package/dist/planmagnet/dependency/GanttChart.js.map +1 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.d.ts +40 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.d.ts.map +1 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.js +106 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.js.map +1 -0
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +169 -100
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsGanttPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.js +143 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.js.map +1 -0
- package/dist/planmagnet/utils/rowNavigation.d.ts +7 -2
- package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -1
- package/dist/planmagnet/utils/rowNavigation.js.map +1 -1
- package/dist/planmagnet/utils/statusColor.d.ts +26 -0
- package/dist/planmagnet/utils/statusColor.d.ts.map +1 -0
- package/dist/planmagnet/utils/statusColor.js +51 -0
- package/dist/planmagnet/utils/statusColor.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { ProjectSelect as n } from "../controls/Pickers.js";
|
|
3
3
|
import { useEntityId as r } from "../hooks/useEntityId.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { DependencyGraph as i } from "../dependency/DependencyGraph.js";
|
|
5
|
+
import { criticalEdgeIdsFromPath as ee, useProjectWorkItemsGraph as a } from "../dependency/useProjectWorkItemsGraph.js";
|
|
6
|
+
import { useEffect as o, useState as s } from "react";
|
|
7
|
+
import { AlertTriangle as c, List as l, Route as u, Waypoints as d } from "lucide-react";
|
|
8
|
+
import { gql as f } from "@apollo/client";
|
|
9
|
+
import { useQuery as p } from "@apollo/client/react";
|
|
10
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as _, Card as v, CardContent as y, CardHeader as b, CardTitle as x } from "@burdenoff/fe-libs/ui";
|
|
10
12
|
//#region src/planmagnet/pages/ProjectsCriticalPathPagePage.tsx
|
|
11
|
-
var
|
|
13
|
+
var S = f`
|
|
12
14
|
query GetProjectCriticalPath($workspaceId: ID!, $projectId: ID) {
|
|
13
15
|
planmagnetCriticalPath(workspaceId: $workspaceId, projectId: $projectId) {
|
|
14
16
|
totalDurationMinutes
|
|
@@ -24,14 +26,14 @@ var _ = c`
|
|
|
24
26
|
length
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
`,
|
|
29
|
+
`, C = f`
|
|
28
30
|
query GetCriticalPathProject($id: ID!) {
|
|
29
31
|
planmagnetProject(id: $id) {
|
|
30
32
|
id
|
|
31
33
|
name
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
|
-
`,
|
|
36
|
+
`, w = 100, T = f`
|
|
35
37
|
query GetNonCriticalWorkItems(
|
|
36
38
|
$workspaceId: ID!
|
|
37
39
|
$filter: PlanmagnetWorkItemFilter
|
|
@@ -50,40 +52,40 @@ var _ = c`
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
`;
|
|
53
|
-
function
|
|
55
|
+
function E(e) {
|
|
54
56
|
if (e <= 0) return "0 days";
|
|
55
57
|
let t = Math.round(e);
|
|
56
58
|
if (t < 60) return `${Math.max(1, t)}m`;
|
|
57
59
|
let n = Math.round(t / 60), r = Math.floor(n / 24), i = n % 24;
|
|
58
60
|
return r === 0 ? `${i}h` : i > 0 ? `${r}d ${i}h` : `${r} day${r === 1 ? "" : "s"}`;
|
|
59
61
|
}
|
|
60
|
-
function
|
|
61
|
-
let
|
|
62
|
+
function D() {
|
|
63
|
+
let f = r(), { workspaceId: D } = e(), O = t(), [k, A] = s(""), [j, M] = s("list"), { data: N, loading: P, error: F } = p(S, {
|
|
62
64
|
variables: {
|
|
63
|
-
workspaceId:
|
|
64
|
-
projectId:
|
|
65
|
+
workspaceId: D ?? "",
|
|
66
|
+
projectId: f
|
|
65
67
|
},
|
|
66
|
-
skip: !
|
|
67
|
-
}), { data:
|
|
68
|
-
variables: { id:
|
|
69
|
-
skip: !
|
|
70
|
-
}),
|
|
68
|
+
skip: !D || !f
|
|
69
|
+
}), { data: I } = p(C, {
|
|
70
|
+
variables: { id: f },
|
|
71
|
+
skip: !f
|
|
72
|
+
}), L = N?.planmagnetCriticalPath.path ?? [], R = L.length > 0, z = L.map((e) => e.id), B = a(j === "graph" ? f : void 0), V = new Set(z), H = ee(L, B.items), { data: U, loading: W, error: G, fetchMore: K } = p(T, {
|
|
71
73
|
variables: {
|
|
72
|
-
workspaceId:
|
|
74
|
+
workspaceId: D ?? "",
|
|
73
75
|
filter: {
|
|
74
|
-
projectId:
|
|
75
|
-
excludeIds:
|
|
76
|
+
projectId: f,
|
|
77
|
+
excludeIds: z
|
|
76
78
|
},
|
|
77
|
-
pagination: { first:
|
|
79
|
+
pagination: { first: w }
|
|
78
80
|
},
|
|
79
|
-
skip: !
|
|
80
|
-
}),
|
|
81
|
-
if (
|
|
82
|
-
if (
|
|
83
|
-
let e =
|
|
84
|
-
|
|
81
|
+
skip: !D || !f || !R
|
|
82
|
+
}), q = U?.planmagnetWorkItems.pageInfo, [J, Y] = s(null);
|
|
83
|
+
if (o(() => {
|
|
84
|
+
if (J || !q?.hasNextPage || !q.endCursor) return;
|
|
85
|
+
let e = q.endCursor;
|
|
86
|
+
K({
|
|
85
87
|
variables: { pagination: {
|
|
86
|
-
first:
|
|
88
|
+
first: w,
|
|
87
89
|
after: e
|
|
88
90
|
} },
|
|
89
91
|
updateQuery: (e, { fetchMoreResult: t }) => ({ planmagnetWorkItems: {
|
|
@@ -92,163 +94,230 @@ function S() {
|
|
|
92
94
|
} })
|
|
93
95
|
}).then((e) => {
|
|
94
96
|
let t = e?.error;
|
|
95
|
-
t &&
|
|
96
|
-
}).catch((e) =>
|
|
97
|
+
t && Y(t.message ?? "Unknown error");
|
|
98
|
+
}).catch((e) => Y(e instanceof Error ? e.message : String(e)));
|
|
97
99
|
}, [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
]), !
|
|
100
|
+
J,
|
|
101
|
+
q?.hasNextPage,
|
|
102
|
+
q?.endCursor,
|
|
103
|
+
K
|
|
104
|
+
]), !f) return /* @__PURE__ */ g("div", {
|
|
103
105
|
className: "space-y-6 p-6",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h1", {
|
|
105
107
|
className: "text-2xl font-semibold flex items-center gap-2",
|
|
106
|
-
children: [/* @__PURE__ */ u
|
|
107
|
-
}), /* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ h(u, { className: "h-5 w-5 text-primary" }), "Critical Path"]
|
|
109
|
+
}), /* @__PURE__ */ h("p", {
|
|
108
110
|
className: "text-sm text-muted-foreground",
|
|
109
111
|
children: "Choose a project to see its critical path."
|
|
110
|
-
})] }), /* @__PURE__ */
|
|
112
|
+
})] }), /* @__PURE__ */ h(v, { children: /* @__PURE__ */ g(y, {
|
|
111
113
|
className: "pt-6 space-y-3",
|
|
112
114
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ h("label", {
|
|
114
116
|
htmlFor: "critical-path-project",
|
|
115
117
|
className: "text-sm font-medium",
|
|
116
118
|
children: "Project"
|
|
117
119
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ h(n, {
|
|
119
121
|
id: "critical-path-project",
|
|
120
|
-
value:
|
|
121
|
-
onChange:
|
|
122
|
+
value: k,
|
|
123
|
+
onChange: A,
|
|
122
124
|
noneLabel: "Choose a project…"
|
|
123
125
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ h("button", {
|
|
125
127
|
type: "button",
|
|
126
128
|
className: "text-sm text-primary hover:underline disabled:pointer-events-none disabled:opacity-50",
|
|
127
|
-
disabled: !
|
|
128
|
-
onClick: () =>
|
|
129
|
+
disabled: !k,
|
|
130
|
+
onClick: () => O(`/projects/critical-path-page/${encodeURIComponent(k)}`),
|
|
129
131
|
children: "View critical path →"
|
|
130
132
|
})
|
|
131
133
|
]
|
|
132
134
|
}) })]
|
|
133
135
|
});
|
|
134
|
-
if (
|
|
136
|
+
if (P && !N) return /* @__PURE__ */ h("div", {
|
|
135
137
|
className: "flex items-center justify-center p-12",
|
|
136
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ h("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
137
139
|
});
|
|
138
|
-
if (
|
|
140
|
+
if (F) return /* @__PURE__ */ g("div", {
|
|
139
141
|
className: "p-6 text-red-500",
|
|
140
|
-
children: ["Error computing critical path: ",
|
|
142
|
+
children: ["Error computing critical path: ", F.message]
|
|
141
143
|
});
|
|
142
|
-
let
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
+
let X = N?.planmagnetCriticalPath.slack ?? {}, te = N?.planmagnetCriticalPath.totalDurationMinutes ?? 0, Z = N?.planmagnetDependencyCycles ?? [], Q = I?.planmagnetProject?.name, $ = [...U?.planmagnetWorkItems.items ?? []].sort((e, t) => (X[e.id] ?? 0) - (X[t.id] ?? 0));
|
|
145
|
+
return /* @__PURE__ */ g("div", {
|
|
144
146
|
className: "space-y-6 p-6",
|
|
145
147
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
className: "flex items-center justify-between",
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ g("div", {
|
|
149
|
+
className: "flex flex-wrap items-center justify-between gap-3",
|
|
150
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h1", {
|
|
149
151
|
className: "text-2xl font-semibold flex items-center gap-2",
|
|
150
|
-
children: [/* @__PURE__ */ u
|
|
151
|
-
}), /* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ h(u, { className: "h-5 w-5 text-primary" }), "Critical Path"]
|
|
153
|
+
}), /* @__PURE__ */ g("p", {
|
|
152
154
|
className: "text-sm text-muted-foreground",
|
|
153
|
-
children: [
|
|
154
|
-
})] })
|
|
155
|
+
children: [Q ?? "This project", " — the longest chain of dependent work; a delay on any node here delays the whole chain."]
|
|
156
|
+
})] }), /* @__PURE__ */ g("div", {
|
|
157
|
+
className: "flex gap-1",
|
|
158
|
+
"data-testid": "critical-path-view-toggle",
|
|
159
|
+
children: [/* @__PURE__ */ g("button", {
|
|
160
|
+
type: "button",
|
|
161
|
+
"aria-pressed": j === "list",
|
|
162
|
+
className: `inline-flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md ${j === "list" ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
163
|
+
onClick: () => M("list"),
|
|
164
|
+
children: [/* @__PURE__ */ h(l, { className: "h-3.5 w-3.5" }), "List"]
|
|
165
|
+
}), /* @__PURE__ */ g("button", {
|
|
166
|
+
type: "button",
|
|
167
|
+
"aria-pressed": j === "graph",
|
|
168
|
+
className: `inline-flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md ${j === "graph" ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
169
|
+
onClick: () => M("graph"),
|
|
170
|
+
children: [/* @__PURE__ */ h(d, { className: "h-3.5 w-3.5" }), "Graph"]
|
|
171
|
+
})]
|
|
172
|
+
})]
|
|
155
173
|
}),
|
|
156
|
-
|
|
174
|
+
Z.length > 0 && /* @__PURE__ */ g("div", {
|
|
157
175
|
role: "alert",
|
|
158
176
|
className: "flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ h(c, { className: "h-4 w-4 mt-0.5 shrink-0" }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
|
|
160
178
|
className: "font-medium",
|
|
161
179
|
children: [
|
|
162
|
-
|
|
180
|
+
Z.length,
|
|
163
181
|
" dependency cycle",
|
|
164
|
-
|
|
182
|
+
Z.length === 1 ? "" : "s",
|
|
165
183
|
" detected."
|
|
166
184
|
]
|
|
167
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ h("p", { children: "A cycle has no valid schedule, so the path below excludes the items involved. Break each cycle by removing or re-pointing one of its dependencies from the task detail page." })] })]
|
|
168
186
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ h(x, { children: "Total duration" }) }), /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h("p", {
|
|
170
188
|
className: "text-2xl font-bold",
|
|
171
|
-
children:
|
|
172
|
-
}), /* @__PURE__ */
|
|
189
|
+
children: E(te)
|
|
190
|
+
}), /* @__PURE__ */ h("p", {
|
|
173
191
|
className: "text-xs text-muted-foreground mt-1",
|
|
174
192
|
children: "Work item spans plus dependency lag/lead, summed along the longest chain."
|
|
175
193
|
})] })] }),
|
|
176
|
-
/* @__PURE__ */
|
|
194
|
+
j === "graph" && /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ h(x, { children: "Dependency graph" }) }), /* @__PURE__ */ h(y, { children: B.error ? /* @__PURE__ */ g("p", {
|
|
195
|
+
className: "text-center text-destructive py-8",
|
|
196
|
+
children: ["The project's dependency graph could not be loaded: ", B.error.message]
|
|
197
|
+
}) : B.loading && B.items.length === 0 ? /* @__PURE__ */ h("p", {
|
|
198
|
+
className: "text-center text-muted-foreground py-8",
|
|
199
|
+
children: "Loading…"
|
|
200
|
+
}) : /* @__PURE__ */ g(m, { children: [
|
|
201
|
+
B.moreError && /* @__PURE__ */ g("p", {
|
|
202
|
+
role: "alert",
|
|
203
|
+
className: "mb-3 text-sm text-destructive",
|
|
204
|
+
children: [
|
|
205
|
+
"Some work items could not be loaded, so this graph may be incomplete:",
|
|
206
|
+
" ",
|
|
207
|
+
B.moreError
|
|
208
|
+
]
|
|
209
|
+
}),
|
|
210
|
+
B.truncated && /* @__PURE__ */ g("p", {
|
|
211
|
+
className: "mb-3 text-sm text-muted-foreground",
|
|
212
|
+
children: [
|
|
213
|
+
"This project has more than ",
|
|
214
|
+
B.items.length,
|
|
215
|
+
" work items — only the first",
|
|
216
|
+
" ",
|
|
217
|
+
B.items.length,
|
|
218
|
+
" are graphed."
|
|
219
|
+
]
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ h(i, {
|
|
222
|
+
nodes: B.items.map((e) => ({
|
|
223
|
+
id: e.id,
|
|
224
|
+
key: e.key,
|
|
225
|
+
title: e.title,
|
|
226
|
+
status: e.status
|
|
227
|
+
})),
|
|
228
|
+
edges: B.items.flatMap((e) => e.dependencies.map((t) => ({
|
|
229
|
+
id: t.id,
|
|
230
|
+
predecessorId: e.id,
|
|
231
|
+
successorId: t.successorId,
|
|
232
|
+
type: t.type,
|
|
233
|
+
lagMinutes: t.lagMinutes
|
|
234
|
+
}))),
|
|
235
|
+
criticalNodeIds: V,
|
|
236
|
+
criticalEdgeIds: H,
|
|
237
|
+
onActivateNode: (e) => O(`/tasks/task-detail-page?taskId=${encodeURIComponent(e)}`),
|
|
238
|
+
emptyMessage: "No work items in this project yet.",
|
|
239
|
+
ariaLabel: `Dependency graph for ${Q ?? "this project"}`
|
|
240
|
+
})
|
|
241
|
+
] }) })] }),
|
|
242
|
+
j === "list" && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ g(x, { children: [
|
|
177
243
|
"Path (",
|
|
178
|
-
|
|
244
|
+
L.length,
|
|
179
245
|
" item",
|
|
180
|
-
|
|
246
|
+
L.length === 1 ? "" : "s",
|
|
181
247
|
")"
|
|
182
|
-
] }) }), /* @__PURE__ */
|
|
248
|
+
] }) }), /* @__PURE__ */ g(y, {
|
|
183
249
|
className: "space-y-2",
|
|
184
|
-
children: [
|
|
250
|
+
children: [L.map((e, t) => /* @__PURE__ */ g("div", {
|
|
185
251
|
className: "flex items-center justify-between gap-3 rounded-md border border-input p-3",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ g("div", {
|
|
187
253
|
className: "flex items-center gap-3 min-w-0",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ h("span", {
|
|
189
255
|
className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
|
|
190
256
|
children: t + 1
|
|
191
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ g("button", {
|
|
192
258
|
type: "button",
|
|
193
259
|
className: "min-w-0 truncate text-left text-sm font-medium hover:underline",
|
|
194
|
-
onClick: () =>
|
|
260
|
+
onClick: () => O(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
195
261
|
children: [e.key ? `${e.key} ` : "", e.title ?? "Untitled work item"]
|
|
196
262
|
})]
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
-
variant: (
|
|
263
|
+
}), /* @__PURE__ */ h(_, {
|
|
264
|
+
variant: (X[e.id] ?? 0) === 0 ? "default" : "secondary",
|
|
199
265
|
className: "shrink-0",
|
|
200
|
-
children: (
|
|
266
|
+
children: (X[e.id] ?? 0) === 0 ? "On critical path" : `${E(X[e.id] ?? 0)} slack`
|
|
201
267
|
})]
|
|
202
|
-
}, e.id)),
|
|
268
|
+
}, e.id)), L.length === 0 && /* @__PURE__ */ h("p", {
|
|
203
269
|
className: "text-center text-muted-foreground py-8",
|
|
204
270
|
children: "No schedulable dependencies yet. Add dependencies from a task's detail page to compute a critical path."
|
|
205
271
|
})]
|
|
206
|
-
})] }),
|
|
207
|
-
j && /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, { children: /* @__PURE__ */ d(g, { children: [
|
|
272
|
+
})] }), R && /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ g(x, { children: [
|
|
208
273
|
"Not on the critical path (",
|
|
209
|
-
|
|
274
|
+
$.length,
|
|
210
275
|
" item",
|
|
211
|
-
|
|
276
|
+
$.length === 1 ? "" : "s",
|
|
212
277
|
")"
|
|
213
|
-
] }) }), /* @__PURE__ */
|
|
278
|
+
] }) }), /* @__PURE__ */ g(y, {
|
|
214
279
|
className: "space-y-2",
|
|
215
280
|
children: [
|
|
216
|
-
|
|
281
|
+
$.map((e) => /* @__PURE__ */ g("div", {
|
|
217
282
|
className: "flex items-center justify-between gap-3 rounded-md border border-input p-3",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ g("button", {
|
|
219
284
|
type: "button",
|
|
220
285
|
className: "min-w-0 truncate text-left text-sm font-medium hover:underline",
|
|
221
|
-
onClick: () =>
|
|
286
|
+
onClick: () => O(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
222
287
|
children: [e.key ? `${e.key} ` : "", e.title]
|
|
223
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ g(_, {
|
|
224
289
|
variant: "secondary",
|
|
225
290
|
className: "shrink-0",
|
|
226
|
-
children: [
|
|
291
|
+
children: [E(X[e.id] ?? 0), " slack"]
|
|
227
292
|
})]
|
|
228
293
|
}, e.id)),
|
|
229
|
-
!
|
|
294
|
+
!G && J && /* @__PURE__ */ g("p", {
|
|
230
295
|
className: "text-center text-destructive py-4",
|
|
231
296
|
role: "alert",
|
|
232
|
-
children: ["Some work items could not be loaded, so this list may be incomplete: ",
|
|
297
|
+
children: ["Some work items could not be loaded, so this list may be incomplete: ", J]
|
|
233
298
|
}),
|
|
234
|
-
|
|
299
|
+
G && /* @__PURE__ */ g("p", {
|
|
235
300
|
className: "text-center text-destructive py-8",
|
|
236
|
-
children: [
|
|
301
|
+
children: [
|
|
302
|
+
"The rest of this project's work items could not be loaded:",
|
|
303
|
+
" ",
|
|
304
|
+
G.message
|
|
305
|
+
]
|
|
237
306
|
}),
|
|
238
|
-
!
|
|
307
|
+
!G && W && $.length === 0 && /* @__PURE__ */ h("p", {
|
|
239
308
|
className: "text-center text-muted-foreground py-8",
|
|
240
309
|
children: "Loading…"
|
|
241
310
|
}),
|
|
242
|
-
!
|
|
311
|
+
!G && !W && $.length === 0 && /* @__PURE__ */ h("p", {
|
|
243
312
|
className: "text-center text-muted-foreground py-8",
|
|
244
313
|
children: "Every scheduled work item in this project is on the critical path."
|
|
245
314
|
})
|
|
246
315
|
]
|
|
247
|
-
})] })
|
|
316
|
+
})] })] })
|
|
248
317
|
]
|
|
249
318
|
});
|
|
250
319
|
}
|
|
251
320
|
//#endregion
|
|
252
|
-
export {
|
|
321
|
+
export { D as ProjectsCriticalPathPagePage };
|
|
253
322
|
|
|
254
323
|
//# sourceMappingURL=ProjectsCriticalPathPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsCriticalPathPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsCriticalPathPagePage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { Route, AlertTriangle } from 'lucide-react';\nimport { useEntityId } from '../hooks/useEntityId';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { ProjectSelect } from '../controls/Pickers';\n\n/**\n * Critical path view for a project (BOFF-8047). planmagnetCriticalPath / planmagnetDependencyCycles were\n * served and prod-verified (duration-weighted CPM over WorkItemDependency, per the P0 decision that this type\n * is CPM-only) but had no UI. Reached from the sidebar (no project preselects one) and from a project's detail\n * page (\"Critical path\" button).\n */\n\nconst GET_CRITICAL_PATH = gql`\n query GetProjectCriticalPath($workspaceId: ID!, $projectId: ID) {\n planmagnetCriticalPath(workspaceId: $workspaceId, projectId: $projectId) {\n totalDurationMinutes\n slack\n path {\n id\n title\n key\n }\n }\n planmagnetDependencyCycles(workspaceId: $workspaceId, projectId: $projectId) {\n workItemIds\n length\n }\n }\n`;\n\nconst GET_CRITICAL_PATH_PROJECT = gql`\n query GetCriticalPathProject($id: ID!) {\n planmagnetProject(id: $id) {\n id\n name\n }\n }\n`;\n\nconst NON_CRITICAL_PAGE_SIZE = 100;\n\n// Every work item in the project that the critical-path chain does NOT run through (excludeIds is the\n// path's own ids), so the slack map's per-node minutes have somewhere to show up. Paged like\n// ExportWorkItemsButton: a project can have more items than one page, and stopping at the first page\n// would silently drop items with real slack from the list below.\nconst GET_NON_CRITICAL_WORK_ITEMS = gql`\n query GetNonCriticalWorkItems(\n $workspaceId: ID!\n $filter: PlanmagnetWorkItemFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetWorkItems(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n title\n key\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n`;\n\nfunction durationLabel(totalMinutes: number): string {\n if (totalMinutes <= 0) return '0 days';\n // Round once, then split. Rounding the day remainder separately printed \"1d 24h\" for 47.5–47.9 h, and fractional\n // minutes (durations are elapsed ms / 60000) printed decimals.\n const roundedMinutes = Math.round(totalMinutes);\n if (roundedMinutes < 60) return `${Math.max(1, roundedMinutes)}m`;\n const totalHours = Math.round(roundedMinutes / 60);\n const days = Math.floor(totalHours / 24);\n const hours = totalHours % 24;\n if (days === 0) return `${hours}h`;\n return hours > 0 ? `${days}d ${hours}h` : `${days} day${days === 1 ? '' : 's'}`;\n}\n\nexport function ProjectsCriticalPathPagePage() {\n const projectId = useEntityId();\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [pickerProjectId, setPickerProjectId] = useState('');\n\n const { data, loading, error } = useQuery<{\n planmagnetCriticalPath: {\n totalDurationMinutes: number;\n // The SDL doc comment on this field says \"days\" but the resolver\n // actually returns MINUTES (wspace-planmagnet-svc\n // src/modules/dependency/services/dependency-graph.ts:53, backed by\n // durationMinutes() in dependency.service.ts) — same unit as\n // totalDurationMinutes above. Feed values through durationLabel()\n // below, never render this number bare. SDL doc fix tracked\n // separately; do not \"fix\" this comment to match the SDL.\n slack: Record<string, number>;\n path: { id: string; title: string | null; key: string | null }[];\n };\n planmagnetDependencyCycles: { workItemIds: string[]; length: number }[];\n }>(GET_CRITICAL_PATH, {\n variables: { workspaceId: workspaceId ?? '', projectId },\n skip: !workspaceId || !projectId,\n });\n const { data: projectData } = useQuery<{\n planmagnetProject: { id: string; name: string } | null;\n }>(GET_CRITICAL_PATH_PROJECT, { variables: { id: projectId }, skip: !projectId });\n\n const path = data?.planmagnetCriticalPath.path ?? [];\n const hasCriticalPath = path.length > 0;\n const pathIds = path.map((node) => node.id);\n\n const {\n data: otherData,\n loading: otherLoading,\n error: otherError,\n fetchMore: fetchMoreOther,\n } = useQuery<{\n planmagnetWorkItems: {\n items: { id: string; title: string; key: string }[];\n pageInfo: { hasNextPage: boolean; endCursor: string | null };\n };\n }>(GET_NON_CRITICAL_WORK_ITEMS, {\n variables: {\n workspaceId: workspaceId ?? '',\n filter: { projectId, excludeIds: pathIds },\n pagination: { first: NON_CRITICAL_PAGE_SIZE },\n },\n skip: !workspaceId || !projectId || !hasCriticalPath,\n });\n\n const otherPageInfo = otherData?.planmagnetWorkItems.pageInfo;\n // A failed later page must not leave a short list that reads as complete: remember it and say so.\n const [moreError, setMoreError] = useState<string | null>(null);\n useEffect(() => {\n if (moreError || !otherPageInfo?.hasNextPage || !otherPageInfo.endCursor) return;\n const after = otherPageInfo.endCursor;\n fetchMoreOther({\n variables: { pagination: { first: NON_CRITICAL_PAGE_SIZE, after } },\n updateQuery: (prev, { fetchMoreResult }) => ({\n planmagnetWorkItems: {\n ...fetchMoreResult.planmagnetWorkItems,\n items: [...prev.planmagnetWorkItems.items, ...fetchMoreResult.planmagnetWorkItems.items],\n },\n }),\n })\n .then((result) => {\n // fe-libs queries resolve with { error } instead of rejecting.\n const failure = (result as { error?: { message?: string } } | undefined)?.error;\n if (failure) setMoreError(failure.message ?? 'Unknown error');\n })\n .catch((e: unknown) => setMoreError(e instanceof Error ? e.message : String(e)));\n }, [moreError, otherPageInfo?.hasNextPage, otherPageInfo?.endCursor, fetchMoreOther]);\n\n if (!projectId) {\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold flex items-center gap-2\">\n <Route className=\"h-5 w-5 text-primary\" />\n Critical Path\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n Choose a project to see its critical path.\n </p>\n </div>\n <Card>\n <CardContent className=\"pt-6 space-y-3\">\n <label htmlFor=\"critical-path-project\" className=\"text-sm font-medium\">\n Project\n </label>\n <ProjectSelect\n id=\"critical-path-project\"\n value={pickerProjectId}\n onChange={setPickerProjectId}\n noneLabel=\"Choose a project…\"\n />\n <button\n type=\"button\"\n className=\"text-sm text-primary hover:underline disabled:pointer-events-none disabled:opacity-50\"\n disabled={!pickerProjectId}\n onClick={() =>\n navigate(`/projects/critical-path-page/${encodeURIComponent(pickerProjectId)}`)\n }\n >\n View critical path →\n </button>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n // Only before the first load: a refetch must not blank the page.\n if (loading && !data)\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n if (error)\n return <div className=\"p-6 text-red-500\">Error computing critical path: {error.message}</div>;\n\n const slack = data?.planmagnetCriticalPath.slack ?? {};\n const totalMinutes = data?.planmagnetCriticalPath.totalDurationMinutes ?? 0;\n const cycles = data?.planmagnetDependencyCycles ?? [];\n const projectName = projectData?.planmagnetProject?.name;\n const otherItems = [...(otherData?.planmagnetWorkItems.items ?? [])].sort(\n (a, b) => (slack[a.id] ?? 0) - (slack[b.id] ?? 0)\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold flex items-center gap-2\">\n <Route className=\"h-5 w-5 text-primary\" />\n Critical Path\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n {projectName ?? 'This project'} — the longest chain of dependent work; a delay on any\n node here delays the whole chain.\n </p>\n </div>\n </div>\n\n {cycles.length > 0 && (\n <div\n role=\"alert\"\n className=\"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive\"\n >\n <AlertTriangle className=\"h-4 w-4 mt-0.5 shrink-0\" />\n <div>\n <p className=\"font-medium\">\n {cycles.length} dependency cycle{cycles.length === 1 ? '' : 's'} detected.\n </p>\n <p>\n A cycle has no valid schedule, so the path below excludes the items involved. Break\n each cycle by removing or re-pointing one of its dependencies from the task detail\n page.\n </p>\n </div>\n </div>\n )}\n\n <Card>\n <CardHeader>\n <CardTitle>Total duration</CardTitle>\n </CardHeader>\n <CardContent>\n <p className=\"text-2xl font-bold\">{durationLabel(totalMinutes)}</p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n Work item spans plus dependency lag/lead, summed along the longest chain.\n </p>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>\n Path ({path.length} item{path.length === 1 ? '' : 's'})\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {path.map((node, index) => (\n <div\n key={node.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <div className=\"flex items-center gap-3 min-w-0\">\n <span className=\"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground\">\n {index + 1}\n </span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate text-left text-sm font-medium hover:underline\"\n onClick={() =>\n navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(node.id)}`)\n }\n >\n {node.key ? `${node.key} ` : ''}\n {node.title ?? 'Untitled work item'}\n </button>\n </div>\n <Badge\n variant={(slack[node.id] ?? 0) === 0 ? 'default' : 'secondary'}\n className=\"shrink-0\"\n >\n {(slack[node.id] ?? 0) === 0\n ? 'On critical path'\n : `${durationLabel(slack[node.id] ?? 0)} slack`}\n </Badge>\n </div>\n ))}\n {path.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">\n No schedulable dependencies yet. Add dependencies from a task's detail page to\n compute a critical path.\n </p>\n )}\n </CardContent>\n </Card>\n\n {hasCriticalPath && (\n <Card>\n <CardHeader>\n <CardTitle>\n Not on the critical path ({otherItems.length} item\n {otherItems.length === 1 ? '' : 's'})\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {otherItems.map((node) => (\n <div\n key={node.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <button\n type=\"button\"\n className=\"min-w-0 truncate text-left text-sm font-medium hover:underline\"\n onClick={() =>\n navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(node.id)}`)\n }\n >\n {node.key ? `${node.key} ` : ''}\n {node.title}\n </button>\n <Badge variant=\"secondary\" className=\"shrink-0\">\n {durationLabel(slack[node.id] ?? 0)} slack\n </Badge>\n </div>\n ))}\n {!otherError && moreError && (\n <p className=\"text-center text-destructive py-4\" role=\"alert\">\n Some work items could not be loaded, so this list may be incomplete: {moreError}\n </p>\n )}\n {otherError && (\n <p className=\"text-center text-destructive py-8\">\n The rest of this project's work items could not be loaded: {otherError.message}\n </p>\n )}\n {!otherError && otherLoading && otherItems.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">Loading…</p>\n )}\n {!otherError && !otherLoading && otherItems.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">\n Every scheduled work item in this project is on the critical path.\n </p>\n )}\n </CardContent>\n </Card>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,IAAoB,CAAG;;;;;;;;;;;;;;;;GAkBvB,IAA4B,CAAG;;;;;;;GAS/B,IAAyB,KAMzB,IAA8B,CAAG;;;;;;;;;;;;;;;;;;;AAoBvC,SAAS,EAAc,GAA8B;AACnD,KAAI,KAAgB,EAAG,QAAO;CAG9B,IAAM,IAAiB,KAAK,MAAM,EAAa;AAC/C,KAAI,IAAiB,GAAI,QAAO,GAAG,KAAK,IAAI,GAAG,EAAe,CAAC;CAC/D,IAAM,IAAa,KAAK,MAAM,IAAiB,GAAG,EAC5C,IAA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C,kBAAC,KAAD;MAAG,WAAU;gBAAb,CAAiD,+DACkB,EAAW,QAC1E;;KAEL,CAAC,KAAc,KAAgB,EAAW,WAAW,KACpD,kBAAC,KAAD;MAAG,WAAU;gBAAyC;MAAY,CAAA;KAEnE,CAAC,KAAc,CAAC,KAAgB,EAAW,WAAW,KACrD,kBAAC,KAAD;MAAG,WAAU;gBAAyC;MAElD,CAAA;KAEM;MACT,EAAA,CAAA;GAEL"}
|
|
1
|
+
{"version":3,"file":"ProjectsCriticalPathPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsCriticalPathPagePage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { Route, AlertTriangle, List, Waypoints } from 'lucide-react';\nimport { useEntityId } from '../hooks/useEntityId';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { ProjectSelect } from '../controls/Pickers';\nimport { DependencyGraph } from '../dependency/DependencyGraph';\nimport {\n criticalEdgeIdsFromPath,\n useProjectWorkItemsGraph,\n} from '../dependency/useProjectWorkItemsGraph';\n\n/**\n * Critical path view for a project (BOFF-8047). planmagnetCriticalPath / planmagnetDependencyCycles were\n * served and prod-verified (duration-weighted CPM over WorkItemDependency, per the P0 decision that this type\n * is CPM-only) but had no UI. Reached from the sidebar (no project preselects one) and from a project's detail\n * page (\"Critical path\" button).\n *\n * PDM-27: the \"Path\" list below is now one of two views over the same data — a \"Graph\" toggle draws the\n * project's full dependency graph (every work item, not just the critical chain) with the chain and its own\n * edges emphasised. The list stays the default and the always-available text equivalent.\n */\n\nconst GET_CRITICAL_PATH = gql`\n query GetProjectCriticalPath($workspaceId: ID!, $projectId: ID) {\n planmagnetCriticalPath(workspaceId: $workspaceId, projectId: $projectId) {\n totalDurationMinutes\n slack\n path {\n id\n title\n key\n }\n }\n planmagnetDependencyCycles(workspaceId: $workspaceId, projectId: $projectId) {\n workItemIds\n length\n }\n }\n`;\n\nconst GET_CRITICAL_PATH_PROJECT = gql`\n query GetCriticalPathProject($id: ID!) {\n planmagnetProject(id: $id) {\n id\n name\n }\n }\n`;\n\nconst NON_CRITICAL_PAGE_SIZE = 100;\n\n// Every work item in the project that the critical-path chain does NOT run through (excludeIds is the\n// path's own ids), so the slack map's per-node minutes have somewhere to show up. Paged like\n// ExportWorkItemsButton: a project can have more items than one page, and stopping at the first page\n// would silently drop items with real slack from the list below.\nconst GET_NON_CRITICAL_WORK_ITEMS = gql`\n query GetNonCriticalWorkItems(\n $workspaceId: ID!\n $filter: PlanmagnetWorkItemFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetWorkItems(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n title\n key\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n`;\n\nfunction durationLabel(totalMinutes: number): string {\n if (totalMinutes <= 0) return '0 days';\n // Round once, then split. Rounding the day remainder separately printed \"1d 24h\" for 47.5–47.9 h, and fractional\n // minutes (durations are elapsed ms / 60000) printed decimals.\n const roundedMinutes = Math.round(totalMinutes);\n if (roundedMinutes < 60) return `${Math.max(1, roundedMinutes)}m`;\n const totalHours = Math.round(roundedMinutes / 60);\n const days = Math.floor(totalHours / 24);\n const hours = totalHours % 24;\n if (days === 0) return `${hours}h`;\n return hours > 0 ? `${days}d ${hours}h` : `${days} day${days === 1 ? '' : 's'}`;\n}\n\nexport function ProjectsCriticalPathPagePage() {\n const projectId = useEntityId();\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [pickerProjectId, setPickerProjectId] = useState('');\n const [view, setView] = useState<'list' | 'graph'>('list');\n\n const { data, loading, error } = useQuery<{\n planmagnetCriticalPath: {\n totalDurationMinutes: number;\n // The SDL doc comment on this field says \"days\" but the resolver\n // actually returns MINUTES (wspace-planmagnet-svc\n // src/modules/dependency/services/dependency-graph.ts:53, backed by\n // durationMinutes() in dependency.service.ts) — same unit as\n // totalDurationMinutes above. Feed values through durationLabel()\n // below, never render this number bare. SDL doc fix tracked\n // separately; do not \"fix\" this comment to match the SDL.\n slack: Record<string, number>;\n path: { id: string; title: string | null; key: string | null }[];\n };\n planmagnetDependencyCycles: { workItemIds: string[]; length: number }[];\n }>(GET_CRITICAL_PATH, {\n variables: { workspaceId: workspaceId ?? '', projectId },\n skip: !workspaceId || !projectId,\n });\n const { data: projectData } = useQuery<{\n planmagnetProject: { id: string; name: string } | null;\n }>(GET_CRITICAL_PATH_PROJECT, { variables: { id: projectId }, skip: !projectId });\n\n const path = data?.planmagnetCriticalPath.path ?? [];\n const hasCriticalPath = path.length > 0;\n const pathIds = path.map((node) => node.id);\n\n // Only fetched while the Graph view is showing — the full item+dependency list the List view never needs.\n const graph = useProjectWorkItemsGraph(view === 'graph' ? projectId : undefined);\n const criticalNodeIds = new Set(pathIds);\n const criticalEdgeIds = criticalEdgeIdsFromPath(path, graph.items);\n\n const {\n data: otherData,\n loading: otherLoading,\n error: otherError,\n fetchMore: fetchMoreOther,\n } = useQuery<{\n planmagnetWorkItems: {\n items: { id: string; title: string; key: string }[];\n pageInfo: { hasNextPage: boolean; endCursor: string | null };\n };\n }>(GET_NON_CRITICAL_WORK_ITEMS, {\n variables: {\n workspaceId: workspaceId ?? '',\n filter: { projectId, excludeIds: pathIds },\n pagination: { first: NON_CRITICAL_PAGE_SIZE },\n },\n skip: !workspaceId || !projectId || !hasCriticalPath,\n });\n\n const otherPageInfo = otherData?.planmagnetWorkItems.pageInfo;\n // A failed later page must not leave a short list that reads as complete: remember it and say so.\n const [moreError, setMoreError] = useState<string | null>(null);\n useEffect(() => {\n if (moreError || !otherPageInfo?.hasNextPage || !otherPageInfo.endCursor) return;\n const after = otherPageInfo.endCursor;\n fetchMoreOther({\n variables: { pagination: { first: NON_CRITICAL_PAGE_SIZE, after } },\n updateQuery: (prev, { fetchMoreResult }) => ({\n planmagnetWorkItems: {\n ...fetchMoreResult.planmagnetWorkItems,\n items: [...prev.planmagnetWorkItems.items, ...fetchMoreResult.planmagnetWorkItems.items],\n },\n }),\n })\n .then((result) => {\n // fe-libs queries resolve with { error } instead of rejecting.\n const failure = (result as { error?: { message?: string } } | undefined)?.error;\n if (failure) setMoreError(failure.message ?? 'Unknown error');\n })\n .catch((e: unknown) => setMoreError(e instanceof Error ? e.message : String(e)));\n }, [moreError, otherPageInfo?.hasNextPage, otherPageInfo?.endCursor, fetchMoreOther]);\n\n if (!projectId) {\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold flex items-center gap-2\">\n <Route className=\"h-5 w-5 text-primary\" />\n Critical Path\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n Choose a project to see its critical path.\n </p>\n </div>\n <Card>\n <CardContent className=\"pt-6 space-y-3\">\n <label htmlFor=\"critical-path-project\" className=\"text-sm font-medium\">\n Project\n </label>\n <ProjectSelect\n id=\"critical-path-project\"\n value={pickerProjectId}\n onChange={setPickerProjectId}\n noneLabel=\"Choose a project…\"\n />\n <button\n type=\"button\"\n className=\"text-sm text-primary hover:underline disabled:pointer-events-none disabled:opacity-50\"\n disabled={!pickerProjectId}\n onClick={() =>\n navigate(`/projects/critical-path-page/${encodeURIComponent(pickerProjectId)}`)\n }\n >\n View critical path →\n </button>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n // Only before the first load: a refetch must not blank the page.\n if (loading && !data)\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n if (error)\n return <div className=\"p-6 text-red-500\">Error computing critical path: {error.message}</div>;\n\n const slack = data?.planmagnetCriticalPath.slack ?? {};\n const totalMinutes = data?.planmagnetCriticalPath.totalDurationMinutes ?? 0;\n const cycles = data?.planmagnetDependencyCycles ?? [];\n const projectName = projectData?.planmagnetProject?.name;\n const otherItems = [...(otherData?.planmagnetWorkItems.items ?? [])].sort(\n (a, b) => (slack[a.id] ?? 0) - (slack[b.id] ?? 0)\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div>\n <h1 className=\"text-2xl font-semibold flex items-center gap-2\">\n <Route className=\"h-5 w-5 text-primary\" />\n Critical Path\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n {projectName ?? 'This project'} — the longest chain of dependent work; a delay on any\n node here delays the whole chain.\n </p>\n </div>\n <div className=\"flex gap-1\" data-testid=\"critical-path-view-toggle\">\n <button\n type=\"button\"\n aria-pressed={view === 'list'}\n className={`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md ${view === 'list' ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n onClick={() => setView('list')}\n >\n <List className=\"h-3.5 w-3.5\" />\n List\n </button>\n <button\n type=\"button\"\n aria-pressed={view === 'graph'}\n className={`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md ${view === 'graph' ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n onClick={() => setView('graph')}\n >\n <Waypoints className=\"h-3.5 w-3.5\" />\n Graph\n </button>\n </div>\n </div>\n\n {cycles.length > 0 && (\n <div\n role=\"alert\"\n className=\"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive\"\n >\n <AlertTriangle className=\"h-4 w-4 mt-0.5 shrink-0\" />\n <div>\n <p className=\"font-medium\">\n {cycles.length} dependency cycle{cycles.length === 1 ? '' : 's'} detected.\n </p>\n <p>\n A cycle has no valid schedule, so the path below excludes the items involved. Break\n each cycle by removing or re-pointing one of its dependencies from the task detail\n page.\n </p>\n </div>\n </div>\n )}\n\n <Card>\n <CardHeader>\n <CardTitle>Total duration</CardTitle>\n </CardHeader>\n <CardContent>\n <p className=\"text-2xl font-bold\">{durationLabel(totalMinutes)}</p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n Work item spans plus dependency lag/lead, summed along the longest chain.\n </p>\n </CardContent>\n </Card>\n\n {view === 'graph' && (\n <Card>\n <CardHeader>\n <CardTitle>Dependency graph</CardTitle>\n </CardHeader>\n <CardContent>\n {graph.error ? (\n <p className=\"text-center text-destructive py-8\">\n The project's dependency graph could not be loaded: {graph.error.message}\n </p>\n ) : graph.loading && graph.items.length === 0 ? (\n <p className=\"text-center text-muted-foreground py-8\">Loading…</p>\n ) : (\n <>\n {graph.moreError && (\n <p role=\"alert\" className=\"mb-3 text-sm text-destructive\">\n Some work items could not be loaded, so this graph may be incomplete:{' '}\n {graph.moreError}\n </p>\n )}\n {graph.truncated && (\n <p className=\"mb-3 text-sm text-muted-foreground\">\n This project has more than {graph.items.length} work items — only the first{' '}\n {graph.items.length} are graphed.\n </p>\n )}\n <DependencyGraph\n nodes={graph.items.map((item) => ({\n id: item.id,\n key: item.key,\n title: item.title,\n status: item.status,\n }))}\n edges={graph.items.flatMap((item) =>\n item.dependencies.map((dep) => ({\n id: dep.id,\n predecessorId: item.id,\n successorId: dep.successorId,\n type: dep.type,\n lagMinutes: dep.lagMinutes,\n }))\n )}\n criticalNodeIds={criticalNodeIds}\n criticalEdgeIds={criticalEdgeIds}\n onActivateNode={(id) =>\n navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(id)}`)\n }\n emptyMessage=\"No work items in this project yet.\"\n ariaLabel={`Dependency graph for ${projectName ?? 'this project'}`}\n />\n </>\n )}\n </CardContent>\n </Card>\n )}\n\n {view === 'list' && (\n <>\n <Card>\n <CardHeader>\n <CardTitle>\n Path ({path.length} item{path.length === 1 ? '' : 's'})\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {path.map((node, index) => (\n <div\n key={node.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <div className=\"flex items-center gap-3 min-w-0\">\n <span className=\"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground\">\n {index + 1}\n </span>\n <button\n type=\"button\"\n className=\"min-w-0 truncate text-left text-sm font-medium hover:underline\"\n onClick={() =>\n navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(node.id)}`)\n }\n >\n {node.key ? `${node.key} ` : ''}\n {node.title ?? 'Untitled work item'}\n </button>\n </div>\n <Badge\n variant={(slack[node.id] ?? 0) === 0 ? 'default' : 'secondary'}\n className=\"shrink-0\"\n >\n {(slack[node.id] ?? 0) === 0\n ? 'On critical path'\n : `${durationLabel(slack[node.id] ?? 0)} slack`}\n </Badge>\n </div>\n ))}\n {path.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">\n No schedulable dependencies yet. Add dependencies from a task's detail page\n to compute a critical path.\n </p>\n )}\n </CardContent>\n </Card>\n\n {hasCriticalPath && (\n <Card>\n <CardHeader>\n <CardTitle>\n Not on the critical path ({otherItems.length} item\n {otherItems.length === 1 ? '' : 's'})\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {otherItems.map((node) => (\n <div\n key={node.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <button\n type=\"button\"\n className=\"min-w-0 truncate text-left text-sm font-medium hover:underline\"\n onClick={() =>\n navigate(`/tasks/task-detail-page?taskId=${encodeURIComponent(node.id)}`)\n }\n >\n {node.key ? `${node.key} ` : ''}\n {node.title}\n </button>\n <Badge variant=\"secondary\" className=\"shrink-0\">\n {durationLabel(slack[node.id] ?? 0)} slack\n </Badge>\n </div>\n ))}\n {!otherError && moreError && (\n <p className=\"text-center text-destructive py-4\" role=\"alert\">\n Some work items could not be loaded, so this list may be incomplete: {moreError}\n </p>\n )}\n {otherError && (\n <p className=\"text-center text-destructive py-8\">\n The rest of this project's work items could not be loaded:{' '}\n {otherError.message}\n </p>\n )}\n {!otherError && otherLoading && otherItems.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">Loading…</p>\n )}\n {!otherError && !otherLoading && otherItems.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">\n Every scheduled work item in this project is on the critical path.\n </p>\n )}\n </CardContent>\n </Card>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAM,IAAoB,CAAG;;;;;;;;;;;;;;;;GAkBvB,IAA4B,CAAG;;;;;;;GAS/B,IAAyB,KAMzB,IAA8B,CAAG;;;;;;;;;;;;;;;;;;;AAoBvC,SAAS,EAAc,GAA8B;AACnD,KAAI,KAAgB,EAAG,QAAO;CAG9B,IAAM,IAAiB,KAAK,MAAM,EAAa;AAC/C,KAAI,IAAiB,GAAI,QAAO,GAAG,KAAK,IAAI,GAAG,EAAe,CAAC;CAC/D,IAAM,IAAa,KAAK,MAAM,IAAiB,GAAG,EAC5C,IAAO,KAAK,MAAM,IAAa,GAAG,EAClC,IAAQ,IAAa;AAE3B,QADI,MAAS,IAAU,GAAG,EAAM,KACzB,IAAQ,IAAI,GAAG,EAAK,IAAI,EAAM,KAAK,GAAG,EAAK,MAAM,MAAS,IAAI,KAAK;;AAG5E,SAAgB,IAA+B;CAC7C,IAAM,IAAY,GAAa,EACzB,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAiB,KAAsB,EAAS,GAAG,EACpD,CAAC,GAAM,KAAW,EAA2B,OAAO,EAEpD,EAAE,SAAM,YAAS,aAAU,EAc9B,GAAmB;EACpB,WAAW;GAAE,aAAa,KAAe;GAAI;GAAW;EACxD,MAAM,CAAC,KAAe,CAAC;EACxB,CAAC,EACI,EAAE,MAAM,MAAgB,EAE3B,GAA2B;EAAE,WAAW,EAAE,IAAI,GAAW;EAAE,MAAM,CAAC;EAAW,CAAC,EAE3E,IAAO,GAAM,uBAAuB,QAAQ,EAAE,EAC9C,IAAkB,EAAK,SAAS,GAChC,IAAU,EAAK,KAAK,MAAS,EAAK,GAAG,EAGrC,IAAQ,EAAyB,MAAS,UAAU,IAAY,KAAA,EAAU,EAC1E,IAAkB,IAAI,IAAI,EAAQ,E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agePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsGanttPagePage.tsx"],"names":[],"mappings":"AA0CA,wBAAgB,qBAAqB,4CAgIpC"}
|