@checkstack/maintenance-frontend 0.3.6 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @checkstack/maintenance-frontend
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8a87cd4]
8
+ - Updated dependencies [8a87cd4]
9
+ - Updated dependencies [8a87cd4]
10
+ - @checkstack/catalog-common@1.2.3
11
+ - @checkstack/common@0.5.0
12
+ - @checkstack/maintenance-common@0.4.1
13
+ - @checkstack/auth-frontend@0.5.2
14
+ - @checkstack/dashboard-frontend@0.3.7
15
+ - @checkstack/frontend-api@0.3.2
16
+ - @checkstack/ui@0.3.1
17
+ - @checkstack/signal-frontend@0.0.9
18
+
19
+ ## 0.4.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 18fa8e3: Add notification suppression toggle for maintenance windows
24
+
25
+ **New Feature:** When creating or editing a maintenance window, you can now enable "Suppress health notifications" to prevent health status change notifications from being sent for affected systems while the maintenance is active (in_progress status). This is useful for planned downtime where health alerts are expected and would otherwise create noise.
26
+
27
+ **Changes:**
28
+
29
+ - Added `suppressNotifications` field to maintenance schema
30
+ - Added new service-to-service API `hasActiveMaintenanceWithSuppression`
31
+ - Healthcheck queue executor now checks for suppression before sending notifications
32
+ - MaintenanceEditor UI includes new toggle checkbox
33
+
34
+ **Bug Fix:** Fixed migration system to correctly set PostgreSQL search_path when running plugin migrations. Previously, migrations could fail with "relation does not exist" errors because the schema context wasn't properly set.
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [18fa8e3]
39
+ - @checkstack/maintenance-common@0.4.0
40
+ - @checkstack/dashboard-frontend@0.3.6
41
+
3
42
  ## 0.3.6
4
43
 
5
44
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/maintenance-frontend",
3
- "version": "0.3.6",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "scripts": {
@@ -51,8 +51,9 @@ export const MaintenanceEditor: React.FC<Props> = ({
51
51
  const [startAt, setStartAt] = useState<Date>(new Date());
52
52
  const [endAt, setEndAt] = useState<Date>(new Date());
53
53
  const [selectedSystemIds, setSelectedSystemIds] = useState<Set<string>>(
54
- new Set()
54
+ new Set(),
55
55
  );
56
+ const [suppressNotifications, setSuppressNotifications] = useState(false);
56
57
 
57
58
  // Status update fields
58
59
  const [updates, setUpdates] = useState<MaintenanceUpdate[]>([]);
@@ -62,7 +63,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
62
63
  const { data: maintenanceDetail, refetch: refetchDetail } =
63
64
  maintenanceClient.getMaintenance.useQuery(
64
65
  { id: maintenance?.id ?? "" },
65
- { enabled: !!maintenance?.id && open }
66
+ { enabled: !!maintenance?.id && open },
66
67
  );
67
68
 
68
69
  // Mutations
@@ -101,6 +102,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
101
102
  setStartAt(new Date(maintenance.startAt));
102
103
  setEndAt(new Date(maintenance.endAt));
103
104
  setSelectedSystemIds(new Set(maintenance.systemIds));
105
+ setSuppressNotifications(maintenance.suppressNotifications);
104
106
  } else {
105
107
  // Default to 1 hour from now to 2 hours from now
106
108
  const now = new Date();
@@ -111,6 +113,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
111
113
  setStartAt(start);
112
114
  setEndAt(end);
113
115
  setSelectedSystemIds(new Set());
116
+ setSuppressNotifications(false);
114
117
  setUpdates([]);
115
118
  setShowUpdateForm(false);
116
119
  }
@@ -147,6 +150,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
147
150
  id: maintenance.id,
148
151
  title,
149
152
  description: description || undefined,
153
+ suppressNotifications,
150
154
  startAt,
151
155
  endAt,
152
156
  systemIds: [...selectedSystemIds],
@@ -155,6 +159,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
155
159
  createMutation.mutate({
156
160
  title,
157
161
  description,
162
+ suppressNotifications,
158
163
  startAt,
159
164
  endAt,
160
165
  systemIds: [...selectedSystemIds],
@@ -259,6 +264,31 @@ export const MaintenanceEditor: React.FC<Props> = ({
259
264
  {selectedSystemIds.size} system(s) selected
260
265
  </p>
261
266
  </div>
267
+
268
+ {/* Notification Suppression Toggle */}
269
+ <div className="border rounded-md p-4 bg-muted/30">
270
+ <div
271
+ className="flex items-center gap-3 cursor-pointer"
272
+ onClick={() => setSuppressNotifications(!suppressNotifications)}
273
+ >
274
+ <Checkbox
275
+ id="suppress-notifications"
276
+ checked={suppressNotifications}
277
+ />
278
+ <div className="flex-1">
279
+ <Label
280
+ htmlFor="suppress-notifications"
281
+ className="cursor-pointer font-medium"
282
+ >
283
+ Suppress health notifications
284
+ </Label>
285
+ <p className="text-xs text-muted-foreground mt-1">
286
+ When enabled, health status change notifications will not be
287
+ sent for affected systems while this maintenance is active.
288
+ </p>
289
+ </div>
290
+ </div>
291
+ </div>
262
292
  </div>
263
293
 
264
294
  {/* Status Updates Section - Only show when editing */}