@burdenoff/microfe-bigconsole 2026.1118.4 → 2026.1118.6

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.
Files changed (29) hide show
  1. package/dist/bigconsole/components/explore/CreateQueryWidget.d.ts +5 -0
  2. package/dist/bigconsole/components/explore/CreateQueryWidget.js +192 -0
  3. package/dist/bigconsole/components/explore/QueryResults.d.ts +4 -0
  4. package/dist/bigconsole/components/explore/QueryResults.js +42 -0
  5. package/dist/bigconsole/components/explore/SavedQueryWidget.d.ts +4 -0
  6. package/dist/bigconsole/components/explore/SavedQueryWidget.js +69 -0
  7. package/dist/bigconsole/components/explore/SqlDraftEditor.d.ts +3 -1
  8. package/dist/bigconsole/components/explore/SqlDraftEditor.js +336 -58
  9. package/dist/bigconsole/components/explore/SqlDraftEntry.js +11 -11
  10. package/dist/bigconsole/components/explore/VisualBuilder.d.ts +14 -0
  11. package/dist/bigconsole/components/explore/VisualBuilder.js +283 -0
  12. package/dist/bigconsole/components/explore/useExploreRun.d.ts +32 -0
  13. package/dist/bigconsole/components/explore/useExploreRun.js +104 -0
  14. package/dist/bigconsole/components/explore/visualSql.d.ts +49 -0
  15. package/dist/bigconsole/components/explore/visualSql.js +95 -0
  16. package/dist/bigconsole/components/insights/BoardLintPanel.d.ts +28 -0
  17. package/dist/bigconsole/components/insights/BoardLintPanel.js +171 -0
  18. package/dist/bigconsole/components/insights/DraftCheckDialog.d.ts +9 -3
  19. package/dist/bigconsole/components/insights/DraftCheckDialog.js +53 -146
  20. package/dist/bigconsole/components/widgets/WidgetWrapper.js +237 -228
  21. package/dist/bigconsole/hooks/useWidgetOperations.js +1 -0
  22. package/dist/bigconsole/pages/InsightsPage.js +305 -274
  23. package/dist/bigconsole/types/index.d.ts +1 -0
  24. package/dist/bigconsole/utils/boardLint.d.ts +5 -0
  25. package/dist/bigconsole/utils/boardLint.js +4 -1
  26. package/dist/generated/wspace-operations.d.ts +143 -0
  27. package/dist/generated/wspace-operations.js +1127 -73
  28. package/dist/generated/wspace-types.d.ts +93 -0
  29. package/package.json +1 -1
@@ -9,22 +9,23 @@ import { setActiveGenerationContext as o } from "../assistant/generationContext.
9
9
  import { isInsightsDraftDirty as ne } from "../utils/insightsDraft.js";
10
10
  import { reportBigConsoleQuotaError as s } from "../utils/quota.js";
11
11
  import { PromptAnalysisPreview as re } from "../components/insights/PromptAnalysisPreview.js";
12
- import { isNative as ie, nativeImpact as c, nativeNotify as ae } from "../../utils/nativeBridge.js";
12
+ import { isNative as ie, nativeImpact as ae, nativeNotify as oe } from "../../utils/nativeBridge.js";
13
13
  import "../components/common/index.js";
14
- import { GeneratedFormattingReview as oe, GenerationExecutionStatus as se } from "../components/insights/GeneratedFormattingReview.js";
15
- import { DraftCheckDialog as ce } from "../components/insights/DraftCheckDialog.js";
16
- import { ConversationalEditPanel as le } from "../components/insights/ConversationalEditPanel.js";
14
+ import { GeneratedFormattingReview as se, GenerationExecutionStatus as ce } from "../components/insights/GeneratedFormattingReview.js";
15
+ import { BoardLintPanel as le } from "../components/insights/BoardLintPanel.js";
16
+ import { DraftCheckDialog as ue } from "../components/insights/DraftCheckDialog.js";
17
+ import { ConversationalEditPanel as de } from "../components/insights/ConversationalEditPanel.js";
17
18
  /* empty css */
18
- import { memo as l, useCallback as u, useEffect as ue, useState as d } from "react";
19
- import { AlertCircle as de, ArrowRight as f, Ban as fe, CheckCircle as p, Clock as m, Eye as pe, History as me, Lightbulb as he, Loader2 as h, MessageSquare as ge, RefreshCw as _e, ShieldCheck as ve, Sparkles as g, Trash2 as ye, Wand2 as be, X as xe, XCircle as _ } from "lucide-react";
20
- import { AuroraBackground as Se, GlassCard as Ce, GradientText as we, IllustratedEmptyState as Te, PagePurpose as Ee } from "@burdenoff/fe-libs/ui";
21
- import { useUnsavedChanges as De } from "@burdenoff/fe-libs/shared/hooks";
22
- import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { useMutation as v, useQuery as ke } from "@apollo/client/react";
19
+ import { memo as c, useCallback as l, useEffect as fe, useMemo as pe, useRef as me, useState as u } from "react";
20
+ import { AlertCircle as he, ArrowRight as d, Ban as ge, CheckCircle as f, Clock as p, Eye as _e, History as ve, Lightbulb as ye, Loader2 as m, MessageSquare as be, RefreshCw as xe, ShieldCheck as Se, Sparkles as h, Trash2 as Ce, Wand2 as g, X as we, XCircle as _ } from "lucide-react";
21
+ import { AuroraBackground as Te, GlassCard as Ee, GradientText as De, IllustratedEmptyState as Oe, PagePurpose as ke } from "@burdenoff/fe-libs/ui";
22
+ import { useUnsavedChanges as Ae } from "@burdenoff/fe-libs/shared/hooks";
23
+ import { useI18n as je } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { useMutation as v, useQuery as Me } from "@apollo/client/react";
24
25
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
25
26
  import { gql as x } from "@apollo/client";
26
27
  // src/bigconsole/pages/InsightsPage.tsx
27
- var Ae = x`
28
+ var Ne = x`
28
29
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
29
30
  listPromptGenerations(status: $status, first: $first) {
30
31
  edges {
@@ -69,7 +70,7 @@ var Ae = x`
69
70
  totalCount
70
71
  }
71
72
  }
72
- `, je = x`
73
+ `, Pe = x`
73
74
  query GetPromptSuggestions($category: String, $limit: Int) {
74
75
  getPromptSuggestions(category: $category, limit: $limit) {
75
76
  id
@@ -80,7 +81,7 @@ var Ae = x`
80
81
  tags
81
82
  }
82
83
  }
83
- `, Me = x`
84
+ `, Fe = x`
84
85
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
85
86
  generateDashboardFromPrompt(input: $input) {
86
87
  id
@@ -88,24 +89,24 @@ var Ae = x`
88
89
  prompt
89
90
  }
90
91
  }
91
- `, Ne = x`
92
+ `, Ie = x`
92
93
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
93
94
  createDashboardFromGeneration(input: $input) {
94
95
  id
95
96
  }
96
97
  }
97
- `, Pe = x`
98
+ `, Le = x`
98
99
  mutation DeletePromptGeneration($generationId: ID!) {
99
100
  deletePromptGeneration(generationId: $generationId)
100
101
  }
101
- `, Fe = x`
102
+ `, Re = x`
102
103
  mutation CancelPromptGeneration($generationId: ID!) {
103
104
  cancelPromptGeneration(generationId: $generationId) {
104
105
  id
105
106
  status
106
107
  }
107
108
  }
108
- `, Ie = x`
109
+ `, ze = x`
109
110
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
110
111
  regenerateDashboard(input: $input) {
111
112
  id
@@ -113,7 +114,7 @@ var Ae = x`
113
114
  prompt
114
115
  }
115
116
  }
116
- `, Le = x`
117
+ `, Be = x`
117
118
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
118
119
  refineGeneratedDashboard(input: $input) {
119
120
  id
@@ -121,11 +122,11 @@ var Ae = x`
121
122
  prompt
122
123
  }
123
124
  }
124
- `, Re = [
125
+ `, Ve = [
125
126
  "PENDING",
126
127
  "PROCESSING",
127
128
  "GENERATING"
128
- ], ze = 12, Be = 8, Ve = [
129
+ ], He = 12, Ue = 8, We = [
129
130
  {
130
131
  value: "MODERN",
131
132
  label: "Modern"
@@ -146,7 +147,7 @@ var Ae = x`
146
147
  value: "VIBRANT",
147
148
  label: "Vibrant"
148
149
  }
149
- ], He = [
150
+ ], Ge = [
150
151
  {
151
152
  value: "GRID",
152
153
  label: "Grid"
@@ -171,20 +172,26 @@ var Ae = x`
171
172
  value: "THREE_COLUMN",
172
173
  label: "Three column"
173
174
  }
174
- ], Ue = [
175
+ ], Ke = [
175
176
  6,
176
177
  8,
177
178
  12,
178
179
  16,
179
180
  24
180
- ], We = [
181
+ ], qe = [
181
182
  4,
182
183
  6,
183
184
  8,
184
185
  12,
185
186
  16,
186
187
  24
187
- ], S = {
188
+ ];
189
+ function Je(e) {
190
+ if (typeof e != "object" || !e || !("refineGeneratedDashboard" in e)) return null;
191
+ let t = e.refineGeneratedDashboard;
192
+ return typeof t != "object" || !t || !("id" in t) ? null : typeof t.id == "string" ? t.id : null;
193
+ }
194
+ var S = {
188
195
  display: "inline-flex",
189
196
  alignItems: "center",
190
197
  justifyContent: "center",
@@ -206,12 +213,12 @@ var Ae = x`
206
213
  border: "1px solid transparent",
207
214
  backgroundColor: "var(--color-action-primary-bg)",
208
215
  color: "var(--color-action-primary-text)"
209
- }, Ge = {
216
+ }, Ye = {
210
217
  ...S,
211
218
  border: "1px solid var(--color-status-warning-border)",
212
219
  backgroundColor: "transparent",
213
220
  color: "var(--color-status-warning-text)"
214
- }, Ke = {
221
+ }, Xe = {
215
222
  ...S,
216
223
  minWidth: "var(--size-controlHeight-md)",
217
224
  padding: "0 var(--space-controlGap)",
@@ -277,10 +284,10 @@ var k = {
277
284
  border: "var(--color-border-subtle)"
278
285
  }
279
286
  };
280
- function qe(e) {
287
+ function Ze(e) {
281
288
  let t = k[O(e)].text;
282
289
  switch (e) {
283
- case "COMPLETED": return /* @__PURE__ */ y(p, {
290
+ case "COMPLETED": return /* @__PURE__ */ y(f, {
284
291
  size: 14,
285
292
  style: { color: t },
286
293
  "aria-hidden": "true"
@@ -293,13 +300,13 @@ function qe(e) {
293
300
  });
294
301
  case "PENDING":
295
302
  case "PROCESSING":
296
- case "GENERATING": return /* @__PURE__ */ y(h, {
303
+ case "GENERATING": return /* @__PURE__ */ y(m, {
297
304
  size: 14,
298
305
  className: "animate-spin",
299
306
  style: { color: t },
300
307
  "aria-hidden": "true"
301
308
  });
302
- default: return /* @__PURE__ */ y(m, {
309
+ default: return /* @__PURE__ */ y(p, {
303
310
  size: 14,
304
311
  style: { color: t },
305
312
  "aria-hidden": "true"
@@ -317,8 +324,8 @@ function A(e, t) {
317
324
  default: return e;
318
325
  }
319
326
  }
320
- var Je = ({ status: e }) => {
321
- let { t } = Oe(), n = k[O(e)];
327
+ var Qe = ({ status: e }) => {
328
+ let { t } = je(), n = k[O(e)];
322
329
  return /* @__PURE__ */ b("span", {
323
330
  "data-status": e,
324
331
  style: {
@@ -327,10 +334,10 @@ var Je = ({ status: e }) => {
327
334
  backgroundColor: n.bg,
328
335
  color: n.text
329
336
  },
330
- children: [qe(e), A(e, t)]
337
+ children: [Ze(e), A(e, t)]
331
338
  });
332
339
  };
333
- function Ye(e) {
340
+ function $e(e) {
334
341
  let t = k[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
335
342
  return {
336
343
  ...D,
@@ -342,19 +349,19 @@ function Ye(e) {
342
349
  function j(e) {
343
350
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
344
351
  }
345
- function Xe(e) {
352
+ function et(e) {
346
353
  let t = e?.toUpperCase();
347
354
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
348
355
  }
349
- var Ze = {
356
+ var tt = {
350
357
  HIGH: "success",
351
358
  MEDIUM: "neutral",
352
359
  LOW: "danger"
353
360
  };
354
- function Qe(e) {
361
+ function nt(e) {
355
362
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
356
363
  }
357
- function $e(e, t) {
364
+ function rt(e, t) {
358
365
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
359
366
  return {
360
367
  "--proposal-column": r + 1,
@@ -363,8 +370,8 @@ function $e(e, t) {
363
370
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
364
371
  };
365
372
  }
366
- function et(e) {
367
- let t = k[Ze[e]];
373
+ function it(e) {
374
+ let t = k[tt[e]];
368
375
  return {
369
376
  ...D,
370
377
  padding: "0 var(--space-controlGap)",
@@ -376,14 +383,23 @@ function et(e) {
376
383
  color: t.text
377
384
  };
378
385
  }
379
- var M = l(function() {
380
- let { t: l } = Oe(), p = e(), m = t(), [_, x] = d(""), [S, O] = d("MODERN"), [k, qe] = d("GRID"), [A, Ze] = d(ze), [M, tt] = d(Be), [N, nt] = d(!1), [rt, P] = d(null), [F, it] = d(() => /* @__PURE__ */ new Set()), [I, L] = d(null), [at, ot] = d(null), [R, st] = d(null), [z, B] = d(null), [V, H] = d(""), [U, ct] = d(!1), [W, G] = d(null), [K, lt] = d({
386
+ var M = c(function() {
387
+ let { t: c } = je(), f = e(), p = t(), [_, x] = u(""), [S, O] = u("MODERN"), [k, Ze] = u("GRID"), [A, tt] = u(He), [M, at] = u(Ue), [N, ot] = u(!1), [st, P] = u(null), [F, ct] = u(() => /* @__PURE__ */ new Set()), [I, L] = u(null), [lt, ut] = u(null), [R, dt] = u(null), [ft, pt] = u({}), mt = l((e, t) => {
388
+ pt((n) => {
389
+ if (t) return {
390
+ ...n,
391
+ [e]: t
392
+ };
393
+ let r = { ...n };
394
+ return delete r[e], r;
395
+ });
396
+ }, []), [z, B] = u(null), [V, H] = u(""), [U, ht] = u(!1), [W, G] = u(null), [gt, _t] = u({
381
397
  text: "",
382
398
  busy: !1
383
399
  });
384
- De({
400
+ Ae({
385
401
  id: "insights-prompt",
386
- label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
402
+ label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
387
403
  dirty: ne({
388
404
  promptText: _,
389
405
  isGenerating: N,
@@ -391,31 +407,31 @@ var M = l(function() {
391
407
  refineText: V,
392
408
  refineBusy: z !== null && F.has(z.id),
393
409
  chatOpen: W !== null,
394
- chatText: K.text,
395
- chatBusy: K.busy
410
+ chatText: gt.text,
411
+ chatBusy: gt.busy
396
412
  })
397
- }), ue(() => (o(z?.id ?? W?.id ?? I?.id ?? null), () => o(null)), [
413
+ }), fe(() => (o(z?.id ?? W?.id ?? I?.id ?? null), () => o(null)), [
398
414
  z,
399
415
  W,
400
416
  I
401
417
  ]);
402
- let q = u((e) => {
403
- it((t) => new Set(t).add(e));
404
- }, []), J = u((e) => {
405
- it((t) => {
418
+ let K = l((e) => {
419
+ ct((t) => new Set(t).add(e));
420
+ }, []), q = l((e) => {
421
+ ct((t) => {
406
422
  let n = new Set(t);
407
423
  return n.delete(e), n;
408
424
  });
409
- }, []), { data: ut, loading: dt, error: ft, refetch: Y, startPolling: pt, stopPolling: mt } = ke(Ae, {
425
+ }, []), { data: vt, loading: yt, error: bt, refetch: J, startPolling: xt, stopPolling: St } = Me(Ne, {
410
426
  variables: { first: 20 },
411
427
  fetchPolicy: "cache-and-network"
412
- }), ht = ut?.listPromptGenerations?.edges?.some((e) => Re.includes(e.node.status)) ?? !1, { data: gt, error: _t, refetch: vt } = ke(je, { variables: { limit: 6 } }), [yt] = v(Me), [bt] = v(Ne), [xt] = v(Pe), [St] = v(Fe), [Ct] = v(Ie), [X] = v(Le), Z = ut?.listPromptGenerations?.edges?.map((e) => e.node) || [], wt = gt?.getPromptSuggestions || [], { current: Tt, superseded: Et } = a(Z), Q = U ? Z : Tt;
413
- ue(() => (ht || N ? pt(2e3) : mt(), () => mt()), [
414
- ht,
428
+ }), Ct = vt?.listPromptGenerations?.edges?.some((e) => Ve.includes(e.node.status)) ?? !1, { data: wt, error: Tt, refetch: Et } = Me(Pe, { variables: { limit: 6 } }), [Dt] = v(Fe), [Ot] = v(Ie), [Y] = v(Le), [kt] = v(Re), [At] = v(ze), [X] = v(Be), Z = vt?.listPromptGenerations?.edges?.map((e) => e.node) || [], jt = wt?.getPromptSuggestions || [], { current: Mt, superseded: Nt } = a(Z), Q = U ? Z : Mt;
429
+ fe(() => (Ct || N ? xt(2e3) : St(), () => St()), [
430
+ Ct,
415
431
  N,
416
- pt,
417
- mt
418
- ]), ue(() => {
432
+ xt,
433
+ St
434
+ ]), fe(() => {
419
435
  if (!I && !z && !W) return;
420
436
  let e = (e) => {
421
437
  e.key === "Escape" && (L(null), B(null), G(null));
@@ -426,14 +442,14 @@ var M = l(function() {
426
442
  z,
427
443
  W
428
444
  ]);
429
- let Dt = u(async () => {
445
+ let Pt = l(async () => {
430
446
  if (_.trim() && !N) {
431
- if (_.length > 2e3) P(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
447
+ if (_.length > 2e3) P(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
432
448
  else {
433
- P(null), nt(!0);
449
+ P(null), ot(!0);
434
450
  try {
435
- m("bigconsole.ai.generate_clicked", { maxWidgets: M });
436
- let e = await yt({ variables: { input: {
451
+ p("bigconsole.ai.generate_clicked", { maxWidgets: M });
452
+ let e = await Dt({ variables: { input: {
437
453
  prompt: _.trim(),
438
454
  styleType: S,
439
455
  layoutType: k,
@@ -442,103 +458,103 @@ var M = l(function() {
442
458
  } } });
443
459
  if (s(e, "command")) return;
444
460
  let t = e.data?.generateDashboardFromPrompt?.id;
445
- t && m("bigconsole.ai.dashboard_generated", {
461
+ t && p("bigconsole.ai.dashboard_generated", {
446
462
  generationId: t,
447
463
  maxWidgets: M
448
- }), x(""), Y();
464
+ }), x(""), J();
449
465
  } catch (e) {
450
466
  if (s(e, "command")) return;
451
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
467
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
452
468
  } finally {
453
- nt(!1);
469
+ ot(!1);
454
470
  }
455
471
  }
456
472
  }
457
473
  }, [
458
- m,
474
+ p,
459
475
  _,
460
476
  N,
461
- yt,
462
- Y,
477
+ Dt,
478
+ J,
463
479
  S,
464
480
  k,
465
481
  A,
466
482
  M,
467
- l
468
- ]), Ot = u(async (e) => {
483
+ c
484
+ ]), Ft = l(async (e) => {
469
485
  P(null);
470
486
  let t = i(e);
471
487
  if (t.kind === "view") {
472
- p(`/dashboards/${t.dashboardId}`);
488
+ f(`/dashboards/${t.dashboardId}`);
473
489
  return;
474
490
  }
475
491
  if (t.kind === "hold") {
476
- P(l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
492
+ P(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
477
493
  return;
478
494
  }
479
495
  let n = e.id;
480
496
  try {
481
- m("bigconsole.ai.create_dashboard_clicked", { generationId: n });
482
- let e = await bt({ variables: { input: t.input } });
497
+ p("bigconsole.ai.create_dashboard_clicked", { generationId: n });
498
+ let e = await Ot({ variables: { input: t.input } });
483
499
  if (s(e, "project")) return;
484
500
  let r = e.data?.createDashboardFromGeneration?.id;
485
- r && (m("bigconsole.ai.dashboard_created", {
501
+ r && (p("bigconsole.ai.dashboard_created", {
486
502
  generationId: n,
487
503
  dashboardId: r
488
- }), p(`/dashboards/${r}`));
504
+ }), f(`/dashboards/${r}`));
489
505
  } catch (e) {
490
506
  if (s(e, "project")) return;
491
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
507
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
492
508
  }
493
509
  }, [
494
- bt,
495
- m,
510
+ Ot,
496
511
  p,
497
- l
498
- ]), kt = u(async (e) => {
512
+ f,
513
+ c
514
+ ]), It = l(async (e) => {
499
515
  P(null);
500
516
  try {
501
- await xt({ variables: { generationId: e } }), ie() && ae("success"), Y();
517
+ await Y({ variables: { generationId: e } }), ie() && oe("success"), J();
502
518
  } catch (e) {
503
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ie() && ae("error");
519
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ie() && oe("error");
504
520
  }
505
521
  }, [
506
- xt,
507
522
  Y,
508
- l
509
- ]), At = u(async (e) => {
510
- P(null), q(e);
523
+ J,
524
+ c
525
+ ]), Lt = l(async (e) => {
526
+ P(null), K(e);
511
527
  try {
512
- await St({ variables: { generationId: e } }), Y();
528
+ await kt({ variables: { generationId: e } }), J();
513
529
  } catch (e) {
514
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
530
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
515
531
  } finally {
516
- J(e);
532
+ q(e);
517
533
  }
518
534
  }, [
519
- St,
520
- Y,
521
- l
522
- ]), jt = u(async (e) => {
523
- P(null), q(e);
535
+ kt,
536
+ J,
537
+ c
538
+ ]), Rt = l(async (e) => {
539
+ P(null), K(e);
524
540
  try {
525
- let t = await Ct({ variables: { input: { generationId: e } } });
541
+ let t = await At({ variables: { input: { generationId: e } } });
526
542
  if (s(t, "command")) return;
527
- Y();
543
+ J();
528
544
  } catch (e) {
529
545
  if (s(e, "command")) return;
530
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
546
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
531
547
  } finally {
532
- J(e);
548
+ q(e);
533
549
  }
534
550
  }, [
535
- Ct,
536
- Y,
537
- l
538
- ]), Mt = u(async () => {
551
+ At,
552
+ J,
553
+ c
554
+ ]), zt = l(async () => {
539
555
  if (!z || !V.trim()) return;
540
556
  let e = z.id;
541
- P(null), q(e);
557
+ P(null), K(e);
542
558
  let t = !1;
543
559
  try {
544
560
  let n = await X({ variables: { input: {
@@ -549,58 +565,61 @@ var M = l(function() {
549
565
  t = !0;
550
566
  return;
551
567
  }
552
- t = !0, Y();
568
+ t = !0, J();
553
569
  } catch (e) {
554
570
  if (s(e, "command")) {
555
571
  t = !0;
556
572
  return;
557
573
  }
558
- P(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
574
+ P(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
559
575
  } finally {
560
- t && (B(null), H("")), J(e);
576
+ t && (B(null), H("")), q(e);
561
577
  }
562
578
  }, [
563
579
  z,
564
580
  V,
565
581
  X,
566
- Y,
567
- l
568
- ]), Nt = u((e) => {
582
+ J,
583
+ c
584
+ ]), Bt = l((e) => {
569
585
  x(e);
570
- }, []), Pt = u((e) => {
586
+ }, []), Vt = l((e) => {
571
587
  let t = e.generatedSpec;
572
- t && (ot({
588
+ t && (ut({
573
589
  name: t.name,
574
590
  pages: t.pages
575
- }), st(e.id));
576
- }, []), Ft = u(async (e) => {
577
- if (!R) return;
578
- let t = R;
579
- P(null), q(t);
591
+ }), dt(e.id));
592
+ }, []), Ht = me(/* @__PURE__ */ new Set()), Ut = l(async (e, t) => {
593
+ if (Ht.current.has(e)) throw Error("A fix is already being applied to this draft. Please wait a moment.");
594
+ Ht.current.add(e), P(null), K(e);
580
595
  try {
581
596
  let n = await X({ variables: { input: {
582
- generationId: t,
583
- refinementPrompt: `Board Lint fix: ${e.summary}`,
597
+ generationId: e,
598
+ refinementPrompt: `Board Lint fix: ${t.summary}`,
584
599
  widgetRefinements: [{
585
- widgetIndex: e.widgetIndex,
586
- ...e.title === void 0 ? {} : { title: e.title },
587
- ...e.configOverrides ? { configOverrides: e.configOverrides } : {}
600
+ widgetIndex: t.widgetIndex,
601
+ ...t.title === void 0 ? {} : { title: t.title },
602
+ ...t.configOverrides ? { configOverrides: t.configOverrides } : {}
588
603
  }]
589
604
  } } });
590
- s(n, "command") || Y();
605
+ return s(n, "command") ? null : (J(), Je(n.data));
591
606
  } catch (e) {
592
- if (s(e, "command")) return;
607
+ if (s(e, "command")) return null;
593
608
  throw e;
594
609
  } finally {
595
- J(t);
610
+ Ht.current.delete(e), q(e);
596
611
  }
597
612
  }, [
598
- R,
599
613
  X,
600
- Y,
601
- q,
602
- J
603
- ]), $ = I?.generatedSpec;
614
+ J,
615
+ K,
616
+ q
617
+ ]), Wt = l(async (e) => {
618
+ await Y({ variables: { generationId: e } }), J();
619
+ }, [Y, J]), Gt = pe(() => I?.generatedSpec ? {
620
+ name: I.generatedSpec.name,
621
+ pages: I.generatedSpec.pages
622
+ } : null, [I?.generatedSpec]), $ = I?.generatedSpec;
604
623
  return /* @__PURE__ */ b("div", {
605
624
  "data-tour": "bigconsole-ai-insights",
606
625
  className: "min-w-0",
@@ -608,7 +627,7 @@ var M = l(function() {
608
627
  children: [
609
628
  /* @__PURE__ */ b("header", {
610
629
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
611
- children: [/* @__PURE__ */ y(Se, { intensity: "subtle" }), /* @__PURE__ */ y("div", {
630
+ children: [/* @__PURE__ */ y(Te, { intensity: "subtle" }), /* @__PURE__ */ y("div", {
612
631
  style: { padding: "var(--space-pagePadding)" },
613
632
  children: /* @__PURE__ */ b("div", {
614
633
  style: {
@@ -629,7 +648,7 @@ var M = l(function() {
629
648
  borderRadius: "var(--radius-card)",
630
649
  backgroundColor: "var(--color-action-primary-bg)"
631
650
  },
632
- children: /* @__PURE__ */ y(g, { style: {
651
+ children: /* @__PURE__ */ y(h, { style: {
633
652
  height: "var(--size-icon-lg)",
634
653
  width: "var(--size-icon-lg)",
635
654
  color: "var(--color-action-primary-text)"
@@ -638,10 +657,10 @@ var M = l(function() {
638
657
  style: { minWidth: 0 },
639
658
  children: [/* @__PURE__ */ y("h1", {
640
659
  className: "m-0 text-2xl font-bold text-text-primary",
641
- children: /* @__PURE__ */ y(we, { children: l("bigconsole.insights.header.title", "AI Insights") })
660
+ children: /* @__PURE__ */ y(De, { children: c("bigconsole.insights.header.title", "AI Insights") })
642
661
  }), /* @__PURE__ */ y("p", {
643
662
  className: "m-0 text-sm text-text-secondary",
644
- children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
663
+ children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
645
664
  })]
646
665
  })]
647
666
  })
@@ -649,50 +668,50 @@ var M = l(function() {
649
668
  }),
650
669
  /* @__PURE__ */ b("div", {
651
670
  style: { padding: "var(--space-pagePadding)" },
652
- children: [/* @__PURE__ */ y(Ee, {
671
+ children: [/* @__PURE__ */ y(ke, {
653
672
  className: "mb-[var(--space-sectionGap)]",
654
673
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
655
674
  }), /* @__PURE__ */ b(ee, { children: [
656
- rt && /* @__PURE__ */ y(r, {
675
+ st && /* @__PURE__ */ y(r, {
657
676
  headingLevel: 2,
658
677
  tone: "danger",
659
678
  padding: "compact",
660
679
  title: "That request did not go through",
661
- description: rt,
662
- icon: /* @__PURE__ */ y(de, { className: "h-icon-sm w-icon-sm" }),
680
+ description: st,
681
+ icon: /* @__PURE__ */ y(he, { className: "h-icon-sm w-icon-sm" }),
663
682
  "data-testid": "insights-error",
664
683
  actions: /* @__PURE__ */ y("button", {
665
684
  type: "button",
666
685
  onClick: () => P(null),
667
- "aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
686
+ "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
668
687
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
669
688
  style: C,
670
689
  children: "Dismiss"
671
690
  })
672
691
  }),
673
- (ft || _t) && /* @__PURE__ */ y("div", {
692
+ (bt || Tt) && /* @__PURE__ */ y("div", {
674
693
  role: "alert",
675
694
  children: /* @__PURE__ */ y(r, {
676
695
  tone: "danger",
677
696
  padding: "compact",
678
697
  headingLevel: 2,
679
- title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
680
- description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
698
+ title: c("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
699
+ description: c("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
681
700
  "data-testid": "insights-load-error",
682
701
  actions: /* @__PURE__ */ b("button", {
683
702
  type: "button",
684
703
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
685
704
  style: C,
686
705
  onClick: () => {
687
- ft && Y().catch(() => void 0), _t && vt().catch(() => void 0);
706
+ bt && J().catch(() => void 0), Tt && Et().catch(() => void 0);
688
707
  },
689
708
  children: [
690
- /* @__PURE__ */ y(_e, {
709
+ /* @__PURE__ */ y(xe, {
691
710
  size: 14,
692
711
  "aria-hidden": "true"
693
712
  }),
694
713
  " ",
695
- l("bigconsole.insights.error.retry", "Retry")
714
+ c("bigconsole.insights.error.retry", "Retry")
696
715
  ]
697
716
  })
698
717
  })
@@ -703,7 +722,7 @@ var M = l(function() {
703
722
  headingLevel: 2,
704
723
  title: "Describe your dashboard",
705
724
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
706
- icon: /* @__PURE__ */ y(g, { className: "h-icon-sm w-icon-sm" }),
725
+ icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" }),
707
726
  "data-testid": "insights-prompt",
708
727
  children: /* @__PURE__ */ b("div", {
709
728
  style: {
@@ -720,13 +739,13 @@ var M = l(function() {
720
739
  fontWeight: "var(--font-weight-medium)",
721
740
  color: "var(--color-text-primary)"
722
741
  },
723
- children: l("bigconsole.insights.prompt.label", "Your prompt")
742
+ children: c("bigconsole.insights.prompt.label", "Your prompt")
724
743
  }),
725
744
  /* @__PURE__ */ y("textarea", {
726
745
  id: "prompt-input",
727
746
  value: _,
728
747
  onChange: (e) => x(e.target.value),
729
- placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
748
+ placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
730
749
  rows: 3,
731
750
  maxLength: 2e3,
732
751
  className: n,
@@ -742,12 +761,12 @@ var M = l(function() {
742
761
  resize: "vertical"
743
762
  },
744
763
  onKeyDown: (e) => {
745
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Dt());
764
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Pt());
746
765
  }
747
766
  }),
748
767
  /* @__PURE__ */ b("div", {
749
768
  role: "group",
750
- "aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
769
+ "aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
751
770
  "data-testid": "insights-generation-options",
752
771
  style: {
753
772
  display: "grid",
@@ -758,14 +777,14 @@ var M = l(function() {
758
777
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
759
778
  htmlFor: "prompt-style",
760
779
  style: T,
761
- children: l("bigconsole.insights.prompt.style", "Style")
780
+ children: c("bigconsole.insights.prompt.style", "Style")
762
781
  }), /* @__PURE__ */ y("select", {
763
782
  id: "prompt-style",
764
783
  value: S,
765
784
  onChange: (e) => O(e.target.value),
766
785
  className: n,
767
786
  style: E,
768
- children: Ve.map((e) => /* @__PURE__ */ y("option", {
787
+ children: We.map((e) => /* @__PURE__ */ y("option", {
769
788
  value: e.value,
770
789
  children: e.label
771
790
  }, e.value))
@@ -773,14 +792,14 @@ var M = l(function() {
773
792
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
774
793
  htmlFor: "prompt-layout",
775
794
  style: T,
776
- children: l("bigconsole.insights.prompt.layout", "Layout")
795
+ children: c("bigconsole.insights.prompt.layout", "Layout")
777
796
  }), /* @__PURE__ */ y("select", {
778
797
  id: "prompt-layout",
779
798
  value: k,
780
- onChange: (e) => qe(e.target.value),
799
+ onChange: (e) => Ze(e.target.value),
781
800
  className: n,
782
801
  style: E,
783
- children: He.map((e) => /* @__PURE__ */ y("option", {
802
+ children: Ge.map((e) => /* @__PURE__ */ y("option", {
784
803
  value: e.value,
785
804
  children: e.label
786
805
  }, e.value))
@@ -788,14 +807,14 @@ var M = l(function() {
788
807
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
789
808
  htmlFor: "prompt-columns",
790
809
  style: T,
791
- children: l("bigconsole.insights.prompt.columns", "Columns")
810
+ children: c("bigconsole.insights.prompt.columns", "Columns")
792
811
  }), /* @__PURE__ */ y("select", {
793
812
  id: "prompt-columns",
794
813
  value: A,
795
- onChange: (e) => Ze(Number(e.target.value)),
814
+ onChange: (e) => tt(Number(e.target.value)),
796
815
  className: n,
797
816
  style: E,
798
- children: Ue.map((e) => /* @__PURE__ */ y("option", {
817
+ children: Ke.map((e) => /* @__PURE__ */ y("option", {
799
818
  value: e,
800
819
  children: e
801
820
  }, e))
@@ -803,14 +822,14 @@ var M = l(function() {
803
822
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
804
823
  htmlFor: "prompt-max-widgets",
805
824
  style: T,
806
- children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
825
+ children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
807
826
  }), /* @__PURE__ */ y("select", {
808
827
  id: "prompt-max-widgets",
809
828
  value: M,
810
- onChange: (e) => tt(Number(e.target.value)),
829
+ onChange: (e) => at(Number(e.target.value)),
811
830
  className: n,
812
831
  style: E,
813
- children: We.map((e) => /* @__PURE__ */ y("option", {
832
+ children: qe.map((e) => /* @__PURE__ */ y("option", {
814
833
  value: e,
815
834
  children: e
816
835
  }, e))
@@ -838,14 +857,14 @@ var M = l(function() {
838
857
  color: "var(--color-text-muted)"
839
858
  },
840
859
  children: [
841
- l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
860
+ c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
842
861
  " · ",
843
862
  _.length,
844
863
  "/2000"
845
864
  ]
846
865
  }), /* @__PURE__ */ b("button", {
847
866
  type: "button",
848
- onClick: Dt,
867
+ onClick: Pt,
849
868
  disabled: !_.trim() || N,
850
869
  className: n,
851
870
  style: {
@@ -854,25 +873,25 @@ var M = l(function() {
854
873
  cursor: !_.trim() || N ? "not-allowed" : "pointer",
855
874
  opacity: !_.trim() || N ? .5 : 1
856
875
  },
857
- children: [N ? /* @__PURE__ */ y(h, {
876
+ children: [N ? /* @__PURE__ */ y(m, {
858
877
  size: 16,
859
878
  className: "animate-spin",
860
879
  "aria-hidden": "true"
861
- }) : /* @__PURE__ */ y(g, {
880
+ }) : /* @__PURE__ */ y(h, {
862
881
  size: 16,
863
882
  "aria-hidden": "true"
864
- }), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
883
+ }), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
865
884
  })]
866
885
  })
867
886
  ]
868
887
  })
869
888
  }),
870
- wt.length > 0 && /* @__PURE__ */ y(r, {
889
+ jt.length > 0 && /* @__PURE__ */ y(r, {
871
890
  emphasis: "muted",
872
891
  headingLevel: 2,
873
- title: l("bigconsole.insights.suggestions.heading", "Starting points"),
892
+ title: c("bigconsole.insights.suggestions.heading", "Starting points"),
874
893
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
875
- icon: /* @__PURE__ */ y(he, { className: "h-icon-sm w-icon-sm" }),
894
+ icon: /* @__PURE__ */ y(ye, { className: "h-icon-sm w-icon-sm" }),
876
895
  "data-testid": "insights-suggestions",
877
896
  children: /* @__PURE__ */ y("div", {
878
897
  style: {
@@ -880,9 +899,9 @@ var M = l(function() {
880
899
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
881
900
  gap: "var(--space-controlGap)"
882
901
  },
883
- children: wt.map((e) => /* @__PURE__ */ b("button", {
902
+ children: jt.map((e) => /* @__PURE__ */ b("button", {
884
903
  type: "button",
885
- onClick: () => Nt(e.prompt),
904
+ onClick: () => Bt(e.prompt),
886
905
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
887
906
  style: {
888
907
  textAlign: "left",
@@ -934,9 +953,9 @@ var M = l(function() {
934
953
  emphasis: "bare",
935
954
  padding: "none",
936
955
  headingLevel: 2,
937
- title: l("bigconsole.insights.generations.heading", "Recent generations"),
956
+ title: c("bigconsole.insights.generations.heading", "Recent generations"),
938
957
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
939
- icon: /* @__PURE__ */ y(me, { className: "h-icon-sm w-icon-sm" }),
958
+ icon: /* @__PURE__ */ y(ve, { className: "h-icon-sm w-icon-sm" }),
940
959
  meta: Q.length > 0 ? /* @__PURE__ */ b("span", {
941
960
  style: D,
942
961
  children: [
@@ -946,7 +965,7 @@ var M = l(function() {
946
965
  ]
947
966
  }) : void 0,
948
967
  "data-testid": "insights-generations",
949
- children: dt && Z.length === 0 ? /* @__PURE__ */ y(r, {
968
+ children: yt && Z.length === 0 ? /* @__PURE__ */ y(r, {
950
969
  emphasis: "muted",
951
970
  headingLevel: 3,
952
971
  "aria-label": "Loading generations",
@@ -962,44 +981,44 @@ var M = l(function() {
962
981
  gap: "var(--space-controlGap)",
963
982
  color: "var(--color-text-muted)"
964
983
  },
965
- children: [/* @__PURE__ */ y(h, {
984
+ children: [/* @__PURE__ */ y(m, {
966
985
  size: 24,
967
986
  className: "animate-spin",
968
987
  "aria-hidden": "true"
969
988
  }), /* @__PURE__ */ y("p", {
970
989
  style: { fontSize: "var(--font-size-body-sm)" },
971
- children: l("bigconsole.insights.generations.loading", "Loading generations…")
990
+ children: c("bigconsole.insights.generations.loading", "Loading generations…")
972
991
  })]
973
992
  })
974
- }) : Z.length === 0 && !N && !ft ? /* @__PURE__ */ y(Ce, {
993
+ }) : Z.length === 0 && !N && !bt ? /* @__PURE__ */ y(Ee, {
975
994
  treatment: "insight",
976
995
  className: "border-[var(--color-border-seam)]",
977
- children: /* @__PURE__ */ y(Te, {
996
+ children: /* @__PURE__ */ y(Oe, {
978
997
  illustration: "onboarding",
979
- title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
980
- description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
998
+ title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
999
+ description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
981
1000
  })
982
1001
  }) : /* @__PURE__ */ b("div", {
983
1002
  className: "flex flex-col gap-list-gap",
984
1003
  children: [
985
- N && !ht && /* @__PURE__ */ y(r, {
1004
+ N && !Ct && /* @__PURE__ */ y(r, {
986
1005
  emphasis: "muted",
987
1006
  tone: "info",
988
1007
  padding: "compact",
989
1008
  headingLevel: 3,
990
1009
  title: "Sending your prompt…",
991
1010
  description: "The new generation appears here as soon as the backend accepts it.",
992
- icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
1011
+ icon: /* @__PURE__ */ y(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
993
1012
  "data-testid": "insights-generation-pending"
994
1013
  }),
995
1014
  Q.map((e) => {
996
- let t = e.generatedSpec, ee = te(Z, e), a = F.has(e.id), o = Re.includes(e.status);
1015
+ let t = e.generatedSpec, ee = te(Z, e), a = F.has(e.id), o = Ve.includes(e.status);
997
1016
  return /* @__PURE__ */ b(r, {
998
1017
  emphasis: "standard",
999
1018
  padding: "compact",
1000
1019
  headingLevel: 3,
1001
- title: t?.name || (o ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
1002
- meta: /* @__PURE__ */ y(Je, { status: e.status }),
1020
+ title: t?.name || (o ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
1021
+ meta: /* @__PURE__ */ y(Qe, { status: e.status }),
1003
1022
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
1004
1023
  "data-testid": "insights-generation-card",
1005
1024
  bodyClassName: "flex flex-col gap-control-gap",
@@ -1014,7 +1033,7 @@ var M = l(function() {
1014
1033
  e.parentGenerationId && /* @__PURE__ */ y("span", {
1015
1034
  style: D,
1016
1035
  "data-testid": "insights-generation-revision",
1017
- children: ee ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: ee.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
1036
+ children: ee ? c("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: ee.generatedSpec?.name || c("bigconsole.insights.generations.untitled", "Untitled generation") }) : c("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
1018
1037
  }),
1019
1038
  /* @__PURE__ */ b("span", {
1020
1039
  style: D,
@@ -1033,7 +1052,7 @@ var M = l(function() {
1033
1052
  ]
1034
1053
  }),
1035
1054
  /* @__PURE__ */ b("span", {
1036
- style: Ye(t.overallConfidence),
1055
+ style: $e(t.overallConfidence),
1037
1056
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
1038
1057
  })
1039
1058
  ]
@@ -1044,7 +1063,7 @@ var M = l(function() {
1044
1063
  padding: "compact",
1045
1064
  title: "Generation failed",
1046
1065
  description: e.errorMessage,
1047
- icon: /* @__PURE__ */ y(de, { className: "h-icon-sm w-icon-sm" })
1066
+ icon: /* @__PURE__ */ y(he, { className: "h-icon-sm w-icon-sm" })
1048
1067
  }),
1049
1068
  /* @__PURE__ */ b("div", {
1050
1069
  style: {
@@ -1059,37 +1078,37 @@ var M = l(function() {
1059
1078
  o && /* @__PURE__ */ b("button", {
1060
1079
  type: "button",
1061
1080
  onClick: () => {
1062
- c("medium"), At(e.id);
1081
+ ae("medium"), Lt(e.id);
1063
1082
  },
1064
1083
  disabled: a,
1065
- title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1084
+ title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1066
1085
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1067
1086
  style: {
1068
- ...Ge,
1087
+ ...Ye,
1069
1088
  cursor: a ? "wait" : "pointer"
1070
1089
  },
1071
1090
  children: [
1072
- /* @__PURE__ */ y(fe, {
1091
+ /* @__PURE__ */ y(ge, {
1073
1092
  size: 14,
1074
1093
  "aria-hidden": "true"
1075
1094
  }),
1076
1095
  " ",
1077
- l("bigconsole.insights.actions.cancel", "Cancel")
1096
+ c("bigconsole.insights.actions.cancel", "Cancel")
1078
1097
  ]
1079
1098
  }),
1080
1099
  e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
1081
1100
  type: "button",
1082
1101
  onClick: () => L(e),
1083
- title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1102
+ title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1084
1103
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1085
1104
  style: C,
1086
1105
  children: [
1087
- /* @__PURE__ */ y(pe, {
1106
+ /* @__PURE__ */ y(_e, {
1088
1107
  size: 14,
1089
1108
  "aria-hidden": "true"
1090
1109
  }),
1091
1110
  " ",
1092
- l("bigconsole.insights.actions.preview", "Preview")
1111
+ c("bigconsole.insights.actions.preview", "Preview")
1093
1112
  ]
1094
1113
  }),
1095
1114
  e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
@@ -1097,53 +1116,53 @@ var M = l(function() {
1097
1116
  onClick: () => {
1098
1117
  B(e), H("");
1099
1118
  },
1100
- title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1119
+ title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1101
1120
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1102
1121
  style: C,
1103
1122
  children: [
1104
- /* @__PURE__ */ y(be, {
1123
+ /* @__PURE__ */ y(g, {
1105
1124
  size: 14,
1106
1125
  "aria-hidden": "true"
1107
1126
  }),
1108
1127
  " ",
1109
- l("bigconsole.insights.actions.refine", "Refine")
1128
+ c("bigconsole.insights.actions.refine", "Refine")
1110
1129
  ]
1111
1130
  }),
1112
1131
  e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
1113
1132
  type: "button",
1114
- onClick: () => Pt(e),
1115
- title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1133
+ onClick: () => Vt(e),
1134
+ title: c("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1116
1135
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1117
1136
  style: C,
1118
1137
  children: [
1119
- /* @__PURE__ */ y(ve, {
1138
+ /* @__PURE__ */ y(Se, {
1120
1139
  size: 14,
1121
1140
  "aria-hidden": "true"
1122
1141
  }),
1123
1142
  " ",
1124
- l("bigconsole.insights.actions.checkDraft", "Check draft")
1143
+ c("bigconsole.insights.actions.checkDraft", "Check draft")
1125
1144
  ]
1126
1145
  }),
1127
1146
  (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ b("button", {
1128
1147
  type: "button",
1129
1148
  onClick: () => {
1130
- c("medium"), jt(e.id);
1149
+ ae("medium"), Rt(e.id);
1131
1150
  },
1132
1151
  disabled: a,
1133
- title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1152
+ title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1134
1153
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1135
1154
  style: {
1136
1155
  ...C,
1137
1156
  cursor: a ? "wait" : "pointer"
1138
1157
  },
1139
1158
  children: [
1140
- /* @__PURE__ */ y(_e, {
1159
+ /* @__PURE__ */ y(xe, {
1141
1160
  size: 14,
1142
1161
  className: a ? "animate-spin" : "",
1143
1162
  "aria-hidden": "true"
1144
1163
  }),
1145
1164
  " ",
1146
- l("bigconsole.insights.actions.regenerate", "Regenerate")
1165
+ c("bigconsole.insights.actions.regenerate", "Regenerate")
1147
1166
  ]
1148
1167
  }),
1149
1168
  /* @__PURE__ */ b("div", {
@@ -1157,19 +1176,19 @@ var M = l(function() {
1157
1176
  children: [
1158
1177
  e.status === "COMPLETED" && i(e).kind === "hold" && /* @__PURE__ */ y("span", {
1159
1178
  role: "status",
1160
- children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1179
+ children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1161
1180
  }),
1162
1181
  e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ b("button", {
1163
1182
  type: "button",
1164
- onClick: () => Ot(e),
1183
+ onClick: () => Ft(e),
1165
1184
  disabled: i(e).kind !== "create",
1166
1185
  title: i(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1167
1186
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1168
1187
  style: w,
1169
1188
  children: [
1170
- l("bigconsole.insights.actions.create", "Create dashboard"),
1189
+ c("bigconsole.insights.actions.create", "Create dashboard"),
1171
1190
  " ",
1172
- /* @__PURE__ */ y(f, {
1191
+ /* @__PURE__ */ y(d, {
1173
1192
  size: 14,
1174
1193
  "aria-hidden": "true"
1175
1194
  })
@@ -1177,13 +1196,13 @@ var M = l(function() {
1177
1196
  }),
1178
1197
  e.dashboardId && /* @__PURE__ */ b("button", {
1179
1198
  type: "button",
1180
- onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1199
+ onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
1181
1200
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1182
1201
  style: C,
1183
1202
  children: [
1184
- l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1203
+ c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1185
1204
  " ",
1186
- /* @__PURE__ */ y(f, {
1205
+ /* @__PURE__ */ y(d, {
1187
1206
  size: 14,
1188
1207
  "aria-hidden": "true"
1189
1208
  })
@@ -1192,13 +1211,13 @@ var M = l(function() {
1192
1211
  /* @__PURE__ */ y("button", {
1193
1212
  type: "button",
1194
1213
  onClick: () => {
1195
- c("medium"), kt(e.id);
1214
+ ae("medium"), It(e.id);
1196
1215
  },
1197
- title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1198
- "aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1216
+ title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1217
+ "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1199
1218
  className: n,
1200
- style: Ke,
1201
- children: /* @__PURE__ */ y(ye, {
1219
+ style: Xe,
1220
+ children: /* @__PURE__ */ y(Ce, {
1202
1221
  size: 14,
1203
1222
  "aria-hidden": "true"
1204
1223
  })
@@ -1210,14 +1229,14 @@ var M = l(function() {
1210
1229
  ]
1211
1230
  }, e.id);
1212
1231
  }),
1213
- Et.length > 0 && /* @__PURE__ */ y("button", {
1232
+ Nt.length > 0 && /* @__PURE__ */ y("button", {
1214
1233
  type: "button",
1215
- onClick: () => ct((e) => !e),
1234
+ onClick: () => ht((e) => !e),
1216
1235
  "aria-expanded": U,
1217
1236
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1218
1237
  style: C,
1219
1238
  "data-testid": "insights-earlier-versions-toggle",
1220
- children: U ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Et.length === 1 ? l("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Et.length })
1239
+ children: U ? c("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Nt.length === 1 ? c("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : c("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Nt.length })
1221
1240
  })
1222
1241
  ]
1223
1242
  })
@@ -1227,7 +1246,7 @@ var M = l(function() {
1227
1246
  I && $ && /* @__PURE__ */ y("div", {
1228
1247
  role: "dialog",
1229
1248
  "aria-modal": "true",
1230
- "aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1249
+ "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1231
1250
  onClick: () => L(null),
1232
1251
  style: {
1233
1252
  position: "fixed",
@@ -1282,13 +1301,13 @@ var M = l(function() {
1282
1301
  }), /* @__PURE__ */ y("button", {
1283
1302
  type: "button",
1284
1303
  onClick: () => L(null),
1285
- "aria-label": l("bigconsole.insights.preview.close", "Close preview"),
1304
+ "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1286
1305
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1287
1306
  style: {
1288
- ...Ke,
1307
+ ...Xe,
1289
1308
  color: "var(--color-text-muted)"
1290
1309
  },
1291
- children: /* @__PURE__ */ y(xe, {
1310
+ children: /* @__PURE__ */ y(we, {
1292
1311
  size: 18,
1293
1312
  "aria-hidden": "true"
1294
1313
  })
@@ -1329,12 +1348,19 @@ var M = l(function() {
1329
1348
  ]
1330
1349
  }),
1331
1350
  /* @__PURE__ */ b("span", {
1332
- style: Ye($.overallConfidence),
1351
+ style: $e($.overallConfidence),
1333
1352
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1334
1353
  })
1335
1354
  ]
1336
1355
  }),
1337
- /* @__PURE__ */ y(se, { metadata: I.processingMetadata }),
1356
+ /* @__PURE__ */ y(ce, { metadata: I.processingMetadata }),
1357
+ /* @__PURE__ */ y(le, {
1358
+ spec: Gt,
1359
+ onApplyFix: (e) => Ut(I.id, e),
1360
+ onUndoFix: Wt,
1361
+ applied: ft[I.id] ?? null,
1362
+ onAppliedChange: (e) => mt(I.id, e)
1363
+ }),
1338
1364
  $.reasoning && /* @__PURE__ */ b("details", {
1339
1365
  "data-testid": "preview-reasoning",
1340
1366
  children: [/* @__PURE__ */ y("summary", {
@@ -1346,7 +1372,7 @@ var M = l(function() {
1346
1372
  color: "var(--color-text-secondary)",
1347
1373
  borderRadius: "var(--radius-button)"
1348
1374
  },
1349
- children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1375
+ children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1350
1376
  }), /* @__PURE__ */ y("p", {
1351
1377
  style: {
1352
1378
  marginTop: "var(--space-controlGap)",
@@ -1377,24 +1403,24 @@ var M = l(function() {
1377
1403
  marginBottom: "var(--space-controlGap)"
1378
1404
  },
1379
1405
  children: [
1380
- l("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1406
+ c("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1381
1407
  " · ",
1382
1408
  e.gridColumns,
1383
1409
  " ",
1384
- l("bigconsole.insights.preview.columns", "columns"),
1410
+ c("bigconsole.insights.preview.columns", "columns"),
1385
1411
  " ·",
1386
1412
  " ",
1387
1413
  e.layout.toLowerCase().replaceAll("_", " ")
1388
1414
  ]
1389
1415
  }), /* @__PURE__ */ y("div", {
1390
1416
  className: "insights-proposal-grid",
1391
- style: Qe(e.gridColumns),
1417
+ style: nt(e.gridColumns),
1392
1418
  children: e.widgets.map((t, n) => {
1393
- let r = Xe(t.confidence);
1419
+ let r = et(t.confidence);
1394
1420
  return /* @__PURE__ */ b("div", {
1395
1421
  className: "insights-proposal-widget",
1396
1422
  style: {
1397
- ...$e(t.position, e.gridColumns),
1423
+ ...rt(t.position, e.gridColumns),
1398
1424
  display: "flex",
1399
1425
  flexDirection: "column",
1400
1426
  gap: "2px",
@@ -1431,7 +1457,7 @@ var M = l(function() {
1431
1457
  }),
1432
1458
  r && /* @__PURE__ */ y("span", {
1433
1459
  style: {
1434
- ...et(r),
1460
+ ...it(r),
1435
1461
  marginLeft: "auto"
1436
1462
  },
1437
1463
  "data-testid": "preview-widget-confidence",
@@ -1448,7 +1474,7 @@ var M = l(function() {
1448
1474
  },
1449
1475
  children: t.reasoning
1450
1476
  }),
1451
- /* @__PURE__ */ y(oe, { config: t.config })
1477
+ /* @__PURE__ */ y(se, { config: t.config })
1452
1478
  ]
1453
1479
  }, n);
1454
1480
  })
@@ -1479,64 +1505,64 @@ var M = l(function() {
1479
1505
  let e = I;
1480
1506
  L(null), B(e), H("");
1481
1507
  },
1482
- title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1508
+ title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1483
1509
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1484
1510
  style: C,
1485
1511
  children: [
1486
- /* @__PURE__ */ y(be, {
1512
+ /* @__PURE__ */ y(g, {
1487
1513
  size: 14,
1488
1514
  "aria-hidden": "true"
1489
1515
  }),
1490
1516
  " ",
1491
- l("bigconsole.insights.actions.refine", "Refine")
1517
+ c("bigconsole.insights.actions.refine", "Refine")
1492
1518
  ]
1493
1519
  }),
1494
1520
  I.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
1495
1521
  type: "button",
1496
- onClick: () => Pt(I),
1497
- title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1522
+ onClick: () => Vt(I),
1523
+ title: c("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1498
1524
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1499
1525
  style: C,
1500
1526
  children: [
1501
- /* @__PURE__ */ y(ve, {
1527
+ /* @__PURE__ */ y(Se, {
1502
1528
  size: 14,
1503
1529
  "aria-hidden": "true"
1504
1530
  }),
1505
1531
  " ",
1506
- l("bigconsole.insights.actions.checkDraft", "Check draft")
1532
+ c("bigconsole.insights.actions.checkDraft", "Check draft")
1507
1533
  ]
1508
1534
  }),
1509
1535
  I.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
1510
1536
  type: "button",
1511
1537
  onClick: () => {
1512
1538
  let e = I;
1513
- L(null), G(e), lt({
1539
+ L(null), G(e), _t({
1514
1540
  text: "",
1515
1541
  busy: !1
1516
1542
  });
1517
1543
  },
1518
- title: l("bigconsole.insights.actions.chatTitle", "Edit the draft by conversation"),
1544
+ title: c("bigconsole.insights.actions.chatTitle", "Edit the draft by conversation"),
1519
1545
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1520
1546
  style: C,
1521
1547
  children: [
1522
- /* @__PURE__ */ y(ge, {
1548
+ /* @__PURE__ */ y(be, {
1523
1549
  size: 14,
1524
1550
  "aria-hidden": "true"
1525
1551
  }),
1526
1552
  " ",
1527
- l("bigconsole.insights.actions.chat", "Chat to edit")
1553
+ c("bigconsole.insights.actions.chat", "Chat to edit")
1528
1554
  ]
1529
1555
  }),
1530
1556
  I.status === "COMPLETED" && i(I).kind === "hold" && /* @__PURE__ */ y("span", {
1531
1557
  role: "status",
1532
- children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1558
+ children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1533
1559
  }),
1534
1560
  I.dashboardId && /* @__PURE__ */ y("button", {
1535
1561
  type: "button",
1536
1562
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1537
1563
  style: C,
1538
- onClick: () => p(`/dashboards/${I.dashboardId}`),
1539
- children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
1564
+ onClick: () => f(`/dashboards/${I.dashboardId}`),
1565
+ children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1540
1566
  }),
1541
1567
  I.status === "COMPLETED" && !I.dashboardId && /* @__PURE__ */ b("button", {
1542
1568
  type: "button",
@@ -1544,14 +1570,14 @@ var M = l(function() {
1544
1570
  title: i(I).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1545
1571
  onClick: () => {
1546
1572
  let e = I;
1547
- L(null), Ot(e);
1573
+ L(null), Ft(e);
1548
1574
  },
1549
1575
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1550
1576
  style: w,
1551
1577
  children: [
1552
- l("bigconsole.insights.actions.create", "Create dashboard"),
1578
+ c("bigconsole.insights.actions.create", "Create dashboard"),
1553
1579
  " ",
1554
- /* @__PURE__ */ y(f, {
1580
+ /* @__PURE__ */ y(d, {
1555
1581
  size: 14,
1556
1582
  "aria-hidden": "true"
1557
1583
  })
@@ -1565,7 +1591,7 @@ var M = l(function() {
1565
1591
  z && /* @__PURE__ */ y("div", {
1566
1592
  role: "dialog",
1567
1593
  "aria-modal": "true",
1568
- "aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1594
+ "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1569
1595
  onClick: () => B(null),
1570
1596
  style: {
1571
1597
  position: "fixed",
@@ -1602,14 +1628,14 @@ var M = l(function() {
1602
1628
  fontWeight: "var(--font-weight-semibold)",
1603
1629
  color: "var(--color-text-primary)"
1604
1630
  },
1605
- children: l("bigconsole.insights.refine.heading", "Refine dashboard")
1631
+ children: c("bigconsole.insights.refine.heading", "Refine dashboard")
1606
1632
  }), /* @__PURE__ */ y("p", {
1607
1633
  style: {
1608
1634
  fontSize: "var(--font-size-body-sm)",
1609
1635
  color: "var(--color-text-secondary)",
1610
1636
  marginTop: 2
1611
1637
  },
1612
- children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1638
+ children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1613
1639
  })]
1614
1640
  }),
1615
1641
  /* @__PURE__ */ b("div", {
@@ -1628,7 +1654,7 @@ var M = l(function() {
1628
1654
  headingLevel: 3,
1629
1655
  title: z.generatedSpec?.name || "Current proposal",
1630
1656
  description: z.prompt.length > 240 ? `${z.prompt.slice(0, 240)}…` : z.prompt,
1631
- icon: /* @__PURE__ */ y(g, { className: "h-icon-sm w-icon-sm" })
1657
+ icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" })
1632
1658
  }), /* @__PURE__ */ b("div", {
1633
1659
  style: {
1634
1660
  display: "flex",
@@ -1650,7 +1676,7 @@ var M = l(function() {
1650
1676
  onChange: (e) => H(e.target.value),
1651
1677
  maxLength: 2e3,
1652
1678
  rows: 4,
1653
- placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1679
+ placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1654
1680
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1655
1681
  style: {
1656
1682
  width: "100%",
@@ -1680,10 +1706,10 @@ var M = l(function() {
1680
1706
  onClick: () => B(null),
1681
1707
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1682
1708
  style: C,
1683
- children: l("bigconsole.insights.actions.cancel", "Cancel")
1709
+ children: c("bigconsole.insights.actions.cancel", "Cancel")
1684
1710
  }), /* @__PURE__ */ b("button", {
1685
1711
  type: "button",
1686
- onClick: () => void Mt(),
1712
+ onClick: () => void zt(),
1687
1713
  disabled: !V.trim() || F.has(z.id),
1688
1714
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1689
1715
  style: {
@@ -1691,42 +1717,47 @@ var M = l(function() {
1691
1717
  cursor: !V.trim() || F.has(z.id) ? "not-allowed" : "pointer",
1692
1718
  opacity: V.trim() ? 1 : .6
1693
1719
  },
1694
- children: [F.has(z.id) ? /* @__PURE__ */ y(h, {
1720
+ children: [F.has(z.id) ? /* @__PURE__ */ y(m, {
1695
1721
  size: 14,
1696
1722
  className: "animate-spin",
1697
1723
  "aria-hidden": "true"
1698
- }) : /* @__PURE__ */ y(be, {
1724
+ }) : /* @__PURE__ */ y(g, {
1699
1725
  size: 14,
1700
1726
  "aria-hidden": "true"
1701
- }), l("bigconsole.insights.refine.apply", "Apply refinement")]
1727
+ }), c("bigconsole.insights.refine.apply", "Apply refinement")]
1702
1728
  })]
1703
1729
  })
1704
1730
  ]
1705
1731
  })
1706
1732
  }),
1707
- W && W.generatedSpec && /* @__PURE__ */ y(le, {
1733
+ W && W.generatedSpec && /* @__PURE__ */ y(de, {
1708
1734
  generation: {
1709
1735
  ...W,
1710
1736
  generatedSpec: W.generatedSpec
1711
1737
  },
1712
- message: K.text,
1713
- onMessageChange: (e) => lt((t) => ({
1738
+ message: gt.text,
1739
+ onMessageChange: (e) => _t((t) => ({
1714
1740
  ...t,
1715
1741
  text: e
1716
1742
  })),
1717
- onBusyChange: (e) => lt((t) => ({
1743
+ onBusyChange: (e) => _t((t) => ({
1718
1744
  ...t,
1719
1745
  busy: e
1720
1746
  })),
1721
1747
  onClose: () => G(null)
1722
1748
  }),
1723
- /* @__PURE__ */ y(ce, {
1724
- open: at !== null,
1749
+ /* @__PURE__ */ y(ue, {
1750
+ open: lt !== null,
1725
1751
  onClose: () => {
1726
- ot(null), st(null);
1752
+ ut(null), dt(null);
1727
1753
  },
1728
- spec: at,
1729
- onApplyFix: Ft
1754
+ spec: lt,
1755
+ onApplyFix: (e) => R ? Ut(R, e) : Promise.resolve(null),
1756
+ onUndoFix: Wt,
1757
+ appliedFix: R ? ft[R] ?? null : null,
1758
+ onAppliedFixChange: (e) => {
1759
+ R && mt(R, e);
1760
+ }
1730
1761
  })
1731
1762
  ]
1732
1763
  });