@checkstack/incident-frontend 0.0.3 → 0.1.0
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,102 @@
|
|
|
1
1
|
# @checkstack/incident-frontend
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8e43507: # Teams and Resource-Level Access Control
|
|
8
|
+
|
|
9
|
+
This release introduces a comprehensive Teams system for organizing users and controlling access to resources at a granular level.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
### Team Management
|
|
14
|
+
|
|
15
|
+
- Create, update, and delete teams with name and description
|
|
16
|
+
- Add/remove users from teams
|
|
17
|
+
- Designate team managers with elevated privileges
|
|
18
|
+
- View team membership and manager status
|
|
19
|
+
|
|
20
|
+
### Resource-Level Access Control
|
|
21
|
+
|
|
22
|
+
- Grant teams access to specific resources (systems, health checks, incidents, maintenances)
|
|
23
|
+
- Configure read-only or manage permissions per team
|
|
24
|
+
- Resource-level "Team Only" mode that restricts access exclusively to team members
|
|
25
|
+
- Separate `resourceAccessSettings` table for resource-level settings (not per-grant)
|
|
26
|
+
- Automatic cleanup of grants when teams are deleted (database cascade)
|
|
27
|
+
|
|
28
|
+
### Middleware Integration
|
|
29
|
+
|
|
30
|
+
- Extended `autoAuthMiddleware` to support resource access checks
|
|
31
|
+
- Single-resource pre-handler validation for detail endpoints
|
|
32
|
+
- Automatic list filtering for collection endpoints
|
|
33
|
+
- S2S endpoints for access verification
|
|
34
|
+
|
|
35
|
+
### Frontend Components
|
|
36
|
+
|
|
37
|
+
- `TeamsTab` component for managing teams in Auth Settings
|
|
38
|
+
- `TeamAccessEditor` component for assigning team access to resources
|
|
39
|
+
- Resource-level "Team Only" toggle in `TeamAccessEditor`
|
|
40
|
+
- Integration into System, Health Check, Incident, and Maintenance editors
|
|
41
|
+
|
|
42
|
+
## Breaking Changes
|
|
43
|
+
|
|
44
|
+
### API Response Format Changes
|
|
45
|
+
|
|
46
|
+
List endpoints now return objects with named keys instead of arrays directly:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// Before
|
|
50
|
+
const systems = await catalogApi.getSystems();
|
|
51
|
+
|
|
52
|
+
// After
|
|
53
|
+
const { systems } = await catalogApi.getSystems();
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Affected endpoints:
|
|
57
|
+
|
|
58
|
+
- `catalog.getSystems` → `{ systems: [...] }`
|
|
59
|
+
- `healthcheck.getConfigurations` → `{ configurations: [...] }`
|
|
60
|
+
- `incident.listIncidents` → `{ incidents: [...] }`
|
|
61
|
+
- `maintenance.listMaintenances` → `{ maintenances: [...] }`
|
|
62
|
+
|
|
63
|
+
### User Identity Enrichment
|
|
64
|
+
|
|
65
|
+
`RealUser` and `ApplicationUser` types now include `teamIds: string[]` field with team memberships.
|
|
66
|
+
|
|
67
|
+
## Documentation
|
|
68
|
+
|
|
69
|
+
See `docs/backend/teams.md` for complete API reference and integration guide.
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- 97c5a6b: Fix Radix UI accessibility warning in dialog components by adding visually hidden DialogDescription components
|
|
74
|
+
- Updated dependencies [8e43507]
|
|
75
|
+
- Updated dependencies [97c5a6b]
|
|
76
|
+
- Updated dependencies [97c5a6b]
|
|
77
|
+
- Updated dependencies [8e43507]
|
|
78
|
+
- Updated dependencies [8e43507]
|
|
79
|
+
- @checkstack/ui@0.1.0
|
|
80
|
+
- @checkstack/auth-frontend@0.1.0
|
|
81
|
+
- @checkstack/catalog-common@1.0.0
|
|
82
|
+
- @checkstack/common@0.1.0
|
|
83
|
+
- @checkstack/incident-common@0.1.0
|
|
84
|
+
- @checkstack/frontend-api@0.0.4
|
|
85
|
+
- @checkstack/signal-frontend@0.0.5
|
|
86
|
+
|
|
87
|
+
## 0.0.4
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- Updated dependencies [f5b1f49]
|
|
92
|
+
- Updated dependencies [f5b1f49]
|
|
93
|
+
- @checkstack/common@0.0.3
|
|
94
|
+
- @checkstack/ui@0.0.4
|
|
95
|
+
- @checkstack/catalog-common@0.0.3
|
|
96
|
+
- @checkstack/frontend-api@0.0.3
|
|
97
|
+
- @checkstack/incident-common@0.0.3
|
|
98
|
+
- @checkstack/signal-frontend@0.0.4
|
|
99
|
+
|
|
3
100
|
## 0.0.3
|
|
4
101
|
|
|
5
102
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/incident-frontend",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"scripts": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"lint:code": "eslint . --max-warnings 0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"@checkstack/auth-frontend": "workspace:*",
|
|
12
13
|
"@checkstack/catalog-common": "workspace:*",
|
|
13
14
|
"@checkstack/common": "workspace:*",
|
|
14
15
|
"@checkstack/frontend-api": "workspace:*",
|
|
@@ -10,6 +10,7 @@ import type { System } from "@checkstack/catalog-common";
|
|
|
10
10
|
import {
|
|
11
11
|
Dialog,
|
|
12
12
|
DialogContent,
|
|
13
|
+
DialogDescription,
|
|
13
14
|
DialogHeader,
|
|
14
15
|
DialogTitle,
|
|
15
16
|
DialogFooter,
|
|
@@ -29,6 +30,7 @@ import {
|
|
|
29
30
|
import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
|
|
30
31
|
import { IncidentUpdateForm } from "./IncidentUpdateForm";
|
|
31
32
|
import { getIncidentStatusBadge } from "../utils/badges";
|
|
33
|
+
import { TeamAccessEditor } from "@checkstack/auth-frontend";
|
|
32
34
|
|
|
33
35
|
interface Props {
|
|
34
36
|
open: boolean;
|
|
@@ -165,6 +167,11 @@ export const IncidentEditor: React.FC<Props> = ({
|
|
|
165
167
|
<DialogTitle>
|
|
166
168
|
{incident ? "Edit Incident" : "Create Incident"}
|
|
167
169
|
</DialogTitle>
|
|
170
|
+
<DialogDescription className="sr-only">
|
|
171
|
+
{incident
|
|
172
|
+
? "Modify the details for this incident report"
|
|
173
|
+
: "Report a new incident affecting your systems"}
|
|
174
|
+
</DialogDescription>
|
|
168
175
|
</DialogHeader>
|
|
169
176
|
|
|
170
177
|
<div className="grid gap-6 py-4 max-h-[70vh] overflow-y-auto">
|
|
@@ -295,6 +302,16 @@ export const IncidentEditor: React.FC<Props> = ({
|
|
|
295
302
|
)}
|
|
296
303
|
</div>
|
|
297
304
|
)}
|
|
305
|
+
|
|
306
|
+
{/* Team Access Editor - only shown when editing existing incident */}
|
|
307
|
+
{incident?.id && (
|
|
308
|
+
<TeamAccessEditor
|
|
309
|
+
resourceType="incident.incident"
|
|
310
|
+
resourceId={incident.id}
|
|
311
|
+
compact
|
|
312
|
+
expanded
|
|
313
|
+
/>
|
|
314
|
+
)}
|
|
298
315
|
</div>
|
|
299
316
|
|
|
300
317
|
<DialogFooter>
|
|
@@ -84,14 +84,15 @@ const IncidentConfigPageContent: React.FC = () => {
|
|
|
84
84
|
const loadData = async () => {
|
|
85
85
|
setLoading(true);
|
|
86
86
|
try {
|
|
87
|
-
const [incidentList, systemList] =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
const [{ incidents: incidentList }, { systems: systemList }] =
|
|
88
|
+
await Promise.all([
|
|
89
|
+
api.listIncidents(
|
|
90
|
+
statusFilter === "all"
|
|
91
|
+
? { includeResolved: showResolved }
|
|
92
|
+
: { status: statusFilter, includeResolved: showResolved }
|
|
93
|
+
),
|
|
94
|
+
catalogApi.getSystems(),
|
|
95
|
+
]);
|
|
95
96
|
setIncidents(incidentList);
|
|
96
97
|
setSystems(systemList);
|
|
97
98
|
} catch (error) {
|
|
@@ -69,7 +69,7 @@ const IncidentDetailPageContent: React.FC = () => {
|
|
|
69
69
|
if (!incidentId) return;
|
|
70
70
|
|
|
71
71
|
try {
|
|
72
|
-
const [incidentData, systemList] = await Promise.all([
|
|
72
|
+
const [incidentData, { systems: systemList }] = await Promise.all([
|
|
73
73
|
api.getIncident({ id: incidentId }),
|
|
74
74
|
catalogApi.getSystems(),
|
|
75
75
|
]);
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState, useMemo } from "react";
|
|
2
2
|
import { useParams, Link } from "react-router-dom";
|
|
3
|
-
import {
|
|
4
|
-
useApi,
|
|
5
|
-
rpcApiRef,
|
|
6
|
-
wrapInSuspense,
|
|
7
|
-
} from "@checkstack/frontend-api";
|
|
3
|
+
import { useApi, rpcApiRef, wrapInSuspense } from "@checkstack/frontend-api";
|
|
8
4
|
import { useSignal } from "@checkstack/signal-frontend";
|
|
9
5
|
import { resolveRoute } from "@checkstack/common";
|
|
10
6
|
import { incidentApiRef } from "../api";
|
|
@@ -48,10 +44,11 @@ const SystemIncidentHistoryPageContent: React.FC = () => {
|
|
|
48
44
|
|
|
49
45
|
setLoading(true);
|
|
50
46
|
try {
|
|
51
|
-
const [incidentList, systemList] =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
const [{ incidents: incidentList }, { systems: systemList }] =
|
|
48
|
+
await Promise.all([
|
|
49
|
+
api.listIncidents({ systemId, includeResolved: true }),
|
|
50
|
+
catalogApi.getSystems(),
|
|
51
|
+
]);
|
|
55
52
|
const systemData = systemList.find((s) => s.id === systemId);
|
|
56
53
|
setIncidents(incidentList);
|
|
57
54
|
setSystem(systemData);
|