@checkstack/incident-frontend 0.8.4 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # @checkstack/incident-frontend
2
2
 
3
+ ## 0.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ba07ae2]
8
+ - @checkstack/incident-common@1.3.0
9
+ - @checkstack/dashboard-frontend@0.7.6
10
+
11
+ ## 0.8.5
12
+
13
+ ### Patch Changes
14
+
15
+ - f23f3c9: Gate decorative motion and blur effects behind
16
+ `usePerformance().isLowPower` on a focused set of high-traffic plugin
17
+ pages (Dashboard, Dependency map, System node, Notification bell,
18
+ Announcement banner / cards, Anomaly field overrides editor, SLO
19
+ attribution chart, Catalog droppable group). Hover scales, backdrop
20
+ blurs, `animate-pulse`/`animate-ping` accents, and entry transitions
21
+ now drop to static states on low-power devices; functional UX
22
+ transitions (Drawer/Dialog open-close, colour transitions) are left
23
+ alone.
24
+
25
+ Standardise the post-mutation error-toast voice on plugin pages by
26
+ migrating multi-clause `toast.error(extractErrorMessage(error, "Failed
27
+ to X"))` call sites onto the `toastError(toast, "Failed to X", error)`
28
+ helper from `@checkstack/ui`. The helper applies the canonical
29
+ `"action: message"` prefix and 100-character truncation in one place,
30
+ and the now-orphaned `extractErrorMessage` imports are dropped from
31
+ the affected files. No business logic or component APIs changed.
32
+
33
+ - f23f3c9: Standardise the empty / loading / error story on key list pages using
34
+ the shared `ListEmptyState`, `QueryErrorState`, and `Skeleton`
35
+ primitives from `@checkstack/ui`. Each affected page now branches
36
+ through the same `isLoading -> isError -> empty -> data` ladder, so
37
+ failed queries surface a retry-able inline error instead of silently
38
+ rendering an empty table, and loading states match the final layout
39
+ rather than flashing a generic spinner. No layout, business logic, or
40
+ query input shapes changed.
41
+ - Updated dependencies [f23f3c9]
42
+ - Updated dependencies [f23f3c9]
43
+ - Updated dependencies [f23f3c9]
44
+ - Updated dependencies [f23f3c9]
45
+ - Updated dependencies [f23f3c9]
46
+ - Updated dependencies [f23f3c9]
47
+ - Updated dependencies [f23f3c9]
48
+ - Updated dependencies [f23f3c9]
49
+ - @checkstack/common@0.11.0
50
+ - @checkstack/auth-frontend@0.6.5
51
+ - @checkstack/notification-common@1.2.0
52
+ - @checkstack/notification-frontend@0.4.5
53
+ - @checkstack/frontend-api@0.5.2
54
+ - @checkstack/dashboard-frontend@0.7.5
55
+ - @checkstack/ui@1.10.0
56
+ - @checkstack/catalog-common@2.2.2
57
+ - @checkstack/incident-common@1.2.2
58
+ - @checkstack/tips-frontend@0.2.5
59
+ - @checkstack/signal-frontend@0.1.4
60
+
3
61
  ## 0.8.4
4
62
 
5
63
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/incident-frontend",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
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.3",
17
- "@checkstack/catalog-common": "2.2.0",
18
- "@checkstack/common": "0.10.0",
19
- "@checkstack/dashboard-frontend": "0.7.3",
20
- "@checkstack/frontend-api": "0.5.1",
21
- "@checkstack/incident-common": "1.2.0",
22
- "@checkstack/notification-common": "1.1.0",
23
- "@checkstack/notification-frontend": "0.4.3",
24
- "@checkstack/signal-frontend": "0.1.3",
25
- "@checkstack/tips-frontend": "0.2.3",
26
- "@checkstack/ui": "1.8.3",
16
+ "@checkstack/auth-frontend": "0.6.5",
17
+ "@checkstack/catalog-common": "2.2.2",
18
+ "@checkstack/common": "0.11.0",
19
+ "@checkstack/dashboard-frontend": "0.7.5",
20
+ "@checkstack/frontend-api": "0.5.2",
21
+ "@checkstack/incident-common": "1.2.2",
22
+ "@checkstack/notification-common": "1.2.0",
23
+ "@checkstack/notification-frontend": "0.4.5",
24
+ "@checkstack/signal-frontend": "0.1.4",
25
+ "@checkstack/tips-frontend": "0.2.5",
26
+ "@checkstack/ui": "1.10.0",
27
27
  "date-fns": "^4.1.0",
28
28
  "lucide-react": "^0.344.0",
29
29
  "react": "^18.2.0",
@@ -33,6 +33,6 @@
33
33
  "typescript": "^5.0.0",
34
34
  "@types/react": "^18.2.0",
35
35
  "@checkstack/tsconfig": "0.0.7",
36
- "@checkstack/scripts": "0.3.2"
36
+ "@checkstack/scripts": "0.3.3"
37
37
  }
38
38
  }
@@ -27,12 +27,12 @@ import {
27
27
  SelectItem,
28
28
  StatusUpdateTimeline,
29
29
  LinksEditor,
30
+ toastError,
30
31
  } from "@checkstack/ui";
31
32
  import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
32
33
  import { IncidentUpdateForm } from "./IncidentUpdateForm";
33
34
  import { getIncidentStatusBadge } from "../utils/badges";
34
35
  import { TeamAccessEditor } from "@checkstack/auth-frontend";
35
- import { extractErrorMessage } from "@checkstack/common";
36
36
 
37
37
  interface Props {
38
38
  open: boolean;
@@ -73,7 +73,7 @@ export const IncidentEditor: React.FC<Props> = ({
73
73
  onSave();
74
74
  },
75
75
  onError: (error) => {
76
- toast.error(extractErrorMessage(error, "Failed to save"));
76
+ toastError(toast, "Failed to create incident", error);
77
77
  },
78
78
  });
79
79
 
@@ -83,7 +83,7 @@ export const IncidentEditor: React.FC<Props> = ({
83
83
  onSave();
84
84
  },
85
85
  onError: (error) => {
86
- toast.error(extractErrorMessage(error, "Failed to save"));
86
+ toastError(toast, "Failed to update incident", error);
87
87
  },
88
88
  });
89
89
 
@@ -92,7 +92,7 @@ export const IncidentEditor: React.FC<Props> = ({
92
92
  void refetchDetail();
93
93
  },
94
94
  onError: (error) => {
95
- toast.error(extractErrorMessage(error, "Failed to add link"));
95
+ toastError(toast, "Failed to add link", error);
96
96
  },
97
97
  });
98
98
 
@@ -101,7 +101,7 @@ export const IncidentEditor: React.FC<Props> = ({
101
101
  void refetchDetail();
102
102
  },
103
103
  onError: (error) => {
104
- toast.error(extractErrorMessage(error, "Failed to remove link"));
104
+ toastError(toast, "Failed to remove link", error);
105
105
  },
106
106
  });
107
107
 
@@ -27,6 +27,7 @@ import {
27
27
  Badge,
28
28
  LoadingSpinner,
29
29
  EmptyState,
30
+ QueryErrorState,
30
31
  Table,
31
32
  TableHeader,
32
33
  TableRow,
@@ -83,15 +84,16 @@ const IncidentConfigPageContent: React.FC = () => {
83
84
  const [resolveId, setResolveId] = useState<string | undefined>();
84
85
 
85
86
  // Fetch incidents with useQuery
86
- const {
87
- data: incidentsData,
88
- isLoading: incidentsLoading,
89
- refetch: refetchIncidents,
90
- } = incidentClient.listIncidents.useQuery(
87
+ const incidentsQuery = incidentClient.listIncidents.useQuery(
91
88
  statusFilter === "all"
92
89
  ? { includeResolved: showResolved }
93
90
  : { status: statusFilter, includeResolved: showResolved },
94
91
  );
92
+ const {
93
+ data: incidentsData,
94
+ isLoading: incidentsLoading,
95
+ refetch: refetchIncidents,
96
+ } = incidentsQuery;
95
97
 
96
98
  // Fetch systems with useQuery
97
99
  const { data: systemsData, isLoading: systemsLoading } =
@@ -273,6 +275,14 @@ const IncidentConfigPageContent: React.FC = () => {
273
275
  <div className="p-12 flex justify-center">
274
276
  <LoadingSpinner />
275
277
  </div>
278
+ ) : incidentsQuery.isError ? (
279
+ <div className="p-4">
280
+ <QueryErrorState
281
+ error={incidentsQuery.error}
282
+ onRetry={() => void incidentsQuery.refetch()}
283
+ resource="incidents"
284
+ />
285
+ </div>
276
286
  ) : incidents.length === 0 ? (
277
287
  <EmptyState
278
288
  icon={<AlertTriangle className="size-10" />}