@checkstack/queue-frontend 0.3.3 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,150 @@
1
1
  # @checkstack/queue-frontend
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9016526]
8
+ - @checkstack/common@0.10.0
9
+ - @checkstack/queue-common@0.5.0
10
+ - @checkstack/frontend-api@0.5.1
11
+ - @checkstack/infrastructure-common@0.3.1
12
+ - @checkstack/ui@1.8.1
13
+ - @checkstack/signal-frontend@0.1.3
14
+
15
+ ## 0.4.0
16
+
17
+ ### Minor Changes
18
+
19
+ - aa89bc5: Replace the bespoke `registerInfrastructureTab()` registry with a standard
20
+ slot-extension contract (`InfrastructureTabsSlot` from
21
+ `@checkstack/infrastructure-common`). Plugins now contribute infrastructure
22
+ tabs via `createSlotExtension`, depending only on the slot owner.
23
+
24
+ The slot system in `@checkstack/frontend-api` gains a second type parameter
25
+ on `createSlot<TContext, TMetadata>` so extensions can declare typed static
26
+ metadata at registration time (label, icon, access rules, ordering for the
27
+ infrastructure tab bar). A new `useSlotExtensions(slot)` hook returns typed
28
+ extensions and subscribes to plugin lifecycle changes.
29
+
30
+ Each tab body now stacks a **Runtime** sub-section (live state, read-only)
31
+ on top of a **Configuration** sub-section (settings, gated by `canUpdate`).
32
+
33
+ **Queue runtime panel.** Surfaces aggregated counts (pending / processing /
34
+ completed / failed) plus three sub-tabs of recent jobs: **Active**, **Recent
35
+ failed** (with the failure message), and **Recent completed** (with
36
+ duration). Job payloads are deliberately not surfaced — they may carry
37
+ secrets and need a separate manage-access gate to be shown.
38
+
39
+ To support this, `Queue<T>` gains a required `listJobs(opts)` method
40
+ returning `JobSummary[]` (no payloads), and `QueueStats` gains a
41
+ `scope: "instance" | "cluster"` field. The in-memory queue keeps rolling
42
+ ring buffers (200 entries) for completed/failed history and tracks active
43
+ jobs by id; BullMQ uses native `getJobs`. `QueueManager.listJobs` aggregates
44
+ across queues and sorts (most-recent-first for terminal states, FIFO for
45
+ active/waiting/delayed).
46
+
47
+ **Cache runtime panel.** Lists the top N entries by size (or by recency) so
48
+ operators can debug a cache filling up. Values are deliberately omitted —
49
+ PII / secret risk. Backends opt in via an optional `listEntries?` method on
50
+ `CacheProvider`; non-supporting backends return `{ supported: false }` and
51
+ the UI renders a "not supported by this backend" hint. The in-memory cache
52
+ implements it using its existing per-entry byte tracking.
53
+
54
+ `CacheStats` also gains `scope: "instance" | "cluster"`.
55
+
56
+ **Multi-instance scope warning.** A new `<InstanceScopeBanner>` component in
57
+ `@checkstack/ui` renders a yellow banner above any runtime panel whose
58
+ backend reports `scope: "instance"` — i.e. in-memory queue or cache running
59
+ in a horizontally scaled deployment. The banner explains the metrics are
60
+ local to the responding replica and recommends switching to a clustered
61
+ backend (Redis-backed queue / cache) for cluster-wide visibility.
62
+
63
+ **Bug fix — stable cache provider proxy.** `CacheManagerImpl.getProvider()`
64
+ now returns a single stable proxy that delegates to whatever provider is
65
+ currently active. Previously, consumers of `createCachedScope` (and any
66
+ direct `cacheManager.getProvider()` caller) captured the active provider
67
+ reference at plugin-init time. After any `setActiveBackend` call — including
68
+ saving the same memory config in the new Cache tab, which reconstructs the
69
+ in-memory cache — those scopes wrote to an orphaned old provider while the
70
+ runtime panel read stats from the new (empty) one, making the runtime panel
71
+ appear to report 0 keys. With the proxy, all consumers share a single stable
72
+ identity and writes always land in the active provider.
73
+
74
+ **Bytes tracking on the in-memory cache.** `InMemoryCache.getStats().sizeBytes`
75
+ now returns a running approximation (UTF-8 bytes of the key plus
76
+ `v8.serialize(value).byteLength`, with a JSON fallback) that's kept in sync
77
+ across all eviction paths. Treat the number as a sanity gauge; it doesn't
78
+ include `Map` per-entry overhead.
79
+
80
+ **Pagination.** Both `Queue<T>.listJobs` and `CacheProvider.listEntries?`
81
+ are offset-paginated. Inputs gain an `offset: number`; outputs change to
82
+ `{ items, total: number | null, hasMore: boolean }`. `total` is nullable
83
+ so backends that can't compute it cheaply still paginate via `hasMore`.
84
+ The UI uses the existing `<Pagination>` component with a 25-row default
85
+ page size. `QueueManager.listJobs` aggregates by over-fetching
86
+ `[0, offset+limit)` per queue, merge-sorting, then slicing the window —
87
+ optimal for the single-queue case, acceptable for the multi-queue case
88
+ within the UI's reasonable page-depth bounds. BullMQ uses native offset
89
+ ranges via `getJobs(types, start, end)` plus `getJobCounts` for `total`.
90
+
91
+ **Pending tab.** The Queue runtime panel exposes a virtual `"pending"`
92
+ state (waiting ∪ delayed, FIFO). It's now the default sub-tab, since
93
+ "what's queued up?" is the most common question. Per-row state is shown
94
+ when viewing the combined list.
95
+
96
+ **Recurring schedules visible under Pending.** Cron- and interval-based
97
+ recurring jobs (e.g. healthchecks) are surfaced under Pending/Delayed
98
+ between fires, with a `nextRunAt` countdown column and a "(recurring)"
99
+ label. `JobSummary` gains optional `nextRunAt: Date` and `recurring:
100
+ boolean` fields. The in-memory queue synthesises these rows from its
101
+ `recurringJobs` registry; BullMQ already materialises the next fire of
102
+ each scheduler as a delayed job and we now surface its trigger time and
103
+ the `repeatJobKey`-derived `recurring` flag.
104
+
105
+ **Bug fix — drop hook emits with no listeners.** `EventBus.emit` no
106
+ longer enqueues a job when zero listeners (distributed or instance-local)
107
+ are registered for the hook. Previously, hooks like
108
+ `core.plugin.initialized` — emitted on every plugin init but subscribed
109
+ to by nothing in the core repo — accumulated one waiting job per emit
110
+ forever. The in-memory queue's `processNext` short-circuits when there
111
+ are zero consumer groups, so its post-loop cleanup never ran for these
112
+ orphaned jobs. The fix drops the emit at the source and logs a debug
113
+ line. Note: in distributed deployments using a Redis-backed queue, this
114
+ means a subscriber on another replica won't receive an event if no
115
+ replica that emits it has a local listener. Plugins needing cross-process
116
+ delivery must register their listener on every replica that should
117
+ receive the hook.
118
+
119
+ **Breaking notes (treated as minor under beta semantics)**:
120
+
121
+ - `@checkstack/infrastructure-common` removes `registerInfrastructureTab`
122
+ and `getInfrastructureTabs`; former callers must register an extension
123
+ into `InfrastructureTabsSlot`.
124
+ - `@checkstack/queue-api`'s `Queue<T>` interface requires the new
125
+ `listJobs(opts)` method returning `ListJobsResult` (paginated). Both
126
+ bundled queue backends (memory, BullMQ) are updated; out-of-tree
127
+ implementations will need to add it.
128
+ - `QueueStats` and `CacheStats` add a required `scope` field.
129
+ - `CacheProvider.listEntries?` (when implemented) now returns
130
+ `ListEntriesResult` instead of `CacheEntrySummary[]`.
131
+ - `JobState` adds a `"pending"` variant.
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies [42abfff]
136
+ - Updated dependencies [3547670]
137
+ - Updated dependencies [1ef2e79]
138
+ - Updated dependencies [aa89bc5]
139
+ - Updated dependencies [950d6ec]
140
+ - Updated dependencies [3547670]
141
+ - @checkstack/common@0.9.0
142
+ - @checkstack/ui@1.8.0
143
+ - @checkstack/frontend-api@0.5.0
144
+ - @checkstack/infrastructure-common@0.3.0
145
+ - @checkstack/queue-common@0.4.0
146
+ - @checkstack/signal-frontend@0.1.2
147
+
3
148
  ## 0.3.3
4
149
 
5
150
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/queue-frontend",
3
- "version": "0.3.3",
3
+ "version": "0.4.1",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,12 +21,12 @@
21
21
  "lint:code": "eslint . --max-warnings 0"
22
22
  },
23
23
  "dependencies": {
24
- "@checkstack/common": "0.7.0",
25
- "@checkstack/frontend-api": "0.4.1",
26
- "@checkstack/infrastructure-common": "0.2.2",
27
- "@checkstack/queue-common": "0.3.0",
28
- "@checkstack/signal-frontend": "0.1.0",
29
- "@checkstack/ui": "1.7.0",
24
+ "@checkstack/common": "0.9.0",
25
+ "@checkstack/frontend-api": "0.5.0",
26
+ "@checkstack/infrastructure-common": "0.3.0",
27
+ "@checkstack/queue-common": "0.4.0",
28
+ "@checkstack/signal-frontend": "0.1.2",
29
+ "@checkstack/ui": "1.8.0",
30
30
  "ajv": "^8.18.0",
31
31
  "ajv-formats": "^3.0.1",
32
32
  "lucide-react": "^0.468.0",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@types/react": "^18.3.18",
39
39
  "typescript": "^5.7.2",
40
- "@checkstack/tsconfig": "0.0.6",
41
- "@checkstack/scripts": "0.1.2"
40
+ "@checkstack/tsconfig": "0.0.7",
41
+ "@checkstack/scripts": "0.3.1"
42
42
  }
43
43
  }
@@ -0,0 +1,21 @@
1
+ import type { InfrastructureTabContext } from "@checkstack/infrastructure-common";
2
+ import { QueueConfigTab } from "./QueueConfigTab";
3
+ import { QueueRuntimePanel } from "./QueueRuntimePanel";
4
+
5
+ /**
6
+ * Queue tab body for the Infrastructure Settings page.
7
+ *
8
+ * Stacks two sub-sections inside the same tab:
9
+ * - Runtime: live job counts (read-only, always shown).
10
+ * - Configuration: provider selection + tuning (gated by `canUpdate`).
11
+ */
12
+ export const QueueInfrastructureTab = ({
13
+ canUpdate,
14
+ }: InfrastructureTabContext) => {
15
+ return (
16
+ <div className="space-y-6">
17
+ <QueueRuntimePanel />
18
+ <QueueConfigTab canUpdate={canUpdate} />
19
+ </div>
20
+ );
21
+ };
@@ -0,0 +1,328 @@
1
+ import { useState } from "react";
2
+ import { usePluginClient } from "@checkstack/frontend-api";
3
+ import { QueueApi, type JobStateDto } from "@checkstack/queue-common";
4
+ import {
5
+ Card,
6
+ CardContent,
7
+ CardDescription,
8
+ CardHeader,
9
+ CardTitle,
10
+ InstanceScopeBanner,
11
+ Pagination,
12
+ Table,
13
+ TableBody,
14
+ TableCell,
15
+ TableHead,
16
+ TableHeader,
17
+ TableRow,
18
+ Tabs,
19
+ TabPanel,
20
+ } from "@checkstack/ui";
21
+ import {
22
+ Activity,
23
+ AlertTriangle,
24
+ CheckCircle2,
25
+ Clock,
26
+ Hourglass,
27
+ Loader2,
28
+ PlayCircle,
29
+ } from "lucide-react";
30
+
31
+ const REFRESH_INTERVAL_MS = 5000;
32
+ const PAGE_SIZE = 25;
33
+
34
+ const formatNumber = (n: number) =>
35
+ n.toLocaleString(undefined, { maximumFractionDigits: 0 });
36
+
37
+ const formatRelative = (date?: Date) => {
38
+ if (!date) return "—";
39
+ const ms = Date.now() - date.getTime();
40
+ const sec = Math.round(ms / 1000);
41
+ if (sec < 60) return `${sec}s ago`;
42
+ const min = Math.round(sec / 60);
43
+ if (min < 60) return `${min}m ago`;
44
+ const hr = Math.round(min / 60);
45
+ if (hr < 24) return `${hr}h ago`;
46
+ return `${Math.round(hr / 24)}d ago`;
47
+ };
48
+
49
+ const formatDuration = (start?: Date, end?: Date) => {
50
+ if (!start) return "—";
51
+ const finish = end ?? new Date();
52
+ const ms = finish.getTime() - start.getTime();
53
+ if (ms < 1000) return `${ms}ms`;
54
+ if (ms < 60_000) return `${(ms / 1000).toFixed(1)}s`;
55
+ return `${Math.round(ms / 60_000)}m`;
56
+ };
57
+
58
+ const truncateMiddle = (s: string, head = 8, tail = 6) => {
59
+ if (s.length <= head + tail + 1) return s;
60
+ return `${s.slice(0, head)}…${s.slice(-tail)}`;
61
+ };
62
+
63
+ const formatCountdown = (target?: Date) => {
64
+ if (!target) return "—";
65
+ const ms = target.getTime() - Date.now();
66
+ if (ms <= 0) return "now";
67
+ const sec = Math.round(ms / 1000);
68
+ if (sec < 60) return `in ${sec}s`;
69
+ const min = Math.round(sec / 60);
70
+ if (min < 60) return `in ${min}m`;
71
+ const hr = Math.round(min / 60);
72
+ if (hr < 24) return `in ${hr}h`;
73
+ return `in ${Math.round(hr / 24)}d`;
74
+ };
75
+
76
+ interface CountTileProps {
77
+ label: string;
78
+ value: number | undefined;
79
+ icon: React.ComponentType<{ className?: string }>;
80
+ tone: "default" | "warning" | "danger" | "success";
81
+ }
82
+
83
+ const toneClasses: Record<CountTileProps["tone"], string> = {
84
+ default: "text-muted-foreground",
85
+ warning: "text-amber-600 dark:text-amber-400",
86
+ danger: "text-destructive",
87
+ success: "text-emerald-600 dark:text-emerald-400",
88
+ };
89
+
90
+ const CountTile = ({ label, value, icon: Icon, tone }: CountTileProps) => (
91
+ <div className="flex items-center gap-3 rounded-lg border bg-card px-4 py-3">
92
+ <Icon className={`h-5 w-5 shrink-0 ${toneClasses[tone]}`} />
93
+ <div className="min-w-0">
94
+ <div className="text-xs font-medium text-muted-foreground">{label}</div>
95
+ <div className="text-2xl font-semibold tabular-nums">
96
+ {value === undefined ? "—" : formatNumber(value)}
97
+ </div>
98
+ </div>
99
+ </div>
100
+ );
101
+
102
+ interface JobsTableProps {
103
+ state: JobStateDto;
104
+ }
105
+
106
+ const JobsTable = ({ state }: JobsTableProps) => {
107
+ const queueClient = usePluginClient(QueueApi);
108
+ const [page, setPage] = useState(1);
109
+ const offset = (page - 1) * PAGE_SIZE;
110
+
111
+ const { data, isLoading, error } = queueClient.listJobs.useQuery(
112
+ { state, offset, limit: PAGE_SIZE },
113
+ { refetchInterval: REFRESH_INTERVAL_MS },
114
+ );
115
+
116
+ if (error) {
117
+ return <p className="text-sm text-destructive">Failed to load jobs.</p>;
118
+ }
119
+ if (isLoading) {
120
+ return <p className="text-sm text-muted-foreground">Loading…</p>;
121
+ }
122
+ if (!data || data.items.length === 0) {
123
+ return <p className="text-sm text-muted-foreground">No {state} jobs.</p>;
124
+ }
125
+
126
+ const showFinished = state === "completed" || state === "failed";
127
+ const showError = state === "failed";
128
+ const showState = state === "pending";
129
+ const showNextRun =
130
+ state === "pending" || state === "delayed" || state === "waiting";
131
+
132
+ // total may be null for backends that can't compute it cheaply; in that
133
+ // case we synthesise totalPages from hasMore so the next button stays usable.
134
+ const totalPages =
135
+ data.total === null
136
+ ? data.hasMore
137
+ ? page + 1
138
+ : page
139
+ : Math.max(1, Math.ceil(data.total / PAGE_SIZE));
140
+
141
+ return (
142
+ <div className="space-y-3">
143
+ <Table>
144
+ <TableHeader>
145
+ <TableRow>
146
+ <TableHead className="w-[140px]">Job ID</TableHead>
147
+ <TableHead>Queue</TableHead>
148
+ {showState && <TableHead>State</TableHead>}
149
+ <TableHead>Enqueued</TableHead>
150
+ {showNextRun && <TableHead>Next run</TableHead>}
151
+ {state === "active" && <TableHead>Running for</TableHead>}
152
+ {showFinished && <TableHead>Finished</TableHead>}
153
+ {showFinished && <TableHead>Duration</TableHead>}
154
+ <TableHead className="text-right">Attempts</TableHead>
155
+ {showError && <TableHead>Error</TableHead>}
156
+ </TableRow>
157
+ </TableHeader>
158
+ <TableBody>
159
+ {data.items.map((job) => (
160
+ <TableRow key={job.id}>
161
+ <TableCell
162
+ className="font-mono text-xs whitespace-nowrap"
163
+ title={job.id}
164
+ >
165
+ {truncateMiddle(job.id)}
166
+ </TableCell>
167
+ <TableCell>{job.name ?? "—"}</TableCell>
168
+ {showState && (
169
+ <TableCell className="capitalize">
170
+ {job.recurring ? "Recurring" : job.state}
171
+ </TableCell>
172
+ )}
173
+ <TableCell title={job.enqueuedAt.toString()}>
174
+ {formatRelative(job.enqueuedAt)}
175
+ </TableCell>
176
+ {showNextRun && (
177
+ <TableCell title={job.nextRunAt?.toString()}>
178
+ {formatCountdown(job.nextRunAt)}
179
+ </TableCell>
180
+ )}
181
+ {state === "active" && (
182
+ <TableCell>{formatDuration(job.startedAt)}</TableCell>
183
+ )}
184
+ {showFinished && (
185
+ <TableCell title={job.finishedAt?.toString()}>
186
+ {formatRelative(job.finishedAt)}
187
+ </TableCell>
188
+ )}
189
+ {showFinished && (
190
+ <TableCell>
191
+ {formatDuration(job.startedAt, job.finishedAt)}
192
+ </TableCell>
193
+ )}
194
+ <TableCell className="text-right tabular-nums">
195
+ {job.attempts}
196
+ </TableCell>
197
+ {showError && (
198
+ <TableCell
199
+ className="max-w-[280px] truncate text-destructive"
200
+ title={job.failedReason}
201
+ >
202
+ {job.failedReason ?? "—"}
203
+ </TableCell>
204
+ )}
205
+ </TableRow>
206
+ ))}
207
+ </TableBody>
208
+ </Table>
209
+ <Pagination
210
+ page={page}
211
+ totalPages={totalPages}
212
+ onPageChange={setPage}
213
+ total={data.total ?? undefined}
214
+ showTotal={data.total !== null}
215
+ />
216
+ </div>
217
+ );
218
+ };
219
+
220
+ const SUB_TABS = [
221
+ { id: "pending", label: "Pending", icon: <Hourglass className="h-4 w-4" /> },
222
+ { id: "active", label: "Active", icon: <PlayCircle className="h-4 w-4" /> },
223
+ {
224
+ id: "failed",
225
+ label: "Recent failed",
226
+ icon: <AlertTriangle className="h-4 w-4" />,
227
+ },
228
+ {
229
+ id: "completed",
230
+ label: "Recent completed",
231
+ icon: <CheckCircle2 className="h-4 w-4" />,
232
+ },
233
+ ] as const;
234
+
235
+ /**
236
+ * Queue Runtime panel. Aggregated counts, then a paginated tabbed listing
237
+ * of Active / Recent failed / Recent completed jobs. Job payloads are
238
+ * deliberately not surfaced — they may carry secrets.
239
+ */
240
+ export const QueueRuntimePanel = () => {
241
+ const queueClient = usePluginClient(QueueApi);
242
+ const { data: stats, isLoading, error } = queueClient.getStats.useQuery(
243
+ undefined,
244
+ { refetchInterval: REFRESH_INTERVAL_MS },
245
+ );
246
+ const [activeSubTab, setActiveSubTab] = useState<JobStateDto>("pending");
247
+
248
+ return (
249
+ <div className="space-y-4">
250
+ <InstanceScopeBanner
251
+ scope={stats?.scope ?? "instance"}
252
+ subject="Queue"
253
+ recommendation="Switch to a Redis-backed queue (e.g. BullMQ) for cluster-wide visibility."
254
+ />
255
+
256
+ <Card>
257
+ <CardHeader>
258
+ <CardTitle className="flex items-center gap-2">
259
+ <Activity className="h-5 w-5" />
260
+ Queue Runtime
261
+ </CardTitle>
262
+ <CardDescription>
263
+ Live aggregated job counts. Refreshes every{" "}
264
+ {REFRESH_INTERVAL_MS / 1000}s.
265
+ </CardDescription>
266
+ </CardHeader>
267
+ <CardContent className="space-y-6">
268
+ {error ? (
269
+ <div className="text-sm text-destructive">
270
+ Failed to load queue stats.
271
+ </div>
272
+ ) : (
273
+ <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
274
+ <CountTile
275
+ label="Pending"
276
+ value={isLoading ? undefined : stats?.pending}
277
+ icon={Clock}
278
+ tone="warning"
279
+ />
280
+ <CountTile
281
+ label="Processing"
282
+ value={isLoading ? undefined : stats?.processing}
283
+ icon={Loader2}
284
+ tone="default"
285
+ />
286
+ <CountTile
287
+ label="Completed"
288
+ value={isLoading ? undefined : stats?.completed}
289
+ icon={CheckCircle2}
290
+ tone="success"
291
+ />
292
+ <CountTile
293
+ label="Failed"
294
+ value={isLoading ? undefined : stats?.failed}
295
+ icon={AlertTriangle}
296
+ tone="danger"
297
+ />
298
+ </div>
299
+ )}
300
+
301
+ <div className="space-y-3">
302
+ <Tabs
303
+ items={SUB_TABS.map((t) => ({
304
+ id: t.id,
305
+ label: t.label,
306
+ icon: t.icon,
307
+ }))}
308
+ activeTab={activeSubTab}
309
+ onTabChange={(id) => setActiveSubTab(id as JobStateDto)}
310
+ />
311
+ <TabPanel id="pending" activeTab={activeSubTab}>
312
+ <JobsTable state="pending" />
313
+ </TabPanel>
314
+ <TabPanel id="active" activeTab={activeSubTab}>
315
+ <JobsTable state="active" />
316
+ </TabPanel>
317
+ <TabPanel id="failed" activeTab={activeSubTab}>
318
+ <JobsTable state="failed" />
319
+ </TabPanel>
320
+ <TabPanel id="completed" activeTab={activeSubTab}>
321
+ <JobsTable state="completed" />
322
+ </TabPanel>
323
+ </div>
324
+ </CardContent>
325
+ </Card>
326
+ </div>
327
+ );
328
+ };
package/src/index.tsx CHANGED
@@ -1,25 +1,28 @@
1
- import { createFrontendPlugin } from "@checkstack/frontend-api";
2
- import { registerInfrastructureTab } from "@checkstack/infrastructure-common";
1
+ import {
2
+ createFrontendPlugin,
3
+ createSlotExtension,
4
+ } from "@checkstack/frontend-api";
5
+ import { InfrastructureTabsSlot } from "@checkstack/infrastructure-common";
3
6
  import { pluginMetadata, queueAccess } from "@checkstack/queue-common";
4
- import { QueueConfigTab } from "./components/QueueConfigTab";
7
+ import { QueueInfrastructureTab } from "./components/QueueInfrastructureTab";
5
8
  import { Gauge } from "lucide-react";
6
9
 
7
- // Register queue tab into the Infrastructure Configuration page
8
- registerInfrastructureTab({
9
- id: "queue",
10
- pluginId: pluginMetadata.pluginId,
11
- label: "Queue",
12
- icon: Gauge,
13
- component: QueueConfigTab,
14
- readAccess: queueAccess.settings.read,
15
- manageAccess: queueAccess.settings.manage,
16
- order: 10, // First tab
17
- });
18
-
19
10
  export const queuePlugin = createFrontendPlugin({
20
11
  metadata: pluginMetadata,
21
- // No routes — the queue tab lives inside the infrastructure page now
22
- // Former standalone /queue/config route is replaced by /infrastructure/config
12
+ // No routes — the queue tab lives inside the infrastructure page.
13
+ extensions: [
14
+ createSlotExtension(InfrastructureTabsSlot, {
15
+ id: "queue.infrastructure.tab",
16
+ component: QueueInfrastructureTab,
17
+ metadata: {
18
+ label: "Queue",
19
+ icon: Gauge,
20
+ readAccess: queueAccess.settings.read,
21
+ manageAccess: queueAccess.settings.manage,
22
+ order: 10,
23
+ },
24
+ }),
25
+ ],
23
26
  });
24
27
 
25
28
  export * from "./api";