@burdenoff/microfe-planmagnet 2026.930.4 → 2026.930.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReleaseChecklistCard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/releases/ReleaseChecklistCard.tsx"],"names":[],"mappings":"AA4FA,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,SAAS,GACV,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,
|
|
1
|
+
{"version":3,"file":"ReleaseChecklistCard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/releases/ReleaseChecklistCard.tsx"],"names":[],"mappings":"AA4FA,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,SAAS,GACV,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,2CAgOA"}
|
|
@@ -7,9 +7,9 @@ import { Copy as a, Plus as ee, X as o } from "lucide-react";
|
|
|
7
7
|
import { gql as s } from "@apollo/client";
|
|
8
8
|
import { useMutation as c, useQuery as l } from "@apollo/client/react";
|
|
9
9
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
-
import { Badge as
|
|
10
|
+
import { Badge as te, Button as f, Card as p, CardContent as m, CardHeader as h, CardTitle as g, Input as ne } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/planmagnet/releases/ReleaseChecklistCard.tsx
|
|
12
|
-
var
|
|
12
|
+
var re = s`
|
|
13
13
|
query ReleaseChecklist($id: ID!) {
|
|
14
14
|
planmagnetRelease(id: $id) {
|
|
15
15
|
id
|
|
@@ -25,7 +25,7 @@ var y = s`
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`, _ = s`
|
|
29
29
|
query ReleaseChecklistSources($workspaceId: ID!, $filter: PlanmagnetReleaseFilter) {
|
|
30
30
|
planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: { first: 50 }) {
|
|
31
31
|
items {
|
|
@@ -35,73 +35,73 @@ var y = s`
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`, v = s`
|
|
39
39
|
mutation ReleaseChecklistAdd($releaseId: ID!, $input: PlanmagnetAddReleaseChecklistItemInput!) {
|
|
40
40
|
planmagnetAddReleaseChecklistItem(releaseId: $releaseId, input: $input) {
|
|
41
41
|
id
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
44
|
+
`, y = s`
|
|
45
45
|
mutation ReleaseChecklistSetDone($id: ID!, $done: Boolean!) {
|
|
46
46
|
planmagnetSetReleaseChecklistItemDone(id: $id, done: $done) {
|
|
47
47
|
id
|
|
48
48
|
isDone
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`, b = s`
|
|
52
52
|
mutation ReleaseChecklistRemove($id: ID!) {
|
|
53
53
|
planmagnetRemoveReleaseChecklistItem(id: $id)
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
55
|
+
`, x = s`
|
|
56
56
|
mutation ReleaseChecklistCopy($releaseId: ID!, $fromReleaseId: ID!) {
|
|
57
57
|
planmagnetCopyReleaseChecklist(releaseId: $releaseId, fromReleaseId: $fromReleaseId) {
|
|
58
58
|
id
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
`;
|
|
62
|
-
function
|
|
63
|
-
let { workspaceId:
|
|
62
|
+
function S({ releaseId: s, projectId: S }) {
|
|
63
|
+
let { workspaceId: C } = e(), { data: w, loading: T, error: E } = l(re, {
|
|
64
64
|
variables: { id: s },
|
|
65
65
|
skip: !s
|
|
66
|
-
}), [
|
|
66
|
+
}), [D, O] = i(!1), k = l(_, {
|
|
67
67
|
variables: {
|
|
68
|
-
workspaceId:
|
|
69
|
-
filter:
|
|
68
|
+
workspaceId: C,
|
|
69
|
+
filter: S ? { projectId: S } : {}
|
|
70
70
|
},
|
|
71
|
-
skip: !
|
|
72
|
-
}),
|
|
71
|
+
skip: !D || !C
|
|
72
|
+
}), A = {
|
|
73
73
|
refetchQueries: [
|
|
74
74
|
"ReleaseChecklist",
|
|
75
75
|
"ReleaseReadiness",
|
|
76
76
|
"GetRelease"
|
|
77
77
|
],
|
|
78
78
|
awaitRefetchQueries: !0
|
|
79
|
-
}, [N, P] = c(
|
|
80
|
-
|
|
79
|
+
}, [j, M] = c(v, A), [N, P] = c(y, A), [F, I] = c(b, A), [L, R] = c(x, A), [z, B] = i(""), [V, H] = i(!0), [U, W] = i(""), [G, K] = i(null), [q, J] = i(null), Y = M.loading || P.loading || I.loading || R.loading, X = w?.planmagnetRelease?.checklist ?? [], Z = X.filter((e) => e.isDone).length, Q = X.filter((e) => e.isRequired && !e.isDone).length, ie = (k.data?.planmagnetReleases.items ?? []).filter((e) => e.id !== s), $ = async (e, t) => {
|
|
80
|
+
K(null);
|
|
81
81
|
try {
|
|
82
82
|
return await n(e()), !0;
|
|
83
83
|
} catch (e) {
|
|
84
|
-
return
|
|
84
|
+
return K(e instanceof Error ? e.message : t), !1;
|
|
85
85
|
}
|
|
86
|
-
},
|
|
87
|
-
await $(() =>
|
|
86
|
+
}, ae = async () => {
|
|
87
|
+
await $(() => j({ variables: {
|
|
88
88
|
releaseId: s,
|
|
89
89
|
input: {
|
|
90
|
-
label:
|
|
91
|
-
isRequired:
|
|
90
|
+
label: z.trim(),
|
|
91
|
+
isRequired: V
|
|
92
92
|
}
|
|
93
|
-
} }), "The item could not be added.") && (
|
|
94
|
-
},
|
|
95
|
-
await $(() =>
|
|
93
|
+
} }), "The item could not be added.") && (B(""), H(!0));
|
|
94
|
+
}, oe = async () => {
|
|
95
|
+
await $(() => L({ variables: {
|
|
96
96
|
releaseId: s,
|
|
97
|
-
fromReleaseId:
|
|
98
|
-
} }), "The checklist could not be copied.") && (
|
|
97
|
+
fromReleaseId: U
|
|
98
|
+
} }), "The checklist could not be copied.") && (O(!1), W(""));
|
|
99
99
|
};
|
|
100
|
-
return /* @__PURE__ */ d(
|
|
100
|
+
return /* @__PURE__ */ d(p, {
|
|
101
101
|
"data-testid": "release-checklist",
|
|
102
|
-
children: [/* @__PURE__ */ d(
|
|
102
|
+
children: [/* @__PURE__ */ d(h, {
|
|
103
103
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
104
|
-
children: [/* @__PURE__ */ u(
|
|
104
|
+
children: [/* @__PURE__ */ u(g, { children: "Readiness checklist" }), X.length > 0 && /* @__PURE__ */ d("span", {
|
|
105
105
|
className: "text-xs text-muted-foreground",
|
|
106
106
|
"data-testid": "release-checklist-summary",
|
|
107
107
|
children: [
|
|
@@ -112,24 +112,24 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
112
112
|
Q > 0 ? ` · ${Q} required still open` : ""
|
|
113
113
|
]
|
|
114
114
|
})]
|
|
115
|
-
}), /* @__PURE__ */ d(
|
|
115
|
+
}), /* @__PURE__ */ d(m, {
|
|
116
116
|
className: "space-y-2",
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ u("p", {
|
|
119
119
|
className: "text-xs text-muted-foreground",
|
|
120
120
|
children: "What must be true before this release ships. A required item still open blocks releasing."
|
|
121
121
|
}),
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
G && /* @__PURE__ */ u(r, { message: G }),
|
|
123
|
+
T && !w && /* @__PURE__ */ u("p", {
|
|
124
124
|
className: "text-sm text-muted-foreground",
|
|
125
125
|
children: "Loading…"
|
|
126
126
|
}),
|
|
127
|
-
|
|
127
|
+
E && /* @__PURE__ */ d("p", {
|
|
128
128
|
role: "alert",
|
|
129
129
|
className: "text-sm text-destructive",
|
|
130
|
-
children: ["The checklist could not be loaded: ",
|
|
130
|
+
children: ["The checklist could not be loaded: ", E.message]
|
|
131
131
|
}),
|
|
132
|
-
|
|
132
|
+
w && X.length === 0 && /* @__PURE__ */ u("p", {
|
|
133
133
|
className: "text-sm text-muted-foreground",
|
|
134
134
|
children: "No criteria yet — add them, or copy another release's checklist."
|
|
135
135
|
}),
|
|
@@ -143,12 +143,19 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
143
143
|
children: [/* @__PURE__ */ u("input", {
|
|
144
144
|
type: "checkbox",
|
|
145
145
|
className: "mt-0.5",
|
|
146
|
-
checked: e.isDone,
|
|
147
|
-
disabled: Y,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
checked: q?.id === e.id ? q.done : e.isDone,
|
|
147
|
+
disabled: Y || q !== null,
|
|
148
|
+
"aria-busy": q?.id === e.id,
|
|
149
|
+
onChange: (t) => {
|
|
150
|
+
let n = t.target.checked;
|
|
151
|
+
J({
|
|
152
|
+
id: e.id,
|
|
153
|
+
done: n
|
|
154
|
+
}), $(() => N({ variables: {
|
|
155
|
+
id: e.id,
|
|
156
|
+
done: n
|
|
157
|
+
} }), "The item could not be updated.").finally(() => J(null));
|
|
158
|
+
},
|
|
152
159
|
"aria-label": `${e.label}${e.isDone ? " (done)" : ""}`
|
|
153
160
|
}), /* @__PURE__ */ d("span", {
|
|
154
161
|
className: "min-w-0",
|
|
@@ -157,7 +164,7 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
157
164
|
className: e.isDone ? "line-through text-muted-foreground" : "",
|
|
158
165
|
children: e.label
|
|
159
166
|
}),
|
|
160
|
-
!e.isRequired && /* @__PURE__ */ u(
|
|
167
|
+
!e.isRequired && /* @__PURE__ */ u(te, {
|
|
161
168
|
variant: "outline",
|
|
162
169
|
className: "ml-2 text-xs",
|
|
163
170
|
children: "optional"
|
|
@@ -176,12 +183,12 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
176
183
|
})
|
|
177
184
|
]
|
|
178
185
|
})]
|
|
179
|
-
}), /* @__PURE__ */ u(
|
|
186
|
+
}), /* @__PURE__ */ u(f, {
|
|
180
187
|
size: "icon",
|
|
181
188
|
variant: "ghost",
|
|
182
189
|
"aria-label": `Remove "${e.label}" from the checklist`,
|
|
183
190
|
disabled: Y,
|
|
184
|
-
onClick: () => void $(() =>
|
|
191
|
+
onClick: () => void $(() => F({ variables: { id: e.id } }), "The item could not be removed."),
|
|
185
192
|
children: /* @__PURE__ */ u(o, { className: "h-4 w-4" })
|
|
186
193
|
})]
|
|
187
194
|
}, e.id))
|
|
@@ -189,12 +196,12 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
189
196
|
/* @__PURE__ */ d("div", {
|
|
190
197
|
className: "flex flex-wrap items-center gap-2 border-t pt-3",
|
|
191
198
|
children: [
|
|
192
|
-
/* @__PURE__ */ u(
|
|
199
|
+
/* @__PURE__ */ u(ne, {
|
|
193
200
|
"aria-label": "New checklist item",
|
|
194
201
|
placeholder: "e.g. Docs updated",
|
|
195
|
-
value:
|
|
202
|
+
value: z,
|
|
196
203
|
maxLength: 200,
|
|
197
|
-
onChange: (e) =>
|
|
204
|
+
onChange: (e) => B(e.target.value),
|
|
198
205
|
className: "min-w-[12rem] flex-1",
|
|
199
206
|
"data-testid": "release-checklist-new"
|
|
200
207
|
}),
|
|
@@ -202,38 +209,38 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
202
209
|
className: "flex items-center gap-1 text-xs",
|
|
203
210
|
children: [/* @__PURE__ */ u("input", {
|
|
204
211
|
type: "checkbox",
|
|
205
|
-
checked:
|
|
206
|
-
onChange: (e) =>
|
|
212
|
+
checked: V,
|
|
213
|
+
onChange: (e) => H(e.target.checked)
|
|
207
214
|
}), "Required"]
|
|
208
215
|
}),
|
|
209
|
-
/* @__PURE__ */ d(
|
|
216
|
+
/* @__PURE__ */ d(f, {
|
|
210
217
|
size: "sm",
|
|
211
|
-
disabled: !
|
|
212
|
-
onClick: () => void
|
|
218
|
+
disabled: !z.trim() || Y,
|
|
219
|
+
onClick: () => void ae(),
|
|
213
220
|
"data-testid": "release-checklist-add",
|
|
214
221
|
children: [/* @__PURE__ */ u(ee, { className: "mr-1 h-4 w-4" }), " Add"]
|
|
215
222
|
}),
|
|
216
|
-
!
|
|
223
|
+
!D && /* @__PURE__ */ d(f, {
|
|
217
224
|
size: "sm",
|
|
218
225
|
variant: "outline",
|
|
219
|
-
onClick: () =>
|
|
226
|
+
onClick: () => O(!0),
|
|
220
227
|
children: [/* @__PURE__ */ u(a, { className: "mr-1 h-4 w-4" }), " Copy from another release"]
|
|
221
228
|
})
|
|
222
229
|
]
|
|
223
230
|
}),
|
|
224
|
-
|
|
231
|
+
D && /* @__PURE__ */ d("div", {
|
|
225
232
|
className: "flex flex-wrap items-center gap-2",
|
|
226
233
|
children: [
|
|
227
234
|
/* @__PURE__ */ d("select", {
|
|
228
235
|
"aria-label": "Release to copy the checklist from",
|
|
229
236
|
className: "min-w-[12rem] flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
230
|
-
value:
|
|
231
|
-
onChange: (e) =>
|
|
237
|
+
value: U,
|
|
238
|
+
onChange: (e) => W(e.target.value),
|
|
232
239
|
"data-testid": "release-checklist-copy-from",
|
|
233
240
|
children: [/* @__PURE__ */ u("option", {
|
|
234
241
|
value: "",
|
|
235
|
-
children:
|
|
236
|
-
}),
|
|
242
|
+
children: k.loading && !k.data ? "Loading releases…" : "Choose a release"
|
|
243
|
+
}), ie.map((e) => /* @__PURE__ */ d("option", {
|
|
237
244
|
value: e.id,
|
|
238
245
|
children: [
|
|
239
246
|
e.name,
|
|
@@ -243,17 +250,17 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
243
250
|
]
|
|
244
251
|
}, e.id))]
|
|
245
252
|
}),
|
|
246
|
-
/* @__PURE__ */ u(
|
|
253
|
+
/* @__PURE__ */ u(f, {
|
|
247
254
|
size: "sm",
|
|
248
|
-
disabled: !
|
|
249
|
-
onClick: () => void
|
|
255
|
+
disabled: !U || Y,
|
|
256
|
+
onClick: () => void oe(),
|
|
250
257
|
"data-testid": "release-checklist-copy",
|
|
251
258
|
children: "Copy"
|
|
252
259
|
}),
|
|
253
|
-
/* @__PURE__ */ u(
|
|
260
|
+
/* @__PURE__ */ u(f, {
|
|
254
261
|
size: "sm",
|
|
255
262
|
variant: "ghost",
|
|
256
|
-
onClick: () =>
|
|
263
|
+
onClick: () => O(!1),
|
|
257
264
|
children: "Cancel"
|
|
258
265
|
})
|
|
259
266
|
]
|
|
@@ -263,6 +270,6 @@ function w({ releaseId: s, projectId: w }) {
|
|
|
263
270
|
});
|
|
264
271
|
}
|
|
265
272
|
//#endregion
|
|
266
|
-
export {
|
|
273
|
+
export { S as ReleaseChecklistCard };
|
|
267
274
|
|
|
268
275
|
//# sourceMappingURL=ReleaseChecklistCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReleaseChecklistCard.js","names":[],"sources":["../../../src/planmagnet/releases/ReleaseChecklistCard.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { Copy, Plus, X } from 'lucide-react';\nimport { ErrorLine } from '../controls/ConfirmButton';\nimport { PersonName } from '../people/People';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\nimport { throwOnError } from '../utils/mutationResult';\n\n/**\n * The release's readiness checklist (PRM-19): the criteria the team defines — docs updated, security sign-off — and\n * ticks off before shipping. A REQUIRED item still open blocks releasing (the server refuses RELEASED and names it,\n * as it does for an open quality gate); optional ones are shown but never block. \"Copy from\" brings another\n * release's criteria (never its ticks), so a team writes its list once.\n */\n\nconst CHECKLIST = gql`\n query ReleaseChecklist($id: ID!) {\n planmagnetRelease(id: $id) {\n id\n checklist {\n id\n label\n isRequired\n isDone\n doneBy\n doneAt\n note\n position\n }\n }\n }\n`;\nconst OTHER_RELEASES = gql`\n query ReleaseChecklistSources($workspaceId: ID!, $filter: PlanmagnetReleaseFilter) {\n planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: { first: 50 }) {\n items {\n id\n name\n version\n }\n }\n }\n`;\nconst ADD = gql`\n mutation ReleaseChecklistAdd($releaseId: ID!, $input: PlanmagnetAddReleaseChecklistItemInput!) {\n planmagnetAddReleaseChecklistItem(releaseId: $releaseId, input: $input) {\n id\n }\n }\n`;\nconst SET_DONE = gql`\n mutation ReleaseChecklistSetDone($id: ID!, $done: Boolean!) {\n planmagnetSetReleaseChecklistItemDone(id: $id, done: $done) {\n id\n isDone\n }\n }\n`;\nconst REMOVE = gql`\n mutation ReleaseChecklistRemove($id: ID!) {\n planmagnetRemoveReleaseChecklistItem(id: $id)\n }\n`;\nconst COPY = gql`\n mutation ReleaseChecklistCopy($releaseId: ID!, $fromReleaseId: ID!) {\n planmagnetCopyReleaseChecklist(releaseId: $releaseId, fromReleaseId: $fromReleaseId) {\n id\n }\n }\n`;\n\ninterface ChecklistItem {\n id: string;\n label: string;\n isRequired: boolean;\n isDone: boolean;\n doneBy: string | null;\n doneAt: string | null;\n note: string | null;\n position: number;\n}\n\nexport function ReleaseChecklistCard({\n releaseId,\n projectId,\n}: {\n releaseId: string;\n projectId: string | null;\n}) {\n const { workspaceId } = usePlanMagnet();\n const { data, loading, error } = useQuery<{\n planmagnetRelease: { id: string; checklist: ChecklistItem[] } | null;\n }>(CHECKLIST, { variables: { id: releaseId }, skip: !releaseId });\n const [copying, setCopying] = useState(false);\n const sources = useQuery<{\n planmagnetReleases: { items: { id: string; name: string; version: string }[] };\n }>(OTHER_RELEASES, {\n variables: { workspaceId, filter: projectId ? { projectId } : {} },\n skip: !copying || !workspaceId,\n });\n const refetch = {\n refetchQueries: ['ReleaseChecklist', 'ReleaseReadiness', 'GetRelease'],\n awaitRefetchQueries: true,\n };\n const [add, addState] = useMutation(ADD, refetch);\n const [setDone, setDoneState] = useMutation(SET_DONE, refetch);\n const [remove, removeState] = useMutation(REMOVE, refetch);\n const [copy, copyState] = useMutation(COPY, refetch);\n const [label, setLabel] = useState('');\n const [required, setRequired] = useState(true);\n const [fromReleaseId, setFromReleaseId] = useState('');\n const [problem, setProblem] = useState<string | null>(null);\n const busy = addState.loading || setDoneState.loading || removeState.loading || copyState.loading;\n\n const items = data?.planmagnetRelease?.checklist ?? [];\n const done = items.filter((i) => i.isDone).length;\n const openRequired = items.filter((i) => i.isRequired && !i.isDone).length;\n const others = (sources.data?.planmagnetReleases.items ?? []).filter((r) => r.id !== releaseId);\n\n const run = async (\n action: () => Promise<{ error?: unknown }>,\n fallback: string\n ): Promise<boolean> => {\n setProblem(null);\n try {\n await throwOnError(action());\n return true;\n } catch (e) {\n setProblem(e instanceof Error ? e.message : fallback);\n return false;\n }\n };\n\n const addItem = async () => {\n const ok = await run(\n () => add({ variables: { releaseId, input: { label: label.trim(), isRequired: required } } }),\n 'The item could not be added.'\n );\n if (ok) {\n setLabel('');\n setRequired(true);\n }\n };\n\n const copyFrom = async () => {\n const ok = await run(\n () => copy({ variables: { releaseId, fromReleaseId } }),\n 'The checklist could not be copied.'\n );\n if (ok) {\n setCopying(false);\n setFromReleaseId('');\n }\n };\n\n return (\n <Card data-testid=\"release-checklist\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0\">\n <CardTitle>Readiness checklist</CardTitle>\n {items.length > 0 && (\n <span className=\"text-xs text-muted-foreground\" data-testid=\"release-checklist-summary\">\n {done} of {items.length} done\n {openRequired > 0 ? ` · ${openRequired} required still open` : ''}\n </span>\n )}\n </CardHeader>\n <CardContent className=\"space-y-2\">\n <p className=\"text-xs text-muted-foreground\">\n What must be true before this release ships. A required item still open blocks releasing.\n </p>\n {problem && <ErrorLine message={problem} />}\n {loading && !data && <p className=\"text-sm text-muted-foreground\">Loading…</p>}\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n The checklist could not be loaded: {error.message}\n </p>\n )}\n {data && items.length === 0 && (\n <p className=\"text-sm text-muted-foreground\">\n No criteria yet — add them, or copy another release's checklist.\n </p>\n )}\n <ul className=\"space-y-1\">\n {items.map((item) => (\n <li\n key={item.id}\n className=\"flex items-start justify-between gap-2 rounded-md border p-2\"\n data-testid=\"release-checklist-item\"\n >\n <label className=\"flex min-w-0 items-start gap-2 text-sm cursor-pointer\">\n <input\n type=\"checkbox\"\n className=\"mt-0.5\"\n checked={item.isDone}\n disabled={busy}\n onChange={(e) =>\n void run(\n () => setDone({ variables: { id: item.id, done: e.target.checked } }),\n 'The item could not be updated.'\n )\n }\n aria-label={`${item.label}${item.isDone ? ' (done)' : ''}`}\n />\n <span className=\"min-w-0\">\n <span className={item.isDone ? 'line-through text-muted-foreground' : ''}>\n {item.label}\n </span>\n {!item.isRequired && (\n <Badge variant=\"outline\" className=\"ml-2 text-xs\">\n optional\n </Badge>\n )}\n {item.isDone && item.doneBy && (\n <span className=\"block text-xs text-muted-foreground\">\n Ticked by <PersonName id={item.doneBy} />\n {item.doneAt ? ` on ${new Date(item.doneAt).toLocaleDateString()}` : ''}\n </span>\n )}\n {item.note && (\n <span className=\"block text-xs text-muted-foreground\">{item.note}</span>\n )}\n </span>\n </label>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n aria-label={`Remove \"${item.label}\" from the checklist`}\n disabled={busy}\n onClick={() =>\n void run(\n () => remove({ variables: { id: item.id } }),\n 'The item could not be removed.'\n )\n }\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </li>\n ))}\n </ul>\n <div className=\"flex flex-wrap items-center gap-2 border-t pt-3\">\n <Input\n aria-label=\"New checklist item\"\n placeholder=\"e.g. Docs updated\"\n value={label}\n maxLength={200}\n onChange={(e) => setLabel(e.target.value)}\n className=\"min-w-[12rem] flex-1\"\n data-testid=\"release-checklist-new\"\n />\n <label className=\"flex items-center gap-1 text-xs\">\n <input\n type=\"checkbox\"\n checked={required}\n onChange={(e) => setRequired(e.target.checked)}\n />\n Required\n </label>\n <Button\n size=\"sm\"\n disabled={!label.trim() || busy}\n onClick={() => void addItem()}\n data-testid=\"release-checklist-add\"\n >\n <Plus className=\"mr-1 h-4 w-4\" /> Add\n </Button>\n {!copying && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => setCopying(true)}>\n <Copy className=\"mr-1 h-4 w-4\" /> Copy from another release\n </Button>\n )}\n </div>\n {copying && (\n <div className=\"flex flex-wrap items-center gap-2\">\n <select\n aria-label=\"Release to copy the checklist from\"\n className=\"min-w-[12rem] flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={fromReleaseId}\n onChange={(e) => setFromReleaseId(e.target.value)}\n data-testid=\"release-checklist-copy-from\"\n >\n <option value=\"\">\n {sources.loading && !sources.data ? 'Loading releases…' : 'Choose a release'}\n </option>\n {others.map((r) => (\n <option key={r.id} value={r.id}>\n {r.name} ({r.version})\n </option>\n ))}\n </select>\n <Button\n size=\"sm\"\n disabled={!fromReleaseId || busy}\n onClick={() => void copyFrom()}\n data-testid=\"release-checklist-copy\"\n >\n Copy\n </Button>\n <Button size=\"sm\" variant=\"ghost\" onClick={() => setCopying(false)}>\n Cancel\n </Button>\n </div>\n )}\n </CardContent>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,IAAY,CAAG;;;;;;;;;;;;;;;;GAiBf,IAAiB,CAAG;;;;;;;;;;GAWpB,KAAM,CAAG;;;;;;GAOT,IAAW,CAAG;;;;;;;GAQd,IAAS,CAAG;;;;GAKZ,IAAO,CAAG;;;;;;;AAmBhB,SAAgB,EAAqB,EACnC,cACA,gBAIC;CACD,IAAM,EAAE,mBAAgB,GAAe,EACjC,EAAE,SAAM,YAAS,aAAU,EAE9B,GAAW;EAAE,WAAW,EAAE,IAAI,GAAW;EAAE,MAAM,CAAC;EAAW,CAAC,EAC3D,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,IAAU,EAEb,GAAgB;EACjB,WAAW;GAAE;GAAa,QAAQ,IAAY,EAAE,cAAW,GAAG,EAAE;GAAE;EAClE,MAAM,CAAC,KAAW,CAAC;EACpB,CAAC,E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MAAM,EAAiB,EAAE,OAAO,MAAM;OACjD,eAAY;iBALd,CAOE,kBAAC,UAAD;QAAQ,OAAM;kBACX,EAAQ,WAAW,CAAC,EAAQ,OAAO,sBAAsB;QACnD,CAAA,EACR,GAAO,KAAK,MACX,kBAAC,UAAD;QAAmB,OAAO,EAAE;kBAA5B;SACG,EAAE;SAAK;SAAG,EAAE;SAAQ;SACd;UAFI,EAAE,GAEN,CACT,CACK;;MACT,kBAAC,GAAD;OACE,MAAK;OACL,UAAU,CAAC,KAAiB;OAC5B,eAAe,KAAK,IAAU;OAC9B,eAAY;iBACb;OAEQ,CAAA;MACT,kBAAC,GAAD;OAAQ,MAAK;OAAK,SAAQ;OAAQ,eAAe,EAAW,GAAM;iBAAE;OAE3D,CAAA;MACL;;IAEI;KACT"}
|
|
1
|
+
{"version":3,"file":"ReleaseChecklistCard.js","names":[],"sources":["../../../src/planmagnet/releases/ReleaseChecklistCard.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { Copy, Plus, X } from 'lucide-react';\nimport { ErrorLine } from '../controls/ConfirmButton';\nimport { PersonName } from '../people/People';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\nimport { throwOnError } from '../utils/mutationResult';\n\n/**\n * The release's readiness checklist (PRM-19): the criteria the team defines — docs updated, security sign-off — and\n * ticks off before shipping. A REQUIRED item still open blocks releasing (the server refuses RELEASED and names it,\n * as it does for an open quality gate); optional ones are shown but never block. \"Copy from\" brings another\n * release's criteria (never its ticks), so a team writes its list once.\n */\n\nconst CHECKLIST = gql`\n query ReleaseChecklist($id: ID!) {\n planmagnetRelease(id: $id) {\n id\n checklist {\n id\n label\n isRequired\n isDone\n doneBy\n doneAt\n note\n position\n }\n }\n }\n`;\nconst OTHER_RELEASES = gql`\n query ReleaseChecklistSources($workspaceId: ID!, $filter: PlanmagnetReleaseFilter) {\n planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: { first: 50 }) {\n items {\n id\n name\n version\n }\n }\n }\n`;\nconst ADD = gql`\n mutation ReleaseChecklistAdd($releaseId: ID!, $input: PlanmagnetAddReleaseChecklistItemInput!) {\n planmagnetAddReleaseChecklistItem(releaseId: $releaseId, input: $input) {\n id\n }\n }\n`;\nconst SET_DONE = gql`\n mutation ReleaseChecklistSetDone($id: ID!, $done: Boolean!) {\n planmagnetSetReleaseChecklistItemDone(id: $id, done: $done) {\n id\n isDone\n }\n }\n`;\nconst REMOVE = gql`\n mutation ReleaseChecklistRemove($id: ID!) {\n planmagnetRemoveReleaseChecklistItem(id: $id)\n }\n`;\nconst COPY = gql`\n mutation ReleaseChecklistCopy($releaseId: ID!, $fromReleaseId: ID!) {\n planmagnetCopyReleaseChecklist(releaseId: $releaseId, fromReleaseId: $fromReleaseId) {\n id\n }\n }\n`;\n\ninterface ChecklistItem {\n id: string;\n label: string;\n isRequired: boolean;\n isDone: boolean;\n doneBy: string | null;\n doneAt: string | null;\n note: string | null;\n position: number;\n}\n\nexport function ReleaseChecklistCard({\n releaseId,\n projectId,\n}: {\n releaseId: string;\n projectId: string | null;\n}) {\n const { workspaceId } = usePlanMagnet();\n const { data, loading, error } = useQuery<{\n planmagnetRelease: { id: string; checklist: ChecklistItem[] } | null;\n }>(CHECKLIST, { variables: { id: releaseId }, skip: !releaseId });\n const [copying, setCopying] = useState(false);\n const sources = useQuery<{\n planmagnetReleases: { items: { id: string; name: string; version: string }[] };\n }>(OTHER_RELEASES, {\n variables: { workspaceId, filter: projectId ? { projectId } : {} },\n skip: !copying || !workspaceId,\n });\n const refetch = {\n refetchQueries: ['ReleaseChecklist', 'ReleaseReadiness', 'GetRelease'],\n awaitRefetchQueries: true,\n };\n const [add, addState] = useMutation(ADD, refetch);\n const [setDone, setDoneState] = useMutation(SET_DONE, refetch);\n const [remove, removeState] = useMutation(REMOVE, refetch);\n const [copy, copyState] = useMutation(COPY, refetch);\n const [label, setLabel] = useState('');\n const [required, setRequired] = useState(true);\n const [fromReleaseId, setFromReleaseId] = useState('');\n const [problem, setProblem] = useState<string | null>(null);\n // The tick a click asked for, shown at once and held until the server's answer is back: a server-controlled box\n // that did not move on click invited a second click, which sent the opposite value.\n const [pendingTick, setPendingTick] = useState<{ id: string; done: boolean } | null>(null);\n const busy = addState.loading || setDoneState.loading || removeState.loading || copyState.loading;\n\n const items = data?.planmagnetRelease?.checklist ?? [];\n const done = items.filter((i) => i.isDone).length;\n const openRequired = items.filter((i) => i.isRequired && !i.isDone).length;\n const others = (sources.data?.planmagnetReleases.items ?? []).filter((r) => r.id !== releaseId);\n\n const run = async (\n action: () => Promise<{ error?: unknown }>,\n fallback: string\n ): Promise<boolean> => {\n setProblem(null);\n try {\n await throwOnError(action());\n return true;\n } catch (e) {\n setProblem(e instanceof Error ? e.message : fallback);\n return false;\n }\n };\n\n const addItem = async () => {\n const ok = await run(\n () => add({ variables: { releaseId, input: { label: label.trim(), isRequired: required } } }),\n 'The item could not be added.'\n );\n if (ok) {\n setLabel('');\n setRequired(true);\n }\n };\n\n const copyFrom = async () => {\n const ok = await run(\n () => copy({ variables: { releaseId, fromReleaseId } }),\n 'The checklist could not be copied.'\n );\n if (ok) {\n setCopying(false);\n setFromReleaseId('');\n }\n };\n\n return (\n <Card data-testid=\"release-checklist\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0\">\n <CardTitle>Readiness checklist</CardTitle>\n {items.length > 0 && (\n <span className=\"text-xs text-muted-foreground\" data-testid=\"release-checklist-summary\">\n {done} of {items.length} done\n {openRequired > 0 ? ` · ${openRequired} required still open` : ''}\n </span>\n )}\n </CardHeader>\n <CardContent className=\"space-y-2\">\n <p className=\"text-xs text-muted-foreground\">\n What must be true before this release ships. A required item still open blocks releasing.\n </p>\n {problem && <ErrorLine message={problem} />}\n {loading && !data && <p className=\"text-sm text-muted-foreground\">Loading…</p>}\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n The checklist could not be loaded: {error.message}\n </p>\n )}\n {data && items.length === 0 && (\n <p className=\"text-sm text-muted-foreground\">\n No criteria yet — add them, or copy another release's checklist.\n </p>\n )}\n <ul className=\"space-y-1\">\n {items.map((item) => (\n <li\n key={item.id}\n className=\"flex items-start justify-between gap-2 rounded-md border p-2\"\n data-testid=\"release-checklist-item\"\n >\n <label className=\"flex min-w-0 items-start gap-2 text-sm cursor-pointer\">\n <input\n type=\"checkbox\"\n className=\"mt-0.5\"\n checked={pendingTick?.id === item.id ? pendingTick.done : item.isDone}\n disabled={busy || pendingTick !== null}\n aria-busy={pendingTick?.id === item.id}\n onChange={(e) => {\n const done = e.target.checked;\n setPendingTick({ id: item.id, done });\n void run(\n () => setDone({ variables: { id: item.id, done } }),\n 'The item could not be updated.'\n ).finally(() => setPendingTick(null));\n }}\n aria-label={`${item.label}${item.isDone ? ' (done)' : ''}`}\n />\n <span className=\"min-w-0\">\n <span className={item.isDone ? 'line-through text-muted-foreground' : ''}>\n {item.label}\n </span>\n {!item.isRequired && (\n <Badge variant=\"outline\" className=\"ml-2 text-xs\">\n optional\n </Badge>\n )}\n {item.isDone && item.doneBy && (\n <span className=\"block text-xs text-muted-foreground\">\n Ticked by <PersonName id={item.doneBy} />\n {item.doneAt ? ` on ${new Date(item.doneAt).toLocaleDateString()}` : ''}\n </span>\n )}\n {item.note && (\n <span className=\"block text-xs text-muted-foreground\">{item.note}</span>\n )}\n </span>\n </label>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n aria-label={`Remove \"${item.label}\" from the checklist`}\n disabled={busy}\n onClick={() =>\n void run(\n () => remove({ variables: { id: item.id } }),\n 'The item could not be removed.'\n )\n }\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </li>\n ))}\n </ul>\n <div className=\"flex flex-wrap items-center gap-2 border-t pt-3\">\n <Input\n aria-label=\"New checklist item\"\n placeholder=\"e.g. Docs updated\"\n value={label}\n maxLength={200}\n onChange={(e) => setLabel(e.target.value)}\n className=\"min-w-[12rem] flex-1\"\n data-testid=\"release-checklist-new\"\n />\n <label className=\"flex items-center gap-1 text-xs\">\n <input\n type=\"checkbox\"\n checked={required}\n onChange={(e) => setRequired(e.target.checked)}\n />\n Required\n </label>\n <Button\n size=\"sm\"\n disabled={!label.trim() || busy}\n onClick={() => void addItem()}\n data-testid=\"release-checklist-add\"\n >\n <Plus className=\"mr-1 h-4 w-4\" /> Add\n </Button>\n {!copying && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => setCopying(true)}>\n <Copy className=\"mr-1 h-4 w-4\" /> Copy from another release\n </Button>\n )}\n </div>\n {copying && (\n <div className=\"flex flex-wrap items-center gap-2\">\n <select\n aria-label=\"Release to copy the checklist from\"\n className=\"min-w-[12rem] flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={fromReleaseId}\n onChange={(e) => setFromReleaseId(e.target.value)}\n data-testid=\"release-checklist-copy-from\"\n >\n <option value=\"\">\n {sources.loading && !sources.data ? 'Loading releases…' : 'Choose a release'}\n </option>\n {others.map((r) => (\n <option key={r.id} value={r.id}>\n {r.name} ({r.version})\n </option>\n ))}\n </select>\n <Button\n size=\"sm\"\n disabled={!fromReleaseId || busy}\n onClick={() => void copyFrom()}\n data-testid=\"release-checklist-copy\"\n >\n Copy\n </Button>\n <Button size=\"sm\" variant=\"ghost\" onClick={() => setCopying(false)}>\n Cancel\n </Button>\n </div>\n )}\n </CardContent>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,KAAY,CAAG;;;;;;;;;;;;;;;;GAiBf,IAAiB,CAAG;;;;;;;;;;GAWpB,IAAM,CAAG;;;;;;GAOT,IAAW,CAAG;;;;;;;GAQd,IAAS,CAAG;;;;GAKZ,IAAO,CAAG;;;;;;;AAmBhB,SAAgB,EAAqB,EACnC,cACA,gBAIC;CACD,IAAM,EAAE,mBAAgB,GAAe,EACjC,EAAE,SAAM,YAAS,aAA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