@checkstack/maintenance-frontend 0.4.2 → 0.4.4

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.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 223081d: Add icon support to PageLayout and improve mobile responsiveness
8
+
9
+ **PageLayout Icons:**
10
+
11
+ - Added required `icon` prop to `PageLayout` and `PageHeader` components that accepts a Lucide icon component reference
12
+ - Icons are rendered with consistent `h-6 w-6 text-primary` styling
13
+ - Updated all page components to include appropriate icons in their headers
14
+
15
+ **Mobile Layout Improvements:**
16
+
17
+ - Standardized responsive padding in main app shell (`p-3` on mobile, `p-6` on desktop)
18
+ - Added `CardHeaderRow` component for mobile-safe card headers with proper wrapping
19
+ - Improved `DateRangeFilter` responsive behavior with vertical stacking on mobile
20
+ - Migrated pages to use `PageLayout` for consistent responsive behavior
21
+
22
+ - Updated dependencies [223081d]
23
+ - @checkstack/ui@0.5.0
24
+ - @checkstack/auth-frontend@0.5.5
25
+ - @checkstack/dashboard-frontend@0.3.10
26
+
27
+ ## 0.4.3
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [db1f56f]
32
+ - Updated dependencies [538e45d]
33
+ - @checkstack/common@0.6.0
34
+ - @checkstack/ui@0.4.1
35
+ - @checkstack/dashboard-frontend@0.3.9
36
+ - @checkstack/auth-frontend@0.5.4
37
+ - @checkstack/catalog-common@1.2.4
38
+ - @checkstack/frontend-api@0.3.3
39
+ - @checkstack/maintenance-common@0.4.2
40
+ - @checkstack/signal-frontend@0.0.10
41
+
3
42
  ## 0.4.2
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.4.2",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "scripts": {
@@ -57,11 +57,11 @@ const MaintenanceConfigPageContent: React.FC = () => {
57
57
  const toast = useToast();
58
58
 
59
59
  const { allowed: canManage, loading: accessLoading } = accessApi.useAccess(
60
- maintenanceAccess.maintenance.manage
60
+ maintenanceAccess.maintenance.manage,
61
61
  );
62
62
 
63
63
  const [statusFilter, setStatusFilter] = useState<MaintenanceStatus | "all">(
64
- "all"
64
+ "all",
65
65
  );
66
66
 
67
67
  // Editor state
@@ -82,7 +82,7 @@ const MaintenanceConfigPageContent: React.FC = () => {
82
82
  isLoading: maintenancesLoading,
83
83
  refetch: refetchMaintenances,
84
84
  } = maintenanceClient.listMaintenances.useQuery(
85
- statusFilter === "all" ? {} : { status: statusFilter }
85
+ statusFilter === "all" ? {} : { status: statusFilter },
86
86
  );
87
87
 
88
88
  // Fetch systems with useQuery
@@ -124,7 +124,7 @@ const MaintenanceConfigPageContent: React.FC = () => {
124
124
  },
125
125
  onError: (error) => {
126
126
  toast.error(
127
- error instanceof Error ? error.message : "Failed to complete"
127
+ error instanceof Error ? error.message : "Failed to complete",
128
128
  );
129
129
  },
130
130
  });
@@ -171,6 +171,7 @@ const MaintenanceConfigPageContent: React.FC = () => {
171
171
  <PageLayout
172
172
  title="Planned Maintenances"
173
173
  subtitle="Manage scheduled maintenance windows for systems"
174
+ icon={Wrench}
174
175
  loading={accessLoading}
175
176
  allowed={canManage}
176
177
  actions={
@@ -329,5 +330,5 @@ const MaintenanceConfigPageContent: React.FC = () => {
329
330
  };
330
331
 
331
332
  export const MaintenanceConfigPage = wrapInSuspense(
332
- MaintenanceConfigPageContent
333
+ MaintenanceConfigPageContent,
333
334
  );
@@ -21,6 +21,7 @@ import { catalogRoutes, CatalogApi } from "@checkstack/catalog-common";
21
21
  import {
22
22
  Card,
23
23
  CardHeader,
24
+ CardHeaderRow,
24
25
  CardTitle,
25
26
  CardContent,
26
27
  Badge,
@@ -55,7 +56,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
55
56
  const toast = useToast();
56
57
 
57
58
  const { allowed: canManage } = accessApi.useAccess(
58
- maintenanceAccess.maintenance.manage
59
+ maintenanceAccess.maintenance.manage,
59
60
  );
60
61
 
61
62
  const [showUpdateForm, setShowUpdateForm] = useState(false);
@@ -67,7 +68,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
67
68
  refetch: refetchMaintenance,
68
69
  } = maintenanceClient.getMaintenance.useQuery(
69
70
  { id: maintenanceId ?? "" },
70
- { enabled: !!maintenanceId }
71
+ { enabled: !!maintenanceId },
71
72
  );
72
73
 
73
74
  // Fetch systems with useQuery
@@ -85,7 +86,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
85
86
  },
86
87
  onError: (error) => {
87
88
  toast.error(
88
- error instanceof Error ? error.message : "Failed to complete"
89
+ error instanceof Error ? error.message : "Failed to complete",
89
90
  );
90
91
  },
91
92
  });
@@ -141,6 +142,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
141
142
  <PageLayout
142
143
  title={maintenance.title}
143
144
  subtitle="Maintenance details and status history"
145
+ icon={Wrench}
144
146
  loading={false}
145
147
  allowed={true}
146
148
  actions={
@@ -150,7 +152,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
150
152
  navigate(
151
153
  resolveRoute(maintenanceRoutes.routes.systemHistory, {
152
154
  systemId: sourceSystemId,
153
- })
155
+ }),
154
156
  )
155
157
  }
156
158
  >
@@ -163,12 +165,12 @@ const MaintenanceDetailPageContent: React.FC = () => {
163
165
  {/* Maintenance Info Card */}
164
166
  <Card>
165
167
  <CardHeader className="border-b border-border">
166
- <div className="flex items-center justify-between">
168
+ <CardHeaderRow>
167
169
  <div className="flex items-center gap-2">
168
170
  <Wrench className="h-5 w-5 text-muted-foreground" />
169
171
  <CardTitle>Maintenance Details</CardTitle>
170
172
  </div>
171
- <div className="flex items-center gap-2">
173
+ <div className="flex flex-wrap items-center gap-2">
172
174
  {getMaintenanceStatusBadge(maintenance.status)}
173
175
  {canComplete && (
174
176
  <Button
@@ -182,7 +184,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
182
184
  </Button>
183
185
  )}
184
186
  </div>
185
- </div>
187
+ </CardHeaderRow>
186
188
  </CardHeader>
187
189
  <CardContent className="p-6 space-y-4">
188
190
  {maintenance.description && (
@@ -244,7 +246,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
244
246
  {/* Status Updates Timeline */}
245
247
  <Card>
246
248
  <CardHeader className="border-b border-border">
247
- <div className="flex items-center justify-between">
249
+ <CardHeaderRow>
248
250
  <div className="flex items-center gap-2">
249
251
  <MessageSquare className="h-5 w-5 text-muted-foreground" />
250
252
  <CardTitle>Status Updates</CardTitle>
@@ -259,7 +261,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
259
261
  Add Update
260
262
  </Button>
261
263
  )}
262
- </div>
264
+ </CardHeaderRow>
263
265
  </CardHeader>
264
266
  <CardContent className="p-6">
265
267
  {/* Add Update Form */}
@@ -287,5 +289,5 @@ const MaintenanceDetailPageContent: React.FC = () => {
287
289
  };
288
290
 
289
291
  export const MaintenanceDetailPage = wrapInSuspense(
290
- MaintenanceDetailPageContent
292
+ MaintenanceDetailPageContent,
291
293
  );
@@ -36,7 +36,7 @@ const SystemMaintenanceHistoryPageContent: React.FC = () => {
36
36
  const { data: maintenancesData, isLoading: maintenancesLoading } =
37
37
  maintenanceClient.listMaintenances.useQuery(
38
38
  { systemId },
39
- { enabled: !!systemId }
39
+ { enabled: !!systemId },
40
40
  );
41
41
 
42
42
  // Fetch systems with useQuery
@@ -82,13 +82,14 @@ const SystemMaintenanceHistoryPageContent: React.FC = () => {
82
82
  <PageLayout
83
83
  title={`Maintenance History: ${systemName}`}
84
84
  subtitle="All past and scheduled maintenances for this system"
85
+ icon={History}
85
86
  loading={loading}
86
87
  allowed={true}
87
88
  actions={
88
89
  <BackLink
89
90
  onClick={() =>
90
91
  navigate(
91
- resolveRoute(catalogRoutes.routes.systemDetail, { systemId })
92
+ resolveRoute(catalogRoutes.routes.systemDetail, { systemId }),
92
93
  )
93
94
  }
94
95
  >
@@ -132,7 +133,7 @@ const SystemMaintenanceHistoryPageContent: React.FC = () => {
132
133
  navigate(
133
134
  `${resolveRoute(maintenanceRoutes.routes.detail, {
134
135
  maintenanceId: m.id,
135
- })}?from=${systemId}`
136
+ })}?from=${systemId}`,
136
137
  )
137
138
  }
138
139
  >
@@ -173,5 +174,5 @@ const SystemMaintenanceHistoryPageContent: React.FC = () => {
173
174
  };
174
175
 
175
176
  export const SystemMaintenanceHistoryPage = wrapInSuspense(
176
- SystemMaintenanceHistoryPageContent
177
+ SystemMaintenanceHistoryPageContent,
177
178
  );