@checkstack/maintenance-frontend 0.5.8 → 0.6.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +192 -0
  2. package/package.json +13 -10
  3. package/tsconfig.json +33 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,197 @@
1
1
  # @checkstack/maintenance-frontend
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [50e5f5f]
8
+ - @checkstack/catalog-common@2.0.1
9
+ - @checkstack/common@0.8.0
10
+ - @checkstack/dashboard-frontend@0.6.1
11
+ - @checkstack/maintenance-common@1.0.1
12
+ - @checkstack/notification-frontend@0.3.1
13
+ - @checkstack/signal-frontend@0.1.1
14
+ - @checkstack/ui@1.7.1
15
+ - @checkstack/auth-frontend@0.5.33
16
+ - @checkstack/frontend-api@0.4.2
17
+ - @checkstack/notification-common@1.0.1
18
+
19
+ ## 0.6.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 32d52c6: feat: unified notification-subscription manager dialog driven by spec registry
24
+
25
+ Replaces the bell-toggle UX (which only managed a single legacy
26
+ catalog group) with a modal that lists every notification type
27
+ registered against a target — system or group — and exposes both
28
+ per-type toggles and a bulk "Subscribe to all / Unsubscribe from all"
29
+ action. Both surfaces (system detail page header bell, dashboard group
30
+ header bell) now open the same `NotificationSubscriptionsManager`
31
+ component.
32
+
33
+ **Key change vs. the prior slot-based approach**: rows are now driven
34
+ by `notificationClient.listSubscriptionSpecs` — the backend's spec
35
+ registry is the single source of truth. Previously, a row only
36
+ appeared if a frontend plugin had remembered to register a
37
+ `createNotificationSubscriptionExtension`; this caused silent drift
38
+ (healthcheck and dependency registered backend specs without frontend
39
+ extensions, so the dialog counted them but never rendered rows). Now,
40
+ every spec the platform knows about renders a row using the spec's
41
+ `display` metadata (title, description, iconName resolved via
42
+ `DynamicIcon`).
43
+
44
+ **Sub-controls registry** (`@checkstack/notification-frontend`):
45
+ plugins that want sub-granularity (anomaly's per-field mute list,
46
+ future severity / channel filters) call
47
+ `registerSubscriptionSubControls(spec, Component)` at module load —
48
+ the manager looks the component up by `specId` when expanding a row.
49
+
50
+ **Removed (no compat)**:
51
+
52
+ - `createNotificationSubscriptionExtension` (replaced by the
53
+ spec-driven manager + the SubControls registry)
54
+ - `target.slot` field on `NotificationTarget` and the
55
+ `NotificationTargetInput.slot` parameter on
56
+ `defineNotificationTarget`
57
+ - `SystemNotificationSubscriptionsSlot` and
58
+ `GroupNotificationSubscriptionsSlot` from `@checkstack/catalog-common`
59
+ - `SystemNotificationsCard` from the system detail page's main column
60
+ - `SubscribeButton` wiring on dashboard group cards and the system
61
+ detail page header
62
+
63
+ **Migrated frontends**: anomaly (now registers `AnomalyFieldMuteList`
64
+ via the SubControls registry), incident, maintenance — all dropped
65
+ their `createNotificationSubscriptionExtension` calls. healthcheck and
66
+ dependency now show up automatically via the spec registry — no
67
+ frontend changes needed for them to render.
68
+
69
+ The trigger button reflects aggregate state — filled bell when at
70
+ least one spec is subscribed for the resource, ghost bell when none.
71
+
72
+ - 32d52c6: feat: notification target pattern + per-spec subscriptions
73
+
74
+ Replaces the all-or-nothing catalog system/group notification model with a
75
+ platform-level target pattern. Each notification-emitting plugin declares
76
+ _subscription specs_ against typed _target_ objects exported from the
77
+ target's owning plugin (catalog ships `catalogSystemTarget` and
78
+ `catalogGroupTarget`). Notification-backend handles every per-resource
79
+ group lifecycle, parent-edge inheritance, and legacy-subscription seeding
80
+ — plugins never author groupId helpers, lifecycle hooks, or migration
81
+ code again.
82
+
83
+ **Plugin-author surface area is now ~12 lines per emitter:**
84
+
85
+ ```ts
86
+ // <plugin>-common
87
+ const { defineSubscription } = createSubscriptionFactory(pluginMetadata);
88
+ export const fooSystemSubscription = defineSubscription({
89
+ localId: "system",
90
+ target: catalogSystemTarget,
91
+ display: { title: "Foo Alerts", description: "...", iconName: "Bell" },
92
+ });
93
+
94
+ // <plugin>-backend register()
95
+ env.registerSubscriptionSpecs([fooSystemSubscription]);
96
+ // ^ feeds the plugin loader's dependency sorter — each spec's
97
+ // target.ownerPlugin becomes an implicit init-order dep, so this
98
+ // plugin automatically waits for catalog (the target owner) to
99
+ // finish init + afterPluginsReady before its own runs.
100
+
101
+ // <plugin>-backend afterPluginsReady
102
+ await notificationClient.registerSubscriptionSpec(
103
+ specToRegistration(fooSystemSubscription)
104
+ );
105
+ // dispatch
106
+ await notificationClient.notifyForSubscription({
107
+ specId: fooSystemSubscription.specId,
108
+ resourceKeys: [systemId],
109
+ title,
110
+ body,
111
+ importance,
112
+ action,
113
+ collapseKey,
114
+ subjects,
115
+ });
116
+
117
+ // <plugin>-frontend
118
+ createNotificationSubscriptionExtension({ spec: fooSystemSubscription });
119
+ ```
120
+
121
+ **Migrated plugins**: anomaly, incident, maintenance, healthcheck,
122
+ dependency. Each lost its bespoke `notification-groups.ts`,
123
+ `bootstrap*NotificationGroups`, `ensure*Group`, and inheritance walk —
124
+ all of that is now centralized in notification-backend's
125
+ `subscription-engine`.
126
+
127
+ **Plugin loader change** (`@checkstack/backend-api`,
128
+ `@checkstack/backend`): the register-time API gains
129
+ `env.registerSubscriptionSpecs([...specs])`. The dependency sorter
130
+ walks `spec.target.ownerPlugin` for every declared spec and adds the
131
+ target owner as an init-order dependency of the emitting plugin. This
132
+ guarantees that catalog (the owner of the platform's `system` and
133
+ `group` targets) completes init + afterPluginsReady before any
134
+ emitting plugin tries to register its specs against the notification
135
+ service — no string-prefix heuristics, no manual `dependsOnPlugins`
136
+ list, no stub rows. Plugins that fail to declare their specs at
137
+ register time get a clear `Target type X is not registered. Did the
138
+ emitting plugin declare this spec via env.registerSubscriptionSpecs?`
139
+ error from the dispatcher.
140
+
141
+ **Removed** (no backwards compat):
142
+
143
+ - `catalogClient.notifySystemSubscribers` and
144
+ `catalogClient.notifyManySystemSubscribers`
145
+ - `notificationClient.notifyUsers` and `notificationClient.notifyGroups`
146
+ as direct dispatch primitives — replaced by spec-bound
147
+ `notifyForSubscription`
148
+ - catalog's `bootstrapNotificationGroups` (replaced by
149
+ `bootstrapNotificationTargets`)
150
+
151
+ **Enforcement**: the dispatcher rejects calls referencing unregistered
152
+ specIds, specs owned by other plugins, or resourceKeys that haven't been
153
+ pushed via `upsertNotificationResource`. Display metadata for any
154
+ groupId is recoverable via the spec registry, so audit lists render
155
+ correct labels even when an emitter's frontend isn't loaded.
156
+
157
+ **Per-field anomaly mute** keeps working — it now lives inside the
158
+ generic SubscriptionRow's optional `SubControls` panel
159
+ (`AnomalyFieldMuteList`), exposed through the catalog system detail
160
+ page's notifications card.
161
+
162
+ The catalog system detail page renders a "Notifications" card hosting
163
+ `SystemNotificationSubscriptionsSlot`. The matching group surface is
164
+ not yet rendered — group-level subscriptions are wired end-to-end on
165
+ the backend; a follow-up will add the host UI.
166
+
167
+ **Migration of existing subscribers**: target types declare a
168
+ `legacyGroupIdTemplate`; on first registration of each spec,
169
+ notification-backend reads subscribers from the legacy
170
+ `catalog.system.<id>` / `catalog.group.<id>` groups and seeds the new
171
+ spec groups exactly once per (spec × resource) pair, tracked in
172
+ `subscription_migrations`. Anomaly stays opt-in (its target also
173
+ declares the template, but the user-explicit nature of the original
174
+ opt-in flow means the seeding produces the same set of subscribers
175
+ they already had).
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [32d52c6]
180
+ - Updated dependencies [32d52c6]
181
+ - Updated dependencies [32d52c6]
182
+ - Updated dependencies [32d52c6]
183
+ - Updated dependencies [32d52c6]
184
+ - Updated dependencies [32d52c6]
185
+ - Updated dependencies [32d52c6]
186
+ - @checkstack/notification-common@1.0.0
187
+ - @checkstack/notification-frontend@0.3.0
188
+ - @checkstack/catalog-common@2.0.0
189
+ - @checkstack/maintenance-common@1.0.0
190
+ - @checkstack/dashboard-frontend@0.6.0
191
+ - @checkstack/frontend-api@0.4.1
192
+ - @checkstack/auth-frontend@0.5.32
193
+ - @checkstack/ui@1.7.0
194
+
3
195
  ## 0.5.8
4
196
 
5
197
  ### Patch Changes
package/package.json CHANGED
@@ -1,25 +1,28 @@
1
1
  {
2
2
  "name": "@checkstack/maintenance-frontend",
3
- "version": "0.5.8",
3
+ "version": "0.6.1",
4
+ "license": "Elastic-2.0",
4
5
  "type": "module",
5
6
  "main": "src/index.tsx",
6
7
  "checkstack": {
7
8
  "type": "frontend"
8
9
  },
9
10
  "scripts": {
10
- "typecheck": "tsc --noEmit",
11
+ "typecheck": "tsgo -b",
11
12
  "lint": "bun run lint:code",
12
13
  "lint:code": "eslint . --max-warnings 0"
13
14
  },
14
15
  "dependencies": {
15
- "@checkstack/auth-frontend": "0.5.30",
16
- "@checkstack/catalog-common": "1.5.2",
16
+ "@checkstack/auth-frontend": "0.5.32",
17
+ "@checkstack/catalog-common": "2.0.0",
17
18
  "@checkstack/common": "0.7.0",
18
- "@checkstack/dashboard-frontend": "0.5.0",
19
- "@checkstack/frontend-api": "0.3.11",
20
- "@checkstack/maintenance-common": "0.4.11",
21
- "@checkstack/signal-frontend": "0.0.16",
22
- "@checkstack/ui": "1.6.0",
19
+ "@checkstack/dashboard-frontend": "0.6.0",
20
+ "@checkstack/frontend-api": "0.4.1",
21
+ "@checkstack/maintenance-common": "1.0.0",
22
+ "@checkstack/notification-common": "1.0.0",
23
+ "@checkstack/notification-frontend": "0.3.0",
24
+ "@checkstack/signal-frontend": "0.1.0",
25
+ "@checkstack/ui": "1.7.0",
23
26
  "date-fns": "^4.1.0",
24
27
  "lucide-react": "^0.344.0",
25
28
  "react": "^18.2.0",
@@ -28,7 +31,7 @@
28
31
  "devDependencies": {
29
32
  "typescript": "^5.0.0",
30
33
  "@types/react": "^18.2.0",
31
- "@checkstack/tsconfig": "0.0.5",
34
+ "@checkstack/tsconfig": "0.0.6",
32
35
  "@checkstack/scripts": "0.1.2"
33
36
  }
34
37
  }
package/tsconfig.json CHANGED
@@ -2,5 +2,37 @@
2
2
  "extends": "@checkstack/tsconfig/frontend.json",
3
3
  "include": [
4
4
  "src"
5
+ ],
6
+ "references": [
7
+ {
8
+ "path": "../auth-frontend"
9
+ },
10
+ {
11
+ "path": "../catalog-common"
12
+ },
13
+ {
14
+ "path": "../common"
15
+ },
16
+ {
17
+ "path": "../dashboard-frontend"
18
+ },
19
+ {
20
+ "path": "../frontend-api"
21
+ },
22
+ {
23
+ "path": "../maintenance-common"
24
+ },
25
+ {
26
+ "path": "../notification-common"
27
+ },
28
+ {
29
+ "path": "../notification-frontend"
30
+ },
31
+ {
32
+ "path": "../signal-frontend"
33
+ },
34
+ {
35
+ "path": "../ui"
36
+ }
5
37
  ]
6
- }
38
+ }