@checkstack/maintenance-frontend 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @checkstack/maintenance-frontend
2
2
 
3
+ ## 0.7.5
4
+
5
+ ### Patch Changes
6
+
7
+ - f23f3c9: Gate decorative motion and blur effects behind
8
+ `usePerformance().isLowPower` on a focused set of high-traffic plugin
9
+ pages (Dashboard, Dependency map, System node, Notification bell,
10
+ Announcement banner / cards, Anomaly field overrides editor, SLO
11
+ attribution chart, Catalog droppable group). Hover scales, backdrop
12
+ blurs, `animate-pulse`/`animate-ping` accents, and entry transitions
13
+ now drop to static states on low-power devices; functional UX
14
+ transitions (Drawer/Dialog open-close, colour transitions) are left
15
+ alone.
16
+
17
+ Standardise the post-mutation error-toast voice on plugin pages by
18
+ migrating multi-clause `toast.error(extractErrorMessage(error, "Failed
19
+ to X"))` call sites onto the `toastError(toast, "Failed to X", error)`
20
+ helper from `@checkstack/ui`. The helper applies the canonical
21
+ `"action: message"` prefix and 100-character truncation in one place,
22
+ and the now-orphaned `extractErrorMessage` imports are dropped from
23
+ the affected files. No business logic or component APIs changed.
24
+
25
+ - f23f3c9: Standardise the empty / loading / error story on key list pages using
26
+ the shared `ListEmptyState`, `QueryErrorState`, and `Skeleton`
27
+ primitives from `@checkstack/ui`. Each affected page now branches
28
+ through the same `isLoading -> isError -> empty -> data` ladder, so
29
+ failed queries surface a retry-able inline error instead of silently
30
+ rendering an empty table, and loading states match the final layout
31
+ rather than flashing a generic spinner. No layout, business logic, or
32
+ query input shapes changed.
33
+ - Updated dependencies [f23f3c9]
34
+ - Updated dependencies [f23f3c9]
35
+ - Updated dependencies [f23f3c9]
36
+ - Updated dependencies [f23f3c9]
37
+ - Updated dependencies [f23f3c9]
38
+ - Updated dependencies [f23f3c9]
39
+ - Updated dependencies [f23f3c9]
40
+ - Updated dependencies [f23f3c9]
41
+ - @checkstack/common@0.11.0
42
+ - @checkstack/auth-frontend@0.6.5
43
+ - @checkstack/notification-common@1.2.0
44
+ - @checkstack/notification-frontend@0.4.5
45
+ - @checkstack/frontend-api@0.5.2
46
+ - @checkstack/dashboard-frontend@0.7.5
47
+ - @checkstack/ui@1.10.0
48
+ - @checkstack/catalog-common@2.2.2
49
+ - @checkstack/maintenance-common@1.2.2
50
+ - @checkstack/tips-frontend@0.2.5
51
+ - @checkstack/signal-frontend@0.1.4
52
+
53
+ ## 0.7.4
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [a06b899]
58
+ - Updated dependencies [a06b899]
59
+ - @checkstack/notification-common@1.1.1
60
+ - @checkstack/ui@1.9.0
61
+ - @checkstack/catalog-common@2.2.1
62
+ - @checkstack/dashboard-frontend@0.7.4
63
+ - @checkstack/maintenance-common@1.2.1
64
+ - @checkstack/notification-frontend@0.4.4
65
+ - @checkstack/auth-frontend@0.6.4
66
+ - @checkstack/tips-frontend@0.2.4
67
+
3
68
  ## 0.7.3
4
69
 
5
70
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/maintenance-frontend",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.tsx",
@@ -13,17 +13,17 @@
13
13
  "lint:code": "eslint . --max-warnings 0"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/auth-frontend": "0.6.2",
17
- "@checkstack/catalog-common": "2.2.0",
16
+ "@checkstack/auth-frontend": "0.6.4",
17
+ "@checkstack/catalog-common": "2.2.1",
18
18
  "@checkstack/common": "0.10.0",
19
- "@checkstack/dashboard-frontend": "0.7.2",
19
+ "@checkstack/dashboard-frontend": "0.7.4",
20
20
  "@checkstack/frontend-api": "0.5.1",
21
- "@checkstack/maintenance-common": "1.2.0",
22
- "@checkstack/notification-common": "1.1.0",
23
- "@checkstack/notification-frontend": "0.4.2",
21
+ "@checkstack/maintenance-common": "1.2.1",
22
+ "@checkstack/notification-common": "1.1.1",
23
+ "@checkstack/notification-frontend": "0.4.4",
24
24
  "@checkstack/signal-frontend": "0.1.3",
25
- "@checkstack/tips-frontend": "0.2.2",
26
- "@checkstack/ui": "1.8.2",
25
+ "@checkstack/tips-frontend": "0.2.4",
26
+ "@checkstack/ui": "1.9.0",
27
27
  "date-fns": "^4.1.0",
28
28
  "lucide-react": "^0.344.0",
29
29
  "react": "^18.2.0",
@@ -22,12 +22,12 @@ import {
22
22
  DateTimePicker,
23
23
  StatusUpdateTimeline,
24
24
  LinksEditor,
25
+ toastError,
25
26
  } from "@checkstack/ui";
26
27
  import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
27
28
  import { MaintenanceUpdateForm } from "./MaintenanceUpdateForm";
28
29
  import { getMaintenanceStatusBadge } from "../utils/badges";
29
30
  import { TeamAccessEditor } from "@checkstack/auth-frontend";
30
- import { extractErrorMessage } from "@checkstack/common";
31
31
 
32
32
  interface Props {
33
33
  open: boolean;
@@ -75,7 +75,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
75
75
  onSave();
76
76
  },
77
77
  onError: (error) => {
78
- toast.error(extractErrorMessage(error, "Failed to save"));
78
+ toastError(toast, "Failed to create maintenance", error);
79
79
  },
80
80
  });
81
81
 
@@ -85,7 +85,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
85
85
  onSave();
86
86
  },
87
87
  onError: (error) => {
88
- toast.error(extractErrorMessage(error, "Failed to save"));
88
+ toastError(toast, "Failed to update maintenance", error);
89
89
  },
90
90
  });
91
91
 
@@ -94,7 +94,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
94
94
  void refetchDetail();
95
95
  },
96
96
  onError: (error) => {
97
- toast.error(extractErrorMessage(error, "Failed to add link"));
97
+ toastError(toast, "Failed to add link", error);
98
98
  },
99
99
  });
100
100
 
@@ -103,7 +103,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
103
103
  void refetchDetail();
104
104
  },
105
105
  onError: (error) => {
106
- toast.error(extractErrorMessage(error, "Failed to remove link"));
106
+ toastError(toast, "Failed to remove link", error);
107
107
  },
108
108
  });
109
109
 
@@ -26,6 +26,7 @@ import {
26
26
  Button,
27
27
  LoadingSpinner,
28
28
  EmptyState,
29
+ QueryErrorState,
29
30
  Table,
30
31
  TableHeader,
31
32
  TableRow,
@@ -83,13 +84,14 @@ const MaintenanceConfigPageContent: React.FC = () => {
83
84
  const [completeId, setCompleteId] = useState<string | undefined>();
84
85
 
85
86
  // Fetch maintenances with useQuery
87
+ const maintenancesQuery = maintenanceClient.listMaintenances.useQuery(
88
+ statusFilter === "all" ? {} : { status: statusFilter },
89
+ );
86
90
  const {
87
91
  data: maintenancesData,
88
92
  isLoading: maintenancesLoading,
89
93
  refetch: refetchMaintenances,
90
- } = maintenanceClient.listMaintenances.useQuery(
91
- statusFilter === "all" ? {} : { status: statusFilter },
92
- );
94
+ } = maintenancesQuery;
93
95
 
94
96
  // Fetch systems with useQuery
95
97
  const { data: systemsData, isLoading: systemsLoading } =
@@ -227,6 +229,14 @@ const MaintenanceConfigPageContent: React.FC = () => {
227
229
  <div className="p-12 flex justify-center">
228
230
  <LoadingSpinner />
229
231
  </div>
232
+ ) : maintenancesQuery.isError ? (
233
+ <div className="p-4">
234
+ <QueryErrorState
235
+ error={maintenancesQuery.error}
236
+ onRetry={() => void maintenancesQuery.refetch()}
237
+ resource="maintenances"
238
+ />
239
+ </div>
230
240
  ) : maintenances.length === 0 ? (
231
241
  <EmptyState
232
242
  icon={<Wrench className="size-10" />}