@checkstack/incident-frontend 0.4.15 → 0.4.16
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,45 @@
|
|
|
1
1
|
# @checkstack/incident-frontend
|
|
2
2
|
|
|
3
|
+
## 0.4.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
|
|
8
|
+
|
|
9
|
+
**New utility**
|
|
10
|
+
|
|
11
|
+
- `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
|
|
12
|
+
|
|
13
|
+
**ESLint rules**
|
|
14
|
+
|
|
15
|
+
- `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
|
|
16
|
+
- `no-console` in frontend packages — forces `toast` over silent `console.error`
|
|
17
|
+
- `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
|
|
18
|
+
- Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
|
|
19
|
+
|
|
20
|
+
**Refactoring**
|
|
21
|
+
|
|
22
|
+
- Replace 141 `instanceof Error` boilerplate patterns across the codebase
|
|
23
|
+
- Replace swallowed `console.error` with user-visible `toast.error()` feedback
|
|
24
|
+
- Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
|
|
25
|
+
- Consolidate 3 identical callback handlers into `handleDialogClose`
|
|
26
|
+
- Fix conditional React hook call in `FormField.tsx`
|
|
27
|
+
- Fix unstable useMemo deps in `Dashboard.tsx`
|
|
28
|
+
- Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
|
|
29
|
+
- Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
|
|
30
|
+
- Delete obvious comments in `encryption.ts` and Teams `provider.ts`
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [d1a2796]
|
|
33
|
+
- Updated dependencies [3c34b07]
|
|
34
|
+
- @checkstack/common@0.6.5
|
|
35
|
+
- @checkstack/ui@1.2.1
|
|
36
|
+
- @checkstack/auth-frontend@0.5.18
|
|
37
|
+
- @checkstack/dashboard-frontend@0.3.26
|
|
38
|
+
- @checkstack/frontend-api@0.3.9
|
|
39
|
+
- @checkstack/catalog-common@1.3.1
|
|
40
|
+
- @checkstack/incident-common@0.4.7
|
|
41
|
+
- @checkstack/signal-frontend@0.0.15
|
|
42
|
+
|
|
3
43
|
## 0.4.15
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/incident-frontend",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"checkstack": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@checkstack/auth-frontend": "0.5.17",
|
|
16
|
-
"@checkstack/catalog-common": "1.
|
|
16
|
+
"@checkstack/catalog-common": "1.3.0",
|
|
17
17
|
"@checkstack/common": "0.6.4",
|
|
18
|
-
"@checkstack/dashboard-frontend": "0.3.
|
|
18
|
+
"@checkstack/dashboard-frontend": "0.3.25",
|
|
19
19
|
"@checkstack/frontend-api": "0.3.8",
|
|
20
20
|
"@checkstack/incident-common": "0.4.6",
|
|
21
21
|
"@checkstack/signal-frontend": "0.0.14",
|
|
@@ -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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
94
|
+
toast.error(extractErrorMessage(error, "Failed to resolve"));
|
|
95
95
|
},
|
|
96
96
|
});
|
|
97
97
|
|