@burdenoff/microfe-bigconsole 2026.1124.2 → 2026.1124.3

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,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+ import { ActionLock } from '../../hooks/useOwnerBoundRun';
2
3
  export interface FleetChildrenPanelProps {
3
4
  dashboardId: string;
4
5
  dashboardName: string;
@@ -6,6 +7,13 @@ export interface FleetChildrenPanelProps {
6
7
  masterName?: string | null;
7
8
  /** Called after an action changed this board's widgets (a flag answered, the board restored). */
8
9
  onBoardChanged?: () => Promise<unknown> | void;
10
+ /**
11
+ * The page's action lock, when the board's widget menu shares it with this panel, so a widget restored or
12
+ * promoted from its menu holds the panel's buttons too. The panel keeps its own when none is given.
13
+ */
14
+ lock?: ActionLock;
15
+ /** Changes when something outside the panel changed this board's widgets, so open flags are read again. */
16
+ changeToken?: number;
9
17
  onClose: () => void;
10
18
  onOpenBoard: (dashboardId: string) => void;
11
19
  }
@@ -9,9 +9,9 @@ import { pushIsEmpty as s } from "../../utils/fleetPush.js";
9
9
  import { CreateLinkedCopyDialog as c } from "./CreateLinkedCopyDialog.js";
10
10
  import { FleetCopySection as l } from "./FleetCopySection.js";
11
11
  import { FleetPushResultTable as u } from "./FleetPushResultTable.js";
12
- import { memo as d, useCallback as f, useState as p } from "react";
13
- import { PermissionButton as m } from "@burdenoff/fe-libs/shared/components";
14
- import { Network as h, X as g } from "lucide-react";
12
+ import { memo as d, useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
13
+ import { PermissionButton as g } from "@burdenoff/fe-libs/shared/components";
14
+ import { Network as ee, X as te } from "lucide-react";
15
15
  import { Button as _, Spinner as v } from "@burdenoff/fe-libs/ui";
16
16
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
17
17
  // src/bigconsole/components/fleet/FleetChildrenPanel.tsx
@@ -30,93 +30,97 @@ var S = {
30
30
  ...S,
31
31
  backgroundColor: "var(--color-status-warning-bgSubtle)",
32
32
  color: "var(--color-status-warning-text)"
33
- }, w = (e, t) => e instanceof Error && e.message ? e.message : t, T = d(function({ dashboardId: d, dashboardName: T, masterName: E = null, onBoardChanged: ee, onClose: D, onOpenBoard: O }) {
34
- let k = n(), { workspaceId: A, currentUser: j } = e(), M = `${A ?? ""}:${j?.id ?? ""}:${d}`, { loading: N, error: P, isMaster: F, linkStatus: I, summary: L, refetch: R } = r(d, !0), z = o(), [B, V] = p({ phase: "idle" }), [H, U] = p(!1), [W, G] = p(null), [K, q] = p(null), J = i(), Y = f(() => {
35
- V({ phase: "idle" }), U(!1), G(null), q(null);
36
- }, []), { acting: X, run: Z } = a(M, R, Y, J), Q = z.busy || X, te = f(() => (q(null), Z(() => z.setAsMaster(d), () => q({
33
+ }, w = (e, t) => e instanceof Error && e.message ? e.message : t, T = d(function({ dashboardId: d, dashboardName: T, masterName: E = null, onBoardChanged: D, lock: O, changeToken: k, onClose: ne, onOpenBoard: re }) {
34
+ let A = n(), { workspaceId: ie, currentUser: ae } = e(), j = `${ie ?? ""}:${ae?.id ?? ""}:${d}`, { loading: M, error: N, isMaster: P, linkStatus: F, summary: I, refetch: L } = r(d, !0), R = o(), [z, B] = h({ phase: "idle" }), [V, H] = h(!1), [U, W] = h(null), [G, K] = h(null), q = i(), J = O ?? q, Y = m(k);
35
+ p(() => {
36
+ k !== Y.current && (Y.current = k, B((e) => e.phase === "preview" ? { phase: "idle" } : e), L());
37
+ }, [k, L]);
38
+ let oe = f(() => {
39
+ B({ phase: "idle" }), H(!1), W(null), K(null);
40
+ }, []), { acting: se, run: X } = a(j, L, oe, J), Z = R.busy || se, Q = f(() => (K(null), X(() => R.setAsMaster(d), () => K({
37
41
  tone: "ok",
38
- text: k("bigconsole.fleet.children.nowMaster", "This board is now a master.")
39
- }), (e) => q({
42
+ text: A("bigconsole.fleet.children.nowMaster", "This board is now a master.")
43
+ }), (e) => K({
40
44
  tone: "error",
41
- text: w(e, k("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
45
+ text: w(e, A("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
42
46
  }))), [
43
- z,
47
+ R,
44
48
  d,
45
- Z,
46
- k
47
- ]), ne = f(() => (q(null), Z(() => z.unsetAsMaster(d), () => q({
49
+ X,
50
+ A
51
+ ]), ce = f(() => (K(null), X(() => R.unsetAsMaster(d), () => K({
48
52
  tone: "ok",
49
- text: k("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
50
- }), (e) => q({
53
+ text: A("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
54
+ }), (e) => K({
51
55
  tone: "error",
52
- text: w(e, k("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
56
+ text: w(e, A("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
53
57
  }))), [
54
- z,
58
+ R,
55
59
  d,
56
- Z,
57
- k
58
- ]), re = f((e) => (G(null), Z(() => z.createLinkedCopy(d, e), () => {
59
- U(!1), q({
60
+ X,
61
+ A
62
+ ]), le = f((e) => (W(null), X(() => R.createLinkedCopy(d, e), () => {
63
+ H(!1), K({
60
64
  tone: "ok",
61
- text: k("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
65
+ text: A("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
62
66
  });
63
- }, (e) => G(w(e, k("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
64
- z,
67
+ }, (e) => W(w(e, A("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
68
+ R,
65
69
  d,
66
- Z,
67
- k
68
- ]), $ = f((e) => (q(null), Z(() => z.previewPush(d, e), (t) => V({
70
+ X,
71
+ A
72
+ ]), $ = f((e) => (K(null), X(() => R.previewPush(d, e), (t) => B({
69
73
  phase: "preview",
70
74
  scope: e,
71
75
  result: t
72
- }), (e) => q({
76
+ }), (e) => K({
73
77
  tone: "error",
74
- text: w(e, k("bigconsole.fleet.error.preview", "The preview could not be made."))
78
+ text: w(e, A("bigconsole.fleet.error.preview", "The preview could not be made."))
75
79
  }))), [
76
- z,
80
+ R,
77
81
  d,
78
- Z,
79
- k
80
- ]), ie = f((e) => (q(null), Z(() => z.push(d, e), (e) => V({
82
+ X,
83
+ A
84
+ ]), ue = f((e) => (K(null), X(() => R.push(d, e), (e) => B({
81
85
  phase: "done",
82
86
  result: e
83
- }), (e) => q({
87
+ }), (e) => K({
84
88
  tone: "error",
85
- text: w(e, k("bigconsole.fleet.error.push", "The push could not be made."))
89
+ text: w(e, A("bigconsole.fleet.error.push", "The push could not be made."))
86
90
  }))), [
87
- z,
91
+ R,
88
92
  d,
89
- Z,
90
- k
91
- ]), ae = (e) => /* @__PURE__ */ x("span", {
93
+ X,
94
+ A
95
+ ]), de = (e) => /* @__PURE__ */ x("span", {
92
96
  className: "flex flex-wrap items-center gap-1",
93
97
  children: [
94
98
  e.status === "PENDING" && /* @__PURE__ */ b("span", {
95
99
  "data-testid": "fleet-child-pending",
96
100
  style: C,
97
- children: k("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
101
+ children: A("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
98
102
  }),
99
103
  e.behindMaster && /* @__PURE__ */ b("span", {
100
104
  "data-testid": "fleet-child-behind",
101
105
  style: C,
102
- children: e.missingWidgetCount ? k("bigconsole.fleet.children.behindCount", "Behind · {{count}} widgets missing", { count: e.missingWidgetCount }) : k("bigconsole.fleet.children.behind", "Behind the master")
106
+ children: e.missingWidgetCount ? A("bigconsole.fleet.children.behindCount", "Behind · {{count}} widgets missing", { count: e.missingWidgetCount }) : A("bigconsole.fleet.children.behind", "Behind the master")
103
107
  }),
104
108
  e.openFlagCount > 0 && /* @__PURE__ */ b("span", {
105
109
  "data-testid": "fleet-child-flags",
106
110
  style: C,
107
- children: k("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
111
+ children: A("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
108
112
  }),
109
113
  e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ b("span", {
110
114
  style: {
111
115
  ...S,
112
116
  color: "var(--color-status-success-text)"
113
117
  },
114
- children: k("bigconsole.fleet.children.inSync", "In sync")
118
+ children: A("bigconsole.fleet.children.inSync", "In sync")
115
119
  })
116
120
  ]
117
121
  });
118
122
  return /* @__PURE__ */ x("section", {
119
- "aria-label": k("bigconsole.fleet.children.title", "Children"),
123
+ "aria-label": A("bigconsole.fleet.children.title", "Children"),
120
124
  "data-testid": "fleet-children-panel",
121
125
  className: "flex flex-col gap-form-gap",
122
126
  children: [
@@ -130,59 +134,60 @@ var S = {
130
134
  fontSize: "var(--font-size-body)",
131
135
  fontWeight: "var(--font-weight-semibold)"
132
136
  },
133
- children: [/* @__PURE__ */ b(h, {
137
+ children: [/* @__PURE__ */ b(ee, {
134
138
  "aria-hidden": "true",
135
139
  style: {
136
140
  height: "var(--size-icon-sm)",
137
141
  width: "var(--size-icon-sm)"
138
142
  }
139
- }), k("bigconsole.fleet.children.title", "Children")]
143
+ }), A("bigconsole.fleet.children.title", "Children")]
140
144
  }), /* @__PURE__ */ b(_, {
141
145
  variant: "ghost",
142
146
  size: "sm",
143
- onClick: D,
144
- "aria-label": k("bigconsole.fleet.children.close", "Close the Children panel"),
145
- title: k("bigconsole.fleet.children.close", "Close the Children panel"),
147
+ onClick: ne,
148
+ "aria-label": A("bigconsole.fleet.children.close", "Close the Children panel"),
149
+ title: A("bigconsole.fleet.children.close", "Close the Children panel"),
146
150
  "data-testid": "fleet-children-close",
147
- children: /* @__PURE__ */ b(g, { style: {
151
+ children: /* @__PURE__ */ b(te, { style: {
148
152
  height: "var(--size-icon-sm)",
149
153
  width: "var(--size-icon-sm)"
150
154
  } })
151
155
  })]
152
156
  }),
153
- K && /* @__PURE__ */ b("p", {
154
- role: K.tone === "error" ? "alert" : "status",
157
+ G && /* @__PURE__ */ b("p", {
158
+ role: G.tone === "error" ? "alert" : "status",
155
159
  "data-testid": "fleet-children-message",
156
160
  style: {
157
161
  margin: 0,
158
- color: K.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
162
+ color: G.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
159
163
  fontSize: "var(--font-size-body-sm)"
160
164
  },
161
- children: K.text
165
+ children: G.text
162
166
  }),
163
- N && !L && !F && /* @__PURE__ */ x("div", {
167
+ M && !I && !P && /* @__PURE__ */ x("div", {
164
168
  className: "flex items-center gap-2",
165
169
  style: { color: "var(--color-text-secondary)" },
166
170
  children: [/* @__PURE__ */ b(v, { style: {
167
171
  height: "var(--size-icon-sm)",
168
172
  width: "var(--size-icon-sm)"
169
- } }), k("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
173
+ } }), A("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
170
174
  }),
171
- !N && P && /* @__PURE__ */ b("p", {
175
+ !M && N && /* @__PURE__ */ b("p", {
172
176
  role: "alert",
173
177
  style: {
174
178
  margin: 0,
175
179
  color: "var(--color-status-error-text)"
176
180
  },
177
- children: k("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
181
+ children: A("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
178
182
  }),
179
- !N && !P && I === "ACTIVE" && /* @__PURE__ */ b(l, {
183
+ !M && !N && F === "ACTIVE" && /* @__PURE__ */ b(l, {
180
184
  dashboardId: d,
181
185
  masterName: E,
182
- onBoardChanged: ee,
183
- lock: J
186
+ onBoardChanged: D,
187
+ lock: J,
188
+ changeToken: k
184
189
  }),
185
- !N && !P && !F && /* @__PURE__ */ x("div", {
190
+ !M && !N && !P && /* @__PURE__ */ x("div", {
186
191
  className: "flex flex-col gap-form-gap",
187
192
  "data-testid": "fleet-children-not-master",
188
193
  children: [/* @__PURE__ */ b("p", {
@@ -191,22 +196,22 @@ var S = {
191
196
  color: "var(--color-text-secondary)",
192
197
  fontSize: "var(--font-size-body-sm)"
193
198
  },
194
- children: k("bigconsole.fleet.children.notMaster", "Other boards can follow this one as linked copies once it is a master. Its own widgets stay as they are.")
195
- }), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(m, {
199
+ children: A("bigconsole.fleet.children.notMaster", "Other boards can follow this one as linked copies once it is a master. Its own widgets stay as they are.")
200
+ }), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(g, {
196
201
  permission: t.DASHBOARD_UPDATE,
197
202
  deniedBehavior: "hide",
198
203
  children: /* @__PURE__ */ x(_, {
199
- onClick: te,
200
- disabled: Q,
204
+ onClick: Q,
205
+ disabled: Z,
201
206
  "data-testid": "fleet-set-master",
202
- children: [Q && /* @__PURE__ */ b(v, { style: {
207
+ children: [Z && /* @__PURE__ */ b(v, { style: {
203
208
  height: "var(--size-icon-sm)",
204
209
  width: "var(--size-icon-sm)"
205
- } }), k("bigconsole.fleet.children.setMaster", "Set as master")]
210
+ } }), A("bigconsole.fleet.children.setMaster", "Set as master")]
206
211
  })
207
212
  }) })]
208
213
  }),
209
- !P && F && L && /* @__PURE__ */ x(y, { children: [
214
+ !N && P && I && /* @__PURE__ */ x(y, { children: [
210
215
  /* @__PURE__ */ x("p", {
211
216
  "data-testid": "fleet-children-counts",
212
217
  style: {
@@ -214,12 +219,12 @@ var S = {
214
219
  color: "var(--color-text-secondary)",
215
220
  fontSize: "var(--font-size-body-sm)"
216
221
  },
217
- children: [k("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
218
- total: L.total,
219
- active: L.active,
220
- pending: L.pending,
221
- behind: L.behind
222
- }), L.hiddenCount > 0 && /* @__PURE__ */ x(y, { children: [" ", k("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: L.hiddenCount })] })]
222
+ children: [A("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
223
+ total: I.total,
224
+ active: I.active,
225
+ pending: I.pending,
226
+ behind: I.behind
227
+ }), I.hiddenCount > 0 && /* @__PURE__ */ x(y, { children: [" ", A("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: I.hiddenCount })] })]
223
228
  }),
224
229
  /* @__PURE__ */ x("ul", {
225
230
  className: "flex flex-col gap-1",
@@ -228,19 +233,19 @@ var S = {
228
233
  margin: 0,
229
234
  padding: 0
230
235
  },
231
- children: [L.children.length === 0 && L.total === 0 && /* @__PURE__ */ b("li", {
236
+ children: [I.children.length === 0 && I.total === 0 && /* @__PURE__ */ b("li", {
232
237
  style: {
233
238
  color: "var(--color-text-secondary)",
234
239
  fontSize: "var(--font-size-body-sm)"
235
240
  },
236
- children: k("bigconsole.fleet.children.none", "No copies yet. Create one, or link a board from the dashboards list.")
237
- }), L.children.map((e) => /* @__PURE__ */ x("li", {
241
+ children: A("bigconsole.fleet.children.none", "No copies yet. Create one, or link a board from the dashboards list.")
242
+ }), I.children.map((e) => /* @__PURE__ */ x("li", {
238
243
  "data-testid": "fleet-child",
239
244
  className: "flex items-center justify-between gap-form-gap rounded-input border px-3 py-2",
240
245
  style: { borderColor: "var(--color-border-subtle)" },
241
246
  children: [/* @__PURE__ */ b("button", {
242
247
  type: "button",
243
- onClick: () => O(e.dashboardId),
248
+ onClick: () => re(e.dashboardId),
244
249
  className: "min-w-0 truncate text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
245
250
  style: {
246
251
  color: "var(--color-text-primary)",
@@ -250,131 +255,131 @@ var S = {
250
255
  cursor: "pointer"
251
256
  },
252
257
  children: e.name
253
- }), ae(e)]
258
+ }), de(e)]
254
259
  }, e.dashboardId))]
255
260
  }),
256
261
  /* @__PURE__ */ x("div", {
257
262
  className: "flex flex-wrap items-center gap-2",
258
263
  children: [
259
- /* @__PURE__ */ b(m, {
264
+ /* @__PURE__ */ b(g, {
260
265
  permission: t.DASHBOARD_CREATE,
261
266
  deniedBehavior: "hide",
262
267
  children: /* @__PURE__ */ b(_, {
263
268
  variant: "outline",
264
269
  onClick: () => {
265
- G(null), U(!0);
270
+ W(null), H(!0);
266
271
  },
267
- disabled: Q,
272
+ disabled: Z,
268
273
  "data-testid": "fleet-create-copy",
269
- children: k("bigconsole.fleet.children.createCopy", "Create linked copy…")
274
+ children: A("bigconsole.fleet.children.createCopy", "Create linked copy…")
270
275
  })
271
276
  }),
272
- /* @__PURE__ */ b(m, {
277
+ /* @__PURE__ */ b(g, {
273
278
  permission: t.DASHBOARD_UPDATE,
274
279
  deniedBehavior: "hide",
275
280
  children: /* @__PURE__ */ b(_, {
276
281
  onClick: () => $("DIRECT_COPIES"),
277
- disabled: Q || L.total === 0 || B.phase === "preview",
282
+ disabled: Z || I.total === 0 || z.phase === "preview",
278
283
  "data-testid": "fleet-push",
279
- children: k("bigconsole.fleet.children.push", "Push to copies…")
284
+ children: A("bigconsole.fleet.children.push", "Push to copies…")
280
285
  })
281
286
  }),
282
- /* @__PURE__ */ b(m, {
287
+ /* @__PURE__ */ b(g, {
283
288
  permission: t.DASHBOARD_UPDATE,
284
289
  deniedBehavior: "hide",
285
290
  children: /* @__PURE__ */ b(_, {
286
291
  variant: "ghost",
287
- onClick: ne,
288
- disabled: Q || L.total > 0,
289
- title: L.total > 0 ? k("bigconsole.fleet.children.unsetBlocked", "Detach or remove every copy first.") : void 0,
292
+ onClick: ce,
293
+ disabled: Z || I.total > 0,
294
+ title: I.total > 0 ? A("bigconsole.fleet.children.unsetBlocked", "Detach or remove every copy first.") : void 0,
290
295
  "data-testid": "fleet-unset-master",
291
- children: k("bigconsole.fleet.children.unsetMaster", "Stop being a master")
296
+ children: A("bigconsole.fleet.children.unsetMaster", "Stop being a master")
292
297
  })
293
298
  })
294
299
  ]
295
300
  })
296
301
  ] }),
297
- B.phase === "preview" && /* @__PURE__ */ x("div", {
302
+ z.phase === "preview" && /* @__PURE__ */ x("div", {
298
303
  className: "flex flex-col gap-form-gap rounded-input border p-3",
299
304
  style: { borderColor: "var(--color-border-subtle)" },
300
305
  "data-testid": "fleet-push-preview",
301
306
  children: [
302
307
  /* @__PURE__ */ b("strong", {
303
308
  style: { color: "var(--color-text-primary)" },
304
- children: k("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
309
+ children: A("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
305
310
  }),
306
311
  /* @__PURE__ */ b("div", {
307
312
  role: "radiogroup",
308
- "aria-label": k("bigconsole.fleet.push.scopeLabel", "How far to push"),
313
+ "aria-label": A("bigconsole.fleet.push.scopeLabel", "How far to push"),
309
314
  className: "flex flex-wrap gap-2",
310
315
  children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */ b("button", {
311
316
  type: "button",
312
317
  role: "radio",
313
- "aria-checked": B.scope === e,
314
- disabled: Q,
315
- onClick: () => B.scope !== e && $(e),
318
+ "aria-checked": z.scope === e,
319
+ disabled: Z,
320
+ onClick: () => z.scope !== e && $(e),
316
321
  className: "rounded-input border px-3 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
317
322
  style: {
318
- borderColor: B.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
319
- backgroundColor: B.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
323
+ borderColor: z.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
324
+ backgroundColor: z.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
320
325
  color: "var(--color-text-primary)"
321
326
  },
322
327
  "data-testid": `fleet-push-scope-${e}`,
323
- children: e === "DIRECT_COPIES" ? k("bigconsole.fleet.push.scopeDirect", "Direct copies") : k("bigconsole.fleet.push.scopeAll", "Copies of copies too")
328
+ children: e === "DIRECT_COPIES" ? A("bigconsole.fleet.push.scopeDirect", "Direct copies") : A("bigconsole.fleet.push.scopeAll", "Copies of copies too")
324
329
  }, e))
325
330
  }),
326
- /* @__PURE__ */ b(u, { result: B.result }),
327
- s(B.result) && /* @__PURE__ */ b("p", {
331
+ /* @__PURE__ */ b(u, { result: z.result }),
332
+ s(z.result) && /* @__PURE__ */ b("p", {
328
333
  style: {
329
334
  margin: 0,
330
335
  color: "var(--color-text-secondary)",
331
336
  fontSize: "var(--font-size-body-sm)"
332
337
  },
333
- children: k("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
338
+ children: A("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
334
339
  }),
335
340
  /* @__PURE__ */ x("div", {
336
341
  className: "flex gap-2",
337
342
  children: [/* @__PURE__ */ x(_, {
338
- onClick: () => ie(B.scope),
339
- disabled: Q || s(B.result),
343
+ onClick: () => ue(z.scope),
344
+ disabled: Z || s(z.result),
340
345
  "data-testid": "fleet-push-confirm",
341
- children: [Q && /* @__PURE__ */ b(v, { style: {
346
+ children: [Z && /* @__PURE__ */ b(v, { style: {
342
347
  height: "var(--size-icon-sm)",
343
348
  width: "var(--size-icon-sm)"
344
- } }), k("bigconsole.fleet.push.confirm", "Push now")]
349
+ } }), A("bigconsole.fleet.push.confirm", "Push now")]
345
350
  }), /* @__PURE__ */ b(_, {
346
351
  variant: "outline",
347
- onClick: () => V({ phase: "idle" }),
348
- disabled: Q,
349
- children: k("bigconsole.fleet.link.cancel", "Cancel")
352
+ onClick: () => B({ phase: "idle" }),
353
+ disabled: Z,
354
+ children: A("bigconsole.fleet.link.cancel", "Cancel")
350
355
  })]
351
356
  })
352
357
  ]
353
358
  }),
354
- B.phase === "done" && /* @__PURE__ */ x("div", {
359
+ z.phase === "done" && /* @__PURE__ */ x("div", {
355
360
  className: "flex flex-col gap-form-gap rounded-input border p-3",
356
361
  style: { borderColor: "var(--color-border-subtle)" },
357
362
  "data-testid": "fleet-push-done",
358
363
  children: [
359
364
  /* @__PURE__ */ b("strong", {
360
365
  style: { color: "var(--color-text-primary)" },
361
- children: k("bigconsole.fleet.push.doneTitle", "Pushed")
366
+ children: A("bigconsole.fleet.push.doneTitle", "Pushed")
362
367
  }),
363
- /* @__PURE__ */ b(u, { result: B.result }),
368
+ /* @__PURE__ */ b(u, { result: z.result }),
364
369
  /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(_, {
365
370
  variant: "outline",
366
- onClick: () => V({ phase: "idle" }),
367
- children: k("bigconsole.fleet.push.done", "Done")
371
+ onClick: () => B({ phase: "idle" }),
372
+ children: A("bigconsole.fleet.push.done", "Done")
368
373
  }) })
369
374
  ]
370
375
  }),
371
376
  /* @__PURE__ */ b(c, {
372
- isOpen: H,
377
+ isOpen: V,
373
378
  masterName: T,
374
- busy: Q,
375
- error: W,
376
- onClose: () => U(!1),
377
- onCreate: re
379
+ busy: Z,
380
+ error: U,
381
+ onClose: () => H(!1),
382
+ onCreate: le
378
383
  })
379
384
  ]
380
385
  });
@@ -8,6 +8,11 @@ export interface FleetCopySectionProps {
8
8
  onBoardChanged?: () => Promise<unknown> | void;
9
9
  /** Shared with the master controls of the same panel, so one action holds the buttons of both. */
10
10
  lock?: ActionLock;
11
+ /**
12
+ * Changes when something outside the panel changed this board's widgets (a widget restored or promoted from its
13
+ * menu), so the flags are read again instead of showing one that is already settled.
14
+ */
15
+ changeToken?: number;
11
16
  }
12
17
  export declare const FleetCopySection: FC<FleetCopySectionProps>;
13
18
  export default FleetCopySection;