@burdenoff/microfe-workspaces 2026.1109.1 → 2026.1110.1

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 (102) hide show
  1. package/dist/WorkspacesRoot.js +10 -9
  2. package/dist/WorkspacesRoutes.js +1 -2
  3. package/dist/components/CreateProjectDialog.js +22 -22
  4. package/dist/components/CreateWorkspaceDialog.js +8 -9
  5. package/dist/components/InviteMemberDialog.js +18 -23
  6. package/dist/components/MemberListItem.js +16 -17
  7. package/dist/components/ProjectCard.js +14 -15
  8. package/dist/components/ProjectMemberPickerDialog.js +92 -93
  9. package/dist/components/RenameProjectDialog.js +12 -17
  10. package/dist/components/WorkspaceCard.js +6 -7
  11. package/dist/components/WorkspaceContextPathSync.js +4 -5
  12. package/dist/components/WorkspacesErrorBoundary.js +6 -11
  13. package/dist/components/index.js +8 -7
  14. package/dist/components/tags/ProjectTagsWidget.js +56 -57
  15. package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
  16. package/dist/constants/permissions.js +1 -2
  17. package/dist/generated/global-operations.js +1 -2
  18. package/dist/generated/wspace-operations.js +1 -2
  19. package/dist/hooks/index.js +9 -8
  20. package/dist/hooks/useMemberMutations.js +165 -166
  21. package/dist/hooks/useOpenWorkspace.js +1 -2
  22. package/dist/hooks/useOrgsWithPermission.js +2 -3
  23. package/dist/hooks/usePendingInvitations.d.ts +1 -1
  24. package/dist/hooks/usePendingInvitations.js +2 -3
  25. package/dist/hooks/useProjectMemberMutations.js +23 -24
  26. package/dist/hooks/useProjectMembers.d.ts +2 -2
  27. package/dist/hooks/useProjectMembers.js +2 -3
  28. package/dist/hooks/useProjectMutations.js +68 -69
  29. package/dist/hooks/useProjects.d.ts +3 -3
  30. package/dist/hooks/useProjects.js +5 -6
  31. package/dist/hooks/useScopedNavigation.js +1 -2
  32. package/dist/hooks/useTenants.d.ts +2 -2
  33. package/dist/hooks/useTenants.js +3 -4
  34. package/dist/hooks/useTr.js +1 -2
  35. package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
  36. package/dist/hooks/useWorkspaceActivity.js +2 -3
  37. package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
  38. package/dist/hooks/useWorkspaceMembers.js +7 -8
  39. package/dist/hooks/useWorkspaceMutations.js +70 -71
  40. package/dist/hooks/useWorkspacePermissions.js +1 -2
  41. package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
  42. package/dist/hooks/useWorkspaceRoles.js +3 -4
  43. package/dist/hooks/useWorkspaces.d.ts +3 -3
  44. package/dist/hooks/useWorkspaces.js +4 -5
  45. package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
  46. package/dist/hooks/useWorkspacesPageView.js +1 -2
  47. package/dist/index.js +15 -15
  48. package/dist/pages/ActivityListPage.js +28 -29
  49. package/dist/pages/CreateWorkspacePage.js +137 -138
  50. package/dist/pages/InviteAcceptancePage.js +65 -66
  51. package/dist/pages/MembersListPage.js +203 -204
  52. package/dist/pages/PendingInvitesPage.js +63 -64
  53. package/dist/pages/ProjectDetailPage.js +71 -72
  54. package/dist/pages/ProjectMembersPage.js +116 -117
  55. package/dist/pages/ProjectsListPage.js +62 -67
  56. package/dist/pages/WorkspaceDetailPage.js +153 -154
  57. package/dist/pages/WorkspaceInvitePage.js +88 -92
  58. package/dist/pages/WorkspaceSettingsPage.js +32 -33
  59. package/dist/pages/WorkspacesListPage.js +40 -41
  60. package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
  61. package/dist/pages/dashboard/DashboardGrid.js +1 -2
  62. package/dist/pages/dashboard/DashboardPage.js +12 -13
  63. package/dist/pages/dashboard/WidgetWrapper.js +3 -3
  64. package/dist/pages/dashboard/config.js +3 -4
  65. package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
  66. package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
  67. package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
  68. package/dist/pages/dashboard/reorder.js +11 -14
  69. package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
  70. package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
  71. package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
  72. package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
  73. package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
  74. package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
  75. package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
  76. package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
  77. package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
  78. package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
  79. package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
  80. package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
  81. package/dist/pages/dashboard/widgets/WelcomeWidget.js +11 -12
  82. package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
  83. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
  84. package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
  85. package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
  86. package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
  87. package/dist/providers/WorkspacesProvider.js +1 -2
  88. package/dist/store/workspacesStore.d.ts +1 -1
  89. package/dist/store/workspacesStore.js +1 -2
  90. package/dist/test/happydom.d.ts +1 -0
  91. package/dist/translations/en.js +1 -2
  92. package/dist/utils/formatters.js +1 -2
  93. package/dist/utils/i18n.js +1 -2
  94. package/dist/utils/invitationDisplay.js +1 -2
  95. package/dist/utils/nativeBridge.js +1 -2
  96. package/dist/utils/pinnedRequest.js +2 -3
  97. package/dist/utils/projectTags.js +2 -3
  98. package/dist/utils/slug.js +1 -2
  99. package/dist/utils/telemetryError.js +13 -16
  100. package/dist/utils/tokenHelpers.js +1 -2
  101. package/dist/utils/workspaceBulkInviteCsv.js +3 -8
  102. package/package.json +72 -55
@@ -2,24 +2,28 @@ import { tWithFallback as e } from "../../utils/i18n.js";
2
2
  import { DEFAULT_DASHBOARD_WIDGETS as t, DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT as n, WIDGET_DEFINITIONS as r, isWidgetAvailable as i, resolveWidgetCopy as a } from "./config.js";
3
3
  import { nativeImpact as o } from "../../utils/nativeBridge.js";
4
4
  import { dropPositionFromPointer as s, reorderByDropIndex as c } from "./reorder.js";
5
- import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
6
- import { ArrowDown as p, ArrowUp as m, GripVertical as h, Loader2 as g, RotateCcw as _, Save as v } from "lucide-react";
7
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
8
- import { Badge as x, Button as S, Separator as C, Sheet as w, SheetContent as T, SheetDescription as E, SheetFooter as D, SheetHeader as O, SheetTitle as ee, Switch as te } from "@burdenoff/fe-libs/ui";
9
- import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
- //#region src/pages/dashboard/DashboardCustomizer.tsx
11
- function k({ open: k, onOpenChange: A, widgets: j, onSave: M, isSaving: N, productId: P = "workspaces" }) {
12
- let { t: F } = ne(), I = l((t, n) => e(F, t, n), [F]), [L, R] = f(j), [z, B] = f(!1), [V, H] = f(null), [U, W] = f(null), [G, K] = f(""), q = d(/* @__PURE__ */ new Map()), J = d(null), Y = d(0);
13
- u(() => {
14
- k && (R([...j]), B(!1));
15
- }, [k, j]);
16
- let X = l((e) => {
17
- R((t) => t.map((t) => t.widgetId === e ? {
5
+ import { useCallback as l, useRef as u, useState as d } from "react";
6
+ import { ArrowDown as f, ArrowUp as p, GripVertical as m, Loader2 as ee, RotateCcw as te, Save as h } from "lucide-react";
7
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
8
+ import { Badge as v, Button as y, Separator as b, Sheet as x, SheetContent as S, SheetDescription as ne, SheetFooter as C, SheetHeader as w, SheetTitle as T, Switch as E } from "@burdenoff/fe-libs/ui";
9
+ import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ // src/pages/dashboard/DashboardCustomizer.tsx
11
+ function O({ open: O, onOpenChange: k, widgets: A, onSave: j, isSaving: M, productId: N = "workspaces" }) {
12
+ let { t: P } = D(), F = l((t, n) => e(P, t, n), [P]), [I, L] = d(A), [R, z] = d(!1), [B, V] = d(null), [H, U] = d(null), [W, G] = d(""), K = u(/* @__PURE__ */ new Map()), q = u(null), J = u(0), [Y, X] = d({
13
+ open: !1,
14
+ widgets: A
15
+ });
16
+ (Y.open !== O || Y.widgets !== A) && (X({
17
+ open: O,
18
+ widgets: A
19
+ }), O && (L([...A]), z(!1)));
20
+ let re = l((e) => {
21
+ L((t) => t.map((t) => t.widgetId === e ? {
18
22
  ...t,
19
23
  enabled: !t.enabled
20
- } : t)), B(!0);
24
+ } : t)), z(!0);
21
25
  }, []), Z = l((e, t) => {
22
- R((n) => {
26
+ L((n) => {
23
27
  let r = [...n].sort((e, t) => e.order - t.order), i = r.findIndex((t) => t.widgetId === e);
24
28
  if (i < 0) return n;
25
29
  let a = t === "up" ? i - 1 : i + 1;
@@ -32,131 +36,132 @@ function k({ open: k, onOpenChange: A, widgets: j, onSave: M, isSaving: N, produ
32
36
  ...r[a],
33
37
  order: o
34
38
  }, r;
35
- }), B(!0);
36
- }, []), re = l(() => {
37
- R([...n[P] ?? t]), B(!0);
38
- }, [P]), ie = l((e) => (t) => {
39
- t ? q.current.set(e, t) : q.current.delete(e);
40
- }, []), ae = l((e, t) => {
41
- H(e), J.current = null, cancelAnimationFrame(Y.current), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e);
39
+ }), z(!0);
40
+ }, []), ie = l(() => {
41
+ let e = n[N] ?? t;
42
+ L([...e]), z(!0);
43
+ }, [N]), ae = l((e) => (t) => {
44
+ t ? K.current.set(e, t) : K.current.delete(e);
42
45
  }, []), oe = l((e, t) => {
43
- !V || V === e || (t.preventDefault(), t.dataTransfer.dropEffect = "move", W(e), cancelAnimationFrame(Y.current), Y.current = requestAnimationFrame(() => {
44
- let n = q.current.get(e);
46
+ V(e), q.current = null, cancelAnimationFrame(J.current), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e);
47
+ }, []), se = l((e, t) => {
48
+ B && B !== e && (t.preventDefault(), t.dataTransfer.dropEffect = "move", U(e), cancelAnimationFrame(J.current), J.current = requestAnimationFrame(() => {
49
+ let n = K.current.get(e);
45
50
  if (!n) return;
46
- let r = s(t.clientY, n.getBoundingClientRect()), i = J.current;
47
- i && i.fromId === V && i.toId === e && i.position === r || (J.current = {
48
- fromId: V,
51
+ let r = s(t.clientY, n.getBoundingClientRect()), i = q.current;
52
+ i && i.fromId === B && i.toId === e && i.position === r || (q.current = {
53
+ fromId: B,
49
54
  toId: e,
50
55
  position: r
51
- }, R((t) => c(t, V, e, r)), B(!0));
56
+ }, L((t) => c(t, B, e, r)), z(!0));
52
57
  }));
53
- }, [V]), Q = l((e, t) => {
54
- t.currentTarget.contains(t.relatedTarget) || U === e && W(null);
55
- }, [U]), se = l((e, t) => {
56
- t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), cancelAnimationFrame(Y.current), H(null), W(null);
57
- }, []), ce = l(() => {
58
- if (cancelAnimationFrame(Y.current), V) {
59
- let t = [...L].sort((e, t) => e.order - t.order), n = t.findIndex((e) => e.widgetId === V), i = r[V], o = i ? a(I, i).title : V;
60
- n >= 0 && K(e(F, "dashboardCustomizer.reorderAnnouncement", `${o} moved to position ${n + 1} of ${t.length}`));
58
+ }, [B]), Q = l((e, t) => {
59
+ t.currentTarget.contains(t.relatedTarget) || H === e && U(null);
60
+ }, [H]), ce = l((e, t) => {
61
+ t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), cancelAnimationFrame(J.current), V(null), U(null);
62
+ }, []), le = l(() => {
63
+ if (cancelAnimationFrame(J.current), B) {
64
+ let t = [...I].sort((e, t) => e.order - t.order), n = t.findIndex((e) => e.widgetId === B), i = r[B], o = i ? a(F, i).title : B;
65
+ n >= 0 && G(e(P, "dashboardCustomizer.reorderAnnouncement", `${o} moved to position ${n + 1} of ${t.length}`));
61
66
  }
62
- H(null), W(null), J.current = null;
67
+ V(null), U(null), q.current = null;
63
68
  }, [
64
- V,
65
- L,
69
+ B,
66
70
  I,
67
- F
68
- ]), le = l(async () => {
69
- await M(L), B(!1), A(!1);
71
+ F,
72
+ P
73
+ ]), ue = l(async () => {
74
+ await j(I), z(!1), k(!1);
70
75
  }, [
71
- L,
72
- M,
73
- A
74
- ]), $ = [...L].sort((e, t) => e.order - t.order);
75
- return /* @__PURE__ */ y(w, {
76
- open: k,
77
- onOpenChange: A,
78
- children: /* @__PURE__ */ b(T, {
76
+ I,
77
+ j,
78
+ k
79
+ ]), $ = [...I].sort((e, t) => e.order - t.order);
80
+ return /* @__PURE__ */ g(x, {
81
+ open: O,
82
+ onOpenChange: k,
83
+ children: /* @__PURE__ */ _(S, {
79
84
  className: "w-full sm:max-w-md overflow-y-auto",
80
85
  side: "right",
81
86
  children: [
82
- /* @__PURE__ */ b(O, { children: [/* @__PURE__ */ y(ee, { children: e(F, "dashboardCustomizer.title", "Customize Dashboard") }), /* @__PURE__ */ y(E, { children: e(F, "dashboardCustomizer.description", "Toggle widgets on or off and reorder them to personalize your dashboard.") })] }),
83
- /* @__PURE__ */ b("div", {
87
+ /* @__PURE__ */ _(w, { children: [/* @__PURE__ */ g(T, { children: e(P, "dashboardCustomizer.title", "Customize Dashboard") }), /* @__PURE__ */ g(ne, { children: e(P, "dashboardCustomizer.description", "Toggle widgets on or off and reorder them to personalize your dashboard.") })] }),
88
+ /* @__PURE__ */ _("div", {
84
89
  role: "listbox",
85
- "aria-label": e(F, "dashboardCustomizer.listLabel", "Dashboard widgets"),
90
+ "aria-label": e(P, "dashboardCustomizer.listLabel", "Dashboard widgets"),
86
91
  className: "py-4 space-y-1",
87
- children: [/* @__PURE__ */ y("div", {
92
+ children: [/* @__PURE__ */ g("div", {
88
93
  "aria-live": "assertive",
89
94
  className: "sr-only",
90
- children: G
95
+ children: W
91
96
  }), $.map((t, n) => {
92
97
  let s = r[t.widgetId];
93
- if (!s || !i(s, P)) return null;
94
- let c = V === t.widgetId, l = U === t.widgetId && V !== null, u = a(I, s).title;
95
- return /* @__PURE__ */ b("div", {
96
- ref: ie(t.widgetId),
98
+ if (!s || !i(s, N)) return null;
99
+ let c = B === t.widgetId, l = H === t.widgetId && B !== null, u = a(F, s).title;
100
+ return /* @__PURE__ */ _("div", {
101
+ ref: ae(t.widgetId),
97
102
  role: "option",
98
- "aria-roledescription": e(F, "dashboardCustomizer.sortableItem", "sortable item"),
103
+ "aria-roledescription": e(P, "dashboardCustomizer.sortableItem", "sortable item"),
99
104
  "aria-selected": c,
100
- "aria-label": e(F, "dashboardCustomizer.widgetRow", `Widget: ${u}. Use the arrow buttons to reorder.`),
101
- onDragOver: (e) => oe(t.widgetId, e),
105
+ "aria-label": e(P, "dashboardCustomizer.widgetRow", `Widget: ${u}. Use the arrow buttons to reorder.`),
106
+ onDragOver: (e) => se(t.widgetId, e),
102
107
  onDragLeave: (e) => Q(t.widgetId, e),
103
- onDrop: (e) => se(t.widgetId, e),
108
+ onDrop: (e) => ce(t.widgetId, e),
104
109
  "data-widget-id": t.widgetId,
105
110
  className: `flex items-center gap-3 p-3 rounded-lg border transition-colors ${t.enabled ? "border-border-default bg-bg-surface" : "border-transparent bg-bg-sunken/30 opacity-60"} ${c ? "opacity-50" : ""} ${l ? "ring-2 ring-border-strong border-transparent" : ""}`,
106
111
  children: [
107
- /* @__PURE__ */ y("span", {
112
+ /* @__PURE__ */ g("span", {
108
113
  draggable: !0,
109
- onDragStart: (e) => ae(t.widgetId, e),
110
- onDragEnd: ce,
111
- "aria-label": e(F, "dashboardCustomizer.dragHandle", `Drag handle for ${u}`),
114
+ onDragStart: (e) => oe(t.widgetId, e),
115
+ onDragEnd: le,
116
+ "aria-label": e(P, "dashboardCustomizer.dragHandle", `Drag handle for ${u}`),
112
117
  className: "cursor-grab active:cursor-grabbing touch-none select-none",
113
- children: /* @__PURE__ */ y(h, {
118
+ children: /* @__PURE__ */ g(m, {
114
119
  "aria-hidden": !0,
115
120
  className: "size-4 text-text-secondary shrink-0"
116
121
  })
117
122
  }),
118
- /* @__PURE__ */ b("div", {
123
+ /* @__PURE__ */ _("div", {
119
124
  className: "flex-1 min-w-0",
120
- children: [/* @__PURE__ */ b("div", {
125
+ children: [/* @__PURE__ */ _("div", {
121
126
  className: "flex items-center gap-2",
122
- children: [/* @__PURE__ */ y("span", {
127
+ children: [/* @__PURE__ */ g("span", {
123
128
  className: "text-sm font-medium text-text-primary",
124
129
  children: u
125
- }), /* @__PURE__ */ y(x, {
130
+ }), /* @__PURE__ */ g(v, {
126
131
  variant: "outline",
127
132
  className: "text-[10px]",
128
133
  children: s.defaultSize
129
134
  })]
130
- }), /* @__PURE__ */ y("p", {
135
+ }), /* @__PURE__ */ g("p", {
131
136
  className: "text-xs text-text-secondary truncate",
132
- children: a(I, s).description
137
+ children: a(F, s).description
133
138
  })]
134
139
  }),
135
- /* @__PURE__ */ b("div", {
140
+ /* @__PURE__ */ _("div", {
136
141
  className: "flex items-center gap-1 shrink-0",
137
142
  children: [
138
- /* @__PURE__ */ y(S, {
143
+ /* @__PURE__ */ g(y, {
139
144
  variant: "ghost",
140
145
  size: "sm",
141
146
  className: "size-7 p-0",
142
147
  disabled: n === 0,
143
148
  onClick: () => Z(t.widgetId, "up"),
144
- "aria-label": e(F, "dashboardCustomizer.moveUp", `Move ${u} up`),
145
- children: /* @__PURE__ */ y(m, { className: "size-3" })
149
+ "aria-label": e(P, "dashboardCustomizer.moveUp", `Move ${u} up`),
150
+ children: /* @__PURE__ */ g(p, { className: "size-3" })
146
151
  }),
147
- /* @__PURE__ */ y(S, {
152
+ /* @__PURE__ */ g(y, {
148
153
  variant: "ghost",
149
154
  size: "sm",
150
155
  className: "size-7 p-0",
151
156
  disabled: n === $.length - 1,
152
157
  onClick: () => Z(t.widgetId, "down"),
153
- "aria-label": e(F, "dashboardCustomizer.moveDown", `Move ${u} down`),
154
- children: /* @__PURE__ */ y(p, { className: "size-3" })
158
+ "aria-label": e(P, "dashboardCustomizer.moveDown", `Move ${u} down`),
159
+ children: /* @__PURE__ */ g(f, { className: "size-3" })
155
160
  }),
156
- /* @__PURE__ */ y(te, {
161
+ /* @__PURE__ */ g(E, {
157
162
  checked: t.enabled,
158
163
  onCheckedChange: () => {
159
- o("medium"), X(t.widgetId);
164
+ o("medium"), re(t.widgetId);
160
165
  },
161
166
  disabled: !s.removable,
162
167
  className: "ml-1"
@@ -167,26 +172,25 @@ function k({ open: k, onOpenChange: A, widgets: j, onSave: M, isSaving: N, produ
167
172
  }, t.widgetId);
168
173
  })]
169
174
  }),
170
- /* @__PURE__ */ y(C, {}),
171
- /* @__PURE__ */ b(D, {
175
+ /* @__PURE__ */ g(b, {}),
176
+ /* @__PURE__ */ _(C, {
172
177
  className: "flex-row gap-2 pt-4",
173
- children: [/* @__PURE__ */ b(S, {
178
+ children: [/* @__PURE__ */ _(y, {
174
179
  variant: "outline",
175
180
  size: "sm",
176
- onClick: re,
181
+ onClick: ie,
177
182
  className: "flex-1",
178
- children: [/* @__PURE__ */ y(_, { className: "size-3 mr-1.5" }), e(F, "dashboardCustomizer.resetToDefaults", "Reset to defaults")]
179
- }), /* @__PURE__ */ b(S, {
183
+ children: [/* @__PURE__ */ g(te, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.resetToDefaults", "Reset to defaults")]
184
+ }), /* @__PURE__ */ _(y, {
180
185
  size: "sm",
181
- onClick: le,
182
- disabled: !z || N,
186
+ onClick: ue,
187
+ disabled: !R || M,
183
188
  className: "flex-1",
184
- children: [N ? /* @__PURE__ */ y(g, { className: "size-3 mr-1.5 animate-spin" }) : /* @__PURE__ */ y(v, { className: "size-3 mr-1.5" }), e(F, "dashboardCustomizer.saveLayout", "Save layout")]
189
+ children: [M ? /* @__PURE__ */ g(ee, { className: "size-3 mr-1.5 animate-spin" }) : /* @__PURE__ */ g(h, { className: "size-3 mr-1.5" }), e(P, "dashboardCustomizer.saveLayout", "Save layout")]
185
190
  })]
186
191
  })
187
192
  ]
188
193
  })
189
194
  });
190
195
  }
191
- //#endregion
192
- export { k as DashboardCustomizer };
196
+ export { O as DashboardCustomizer };
@@ -21,7 +21,7 @@ import { WorkflowRunsWidget as b } from "./widgets/WorkflowRunsWidget.js";
21
21
  import { jsx as x, jsxs as S } from "react/jsx-runtime";
22
22
  import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
23
  import { MotionItem as w, MotionList as T } from "@burdenoff/fe-libs/shared/motion";
24
- //#region src/pages/dashboard/DashboardGrid.tsx
24
+ // src/pages/dashboard/DashboardGrid.tsx
25
25
  var E = {
26
26
  welcome: i,
27
27
  quickActions: a,
@@ -72,5 +72,4 @@ function D({ widgets: i, productId: a, ...o }) {
72
72
  })
73
73
  });
74
74
  }
75
- //#endregion
76
75
  export { D as DashboardGrid };
@@ -1,16 +1,16 @@
1
- import { useWorkspacesPageView as e } from "../../hooks/useWorkspacesPageView.js";
2
- import { useGlobalDashboardData as t, useProjectsDashboardData as n, useVibecontrolsDashboardData as r, useWorkspaceDashboardData as i } from "./hooks/useDashboardData.js";
3
- import { useUpdateDashboardPreferences as ee } from "./hooks/useDashboardPreferences.js";
4
- import { getEffectiveWidgets as a } from "./config.js";
5
- import { DashboardGrid as te } from "./DashboardGrid.js";
6
- import { DashboardCustomizer as o } from "./DashboardCustomizer.js";
1
+ import { useGlobalDashboardData as e, useProjectsDashboardData as t, useVibecontrolsDashboardData as n, useWorkspaceDashboardData as r } from "./hooks/useDashboardData.js";
2
+ import { useUpdateDashboardPreferences as i } from "./hooks/useDashboardPreferences.js";
3
+ import { DashboardGrid as ee } from "./DashboardGrid.js";
4
+ import { DashboardCustomizer as a } from "./DashboardCustomizer.js";
5
+ import { getEffectiveWidgets as te } from "./config.js";
6
+ import { useWorkspacesPageView as o } from "../../hooks/useWorkspacesPageView.js";
7
7
  import { useCallback as s, useMemo as c, useState as l } from "react";
8
8
  import { AlertCircle as u, Building2 as d, GitBranch as f, Loader2 as p, RefreshCw as m, Settings2 as ne, Sparkles as h } from "lucide-react";
9
9
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
10
10
  import { AuroraBackground as y, Button as b, GradientText as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
11
11
  import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
12
  import { PageHeader as w } from "@burdenoff/fe-libs/chrome";
13
- //#region src/pages/dashboard/DashboardPage.tsx
13
+ // src/pages/dashboard/DashboardPage.tsx
14
14
  var T = {
15
15
  workspaces: {
16
16
  noun: "Workspaces",
@@ -51,11 +51,11 @@ function E(e, t, n) {
51
51
  }
52
52
  }
53
53
  function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspaces" }) {
54
- e("workspaces.dashboard");
54
+ o("workspaces.dashboard");
55
55
  let { t: O } = C(), k = (e, t) => {
56
56
  let n = O(e);
57
57
  return n === e ? t : n;
58
- }, [re, A] = l(!1), j = T[D] ?? T.workspaces, M = E(k, D, j), N = j.Icon, { data: P, isLoading: F, error: I, refetch: L } = i(f), { data: R, isLoading: z, error: B, refetch: V } = t(f), { data: H, isLoading: U, refetch: W } = n(f), G = D === "vibecontrols", { data: K, isLoading: q, refetch: J } = r(f, G), Y = ee(f), X = F || z || U || q, ie = c(() => !P && !R && !H && !K ? null : {
58
+ }, [re, A] = l(!1), j = T[D] ?? T.workspaces, M = E(k, D, j), N = j.Icon, { data: P, isLoading: F, error: I, refetch: L } = r(f), { data: R, isLoading: z, error: B, refetch: V } = e(f), { data: H, isLoading: U, refetch: W } = t(f), G = D === "vibecontrols", { data: K, isLoading: q, refetch: J } = n(f, G), Y = i(f), X = F || z || U || q, ie = c(() => !P && !R && !H && !K ? null : {
59
59
  ...P ?? {
60
60
  workspaces: {
61
61
  items: [],
@@ -94,7 +94,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
94
94
  R,
95
95
  H,
96
96
  K
97
- ]), Z = R?.dashboardPreferences, Q = c(() => a(Z?.widgets ?? null, D), [Z, D]), $ = s(() => {
97
+ ]), Z = R?.dashboardPreferences, Q = c(() => te(Z?.widgets ?? null, D), [Z, D]), $ = s(() => {
98
98
  L(), V(), W(), G && J();
99
99
  }, [
100
100
  L,
@@ -172,7 +172,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
172
172
  ]
173
173
  })]
174
174
  }),
175
- /* @__PURE__ */ _(te, {
175
+ /* @__PURE__ */ _(ee, {
176
176
  widgets: Q,
177
177
  workspaceData: ie,
178
178
  globalData: R ?? null,
@@ -180,7 +180,7 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
180
180
  navigate: d,
181
181
  productId: D
182
182
  }),
183
- /* @__PURE__ */ _(o, {
183
+ /* @__PURE__ */ _(a, {
184
184
  open: re,
185
185
  onOpenChange: A,
186
186
  widgets: Q,
@@ -191,5 +191,4 @@ function D({ navigate: d, authToken: f, currentUser: h, productId: D = "workspac
191
191
  ]
192
192
  });
193
193
  }
194
- //#endregion
195
194
  export { D as DashboardPage };
@@ -3,7 +3,7 @@ import { AlertCircle as t, WifiOff as n } from "lucide-react";
3
3
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
4
  import { CardContent as a, CardHeader as o, GlassCard as s, Skeleton as c } from "@burdenoff/fe-libs/ui";
5
5
  import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
- //#region src/pages/dashboard/WidgetWrapper.tsx
6
+ // src/pages/dashboard/WidgetWrapper.tsx
7
7
  function u(e) {
8
8
  switch (e) {
9
9
  case "large": return "col-span-1 sm:col-span-2 lg:col-span-3";
@@ -49,9 +49,10 @@ function p() {
49
49
  });
50
50
  }
51
51
  function m({ title: e, icon: t, size: n, isLoading: c, error: l, unavailable: m, headerAction: h, children: g, className: _ = "" }) {
52
+ let v = u(n);
52
53
  return /* @__PURE__ */ i(s, {
53
54
  treatment: "insight",
54
- className: `h-full ${u(n)} border-border-seam bg-bg-surface ${_}`,
55
+ className: `h-full ${v} border-border-seam bg-bg-surface ${_}`,
55
56
  children: [/* @__PURE__ */ i(o, {
56
57
  className: "flex flex-row items-center justify-between pb-2 gap-y-0",
57
58
  children: [/* @__PURE__ */ i("h2", {
@@ -64,5 +65,4 @@ function m({ title: e, icon: t, size: n, isLoading: c, error: l, unavailable: m,
64
65
  })]
65
66
  });
66
67
  }
67
- //#endregion
68
68
  export { m as WidgetWrapper, u as getColSpan };
@@ -1,4 +1,4 @@
1
- //#region src/pages/dashboard/config.ts
1
+ // src/pages/dashboard/config.ts
2
2
  var e = "workspaces", t = {
3
3
  welcome: {
4
4
  id: "welcome",
@@ -367,7 +367,7 @@ var e = "workspaces", t = {
367
367
  ]
368
368
  }, i = n;
369
369
  function a(t, n = e) {
370
- return !t.availableInProducts || t.availableInProducts.length === 0 ? !0 : t.availableInProducts.includes(n);
370
+ return !t.availableInProducts || t.availableInProducts.length === 0 || t.availableInProducts.includes(n);
371
371
  }
372
372
  function o(n = e) {
373
373
  let r = {};
@@ -462,5 +462,4 @@ function c(e, t) {
462
462
  };
463
463
  }
464
464
  }
465
- //#endregion
466
- export { i as DEFAULT_DASHBOARD_WIDGETS, r as DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT, t as WIDGET_DEFINITIONS, s as getEffectiveWidgets, a as isWidgetAvailable, c as resolveWidgetCopy };
465
+ export { i as DEFAULT_DASHBOARD_WIDGETS, r as DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT, e as DEFAULT_PRODUCT_ID, t as WIDGET_DEFINITIONS, o as getDefinitionsForProduct, s as getEffectiveWidgets, a as isWidgetAvailable, c as resolveWidgetCopy };
@@ -1,13 +1,13 @@
1
1
  import { WorkspaceDashboardData, GlobalDashboardData, VibeSummary, SessionSummary, AgentFleetSummary } from '../types';
2
- export declare function useProjectsDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<{
2
+ export declare function useProjectsDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<{
3
3
  items: import('../types').ProjectSummary[];
4
4
  total: number;
5
- }>, Error>;
6
- export declare function useWorkspaceDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceDashboardData>, Error>;
5
+ }, Error>;
6
+ export declare function useWorkspaceDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<WorkspaceDashboardData, Error>;
7
7
  export interface VibecontrolsDashboardData {
8
8
  recentVibes: VibeSummary[];
9
9
  activeSessions: SessionSummary[];
10
10
  agentFleet: AgentFleetSummary | null;
11
11
  }
12
- export declare function useVibecontrolsDashboardData(authToken?: string | null, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<NoInfer<VibecontrolsDashboardData>, Error>;
13
- export declare function useGlobalDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<GlobalDashboardData>, Error>;
12
+ export declare function useVibecontrolsDashboardData(authToken?: string | null, enabled?: boolean): import('@tanstack/react-query').UseQueryResult<VibecontrolsDashboardData, Error>;
13
+ export declare function useGlobalDashboardData(authToken?: string | null): import('@tanstack/react-query').UseQueryResult<GlobalDashboardData, Error>;
@@ -4,7 +4,7 @@ import { useActiveContext as r } from "@burdenoff/fe-libs/shared/providers/shell
4
4
  import { useQuery as i } from "@tanstack/react-query";
5
5
  import { print as a } from "graphql";
6
6
  import { graphqlFetch as o } from "@burdenoff/fe-libs/shared/graphql";
7
- //#region src/pages/dashboard/hooks/useDashboardData.ts
7
+ // src/pages/dashboard/hooks/useDashboardData.ts
8
8
  var s = 1024 ** 3;
9
9
  function c(t) {
10
10
  let { workspaceId: n } = r();
@@ -26,8 +26,8 @@ function c(t) {
26
26
  items: [],
27
27
  total: 0
28
28
  },
29
- staleTime: 120 * 1e3,
30
- gcTime: 300 * 1e3,
29
+ staleTime: 12e4,
30
+ gcTime: 3e5,
31
31
  retry: 1,
32
32
  refetchOnWindowFocus: !0
33
33
  });
@@ -86,8 +86,8 @@ function l(e) {
86
86
  storageUsage: c
87
87
  };
88
88
  },
89
- staleTime: 120 * 1e3,
90
- gcTime: 300 * 1e3,
89
+ staleTime: 12e4,
90
+ gcTime: 3e5,
91
91
  retry: 1,
92
92
  refetchOnWindowFocus: !0
93
93
  });
@@ -124,8 +124,8 @@ function d(e, t = !1) {
124
124
  };
125
125
  }
126
126
  },
127
- staleTime: 60 * 1e3,
128
- gcTime: 300 * 1e3,
127
+ staleTime: 6e4,
128
+ gcTime: 3e5,
129
129
  retry: 0,
130
130
  refetchOnWindowFocus: !0
131
131
  });
@@ -154,10 +154,9 @@ function f(e) {
154
154
  }
155
155
  };
156
156
  },
157
- staleTime: 300 * 1e3,
158
- gcTime: 600 * 1e3,
157
+ staleTime: 3e5,
158
+ gcTime: 6e5,
159
159
  retry: 1
160
160
  });
161
161
  }
162
- //#endregion
163
162
  export { f as useGlobalDashboardData, c as useProjectsDashboardData, d as useVibecontrolsDashboardData, l as useWorkspaceDashboardData };
@@ -1,15 +1,15 @@
1
- import { UpdateDashboardPreferencesDocument as e } from "../../../generated/global-operations.js";
2
- import { captureRequestActor as t, pinnedFetch as n } from "../../../utils/pinnedRequest.js";
1
+ import { captureRequestActor as e, pinnedFetch as t } from "../../../utils/pinnedRequest.js";
2
+ import { UpdateDashboardPreferencesDocument as n } from "../../../generated/global-operations.js";
3
3
  import { useMutation as r, useQueryClient as i } from "@tanstack/react-query";
4
4
  import { print as a } from "graphql";
5
- //#region src/pages/dashboard/hooks/useDashboardPreferences.ts
5
+ // src/pages/dashboard/hooks/useDashboardPreferences.ts
6
6
  function o(o) {
7
7
  let s = i();
8
8
  return r({
9
9
  mutationFn: async (r) => {
10
- let i = await n(t({ authToken: o }), {
10
+ let i = e({ authToken: o }), s = await t(i, {
11
11
  gateway: "global",
12
- query: a(e),
12
+ query: a(n),
13
13
  variables: { input: { widgets: r.map((e) => ({
14
14
  widgetId: e.widgetId,
15
15
  enabled: e.enabled,
@@ -17,13 +17,12 @@ function o(o) {
17
17
  size: e.size
18
18
  })) } }
19
19
  });
20
- if (i.errors?.length) throw Error(i.errors[0]?.message || "Failed to save preferences");
21
- return i.data.updateMyDashboardPreferences;
20
+ if (s.errors?.length) throw Error(s.errors[0]?.message || "Failed to save preferences");
21
+ return s.data.updateMyDashboardPreferences;
22
22
  },
23
23
  onSuccess: () => {
24
24
  s.invalidateQueries({ queryKey: ["dashboard", "global"] });
25
25
  }
26
26
  });
27
27
  }
28
- //#endregion
29
28
  export { o as useUpdateDashboardPreferences };
@@ -1,24 +1,21 @@
1
- //#region src/pages/dashboard/reorder.ts
2
- var e = 10;
3
- function t(t) {
4
- return t.map((t, n) => ({
5
- ...t,
6
- order: (n + 1) * e
1
+ function e(e) {
2
+ return e.map((e, t) => ({
3
+ ...e,
4
+ order: (t + 1) * 10
7
5
  }));
8
6
  }
9
- function n(e, n, r, i) {
10
- if (n === r) return e;
11
- let a = [...e].sort((e, t) => e.order - t.order), o = a.findIndex((e) => e.widgetId === n), s = a.findIndex((e) => e.widgetId === r);
12
- if (o < 0 || s < 0) return e;
7
+ function t(t, n, r, i) {
8
+ if (n === r) return t;
9
+ let a = [...t].sort((e, t) => e.order - t.order), o = a.findIndex((e) => e.widgetId === n), s = a.findIndex((e) => e.widgetId === r);
10
+ if (o < 0 || s < 0) return t;
13
11
  let c = a[o], l = a.filter((e, t) => t !== o), u = i === "above" ? l.findIndex((e) => e.widgetId === r) : l.findIndex((e) => e.widgetId === r) + 1;
14
- return t([
12
+ return e([
15
13
  ...l.slice(0, u),
16
14
  c,
17
15
  ...l.slice(u)
18
16
  ]);
19
17
  }
20
- function r(e, t) {
18
+ function n(e, t) {
21
19
  return e < t.top + t.height / 2 ? "above" : "below";
22
20
  }
23
- //#endregion
24
- export { r as dropPositionFromPointer, n as reorderByDropIndex };
21
+ export { n as dropPositionFromPointer, e as renumberOrders, t as reorderByDropIndex };