@burdenoff/microfe-planmagnet 2026.930.18 → 2026.930.20
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/index.js +2 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +17 -5
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/controls/SyncControls.d.ts +101 -0
- package/dist/planmagnet/controls/SyncControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/SyncControls.js +616 -0
- package/dist/planmagnet/controls/SyncControls.js.map +1 -0
- package/dist/planmagnet/hooks/useLiveRefresh.d.ts.map +1 -1
- package/dist/planmagnet/hooks/useLiveRefresh.js +47 -46
- package/dist/planmagnet/hooks/useLiveRefresh.js.map +1 -1
- package/dist/planmagnet/index.d.ts +1 -0
- package/dist/planmagnet/index.d.ts.map +1 -1
- package/dist/planmagnet/index.js +1 -0
- package/dist/planmagnet/integrations/routes.d.ts +13 -0
- package/dist/planmagnet/integrations/routes.d.ts.map +1 -0
- package/dist/planmagnet/integrations/routes.js +9 -0
- package/dist/planmagnet/integrations/routes.js.map +1 -0
- package/dist/planmagnet/integrations/syncTypes.d.ts +143 -0
- package/dist/planmagnet/integrations/syncTypes.d.ts.map +1 -0
- package/dist/planmagnet/integrations/syncTypes.js +71 -0
- package/dist/planmagnet/integrations/syncTypes.js.map +1 -0
- package/dist/planmagnet/integrations/useSyncProviderCapabilities.d.ts +8 -0
- package/dist/planmagnet/integrations/useSyncProviderCapabilities.d.ts.map +1 -0
- package/dist/planmagnet/integrations/useSyncProviderCapabilities.js +27 -0
- package/dist/planmagnet/integrations/useSyncProviderCapabilities.js.map +1 -0
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js +1 -1
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js +411 -0
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js.map +1 -0
- package/dist/planmagnet/pages/IntegrationsSyncDetailPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/IntegrationsSyncDetailPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/IntegrationsSyncDetailPagePage.js +593 -0
- package/dist/planmagnet/pages/IntegrationsSyncDetailPagePage.js.map +1 -0
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.js +267 -0
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationsSyncDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/IntegrationsSyncDetailPagePage.tsx"],"names":[],"mappings":"AA8ZA,wBAAgB,8BAA8B,4CAuM7C"}
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
|
+
import { PersonName as t } from "../people/People.js";
|
|
3
|
+
import { detailPath as n } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useEntityId as r } from "../hooks/useEntityId.js";
|
|
5
|
+
import { directionLabel as i, parseGithubFieldMapping as a, providerLabel as o } from "../integrations/syncTypes.js";
|
|
6
|
+
import { CONFLICT_STRATEGY_EXPLANATION as s, ConflictResolveActions as c, ConflictStatusBadge as l, DeleteSyncButton as u, EditSyncDialog as d, PauseResumeButton as f, RunNowButton as p, SyncHealthSummary as m, SyncRunResultSummary as h, SyncRunStatusBadge as g, SyncStatusBadge as _, TestConnectionButton as v, TruncatedText as y } from "../controls/SyncControls.js";
|
|
7
|
+
import { useState as b } from "react";
|
|
8
|
+
import { ExternalLink as x, History as S, Plug as C, ShieldAlert as w } from "lucide-react";
|
|
9
|
+
import { gql as T } from "@apollo/client";
|
|
10
|
+
import { useQuery as E } from "@apollo/client/react";
|
|
11
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
12
|
+
import { Badge as A, Button as j, Card as M, CardContent as N, CardHeader as P, CardTitle as F, Tabs as I, TabsContent as L, TabsList as R, TabsTrigger as z } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/planmagnet/pages/IntegrationsSyncDetailPagePage.tsx
|
|
14
|
+
var B = 20, V = 20, H = T`
|
|
15
|
+
query SyncDetail($id: ID!) {
|
|
16
|
+
planmagnetExternalSync(id: $id) {
|
|
17
|
+
id
|
|
18
|
+
provider
|
|
19
|
+
direction
|
|
20
|
+
status
|
|
21
|
+
projectId
|
|
22
|
+
project {
|
|
23
|
+
id
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
externalProjectId
|
|
27
|
+
externalProjectUrl
|
|
28
|
+
conflictStrategy
|
|
29
|
+
fieldMapping
|
|
30
|
+
syncFilters
|
|
31
|
+
lastSyncedAt
|
|
32
|
+
lastSyncError
|
|
33
|
+
totalItemsSynced
|
|
34
|
+
createdAt
|
|
35
|
+
updatedAt
|
|
36
|
+
runHealth {
|
|
37
|
+
lastRunAt
|
|
38
|
+
lastStatus
|
|
39
|
+
consecutiveFailures
|
|
40
|
+
runsLast7Days
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`, U = T`
|
|
45
|
+
query SyncRuns($syncId: ID!, $pagination: PlanmagnetPaginationInput) {
|
|
46
|
+
planmagnetSyncRuns(syncId: $syncId, pagination: $pagination) {
|
|
47
|
+
totalCount
|
|
48
|
+
pageInfo {
|
|
49
|
+
hasNextPage
|
|
50
|
+
endCursor
|
|
51
|
+
}
|
|
52
|
+
items {
|
|
53
|
+
id
|
|
54
|
+
direction
|
|
55
|
+
status
|
|
56
|
+
startedAt
|
|
57
|
+
finishedAt
|
|
58
|
+
itemsCreated
|
|
59
|
+
itemsUpdated
|
|
60
|
+
itemsSkipped
|
|
61
|
+
errorCount
|
|
62
|
+
conflictCount
|
|
63
|
+
errorMessage
|
|
64
|
+
triggeredBy
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`, W = T`
|
|
69
|
+
query SyncConflicts(
|
|
70
|
+
$syncId: ID!
|
|
71
|
+
$status: PlanmagnetSyncConflictStatus
|
|
72
|
+
$pagination: PlanmagnetPaginationInput
|
|
73
|
+
) {
|
|
74
|
+
planmagnetSyncConflicts(syncId: $syncId, status: $status, pagination: $pagination) {
|
|
75
|
+
totalCount
|
|
76
|
+
pageInfo {
|
|
77
|
+
hasNextPage
|
|
78
|
+
endCursor
|
|
79
|
+
}
|
|
80
|
+
items {
|
|
81
|
+
id
|
|
82
|
+
createdAt
|
|
83
|
+
fields
|
|
84
|
+
localUpdatedAt
|
|
85
|
+
remoteUpdatedAt
|
|
86
|
+
resolution
|
|
87
|
+
resolvedAt
|
|
88
|
+
resolvedBy
|
|
89
|
+
status
|
|
90
|
+
mappingId
|
|
91
|
+
mapping {
|
|
92
|
+
id
|
|
93
|
+
internalId
|
|
94
|
+
internalType
|
|
95
|
+
externalId
|
|
96
|
+
externalType
|
|
97
|
+
externalUrl
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
103
|
+
function G({ syncId: e }) {
|
|
104
|
+
let [n, r] = b(!1), { data: a, loading: o, error: s, fetchMore: c } = E(U, { variables: {
|
|
105
|
+
syncId: e,
|
|
106
|
+
pagination: { first: B }
|
|
107
|
+
} }), l = a?.planmagnetSyncRuns, u = l?.items ?? [], d = async () => {
|
|
108
|
+
let e = l?.pageInfo.endCursor;
|
|
109
|
+
if (e) {
|
|
110
|
+
r(!0);
|
|
111
|
+
try {
|
|
112
|
+
await c({
|
|
113
|
+
variables: { pagination: {
|
|
114
|
+
first: B,
|
|
115
|
+
after: e
|
|
116
|
+
} },
|
|
117
|
+
updateQuery: (e, { fetchMoreResult: t }) => ({ planmagnetSyncRuns: {
|
|
118
|
+
...t.planmagnetSyncRuns,
|
|
119
|
+
items: [...e.planmagnetSyncRuns.items, ...t.planmagnetSyncRuns.items]
|
|
120
|
+
} })
|
|
121
|
+
});
|
|
122
|
+
} finally {
|
|
123
|
+
r(!1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return /* @__PURE__ */ k("div", {
|
|
128
|
+
className: "space-y-3",
|
|
129
|
+
"data-testid": "sync-runs",
|
|
130
|
+
children: [
|
|
131
|
+
s && /* @__PURE__ */ k("p", {
|
|
132
|
+
role: "alert",
|
|
133
|
+
className: "text-sm text-destructive",
|
|
134
|
+
children: ["Run history could not be loaded: ", s.message]
|
|
135
|
+
}),
|
|
136
|
+
o && !a && /* @__PURE__ */ O("p", {
|
|
137
|
+
className: "text-sm text-muted-foreground",
|
|
138
|
+
children: "Loading run history…"
|
|
139
|
+
}),
|
|
140
|
+
l && u.length === 0 && /* @__PURE__ */ O("p", {
|
|
141
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
142
|
+
children: "No runs yet — use \"Run now\" above to start the first one."
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ O("div", {
|
|
145
|
+
className: "overflow-x-auto",
|
|
146
|
+
children: u.length > 0 && /* @__PURE__ */ k("table", {
|
|
147
|
+
className: "w-full text-sm",
|
|
148
|
+
children: [/* @__PURE__ */ O("thead", { children: /* @__PURE__ */ k("tr", {
|
|
149
|
+
className: "text-left text-muted-foreground",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ O("th", {
|
|
152
|
+
className: "py-1 pr-3 font-medium",
|
|
153
|
+
children: "Started"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ O("th", {
|
|
156
|
+
className: "py-1 pr-3 font-medium",
|
|
157
|
+
children: "Direction"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ O("th", {
|
|
160
|
+
className: "py-1 pr-3 font-medium",
|
|
161
|
+
children: "Status"
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ O("th", {
|
|
164
|
+
className: "py-1 pr-3 font-medium",
|
|
165
|
+
children: "Created / updated / skipped"
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ O("th", {
|
|
168
|
+
className: "py-1 pr-3 font-medium",
|
|
169
|
+
children: "Conflicts"
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ O("th", {
|
|
172
|
+
className: "py-1 pr-3 font-medium",
|
|
173
|
+
children: "Triggered by"
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ O("th", {
|
|
176
|
+
className: "py-1 font-medium",
|
|
177
|
+
children: "Error"
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
}) }), /* @__PURE__ */ O("tbody", { children: u.map((e) => /* @__PURE__ */ k("tr", {
|
|
181
|
+
className: "border-t align-top",
|
|
182
|
+
"data-testid": "sync-run-row",
|
|
183
|
+
children: [
|
|
184
|
+
/* @__PURE__ */ k("td", {
|
|
185
|
+
className: "py-1.5 pr-3 whitespace-nowrap",
|
|
186
|
+
children: [/* @__PURE__ */ O("div", { children: new Date(e.startedAt).toLocaleString() }), /* @__PURE__ */ k("div", {
|
|
187
|
+
className: "text-xs text-muted-foreground",
|
|
188
|
+
children: ["finished ", new Date(e.finishedAt).toLocaleString()]
|
|
189
|
+
})]
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ O("td", {
|
|
192
|
+
className: "py-1.5 pr-3 whitespace-nowrap",
|
|
193
|
+
children: i(e.direction)
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ O("td", {
|
|
196
|
+
className: "py-1.5 pr-3",
|
|
197
|
+
children: /* @__PURE__ */ O(g, { status: e.status })
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ k("td", {
|
|
200
|
+
className: "py-1.5 pr-3 whitespace-nowrap",
|
|
201
|
+
children: [
|
|
202
|
+
e.itemsCreated,
|
|
203
|
+
" / ",
|
|
204
|
+
e.itemsUpdated,
|
|
205
|
+
" / ",
|
|
206
|
+
e.itemsSkipped
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ O("td", {
|
|
210
|
+
className: "py-1.5 pr-3",
|
|
211
|
+
children: e.conflictCount
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ O("td", {
|
|
214
|
+
className: "py-1.5 pr-3 whitespace-nowrap",
|
|
215
|
+
children: /* @__PURE__ */ O(t, { id: e.triggeredBy })
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ O("td", {
|
|
218
|
+
className: "py-1.5 text-status-error-text",
|
|
219
|
+
children: e.errorMessage ? /* @__PURE__ */ O(y, {
|
|
220
|
+
text: e.errorMessage,
|
|
221
|
+
max: 100,
|
|
222
|
+
className: "text-status-error-text"
|
|
223
|
+
}) : /* @__PURE__ */ O("span", {
|
|
224
|
+
className: "text-muted-foreground",
|
|
225
|
+
children: "—"
|
|
226
|
+
})
|
|
227
|
+
})
|
|
228
|
+
]
|
|
229
|
+
}, e.id)) })]
|
|
230
|
+
})
|
|
231
|
+
}),
|
|
232
|
+
l?.pageInfo.hasNextPage && /* @__PURE__ */ O(j, {
|
|
233
|
+
size: "sm",
|
|
234
|
+
variant: "outline",
|
|
235
|
+
onClick: () => void d(),
|
|
236
|
+
disabled: n,
|
|
237
|
+
children: n ? "Loading…" : `Show more (${u.length} of ${l.totalCount})`
|
|
238
|
+
})
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
function K({ conflict: n }) {
|
|
243
|
+
let r = e(), i = n.mapping, a = i?.internalType === "workitem";
|
|
244
|
+
return /* @__PURE__ */ k("li", {
|
|
245
|
+
className: "rounded-md border p-4 space-y-2",
|
|
246
|
+
"data-testid": "sync-conflict",
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ k("div", {
|
|
249
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
250
|
+
children: [/* @__PURE__ */ k("div", {
|
|
251
|
+
className: "flex flex-wrap items-center gap-2",
|
|
252
|
+
children: [/* @__PURE__ */ O(l, { status: n.status }), /* @__PURE__ */ k("span", {
|
|
253
|
+
className: "text-xs text-muted-foreground",
|
|
254
|
+
children: ["Detected ", new Date(n.createdAt).toLocaleString()]
|
|
255
|
+
})]
|
|
256
|
+
}), i && /* @__PURE__ */ k("div", {
|
|
257
|
+
className: "flex items-center gap-2 text-xs",
|
|
258
|
+
children: [a ? /* @__PURE__ */ O("button", {
|
|
259
|
+
type: "button",
|
|
260
|
+
className: "font-medium text-primary hover:underline",
|
|
261
|
+
onClick: () => r(`/tasks/task-detail-page?taskId=${encodeURIComponent(i.internalId)}`),
|
|
262
|
+
children: "Open in PlanMagnet"
|
|
263
|
+
}) : /* @__PURE__ */ k("span", {
|
|
264
|
+
className: "text-muted-foreground",
|
|
265
|
+
children: [
|
|
266
|
+
i.internalType,
|
|
267
|
+
" ",
|
|
268
|
+
i.internalId
|
|
269
|
+
]
|
|
270
|
+
}), i.externalUrl && /* @__PURE__ */ k("a", {
|
|
271
|
+
href: i.externalUrl,
|
|
272
|
+
target: "_blank",
|
|
273
|
+
rel: "noreferrer noopener",
|
|
274
|
+
className: "inline-flex items-center gap-1 text-primary hover:underline",
|
|
275
|
+
children: [
|
|
276
|
+
"View on ",
|
|
277
|
+
i.externalType,
|
|
278
|
+
/* @__PURE__ */ O(x, { className: "h-3 w-3" })
|
|
279
|
+
]
|
|
280
|
+
})]
|
|
281
|
+
})]
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ k("p", {
|
|
284
|
+
className: "text-sm",
|
|
285
|
+
children: [
|
|
286
|
+
"Fields in conflict:",
|
|
287
|
+
" ",
|
|
288
|
+
/* @__PURE__ */ O("span", {
|
|
289
|
+
className: "font-medium",
|
|
290
|
+
children: n.fields.length ? n.fields.join(", ") : "unknown"
|
|
291
|
+
})
|
|
292
|
+
]
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ k("div", {
|
|
295
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs text-muted-foreground",
|
|
296
|
+
children: [/* @__PURE__ */ k("span", { children: ["PlanMagnet last updated ", new Date(n.localUpdatedAt).toLocaleString()] }), /* @__PURE__ */ k("span", { children: ["Provider last updated ", new Date(n.remoteUpdatedAt).toLocaleString()] })]
|
|
297
|
+
}),
|
|
298
|
+
n.status === "OPEN" ? /* @__PURE__ */ O(c, { conflictId: n.id }) : /* @__PURE__ */ k("p", {
|
|
299
|
+
className: "text-xs text-muted-foreground",
|
|
300
|
+
children: [
|
|
301
|
+
"Resolved ",
|
|
302
|
+
n.resolvedAt ? new Date(n.resolvedAt).toLocaleString() : "",
|
|
303
|
+
n.resolution ? ` — ${n.resolution === "SOURCE_WINS" ? "kept PlanMagnet" : n.resolution === "TARGET_WINS" ? "took the provider" : "dismissed manually"}` : "",
|
|
304
|
+
n.resolvedBy ? /* @__PURE__ */ k(D, { children: [" by ", /* @__PURE__ */ O(t, { id: n.resolvedBy })] }) : null
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function q({ syncId: e }) {
|
|
311
|
+
let [t, n] = b("OPEN"), [r, i] = b(!1), { data: a, loading: o, error: s, fetchMore: c } = E(W, { variables: {
|
|
312
|
+
syncId: e,
|
|
313
|
+
status: t === "ALL" ? void 0 : t,
|
|
314
|
+
pagination: { first: V }
|
|
315
|
+
} }), l = a?.planmagnetSyncConflicts, u = l?.items ?? [], d = async () => {
|
|
316
|
+
let e = l?.pageInfo.endCursor;
|
|
317
|
+
if (e) {
|
|
318
|
+
i(!0);
|
|
319
|
+
try {
|
|
320
|
+
await c({
|
|
321
|
+
variables: { pagination: {
|
|
322
|
+
first: V,
|
|
323
|
+
after: e
|
|
324
|
+
} },
|
|
325
|
+
updateQuery: (e, { fetchMoreResult: t }) => ({ planmagnetSyncConflicts: {
|
|
326
|
+
...t.planmagnetSyncConflicts,
|
|
327
|
+
items: [...e.planmagnetSyncConflicts.items, ...t.planmagnetSyncConflicts.items]
|
|
328
|
+
} })
|
|
329
|
+
});
|
|
330
|
+
} finally {
|
|
331
|
+
i(!1);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
return /* @__PURE__ */ k("div", {
|
|
336
|
+
className: "space-y-3",
|
|
337
|
+
"data-testid": "sync-conflicts",
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ O("div", {
|
|
340
|
+
className: "flex flex-wrap gap-1",
|
|
341
|
+
role: "group",
|
|
342
|
+
"aria-label": "Filter conflicts by status",
|
|
343
|
+
children: [
|
|
344
|
+
"OPEN",
|
|
345
|
+
"RESOLVED",
|
|
346
|
+
"ALL"
|
|
347
|
+
].map((e) => /* @__PURE__ */ O("button", {
|
|
348
|
+
type: "button",
|
|
349
|
+
"aria-pressed": t === e,
|
|
350
|
+
"data-testid": `sync-conflicts-status-${e}`,
|
|
351
|
+
onClick: () => n(e),
|
|
352
|
+
className: `px-3 py-1.5 text-sm rounded-md ${t === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
353
|
+
children: e === "ALL" ? "All" : e.charAt(0) + e.slice(1).toLowerCase()
|
|
354
|
+
}, e))
|
|
355
|
+
}),
|
|
356
|
+
s && /* @__PURE__ */ k("p", {
|
|
357
|
+
role: "alert",
|
|
358
|
+
className: "text-sm text-destructive",
|
|
359
|
+
children: ["Conflicts could not be loaded: ", s.message]
|
|
360
|
+
}),
|
|
361
|
+
o && !a && /* @__PURE__ */ O("p", {
|
|
362
|
+
className: "text-sm text-muted-foreground",
|
|
363
|
+
children: "Loading conflicts…"
|
|
364
|
+
}),
|
|
365
|
+
l && u.length === 0 && /* @__PURE__ */ O("p", {
|
|
366
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
367
|
+
children: t === "OPEN" ? "No open conflicts." : "No conflicts found."
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ O("ul", {
|
|
370
|
+
className: "space-y-3",
|
|
371
|
+
children: u.map((e) => /* @__PURE__ */ O(K, { conflict: e }, e.id))
|
|
372
|
+
}),
|
|
373
|
+
l?.pageInfo.hasNextPage && /* @__PURE__ */ O(j, {
|
|
374
|
+
size: "sm",
|
|
375
|
+
variant: "outline",
|
|
376
|
+
onClick: () => void d(),
|
|
377
|
+
disabled: r,
|
|
378
|
+
children: r ? "Loading…" : `Show more (${u.length} of ${l.totalCount})`
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
function J() {
|
|
384
|
+
let t = r(), c = e(), [l, g] = b(null), { data: T, loading: D, error: j } = E(H, {
|
|
385
|
+
variables: { id: t },
|
|
386
|
+
skip: !t
|
|
387
|
+
});
|
|
388
|
+
if (!t) return /* @__PURE__ */ O("div", {
|
|
389
|
+
className: "p-6 text-muted-foreground",
|
|
390
|
+
children: "No sync selected. Open one from Integrations."
|
|
391
|
+
});
|
|
392
|
+
if (D && !T) return /* @__PURE__ */ O("div", {
|
|
393
|
+
className: "flex items-center justify-center p-12",
|
|
394
|
+
children: /* @__PURE__ */ O("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
395
|
+
});
|
|
396
|
+
if (j) return /* @__PURE__ */ k("div", {
|
|
397
|
+
className: "p-6 text-destructive",
|
|
398
|
+
children: ["Sync could not be loaded: ", j.message]
|
|
399
|
+
});
|
|
400
|
+
let B = T?.planmagnetExternalSync;
|
|
401
|
+
if (!B) return /* @__PURE__ */ O("div", {
|
|
402
|
+
className: "p-6 text-muted-foreground",
|
|
403
|
+
children: "Sync not found."
|
|
404
|
+
});
|
|
405
|
+
let V = a(B.fieldMapping);
|
|
406
|
+
return /* @__PURE__ */ k("div", {
|
|
407
|
+
className: "space-y-6 p-6",
|
|
408
|
+
"data-testid": "sync-detail",
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ k("div", {
|
|
411
|
+
className: "flex flex-wrap items-start justify-between gap-4",
|
|
412
|
+
children: [/* @__PURE__ */ k("div", {
|
|
413
|
+
className: "flex items-start gap-3",
|
|
414
|
+
children: [/* @__PURE__ */ O(C, { className: "h-6 w-6 text-primary mt-0.5" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
|
|
415
|
+
className: "flex flex-wrap items-center gap-2",
|
|
416
|
+
children: [/* @__PURE__ */ k("h1", {
|
|
417
|
+
className: "text-2xl font-semibold",
|
|
418
|
+
children: [o(B.provider), " sync"]
|
|
419
|
+
}), /* @__PURE__ */ O(_, { status: B.status })]
|
|
420
|
+
}), /* @__PURE__ */ k("p", {
|
|
421
|
+
className: "text-sm text-muted-foreground",
|
|
422
|
+
children: [
|
|
423
|
+
B.project ? /* @__PURE__ */ O("button", {
|
|
424
|
+
type: "button",
|
|
425
|
+
className: "text-primary hover:underline",
|
|
426
|
+
onClick: () => c(n("/projects/project-detail-page", B.project?.id)),
|
|
427
|
+
children: B.project.name
|
|
428
|
+
}) : "Unknown project",
|
|
429
|
+
" · ",
|
|
430
|
+
i(B.direction)
|
|
431
|
+
]
|
|
432
|
+
})] })]
|
|
433
|
+
}), /* @__PURE__ */ k("div", {
|
|
434
|
+
className: "flex flex-wrap items-center gap-2",
|
|
435
|
+
children: [
|
|
436
|
+
/* @__PURE__ */ O(p, {
|
|
437
|
+
syncId: B.id,
|
|
438
|
+
size: "default",
|
|
439
|
+
onResult: g
|
|
440
|
+
}),
|
|
441
|
+
/* @__PURE__ */ O(f, {
|
|
442
|
+
syncId: B.id,
|
|
443
|
+
status: B.status
|
|
444
|
+
}),
|
|
445
|
+
/* @__PURE__ */ O(v, { syncId: B.id }),
|
|
446
|
+
/* @__PURE__ */ O(d, { sync: {
|
|
447
|
+
id: B.id,
|
|
448
|
+
provider: B.provider,
|
|
449
|
+
direction: B.direction,
|
|
450
|
+
conflictStrategy: B.conflictStrategy,
|
|
451
|
+
fieldMapping: B.fieldMapping,
|
|
452
|
+
syncFilters: B.syncFilters
|
|
453
|
+
} }),
|
|
454
|
+
/* @__PURE__ */ O(u, {
|
|
455
|
+
syncId: B.id,
|
|
456
|
+
label: `${o(B.provider)} sync`,
|
|
457
|
+
onDeleted: () => c("/integrations/syncs-page")
|
|
458
|
+
})
|
|
459
|
+
]
|
|
460
|
+
})]
|
|
461
|
+
}),
|
|
462
|
+
l && /* @__PURE__ */ O(h, { result: l }),
|
|
463
|
+
/* @__PURE__ */ k("div", {
|
|
464
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
465
|
+
children: [/* @__PURE__ */ k("div", {
|
|
466
|
+
className: "lg:col-span-2 space-y-6",
|
|
467
|
+
children: [/* @__PURE__ */ k(M, { children: [/* @__PURE__ */ O(P, { children: /* @__PURE__ */ O(F, { children: "Health" }) }), /* @__PURE__ */ k(N, {
|
|
468
|
+
className: "space-y-3",
|
|
469
|
+
children: [/* @__PURE__ */ O(m, { health: B.runHealth }), B.lastSyncError && /* @__PURE__ */ O("p", {
|
|
470
|
+
className: "text-sm text-status-error-text",
|
|
471
|
+
"data-testid": "sync-last-error",
|
|
472
|
+
children: /* @__PURE__ */ O(y, {
|
|
473
|
+
text: B.lastSyncError,
|
|
474
|
+
max: 200,
|
|
475
|
+
className: "text-status-error-text"
|
|
476
|
+
})
|
|
477
|
+
})]
|
|
478
|
+
})] }), /* @__PURE__ */ k(M, { children: [/* @__PURE__ */ O(P, { children: /* @__PURE__ */ k(F, {
|
|
479
|
+
className: "flex items-center gap-2",
|
|
480
|
+
children: [/* @__PURE__ */ O(S, { className: "h-4 w-4 text-primary" }), "History"]
|
|
481
|
+
}) }), /* @__PURE__ */ O(N, { children: /* @__PURE__ */ k(I, {
|
|
482
|
+
defaultValue: "runs",
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ k(R, { children: [/* @__PURE__ */ O(z, {
|
|
485
|
+
value: "runs",
|
|
486
|
+
"data-testid": "sync-tab-runs",
|
|
487
|
+
children: "Run history"
|
|
488
|
+
}), /* @__PURE__ */ k(z, {
|
|
489
|
+
value: "conflicts",
|
|
490
|
+
"data-testid": "sync-tab-conflicts",
|
|
491
|
+
children: [/* @__PURE__ */ O(w, { className: "mr-1 h-3.5 w-3.5" }), "Conflicts"]
|
|
492
|
+
})] }),
|
|
493
|
+
/* @__PURE__ */ O(L, {
|
|
494
|
+
value: "runs",
|
|
495
|
+
className: "mt-4",
|
|
496
|
+
children: /* @__PURE__ */ O(G, { syncId: B.id })
|
|
497
|
+
}),
|
|
498
|
+
/* @__PURE__ */ O(L, {
|
|
499
|
+
value: "conflicts",
|
|
500
|
+
className: "mt-4",
|
|
501
|
+
children: /* @__PURE__ */ O(q, { syncId: B.id })
|
|
502
|
+
})
|
|
503
|
+
]
|
|
504
|
+
}) })] })]
|
|
505
|
+
}), /* @__PURE__ */ k(M, { children: [/* @__PURE__ */ O(P, { children: /* @__PURE__ */ O(F, { children: "Details" }) }), /* @__PURE__ */ k(N, {
|
|
506
|
+
className: "space-y-3 text-sm",
|
|
507
|
+
children: [
|
|
508
|
+
/* @__PURE__ */ k("div", {
|
|
509
|
+
className: "flex justify-between gap-2",
|
|
510
|
+
children: [/* @__PURE__ */ O("span", {
|
|
511
|
+
className: "text-muted-foreground",
|
|
512
|
+
children: "External project"
|
|
513
|
+
}), B.externalProjectUrl ? /* @__PURE__ */ k("a", {
|
|
514
|
+
href: B.externalProjectUrl,
|
|
515
|
+
target: "_blank",
|
|
516
|
+
rel: "noreferrer noopener",
|
|
517
|
+
className: "inline-flex items-center gap-1 font-medium text-primary hover:underline",
|
|
518
|
+
children: [B.externalProjectId, /* @__PURE__ */ O(x, { className: "h-3 w-3" })]
|
|
519
|
+
}) : /* @__PURE__ */ O("span", {
|
|
520
|
+
className: "font-medium",
|
|
521
|
+
children: B.externalProjectId
|
|
522
|
+
})]
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ k("div", {
|
|
525
|
+
className: "flex justify-between gap-2",
|
|
526
|
+
children: [/* @__PURE__ */ O("span", {
|
|
527
|
+
className: "text-muted-foreground",
|
|
528
|
+
children: "Conflict strategy"
|
|
529
|
+
}), /* @__PURE__ */ O(A, {
|
|
530
|
+
variant: "outline",
|
|
531
|
+
className: "text-xs",
|
|
532
|
+
children: B.conflictStrategy === "SOURCE_WINS" ? "PlanMagnet wins" : B.conflictStrategy === "TARGET_WINS" ? "Provider wins" : "Manual"
|
|
533
|
+
})]
|
|
534
|
+
}),
|
|
535
|
+
/* @__PURE__ */ O("p", {
|
|
536
|
+
className: "text-xs text-muted-foreground",
|
|
537
|
+
children: s[B.conflictStrategy]
|
|
538
|
+
}),
|
|
539
|
+
B.provider === "GITHUB" && /* @__PURE__ */ k("div", { children: [
|
|
540
|
+
/* @__PURE__ */ O("p", {
|
|
541
|
+
className: "text-muted-foreground",
|
|
542
|
+
children: "Field mapping"
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ k("p", {
|
|
545
|
+
className: "font-medium",
|
|
546
|
+
children: ["Priority label: ", /* @__PURE__ */ O("code", { children: V.priority || "priority:" })]
|
|
547
|
+
}),
|
|
548
|
+
/* @__PURE__ */ k("p", {
|
|
549
|
+
className: "font-medium",
|
|
550
|
+
children: ["Due-date label: ", /* @__PURE__ */ O("code", { children: V.dueDate || "due:" })]
|
|
551
|
+
})
|
|
552
|
+
] }),
|
|
553
|
+
/* @__PURE__ */ k("div", {
|
|
554
|
+
className: "flex justify-between",
|
|
555
|
+
children: [/* @__PURE__ */ O("span", {
|
|
556
|
+
className: "text-muted-foreground",
|
|
557
|
+
children: "Items synced"
|
|
558
|
+
}), /* @__PURE__ */ O("span", {
|
|
559
|
+
className: "font-medium",
|
|
560
|
+
children: B.totalItemsSynced
|
|
561
|
+
})]
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ k("div", {
|
|
564
|
+
className: "flex justify-between",
|
|
565
|
+
children: [/* @__PURE__ */ O("span", {
|
|
566
|
+
className: "text-muted-foreground",
|
|
567
|
+
children: "Last synced"
|
|
568
|
+
}), /* @__PURE__ */ O("span", { children: B.lastSyncedAt ? new Date(B.lastSyncedAt).toLocaleString() : "Never" })]
|
|
569
|
+
}),
|
|
570
|
+
/* @__PURE__ */ k("div", {
|
|
571
|
+
className: "flex justify-between",
|
|
572
|
+
children: [/* @__PURE__ */ O("span", {
|
|
573
|
+
className: "text-muted-foreground",
|
|
574
|
+
children: "Created"
|
|
575
|
+
}), /* @__PURE__ */ O("span", { children: new Date(B.createdAt).toLocaleDateString() })]
|
|
576
|
+
}),
|
|
577
|
+
/* @__PURE__ */ k("div", {
|
|
578
|
+
className: "flex justify-between",
|
|
579
|
+
children: [/* @__PURE__ */ O("span", {
|
|
580
|
+
className: "text-muted-foreground",
|
|
581
|
+
children: "Updated"
|
|
582
|
+
}), /* @__PURE__ */ O("span", { children: new Date(B.updatedAt).toLocaleDateString() })]
|
|
583
|
+
})
|
|
584
|
+
]
|
|
585
|
+
})] })]
|
|
586
|
+
})
|
|
587
|
+
]
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
//#endregion
|
|
591
|
+
export { J as IntegrationsSyncDetailPagePage };
|
|
592
|
+
|
|
593
|
+
//# sourceMappingURL=IntegrationsSyncDetailPagePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationsSyncDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/IntegrationsSyncDetailPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { ExternalLink, History, Plug, ShieldAlert } from 'lucide-react';\nimport { useEntityId } from '../hooks/useEntityId';\nimport { usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { detailPath } from '../utils/rowNavigation';\nimport { PersonName } from '../people/People';\nimport {\n ConflictResolveActions,\n ConflictStatusBadge,\n DeleteSyncButton,\n EditSyncDialog,\n PauseResumeButton,\n RunNowButton,\n SyncHealthSummary,\n SyncRunResultSummary,\n SyncRunStatusBadge,\n SyncStatusBadge,\n TestConnectionButton,\n TruncatedText,\n CONFLICT_STRATEGY_EXPLANATION,\n} from '../controls/SyncControls';\nimport {\n directionLabel,\n parseGithubFieldMapping,\n providerLabel,\n type ConflictStatus,\n type ExternalSyncRow,\n type SyncConflictRow,\n type SyncRunResult,\n type SyncRunRow,\n} from '../integrations/syncTypes';\n\n/**\n * Sync detail (AUT-09/10/24/40): one ExternalSync — its health, its settings, its run history and its open\n * conflicts. Every write action here can be refused by role (FORBIDDEN) or by the provider itself (a honest\n * NOT_IMPLEMENTED for a non-GitHub provider, a real GitHub API error) — both are surfaced inline, never masked.\n */\n\nconst RUNS_PAGE = 20;\nconst CONFLICTS_PAGE = 20;\n\nconst GET_SYNC_DETAIL = gql`\n query SyncDetail($id: ID!) {\n planmagnetExternalSync(id: $id) {\n id\n provider\n direction\n status\n projectId\n project {\n id\n name\n }\n externalProjectId\n externalProjectUrl\n conflictStrategy\n fieldMapping\n syncFilters\n lastSyncedAt\n lastSyncError\n totalItemsSynced\n createdAt\n updatedAt\n runHealth {\n lastRunAt\n lastStatus\n consecutiveFailures\n runsLast7Days\n }\n }\n }\n`;\n\nconst GET_SYNC_RUNS = gql`\n query SyncRuns($syncId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetSyncRuns(syncId: $syncId, pagination: $pagination) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n id\n direction\n status\n startedAt\n finishedAt\n itemsCreated\n itemsUpdated\n itemsSkipped\n errorCount\n conflictCount\n errorMessage\n triggeredBy\n }\n }\n }\n`;\n\nconst GET_SYNC_CONFLICTS = gql`\n query SyncConflicts(\n $syncId: ID!\n $status: PlanmagnetSyncConflictStatus\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetSyncConflicts(syncId: $syncId, status: $status, pagination: $pagination) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n items {\n id\n createdAt\n fields\n localUpdatedAt\n remoteUpdatedAt\n resolution\n resolvedAt\n resolvedBy\n status\n mappingId\n mapping {\n id\n internalId\n internalType\n externalId\n externalType\n externalUrl\n }\n }\n }\n }\n`;\n\nfunction RunHistorySection({ syncId }: { syncId: string }) {\n const [loadingMore, setLoadingMore] = useState(false);\n const { data, loading, error, fetchMore } = useQuery<{\n planmagnetSyncRuns: {\n totalCount: number;\n pageInfo: { hasNextPage: boolean; endCursor: string | null };\n items: SyncRunRow[];\n };\n }>(GET_SYNC_RUNS, { variables: { syncId, pagination: { first: RUNS_PAGE } } });\n\n const list = data?.planmagnetSyncRuns;\n const runs = list?.items ?? [];\n\n const loadMore = async () => {\n const after = list?.pageInfo.endCursor;\n if (!after) return;\n setLoadingMore(true);\n try {\n await fetchMore({\n variables: { pagination: { first: RUNS_PAGE, after } },\n updateQuery: (prev, { fetchMoreResult }) => ({\n planmagnetSyncRuns: {\n ...fetchMoreResult.planmagnetSyncRuns,\n items: [...prev.planmagnetSyncRuns.items, ...fetchMoreResult.planmagnetSyncRuns.items],\n },\n }),\n });\n } finally {\n setLoadingMore(false);\n }\n };\n\n return (\n <div className=\"space-y-3\" data-testid=\"sync-runs\">\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n Run history could not be loaded: {error.message}\n </p>\n )}\n {loading && !data && <p className=\"text-sm text-muted-foreground\">Loading run history…</p>}\n {list && runs.length === 0 && (\n <p className=\"py-6 text-center text-sm text-muted-foreground\">\n No runs yet — use "Run now" above to start the first one.\n </p>\n )}\n <div className=\"overflow-x-auto\">\n {runs.length > 0 && (\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"text-left text-muted-foreground\">\n <th className=\"py-1 pr-3 font-medium\">Started</th>\n <th className=\"py-1 pr-3 font-medium\">Direction</th>\n <th className=\"py-1 pr-3 font-medium\">Status</th>\n <th className=\"py-1 pr-3 font-medium\">Created / updated / skipped</th>\n <th className=\"py-1 pr-3 font-medium\">Conflicts</th>\n <th className=\"py-1 pr-3 font-medium\">Triggered by</th>\n <th className=\"py-1 font-medium\">Error</th>\n </tr>\n </thead>\n <tbody>\n {runs.map((run) => (\n <tr key={run.id} className=\"border-t align-top\" data-testid=\"sync-run-row\">\n <td className=\"py-1.5 pr-3 whitespace-nowrap\">\n <div>{new Date(run.startedAt).toLocaleString()}</div>\n <div className=\"text-xs text-muted-foreground\">\n finished {new Date(run.finishedAt).toLocaleString()}\n </div>\n </td>\n <td className=\"py-1.5 pr-3 whitespace-nowrap\">{directionLabel(run.direction)}</td>\n <td className=\"py-1.5 pr-3\">\n <SyncRunStatusBadge status={run.status} />\n </td>\n <td className=\"py-1.5 pr-3 whitespace-nowrap\">\n {run.itemsCreated} / {run.itemsUpdated} / {run.itemsSkipped}\n </td>\n <td className=\"py-1.5 pr-3\">{run.conflictCount}</td>\n <td className=\"py-1.5 pr-3 whitespace-nowrap\">\n <PersonName id={run.triggeredBy} />\n </td>\n <td className=\"py-1.5 text-status-error-text\">\n {run.errorMessage ? (\n <TruncatedText\n text={run.errorMessage}\n max={100}\n className=\"text-status-error-text\"\n />\n ) : (\n <span className=\"text-muted-foreground\">—</span>\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n </div>\n {list?.pageInfo.hasNextPage && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => void loadMore()} disabled={loadingMore}>\n {loadingMore ? 'Loading…' : `Show more (${runs.length} of ${list.totalCount})`}\n </Button>\n )}\n </div>\n );\n}\n\nfunction ConflictRow({ conflict }: { conflict: SyncConflictRow }) {\n const navigate = usePlanMagnetNavigate();\n const mapping = conflict.mapping;\n const isWorkItem = mapping?.internalType === 'workitem';\n\n return (\n <li className=\"rounded-md border p-4 space-y-2\" data-testid=\"sync-conflict\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <ConflictStatusBadge status={conflict.status} />\n <span className=\"text-xs text-muted-foreground\">\n Detected {new Date(conflict.createdAt).toLocaleString()}\n </span>\n </div>\n {mapping && (\n <div className=\"flex items-center gap-2 text-xs\">\n {isWorkItem ? (\n <button\n type=\"button\"\n className=\"font-medium text-primary hover:underline\"\n onClick={() =>\n navigate(\n `/tasks/task-detail-page?taskId=${encodeURIComponent(mapping.internalId)}`\n )\n }\n >\n Open in PlanMagnet\n </button>\n ) : (\n <span className=\"text-muted-foreground\">\n {mapping.internalType} {mapping.internalId}\n </span>\n )}\n {mapping.externalUrl && (\n <a\n href={mapping.externalUrl}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className=\"inline-flex items-center gap-1 text-primary hover:underline\"\n >\n View on {mapping.externalType}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n )}\n </div>\n )}\n </div>\n <p className=\"text-sm\">\n Fields in conflict:{' '}\n <span className=\"font-medium\">\n {conflict.fields.length ? conflict.fields.join(', ') : 'unknown'}\n </span>\n </p>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs text-muted-foreground\">\n <span>PlanMagnet last updated {new Date(conflict.localUpdatedAt).toLocaleString()}</span>\n <span>Provider last updated {new Date(conflict.remoteUpdatedAt).toLocaleString()}</span>\n </div>\n {conflict.status === 'OPEN' ? (\n <ConflictResolveActions conflictId={conflict.id} />\n ) : (\n <p className=\"text-xs text-muted-foreground\">\n Resolved {conflict.resolvedAt ? new Date(conflict.resolvedAt).toLocaleString() : ''}\n {conflict.resolution\n ? ` — ${conflict.resolution === 'SOURCE_WINS' ? 'kept PlanMagnet' : conflict.resolution === 'TARGET_WINS' ? 'took the provider' : 'dismissed manually'}`\n : ''}\n {conflict.resolvedBy ? (\n <>\n {' by '}\n <PersonName id={conflict.resolvedBy} />\n </>\n ) : null}\n </p>\n )}\n </li>\n );\n}\n\nfunction ConflictsSection({ syncId }: { syncId: string }) {\n const [status, setStatus] = useState<'ALL' | ConflictStatus>('OPEN');\n const [loadingMore, setLoadingMore] = useState(false);\n const { data, loading, error, fetchMore } = useQuery<{\n planmagnetSyncConflicts: {\n totalCount: number;\n pageInfo: { hasNextPage: boolean; endCursor: string | null };\n items: SyncConflictRow[];\n };\n }>(GET_SYNC_CONFLICTS, {\n variables: {\n syncId,\n status: status === 'ALL' ? undefined : status,\n pagination: { first: CONFLICTS_PAGE },\n },\n });\n\n const list = data?.planmagnetSyncConflicts;\n const conflicts = list?.items ?? [];\n\n const loadMore = async () => {\n const after = list?.pageInfo.endCursor;\n if (!after) return;\n setLoadingMore(true);\n try {\n await fetchMore({\n variables: { pagination: { first: CONFLICTS_PAGE, after } },\n updateQuery: (prev, { fetchMoreResult }) => ({\n planmagnetSyncConflicts: {\n ...fetchMoreResult.planmagnetSyncConflicts,\n items: [\n ...prev.planmagnetSyncConflicts.items,\n ...fetchMoreResult.planmagnetSyncConflicts.items,\n ],\n },\n }),\n });\n } finally {\n setLoadingMore(false);\n }\n };\n\n return (\n <div className=\"space-y-3\" data-testid=\"sync-conflicts\">\n <div className=\"flex flex-wrap gap-1\" role=\"group\" aria-label=\"Filter conflicts by status\">\n {(['OPEN', 'RESOLVED', 'ALL'] as const).map((s) => (\n <button\n key={s}\n type=\"button\"\n aria-pressed={status === s}\n data-testid={`sync-conflicts-status-${s}`}\n onClick={() => setStatus(s)}\n className={`px-3 py-1.5 text-sm rounded-md ${status === s ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n >\n {s === 'ALL' ? 'All' : s.charAt(0) + s.slice(1).toLowerCase()}\n </button>\n ))}\n </div>\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n Conflicts could not be loaded: {error.message}\n </p>\n )}\n {loading && !data && <p className=\"text-sm text-muted-foreground\">Loading conflicts…</p>}\n {list && conflicts.length === 0 && (\n <p className=\"py-6 text-center text-sm text-muted-foreground\">\n {status === 'OPEN' ? 'No open conflicts.' : 'No conflicts found.'}\n </p>\n )}\n <ul className=\"space-y-3\">\n {conflicts.map((conflict) => (\n <ConflictRow key={conflict.id} conflict={conflict} />\n ))}\n </ul>\n {list?.pageInfo.hasNextPage && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => void loadMore()} disabled={loadingMore}>\n {loadingMore ? 'Loading…' : `Show more (${conflicts.length} of ${list.totalCount})`}\n </Button>\n )}\n </div>\n );\n}\n\nexport function IntegrationsSyncDetailPagePage() {\n const syncId = useEntityId();\n const navigate = usePlanMagnetNavigate();\n const [runResult, setRunResult] = useState<SyncRunResult | null>(null);\n\n const { data, loading, error } = useQuery<{ planmagnetExternalSync: ExternalSyncRow | null }>(\n GET_SYNC_DETAIL,\n { variables: { id: syncId }, skip: !syncId }\n );\n\n if (!syncId)\n return (\n <div className=\"p-6 text-muted-foreground\">No sync selected. Open one from Integrations.</div>\n );\n // Only before the first load: a refetch after an action 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-destructive\">Sync could not be loaded: {error.message}</div>;\n\n const sync = data?.planmagnetExternalSync;\n if (!sync) return <div className=\"p-6 text-muted-foreground\">Sync not found.</div>;\n\n const mapping = parseGithubFieldMapping(sync.fieldMapping);\n\n return (\n <div className=\"space-y-6 p-6\" data-testid=\"sync-detail\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div className=\"flex items-start gap-3\">\n <Plug className=\"h-6 w-6 text-primary mt-0.5\" />\n <div>\n <div className=\"flex flex-wrap items-center gap-2\">\n <h1 className=\"text-2xl font-semibold\">{providerLabel(sync.provider)} sync</h1>\n <SyncStatusBadge status={sync.status} />\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {sync.project ? (\n <button\n type=\"button\"\n className=\"text-primary hover:underline\"\n onClick={() =>\n navigate(detailPath('/projects/project-detail-page', sync.project?.id))\n }\n >\n {sync.project.name}\n </button>\n ) : (\n 'Unknown project'\n )}\n {' · '}\n {directionLabel(sync.direction)}\n </p>\n </div>\n </div>\n <div className=\"flex flex-wrap items-center gap-2\">\n <RunNowButton syncId={sync.id} size=\"default\" onResult={setRunResult} />\n <PauseResumeButton syncId={sync.id} status={sync.status} />\n <TestConnectionButton syncId={sync.id} />\n <EditSyncDialog\n sync={{\n id: sync.id,\n provider: sync.provider,\n direction: sync.direction,\n conflictStrategy: sync.conflictStrategy,\n fieldMapping: sync.fieldMapping,\n syncFilters: sync.syncFilters,\n }}\n />\n <DeleteSyncButton\n syncId={sync.id}\n label={`${providerLabel(sync.provider)} sync`}\n onDeleted={() => navigate('/integrations/syncs-page')}\n />\n </div>\n </div>\n\n {runResult && <SyncRunResultSummary result={runResult} />}\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Health</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <SyncHealthSummary health={sync.runHealth} />\n {sync.lastSyncError && (\n <p className=\"text-sm text-status-error-text\" data-testid=\"sync-last-error\">\n <TruncatedText\n text={sync.lastSyncError}\n max={200}\n className=\"text-status-error-text\"\n />\n </p>\n )}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <History className=\"h-4 w-4 text-primary\" />\n History\n </CardTitle>\n </CardHeader>\n <CardContent>\n <Tabs defaultValue=\"runs\">\n <TabsList>\n <TabsTrigger value=\"runs\" data-testid=\"sync-tab-runs\">\n Run history\n </TabsTrigger>\n <TabsTrigger value=\"conflicts\" data-testid=\"sync-tab-conflicts\">\n <ShieldAlert className=\"mr-1 h-3.5 w-3.5\" />\n Conflicts\n </TabsTrigger>\n </TabsList>\n <TabsContent value=\"runs\" className=\"mt-4\">\n <RunHistorySection syncId={sync.id} />\n </TabsContent>\n <TabsContent value=\"conflicts\" className=\"mt-4\">\n <ConflictsSection syncId={sync.id} />\n </TabsContent>\n </Tabs>\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3 text-sm\">\n <div className=\"flex justify-between gap-2\">\n <span className=\"text-muted-foreground\">External project</span>\n {sync.externalProjectUrl ? (\n <a\n href={sync.externalProjectUrl}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className=\"inline-flex items-center gap-1 font-medium text-primary hover:underline\"\n >\n {sync.externalProjectId}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n ) : (\n <span className=\"font-medium\">{sync.externalProjectId}</span>\n )}\n </div>\n <div className=\"flex justify-between gap-2\">\n <span className=\"text-muted-foreground\">Conflict strategy</span>\n <Badge variant=\"outline\" className=\"text-xs\">\n {sync.conflictStrategy === 'SOURCE_WINS'\n ? 'PlanMagnet wins'\n : sync.conflictStrategy === 'TARGET_WINS'\n ? 'Provider wins'\n : 'Manual'}\n </Badge>\n </div>\n <p className=\"text-xs text-muted-foreground\">\n {CONFLICT_STRATEGY_EXPLANATION[sync.conflictStrategy]}\n </p>\n {sync.provider === 'GITHUB' && (\n <div>\n <p className=\"text-muted-foreground\">Field mapping</p>\n <p className=\"font-medium\">\n Priority label: <code>{mapping.priority || 'priority:'}</code>\n </p>\n <p className=\"font-medium\">\n Due-date label: <code>{mapping.dueDate || 'due:'}</code>\n </p>\n </div>\n )}\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Items synced</span>\n <span className=\"font-medium\">{sync.totalItemsSynced}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Last synced</span>\n <span>\n {sync.lastSyncedAt ? new Date(sync.lastSyncedAt).toLocaleString() : 'Never'}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Created</span>\n <span>{new Date(sync.createdAt).toLocaleDateString()}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Updated</span>\n <span>{new Date(sync.updatedAt).toLocaleDateString()}</span>\n </div>\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAoDA,IAAM,IAAY,IACZ,IAAiB,IAEjB,IAAkB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCrB,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;GA0BnB,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoC9B,SAAS,EAAkB,EAAE,aAA8B;CACzD,IAAM,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,EAAE,SAAM,YAAS,UAAO,iBAAc,EAMzC,GAAe,EAAE,WAAW;EAAE;EAAQ,YAAY,EAAE,OAAO,GAAW;EAAE,EAAE,CAAC,EAExE,IAAO,GAAM,oBACb,IAAO,GAAM,SAAS,EAAE,EAExB,IAAW,YAAY;EAC3B,IAAM,IAAQ,GAAM,SAAS;AACxB,SACL;KAAe,GAAK;AACpB,OAAI;AACF,UAAM,EAAU;KACd,WAAW,EAAE,YAAY;MAAE,OAAO;MAAW;MAAO,EAAE;KACtD,cAAc,GAAM,EAAE,0BAAuB,EAC3C,oBAAoB;MAClB,GAAG,EAAgB;MACnB,OAAO,CAAC,GAAG,EAAK,mBAAmB,OAAO,GAAG,EAAgB,mBAAmB,MAAM;MACvF,EACF;KACF,CAAC;aACM;AACR,MAAe,GAAM;;;;AAIzB,QACE,kBAAC,OAAD;EAAK,WAAU;EAAY,eAAY;YAAvC;GACG,KACC,kBAAC,KAAD;IAAG,MAAK;IAAQ,WAAU;cAA1B,CAAqD,qCACjB,EAAM,QACtC;;GAEL,KAAW,CAAC,KAAQ,kBAAC,KAAD;IAAG,WAAU;cAAgC;IAAwB,CAAA;GACzF,KAAQ,EAAK,WAAW,KACvB,kBAAC,KAAD;IAA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