@checkstack/satellite-frontend 0.2.10 → 0.2.12
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 +47 -0
- package/package.json +6 -6
- package/src/pages/SatelliteListPage.tsx +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @checkstack/satellite-frontend
|
|
2
2
|
|
|
3
|
+
## 0.2.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [32d52c6]
|
|
8
|
+
- Updated dependencies [32d52c6]
|
|
9
|
+
- @checkstack/frontend-api@0.4.1
|
|
10
|
+
- @checkstack/ui@1.7.0
|
|
11
|
+
- @checkstack/satellite-common@0.3.1
|
|
12
|
+
|
|
13
|
+
## 0.2.11
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 208ad71: Centralize realtime cache invalidation: signals now carry their owning `pluginId` end-to-end, and a single `SignalAutoInvalidator` mounted near the React Query client invalidates `[[pluginId]]` for every incoming signal automatically.
|
|
18
|
+
|
|
19
|
+
**Breaking change to `createSignal`** (`@checkstack/signal-common`): the factory now takes a single object argument with `pluginMetadata`, `event`, and `payloadSchema`. The signal id is constructed as `${pluginMetadata.pluginId}.${event}` and the resulting `Signal` carries a `pluginId` field. The `SignalMessage` wire envelope and `ServerToClientMessage` `signal` variant gained a `pluginId` field so the frontend can route invalidations without parsing the id.
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// Before
|
|
23
|
+
export const ANOMALY_STATE_CHANGED = createSignal(
|
|
24
|
+
"anomaly.state_changed",
|
|
25
|
+
z.object({ ... }),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// After
|
|
29
|
+
export const ANOMALY_STATE_CHANGED = createSignal({
|
|
30
|
+
pluginMetadata,
|
|
31
|
+
event: "state_changed",
|
|
32
|
+
payloadSchema: z.object({ ... }),
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**New plugin field**: `FrontendPlugin.foreignSignals?: Signal<unknown>[]` lets a plugin opt its `[[pluginId]]` cache into invalidation when another plugin's signal fires (e.g. `dependency-frontend` declares `[SYSTEM_STATUS_CHANGED]` because dependency payloads embed system status). Same-plugin signals must NOT be listed — they are always auto-invalidated.
|
|
37
|
+
|
|
38
|
+
**Removed boilerplate**: per-component `useSignal(X, () => refetch())` and `useSignal(X, () => queryClient.invalidateQueries(...))` calls have been removed across `incident-frontend`, `maintenance-frontend`, `healthcheck-frontend`, `slo-frontend`, `dependency-frontend`, `satellite-frontend`, `announcement-frontend`, `notification-frontend`, and `dashboard-frontend`. The `NotificationBell` unread count is now derived directly from the `getUnreadCount` query (auto-invalidated) instead of a local state mirror.
|
|
39
|
+
|
|
40
|
+
**User-visible bug fix**: the system detail page anomaly widget (`SystemAnomalyWidget`) now updates in real-time when anomalies change, with no per-widget signal subscription required. The dashboard status page also stays fresh on `ANOMALY_STATE_CHANGED`, `ANOMALY_BASELINE_UPDATED`, and `ANOMALY_TREND_DETECTED`.
|
|
41
|
+
|
|
42
|
+
UI-state consumers that legitimately need a `useSignal` (the dashboard activity terminal, the queue lag alert, and the rolling-preset date refresh in `useHealthCheckData`) keep their handlers; the auto-invalidator runs alongside them.
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [208ad71]
|
|
45
|
+
- @checkstack/signal-frontend@0.1.0
|
|
46
|
+
- @checkstack/frontend-api@0.4.0
|
|
47
|
+
- @checkstack/satellite-common@0.3.0
|
|
48
|
+
- @checkstack/ui@1.6.1
|
|
49
|
+
|
|
3
50
|
## 0.2.10
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/satellite-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"checkstack": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"lint:code": "eslint . --max-warnings 0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@checkstack/common": "0.
|
|
16
|
-
"@checkstack/frontend-api": "0.
|
|
17
|
-
"@checkstack/satellite-common": "0.
|
|
18
|
-
"@checkstack/signal-frontend": "0.0
|
|
19
|
-
"@checkstack/ui": "1.
|
|
15
|
+
"@checkstack/common": "0.7.0",
|
|
16
|
+
"@checkstack/frontend-api": "0.4.0",
|
|
17
|
+
"@checkstack/satellite-common": "0.3.0",
|
|
18
|
+
"@checkstack/signal-frontend": "0.1.0",
|
|
19
|
+
"@checkstack/ui": "1.6.1",
|
|
20
20
|
"lucide-react": "^0.344.0",
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-router-dom": "^6.20.0"
|
|
@@ -5,11 +5,9 @@ import {
|
|
|
5
5
|
useApi,
|
|
6
6
|
wrapInSuspense,
|
|
7
7
|
} from "@checkstack/frontend-api";
|
|
8
|
-
import { useSignal } from "@checkstack/signal-frontend";
|
|
9
8
|
import {
|
|
10
9
|
SatelliteApi,
|
|
11
10
|
satelliteAccess,
|
|
12
|
-
SATELLITE_STATUS_CHANGED,
|
|
13
11
|
} from "@checkstack/satellite-common";
|
|
14
12
|
import type { SatelliteWithStatus } from "@checkstack/satellite-common";
|
|
15
13
|
import {
|
|
@@ -55,11 +53,6 @@ const SatelliteListPageContent: React.FC = () => {
|
|
|
55
53
|
refetch,
|
|
56
54
|
} = satelliteClient.listSatellites.useQuery();
|
|
57
55
|
|
|
58
|
-
// Real-time status updates
|
|
59
|
-
useSignal(SATELLITE_STATUS_CHANGED, () => {
|
|
60
|
-
void refetch();
|
|
61
|
-
});
|
|
62
|
-
|
|
63
56
|
const deleteMutation = satelliteClient.deleteSatellite.useMutation({
|
|
64
57
|
onSuccess: () => {
|
|
65
58
|
toast.success("Satellite deleted");
|