@checkstack/incident-frontend 0.4.15 → 0.4.17

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,54 @@
1
1
  # @checkstack/incident-frontend
2
2
 
3
+ ## 0.4.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [26d8bae]
8
+ - @checkstack/ui@1.3.0
9
+ - @checkstack/auth-frontend@0.5.19
10
+ - @checkstack/dashboard-frontend@0.3.27
11
+
12
+ ## 0.4.16
13
+
14
+ ### Patch Changes
15
+
16
+ - d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
17
+
18
+ **New utility**
19
+
20
+ - `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
21
+
22
+ **ESLint rules**
23
+
24
+ - `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
25
+ - `no-console` in frontend packages — forces `toast` over silent `console.error`
26
+ - `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
27
+ - Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
28
+
29
+ **Refactoring**
30
+
31
+ - Replace 141 `instanceof Error` boilerplate patterns across the codebase
32
+ - Replace swallowed `console.error` with user-visible `toast.error()` feedback
33
+ - Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
34
+ - Consolidate 3 identical callback handlers into `handleDialogClose`
35
+ - Fix conditional React hook call in `FormField.tsx`
36
+ - Fix unstable useMemo deps in `Dashboard.tsx`
37
+ - Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
38
+ - Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
39
+ - Delete obvious comments in `encryption.ts` and Teams `provider.ts`
40
+
41
+ - Updated dependencies [d1a2796]
42
+ - Updated dependencies [3c34b07]
43
+ - @checkstack/common@0.6.5
44
+ - @checkstack/ui@1.2.1
45
+ - @checkstack/auth-frontend@0.5.18
46
+ - @checkstack/dashboard-frontend@0.3.26
47
+ - @checkstack/frontend-api@0.3.9
48
+ - @checkstack/catalog-common@1.3.1
49
+ - @checkstack/incident-common@0.4.7
50
+ - @checkstack/signal-frontend@0.0.15
51
+
3
52
  ## 0.4.15
4
53
 
5
54
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/incident-frontend",
3
- "version": "0.4.15",
3
+ "version": "0.4.17",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "checkstack": {
@@ -12,14 +12,14 @@
12
12
  "lint:code": "eslint . --max-warnings 0"
13
13
  },
14
14
  "dependencies": {
15
- "@checkstack/auth-frontend": "0.5.17",
16
- "@checkstack/catalog-common": "1.2.11",
17
- "@checkstack/common": "0.6.4",
18
- "@checkstack/dashboard-frontend": "0.3.23",
19
- "@checkstack/frontend-api": "0.3.8",
20
- "@checkstack/incident-common": "0.4.6",
21
- "@checkstack/signal-frontend": "0.0.14",
22
- "@checkstack/ui": "1.2.0",
15
+ "@checkstack/auth-frontend": "0.5.18",
16
+ "@checkstack/catalog-common": "1.3.1",
17
+ "@checkstack/common": "0.6.5",
18
+ "@checkstack/dashboard-frontend": "0.3.26",
19
+ "@checkstack/frontend-api": "0.3.9",
20
+ "@checkstack/incident-common": "0.4.7",
21
+ "@checkstack/signal-frontend": "0.0.15",
22
+ "@checkstack/ui": "1.2.1",
23
23
  "date-fns": "^4.1.0",
24
24
  "lucide-react": "^0.344.0",
25
25
  "react": "^18.2.0",
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "typescript": "^5.0.0",
30
30
  "@types/react": "^18.2.0",
31
- "@checkstack/tsconfig": "0.0.4",
31
+ "@checkstack/tsconfig": "0.0.5",
32
32
  "@checkstack/scripts": "0.1.2"
33
33
  }
34
34
  }
@@ -31,6 +31,7 @@ import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
31
31
  import { IncidentUpdateForm } from "./IncidentUpdateForm";
32
32
  import { getIncidentStatusBadge } from "../utils/badges";
33
33
  import { TeamAccessEditor } from "@checkstack/auth-frontend";
34
+ import { extractErrorMessage } from "@checkstack/common";
34
35
 
35
36
  interface Props {
36
37
  open: boolean;
@@ -71,7 +72,7 @@ export const IncidentEditor: React.FC<Props> = ({
71
72
  onSave();
72
73
  },
73
74
  onError: (error) => {
74
- toast.error(error instanceof Error ? error.message : "Failed to save");
75
+ toast.error(extractErrorMessage(error, "Failed to save"));
75
76
  },
76
77
  });
77
78
 
@@ -81,7 +82,7 @@ export const IncidentEditor: React.FC<Props> = ({
81
82
  onSave();
82
83
  },
83
84
  onError: (error) => {
84
- toast.error(error instanceof Error ? error.message : "Failed to save");
85
+ toast.error(extractErrorMessage(error, "Failed to save"));
85
86
  },
86
87
  });
87
88
 
@@ -14,6 +14,7 @@ import {
14
14
  useToast,
15
15
  } from "@checkstack/ui";
16
16
  import { Loader2 } from "lucide-react";
17
+ import { extractErrorMessage } from "@checkstack/common";
17
18
 
18
19
  interface IncidentUpdateFormProps {
19
20
  incidentId: string;
@@ -45,7 +46,7 @@ export const IncidentUpdateForm: React.FC<IncidentUpdateFormProps> = ({
45
46
  },
46
47
  onError: (error) => {
47
48
  toast.error(
48
- error instanceof Error ? error.message : "Failed to post update"
49
+ extractErrorMessage(error, "Failed to post update")
49
50
  );
50
51
  },
51
52
  });
@@ -47,6 +47,7 @@ import {
47
47
  } from "lucide-react";
48
48
  import { formatDistanceToNow } from "date-fns";
49
49
  import { IncidentEditor } from "../components/IncidentEditor";
50
+ import { extractErrorMessage } from "@checkstack/common";
50
51
 
51
52
  const IncidentConfigPageContent: React.FC = () => {
52
53
  const incidentClient = usePluginClient(IncidentApi);
@@ -114,7 +115,7 @@ const IncidentConfigPageContent: React.FC = () => {
114
115
  setDeleteId(undefined);
115
116
  },
116
117
  onError: (error) => {
117
- toast.error(error instanceof Error ? error.message : "Failed to delete");
118
+ toast.error(extractErrorMessage(error, "Failed to delete"));
118
119
  },
119
120
  });
120
121
 
@@ -125,7 +126,7 @@ const IncidentConfigPageContent: React.FC = () => {
125
126
  setResolveId(undefined);
126
127
  },
127
128
  onError: (error) => {
128
- toast.error(error instanceof Error ? error.message : "Failed to resolve");
129
+ toast.error(extractErrorMessage(error, "Failed to resolve"));
129
130
  },
130
131
  });
131
132
 
@@ -7,7 +7,7 @@ import {
7
7
  wrapInSuspense,
8
8
  } from "@checkstack/frontend-api";
9
9
  import { useSignal } from "@checkstack/signal-frontend";
10
- import { resolveRoute } from "@checkstack/common";
10
+ import { resolveRoute, extractErrorMessage} from "@checkstack/common";
11
11
  import { IncidentApi } from "../api";
12
12
  import {
13
13
  incidentRoutes,
@@ -91,7 +91,7 @@ const IncidentDetailPageContent: React.FC = () => {
91
91
  void refetchIncident();
92
92
  },
93
93
  onError: (error) => {
94
- toast.error(error instanceof Error ? error.message : "Failed to resolve");
94
+ toast.error(extractErrorMessage(error, "Failed to resolve"));
95
95
  },
96
96
  });
97
97