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