@checkstack/slo-frontend 0.3.9 → 0.4.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,197 @@
1
1
  # @checkstack/slo-frontend
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3547670: Wire the new tips infrastructure across the frontends:
8
+
9
+ **Empty-state coaching.** Replace generic "no items" copy with onboarding
10
+ guidance — short description, three numbered steps and a primary CTA — on
11
+ every EmptyState that has a meaningful next action. Affects: catalog
12
+ (systems + groups), dashboard, health-check page, integrations (subscriptions
13
+
14
+ - provider connections), GitOps providers + secrets, GitOps provenance,
15
+ SLO config + overview, maintenance config, satellites, plugin manager,
16
+ incident config, announcements. Read-only EmptyStates (incident history,
17
+ maintenance history, plugin events) get clearer descriptions explaining
18
+ what would populate them.
19
+
20
+ **First-run anchored tips.** Add `<Tip>` popovers to the most important
21
+ "Create" affordances so first-time users see a one-line explanation of
22
+ what they're about to make and why it matters: catalog “Add System” /
23
+ “Add Group”, healthcheck “Create Check”, integrations “New Subscription”,
24
+ GitOps “Add Provider”, SLO “Create SLO”, maintenance “Create Maintenance”,
25
+ satellite “Create Satellite”, plugin-manager “Install plugin”, incident
26
+ “Report Incident”, announcement “New Announcement”. Each tip is dismissed
27
+ per user (server-backed when signed in, localStorage otherwise) and
28
+ namespaced through `qualifyTipId(plugin, …)` so it cannot escape the
29
+ plugin's own namespace.
30
+
31
+ **Welcome banner on the dashboard.** A `<TipBanner>` at the top of the
32
+ dashboard introduces Checkstack's main flow ("add a system, then a health
33
+ check") with a one-click jump into the catalog.
34
+
35
+ ### Patch Changes
36
+
37
+ - 950d6ec: Fix mobile UserMenu items rendering at zero height, group menu items by
38
+ section, and unstack cramped card headers on small viewports.
39
+
40
+ - **UserMenu mobile bug**: On mobile, the user-menu Sheet rendered every
41
+ menu item as a grid row, which combined with `flex-shrink: 1` on each
42
+ item collapsed the buttons whose internal layout uses `display: flex`
43
+ (the items registered with `useNavigate` rather than `<Link>`) to zero
44
+ content height. Switched the mobile container to a flex column with
45
+ `[&>*]:shrink-0` and added `min-h-0` so the sheet scrolls correctly
46
+ when the list overflows.
47
+
48
+ - **UserMenu grouping**: Slot extensions now accept an optional `group`
49
+ field. The user menu buckets `UserMenuItemsSlot` extensions by `group`
50
+ and renders each group under a labeled header (`Workspace`,
51
+ `Reliability`, `Configuration`, `Documentation`, `Account`). Existing
52
+ core plugins are tagged with the appropriate group; third-party plugins
53
+ can pick any of these or supply their own label. Untagged extensions
54
+ render last with no header. `UserMenuItemsBottomSlot` is unaffected.
55
+
56
+ - **Card header responsiveness**: `CardHeaderRow` (the primitive shared by
57
+ Incident, Maintenance, Auth, Catalog, GitOps and other config cards) now
58
+ stacks vertically on narrow viewports and only switches to a single row
59
+ at the `sm` breakpoint, so titles and adjacent filter controls (e.g.
60
+ status `Select`, "Show resolved" checkbox) no longer cram together on
61
+ mobile. Refactored the Incident and Maintenance config pages to use the
62
+ primitive instead of a hand-rolled `flex items-center justify-between`
63
+ row, and made their `Select` triggers full-width on mobile.
64
+
65
+ - Updated dependencies [42abfff]
66
+ - Updated dependencies [3547670]
67
+ - Updated dependencies [1ef2e79]
68
+ - Updated dependencies [aa89bc5]
69
+ - Updated dependencies [3547670]
70
+ - Updated dependencies [950d6ec]
71
+ - Updated dependencies [3547670]
72
+ - Updated dependencies [3547670]
73
+ - @checkstack/common@0.9.0
74
+ - @checkstack/ui@1.8.0
75
+ - @checkstack/catalog-common@2.1.0
76
+ - @checkstack/frontend-api@0.5.0
77
+ - @checkstack/tips-frontend@0.2.0
78
+ - @checkstack/dashboard-frontend@0.7.0
79
+ - @checkstack/dependency-common@1.0.2
80
+ - @checkstack/healthcheck-common@1.0.2
81
+ - @checkstack/slo-common@0.3.3
82
+ - @checkstack/signal-frontend@0.1.2
83
+
84
+ ## 0.3.10
85
+
86
+ ### Patch Changes
87
+
88
+ - 50e5f5f: Runtime plugin system: install + uninstall plugins from npm, GitHub releases
89
+ (including private GitHub Enterprise instances), or tarball uploads at
90
+ runtime, with multi-package bundles, dependency-derived compatibility checks,
91
+ multi-instance coordination via a Postgres artifact store, and
92
+ single-coordinator destructive cleanup.
93
+
94
+ Highlights:
95
+
96
+ - New `PluginSource` discriminated union and `PluginInstaller` /
97
+ `PluginInstallerRegistry` interfaces in `@checkstack/backend-api`. The
98
+ GitHub variant accepts an optional `apiBaseUrl` so deployments backed by
99
+ GitHub Enterprise can install from `https://ghe.example.com/api/v3`
100
+ instead of `api.github.com`.
101
+ - New `installPackageMetadataSchema` (Zod) in `@checkstack/common` validates
102
+ every plugin's `package.json` at install time. Required fields: `name`,
103
+ `version`, `description`, `author`, `license`, `checkstack.type`,
104
+ `checkstack.pluginId`. Optional: `checkstack.bundle`,
105
+ `checkstack.usageInstructions`, `checkstack.allowInstallScripts`.
106
+ - New `pluginManagerContract` in `@checkstack/pluginmanager-common` with
107
+ `list`, `previewInstall`, `install`, `previewUninstall`, `uninstall`, and
108
+ `events` procedures.
109
+ - New `@checkstack/pluginmanager-frontend` admin UI: installed-plugins list
110
+ with per-row uninstall (typed-confirmation modal, schema/configs/cascade
111
+ toggles), install page with NPM / Tarball Upload / GitHub Release tabs
112
+ (Catalog tab disabled — coming soon), and an events page surfacing the
113
+ install/uninstall audit log.
114
+ - New `bunx @checkstack/scripts plugin-pack` CLI for plugin authors —
115
+ per-package mode produces an npm-shaped tarball; `--bundle` mode produces
116
+ an outer tarball containing every sibling declared in
117
+ `package.json#checkstack.bundle`. Published to npm so external authors
118
+ can `bunx` it directly without a workspace checkout.
119
+ - Compatibility derived from `package.json#dependencies` ranges
120
+ (`semver.satisfies` against the platform's loaded `@checkstack/*`
121
+ versions) — no separate `compatibility` field.
122
+ - Multi-instance: originator persists artifacts + `plugins` rows + broadcasts
123
+ install/uninstall; receiving instances do in-process register/unregister
124
+ only. Destructive ops (drop schema, delete plugin_configs, delete
125
+ artifacts, delete `plugins` rows) run exactly once on the originator.
126
+ - Fresh-instance bootstrap: `loadPlugins()` hydrates any
127
+ `is_uninstallable=true` plugin missing from `node_modules` from the
128
+ artifact store before normal Phase 1 register.
129
+ - New schema: `plugin_artifacts` (tarball storage), `plugin_install_events`
130
+ (audit/error log). `plugins` extended with `version`, `metadata`,
131
+ `source`, `bundle_id`, `is_primary`. Local plugin sync now writes
132
+ `version` from each plugin's `package.json` so the admin UI shows real
133
+ versions instead of `—`.
134
+ - Tarball-upload endpoint (`POST /api/pluginmanager/upload-tarball`) for
135
+ the install UI; access-gated by `pluginmanager.plugin.manage`.
136
+ - Plugin Manager menu link added to the user menu (main grid, alongside
137
+ Profile / Notification Settings / etc.).
138
+
139
+ Cross-cutting changes:
140
+
141
+ - Backend request/response logging now flows through `rootLogger` (winston)
142
+ instead of `hono/logger`. 5xx responses include the response body inline
143
+ so swallowed early-return errors are visible in the log.
144
+ - The `/api/:pluginId/*` dispatcher now logs which core service is missing
145
+ or which `pluginId` had no metadata when it 500s.
146
+ - New `registerCorePluginMetadata` on `PluginManager` for core routers
147
+ (like the plugin manager itself) that need their metadata visible to the
148
+ RPC dispatcher without going through the full plugin lifecycle.
149
+ - ESLint: `unicorn/no-null` is now disabled globally. Drizzle distinguishes
150
+ between `null` (writes a real SQL NULL) and `undefined` (skip the column
151
+ on insert), so treating them as interchangeable produced latent bugs at
152
+ the persistence boundary. The bulk of the patch-bumped packages above
153
+ reflect lint-fix touches that landed when this rule was relaxed.
154
+ - Workspace-wide license normalization to `Elastic-2.0` (matches
155
+ `LICENSE.md`). Every `package.json` in the workspace now declares the
156
+ same SPDX identifier; the patch bumps capture this.
157
+
158
+ Plugin packages (every `plugins/*`): added a `pack` npm script
159
+ (`bunx @checkstack/scripts plugin-pack`), mirrored each plugin's
160
+ `pluginId` from `plugin-metadata.ts` into `package.json#checkstack.pluginId`
161
+ so install-time validation passes, stubbed any missing required metadata
162
+ fields (`description`, `author`, `license`), and added
163
+ `checkstack.bundle` to multi-package plugin primaries (telegram, rcon, ssh,
164
+ jira, queue-bullmq, queue-memory, cache-memory).
165
+
166
+ Breaking changes:
167
+
168
+ - The legacy single-method `PluginInstaller` interface (`install(packageName)`)
169
+ is removed. Callers must use `coreServices.pluginInstallerRegistry`.
170
+ - The old `pluginAdminContract` and `createPluginAdminRouter` are removed.
171
+ Replaced by `pluginManagerContract` in `@checkstack/pluginmanager-common`
172
+ and `createPluginManagerRouter` in `core/backend`.
173
+ - `@checkstack/test-utils-backend` no longer exports
174
+ `createMockPluginInstaller` / `MockPluginInstaller` (the legacy interface
175
+ it shimmed is gone).
176
+
177
+ Note: bumps are limited to `minor` (for packages with new public API
178
+ surface) and `patch` (for downstream consumers, license normalization,
179
+ and lint fixes). No `major` bumps despite the `PluginInstaller` removal —
180
+ the legacy interface had no third-party consumers in the wild before this
181
+ runtime plugin system landed, and the contract surface is the same shape
182
+ modulo the rename.
183
+
184
+ - Updated dependencies [50e5f5f]
185
+ - @checkstack/catalog-common@2.0.1
186
+ - @checkstack/common@0.8.0
187
+ - @checkstack/dashboard-frontend@0.6.1
188
+ - @checkstack/dependency-common@1.0.1
189
+ - @checkstack/signal-frontend@0.1.1
190
+ - @checkstack/slo-common@0.3.2
191
+ - @checkstack/ui@1.7.1
192
+ - @checkstack/frontend-api@0.4.2
193
+ - @checkstack/healthcheck-common@1.0.1
194
+
3
195
  ## 0.3.9
4
196
 
5
197
  ### Patch Changes
package/package.json CHANGED
@@ -1,26 +1,28 @@
1
1
  {
2
2
  "name": "@checkstack/slo-frontend",
3
- "version": "0.3.9",
3
+ "version": "0.4.0",
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/catalog-common": "1.5.3",
16
- "@checkstack/common": "0.7.0",
17
- "@checkstack/dashboard-frontend": "0.5.1",
18
- "@checkstack/dependency-common": "0.3.0",
19
- "@checkstack/frontend-api": "0.4.0",
20
- "@checkstack/healthcheck-common": "0.13.0",
21
- "@checkstack/signal-frontend": "0.1.0",
22
- "@checkstack/slo-common": "0.3.0",
23
- "@checkstack/ui": "1.6.1",
16
+ "@checkstack/catalog-common": "2.0.1",
17
+ "@checkstack/common": "0.8.0",
18
+ "@checkstack/dashboard-frontend": "0.6.1",
19
+ "@checkstack/dependency-common": "1.0.1",
20
+ "@checkstack/frontend-api": "0.4.2",
21
+ "@checkstack/healthcheck-common": "1.0.1",
22
+ "@checkstack/signal-frontend": "0.1.1",
23
+ "@checkstack/slo-common": "0.3.2",
24
+ "@checkstack/tips-frontend": "0.1.0",
25
+ "@checkstack/ui": "1.7.1",
24
26
  "date-fns": "^4.1.0",
25
27
  "lucide-react": "^0.344.0",
26
28
  "react": "^18.2.0",
@@ -30,7 +32,7 @@
30
32
  "devDependencies": {
31
33
  "typescript": "^5.0.0",
32
34
  "@types/react": "^18.2.0",
33
- "@checkstack/tsconfig": "0.0.5",
34
- "@checkstack/scripts": "0.1.2"
35
+ "@checkstack/tsconfig": "0.0.7",
36
+ "@checkstack/scripts": "0.3.0"
35
37
  }
36
38
  }
@@ -100,7 +100,7 @@ export const SloTrendChart: React.FC<SloTrendChartProps> = ({
100
100
  />
101
101
  <Tooltip
102
102
  content={({ active, payload }) => {
103
- // eslint-disable-next-line unicorn/no-null
103
+
104
104
  if (!active || !payload?.length) return null;
105
105
  const payloadData = payload[0].payload as (typeof data)[number];
106
106
  return (
package/src/index.tsx CHANGED
@@ -40,6 +40,7 @@ export default createFrontendPlugin({
40
40
  createSlotExtension(UserMenuItemsSlot, {
41
41
  id: "slo.user-menu.items",
42
42
  component: SloMenuItems,
43
+ metadata: { group: "Reliability" },
43
44
  }),
44
45
  createSlotExtension(SystemStateBadgesSlot, {
45
46
  id: "slo.system-state-badge",
@@ -7,7 +7,12 @@ import {
7
7
  wrapInSuspense,
8
8
  } from "@checkstack/frontend-api";
9
9
  import { SloApi } from "../api";
10
- import { sloAccess, type SloObjective } from "@checkstack/slo-common";
10
+ import {
11
+ sloAccess,
12
+ pluginMetadata as sloPluginMetadata,
13
+ type SloObjective,
14
+ } from "@checkstack/slo-common";
15
+ import { Tip } from "@checkstack/tips-frontend";
11
16
  import { CatalogApi } from "@checkstack/catalog-common";
12
17
  import {
13
18
  Card,
@@ -132,10 +137,19 @@ const SloConfigPageContent: React.FC = () => {
132
137
  loading={accessLoading}
133
138
  allowed={canManage}
134
139
  actions={
135
- <Button onClick={handleCreate}>
136
- <Plus className="h-4 w-4 mr-2" />
137
- Create SLO
138
- </Button>
140
+ <Tip
141
+ plugin={sloPluginMetadata}
142
+ id="objectives.create"
143
+ title="Set the bar for reliability"
144
+ description="An SLO is a contract you set with yourself — “this service is healthy 99.9% of the time over 30 days”. Checkstack measures it from your existing health-check history, tracks the error budget, and shows you when you're burning it too fast."
145
+ side="bottom"
146
+ align="end"
147
+ >
148
+ <Button onClick={handleCreate}>
149
+ <Plus className="h-4 w-4 mr-2" />
150
+ Create SLO
151
+ </Button>
152
+ </Tip>
139
153
  }
140
154
  >
141
155
  <Card>
@@ -152,8 +166,22 @@ const SloConfigPageContent: React.FC = () => {
152
166
  </div>
153
167
  ) : objectives.length === 0 ? (
154
168
  <EmptyState
155
- title="No SLO objectives"
156
- description="Create your first SLO objective to start tracking reliability."
169
+ icon={<Target className="size-10" />}
170
+ title="No SLO objectives yet"
171
+ description="An SLO turns raw uptime into a target you can hold yourself to: “API X is healthy 99.9% of the time over the last 30 days.” Checkstack tracks the error budget against your health-check history and lets you exclude planned maintenance."
172
+ steps={[
173
+ "Click “Create SLO” and pick the system to measure.",
174
+ "Choose a target (e.g. 99.9%) and a rolling window (e.g. 30 days).",
175
+ "Decide whether scheduled maintenances eat into the error budget — usually you want them excluded.",
176
+ ]}
177
+ actions={
178
+ canManage ? (
179
+ <Button onClick={handleCreate}>
180
+ <Plus className="h-4 w-4 mr-2" />
181
+ Create your first SLO
182
+ </Button>
183
+ ) : undefined
184
+ }
157
185
  />
158
186
  ) : (
159
187
  <Table>
@@ -62,8 +62,23 @@ const SloOverviewPageContent: React.FC = () => {
62
62
  </div>
63
63
  ) : objectives.length === 0 ? (
64
64
  <EmptyState
65
+ icon={<Target className="size-10" />}
65
66
  title="No SLOs configured"
66
- description="Define Service Level Objectives to track reliability."
67
+ description="SLOs translate uptime into a target — “healthy 99.9% of the time over 30 days” — and let you track the error budget per system. This dashboard lights up once you've defined at least one."
68
+ steps={[
69
+ "Open SLO management to create your first objective.",
70
+ "Pick the system, the target percentage and the rolling window.",
71
+ "Come back here for an at-a-glance view of every SLO and its remaining error budget.",
72
+ ]}
73
+ actions={
74
+ <Link
75
+ to={resolveRoute(sloRoutes.routes.config)}
76
+ className="inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline"
77
+ >
78
+ Manage SLOs
79
+ <ArrowRight className="w-4 h-4" />
80
+ </Link>
81
+ }
67
82
  />
68
83
  ) : (
69
84
  <div className="grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-6">
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": "../catalog-common"
9
+ },
10
+ {
11
+ "path": "../common"
12
+ },
13
+ {
14
+ "path": "../dashboard-frontend"
15
+ },
16
+ {
17
+ "path": "../dependency-common"
18
+ },
19
+ {
20
+ "path": "../frontend-api"
21
+ },
22
+ {
23
+ "path": "../healthcheck-common"
24
+ },
25
+ {
26
+ "path": "../signal-frontend"
27
+ },
28
+ {
29
+ "path": "../slo-common"
30
+ },
31
+ {
32
+ "path": "../tips-frontend"
33
+ },
34
+ {
35
+ "path": "../ui"
36
+ }
5
37
  ]
6
38
  }