@sentry/junior-dashboard 0.233.0 → 0.234.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 (39) hide show
  1. package/dist/app.js +89 -15
  2. package/dist/client.js +55 -52
  3. package/dist/index.js +89 -15
  4. package/dist/tailwind.css +1 -1
  5. package/package.json +3 -3
  6. package/src/client/App.tsx +359 -345
  7. package/src/client/api.ts +17 -1
  8. package/src/client/components/ActorAvatar.tsx +37 -0
  9. package/src/client/components/Button.tsx +12 -10
  10. package/src/client/components/Field.tsx +14 -1
  11. package/src/client/components/FormNotice.tsx +40 -0
  12. package/src/client/components/ParticipantAvatarStack.tsx +6 -14
  13. package/src/client/components/README.md +11 -2
  14. package/src/client/components/Select.tsx +18 -0
  15. package/src/client/components/StatusChip.tsx +15 -12
  16. package/src/client/components/TextInput.tsx +25 -5
  17. package/src/client/http.ts +31 -3
  18. package/src/client/pages/automations/AutomationDetailsDrawer.tsx +71 -54
  19. package/src/client/pages/automations/AutomationEditPage.tsx +172 -0
  20. package/src/client/pages/automations/AutomationEditor.tsx +397 -0
  21. package/src/client/pages/automations/AutomationEditorLoading.tsx +18 -0
  22. package/src/client/pages/automations/AutomationEventFields.tsx +264 -0
  23. package/src/client/pages/automations/AutomationFilters.tsx +171 -0
  24. package/src/client/pages/automations/AutomationFormSection.tsx +22 -0
  25. package/src/client/pages/automations/AutomationLifecycle.tsx +146 -0
  26. package/src/client/pages/automations/AutomationOutcomeFields.tsx +177 -0
  27. package/src/client/pages/automations/AutomationRow.tsx +358 -0
  28. package/src/client/pages/automations/AutomationScheduleFields.tsx +328 -0
  29. package/src/client/pages/automations/AutomationsPage.tsx +157 -408
  30. package/src/client/pages/automations/AutomationsPageLayout.tsx +16 -5
  31. package/src/client/pages/automations/README.md +19 -0
  32. package/src/client/pages/automations/automationDraft.ts +110 -0
  33. package/src/client/pages/automations/automationOutcomes.ts +23 -0
  34. package/src/client/pages/dev/ComponentsPage.tsx +50 -4
  35. package/src/client/searchParams.ts +4 -2
  36. package/src/client.tsx +7 -4
  37. package/src/mock-reporting/automation-collection.ts +101 -0
  38. package/src/mock-reporting/fixtures.ts +9 -3
  39. package/src/mock-reporting/routes.ts +14 -9
@@ -1,3 +1,4 @@
1
+ import { AutomationEditPage } from "./pages/automations/AutomationEditPage";
1
2
  import { useEffect, useMemo, useState } from "react";
2
3
  import { Navigate, Route, Routes, useLocation } from "react-router";
3
4
 
@@ -136,7 +137,10 @@ export function DashboardShell() {
136
137
 
137
138
  return (
138
139
  <DashboardChromeProvider>
139
- <VisualViewportShell className={dashboardShellBgClass} enabled={workspace}>
140
+ <VisualViewportShell
141
+ className={dashboardShellBgClass}
142
+ enabled={workspace}
143
+ >
140
144
  <DashboardChrome
141
145
  banner={
142
146
  <>
@@ -201,357 +205,367 @@ export function DashboardShell() {
201
205
  }
202
206
  />
203
207
  <Routes>
204
- <Route element={<LegacyAutomationsRedirect />} path="/tasks" />
205
- <Route element={<LegacyAutomationsRedirect />} path="/tasks/*" />
206
- <Route
207
- element={
208
- loading ? (
209
- <AutomationsPageLayout>
210
- <AutomationsRouteLoading
211
- description="Terminal runs for one scheduled or event automation."
212
- label="Loading automation executions"
213
- title="Automation executions"
214
- variant="list"
208
+ <Route element={<LegacyAutomationsRedirect />} path="/tasks" />
209
+ <Route element={<LegacyAutomationsRedirect />} path="/tasks/*" />
210
+ <Route
211
+ element={
212
+ loading ? (
213
+ <AutomationsPageLayout>
214
+ <AutomationsRouteLoading
215
+ description="Terminal runs for one scheduled or event automation."
216
+ label="Loading automation executions"
217
+ title="Automation executions"
218
+ variant="list"
219
+ />
220
+ </AutomationsPageLayout>
221
+ ) : loggedIn ? (
222
+ <AutomationsPageLayout>
223
+ <AutomationExecutionsPage enabled={loggedIn} />
224
+ </AutomationsPageLayout>
225
+ ) : (
226
+ <Navigate replace to="/" />
227
+ )
228
+ }
229
+ path="/automations/:kind/:automationId/executions"
230
+ />
231
+ <Route
232
+ element={
233
+ loading ? (
234
+ <AutomationsPageLayout>
235
+ <AutomationsRouteLoading
236
+ description="Newest runs across your automations and automations in public destinations."
237
+ label="Loading automation runs"
238
+ title="Runs"
239
+ variant="list"
240
+ />
241
+ </AutomationsPageLayout>
242
+ ) : loggedIn ? (
243
+ <AutomationsPageLayout>
244
+ <AutomationRunsPage enabled={loggedIn} />
245
+ </AutomationsPageLayout>
246
+ ) : (
247
+ <Navigate replace to="/" />
248
+ )
249
+ }
250
+ path="/automations/runs"
251
+ />
252
+ <Route
253
+ element={
254
+ loading ? (
255
+ <AutomationsPageLayout>
256
+ <AutomationsRouteLoading
257
+ description="Find and manage automations across your linked workspaces."
258
+ label="Loading automations"
259
+ title="All automations"
260
+ variant="list"
261
+ />
262
+ </AutomationsPageLayout>
263
+ ) : loggedIn ? (
264
+ <AutomationsPageLayout>
265
+ <AutomationsPage enabled={loggedIn} view="list" />
266
+ </AutomationsPageLayout>
267
+ ) : (
268
+ <Navigate replace to="/" />
269
+ )
270
+ }
271
+ path="/automations/list"
272
+ />
273
+ <Route
274
+ path="/automations/:kind/:automationId/edit"
275
+ element={
276
+ loading || loggedIn ? (
277
+ <AutomationEditPage enabled={loggedIn} />
278
+ ) : (
279
+ <Navigate replace to="/" />
280
+ )
281
+ }
282
+ />
283
+ <Route
284
+ element={
285
+ loading ? (
286
+ <AutomationsPageLayout>
287
+ <AutomationsRouteLoading
288
+ description="Find and manage automations across your linked workspaces."
289
+ label="Loading automations"
290
+ title="All automations"
291
+ variant="list"
292
+ />
293
+ </AutomationsPageLayout>
294
+ ) : loggedIn ? (
295
+ <AutomationsPageLayout>
296
+ <AutomationsPage enabled={loggedIn} view="list" />
297
+ </AutomationsPageLayout>
298
+ ) : (
299
+ <Navigate replace to="/" />
300
+ )
301
+ }
302
+ path="/automations/:automationId"
303
+ />
304
+ <Route
305
+ element={
306
+ loading ? (
307
+ <AutomationsPageLayout>
308
+ <AutomationsRouteLoading
309
+ description="Scheduled and event-driven work created by users."
310
+ label="Loading automations"
311
+ title="Automations"
312
+ variant="stats"
313
+ />
314
+ </AutomationsPageLayout>
315
+ ) : loggedIn ? (
316
+ <AutomationsPageLayout>
317
+ <AutomationsPage enabled={loggedIn} view="overview" />
318
+ </AutomationsPageLayout>
319
+ ) : (
320
+ <Navigate replace to="/" />
321
+ )
322
+ }
323
+ path="/automations"
324
+ />
325
+ <Route
326
+ element={<LegacySystemRedirect section="locations" />}
327
+ path="/locations"
328
+ />
329
+ <Route
330
+ element={<LegacySystemRedirect section="locations" />}
331
+ path="/locations/:locationId"
332
+ />
333
+ <Route
334
+ element={
335
+ loading ? (
336
+ <SystemRouteLoading
337
+ description="Public destinations and their conversation activity."
338
+ label="Loading locations"
339
+ title="Locations"
340
+ variant="stats"
215
341
  />
216
- </AutomationsPageLayout>
217
- ) : loggedIn ? (
218
- <AutomationsPageLayout>
219
- <AutomationExecutionsPage enabled={loggedIn} />
220
- </AutomationsPageLayout>
221
- ) : (
222
- <Navigate replace to="/" />
223
- )
224
- }
225
- path="/automations/:kind/:automationId/executions"
226
- />
227
- <Route
228
- element={
229
- loading ? (
230
- <AutomationsPageLayout>
231
- <AutomationsRouteLoading
232
- description="Newest runs across your automations and automations in public destinations."
233
- label="Loading automation runs"
234
- title="Runs"
235
- variant="list"
342
+ ) : (
343
+ <LocationsPage />
344
+ )
345
+ }
346
+ path="/system/locations"
347
+ />
348
+ <Route
349
+ element={
350
+ loading ? (
351
+ <SystemPageLayout>
352
+ <LoadingView label="Loading location" />
353
+ </SystemPageLayout>
354
+ ) : (
355
+ <LocationDetailPage />
356
+ )
357
+ }
358
+ path="/system/locations/:locationId"
359
+ />
360
+ <Route
361
+ element={
362
+ loading ? (
363
+ <ConversationWorkspaceLoading detail={false} />
364
+ ) : data ? (
365
+ <ConversationWorkspace />
366
+ ) : (
367
+ <LoadingView
368
+ label={query.error?.message ?? "Dashboard unavailable"}
236
369
  />
237
- </AutomationsPageLayout>
238
- ) : loggedIn ? (
239
- <AutomationsPageLayout>
240
- <AutomationRunsPage enabled={loggedIn} />
241
- </AutomationsPageLayout>
242
- ) : (
243
- <Navigate replace to="/" />
244
- )
245
- }
246
- path="/automations/runs"
247
- />
248
- <Route
249
- element={
250
- loading ? (
251
- <AutomationsPageLayout>
252
- <AutomationsRouteLoading
253
- description="Find and manage automations across your linked workspaces."
254
- label="Loading automations"
255
- title="All automations"
256
- variant="list"
370
+ )
371
+ }
372
+ path="/"
373
+ />
374
+ <Route element={<CodePage />} path="/code" />
375
+ <Route
376
+ element={<Navigate replace to="/" />}
377
+ path="/conversations/new"
378
+ />
379
+ <Route
380
+ element={
381
+ loading ? (
382
+ <ConversationWorkspaceLoading detail />
383
+ ) : data ? (
384
+ <ConversationWorkspace />
385
+ ) : (
386
+ <LoadingView
387
+ label={query.error?.message ?? "Dashboard unavailable"}
257
388
  />
258
- </AutomationsPageLayout>
259
- ) : loggedIn ? (
260
- <AutomationsPageLayout>
261
- <AutomationsPage enabled={loggedIn} view="list" />
262
- </AutomationsPageLayout>
263
- ) : (
264
- <Navigate replace to="/" />
265
- )
266
- }
267
- path="/automations/list"
268
- />
269
- <Route
270
- element={
271
- loading ? (
272
- <AutomationsPageLayout>
273
- <AutomationsRouteLoading
274
- description="Find and manage automations across your linked workspaces."
275
- label="Loading automations"
276
- title="All automations"
277
- variant="list"
389
+ )
390
+ }
391
+ path="/conversations/:conversationId"
392
+ />
393
+ <Route element={<Navigate replace to="/" />} path="/conversations" />
394
+ <Route
395
+ element={
396
+ loading ? (
397
+ <LoadingView label="Loading components" />
398
+ ) : !data ? (
399
+ <LoadingView
400
+ label={query.error?.message ?? "Dashboard unavailable"}
278
401
  />
279
- </AutomationsPageLayout>
280
- ) : loggedIn ? (
281
- <AutomationsPageLayout>
282
- <AutomationsPage enabled={loggedIn} view="list" />
283
- </AutomationsPageLayout>
284
- ) : (
285
- <Navigate replace to="/" />
286
- )
287
- }
288
- path="/automations/:automationId"
289
- />
290
- <Route
291
- element={
292
- loading ? (
293
- <AutomationsPageLayout>
294
- <AutomationsRouteLoading
295
- description="Scheduled and event-driven work created by users."
296
- label="Loading automations"
297
- title="Automations"
402
+ ) : data.config.componentGallery ? (
403
+ <ComponentsPage />
404
+ ) : (
405
+ <Navigate replace to="/" />
406
+ )
407
+ }
408
+ path="/dev/*"
409
+ />
410
+ <Route
411
+ element={<LegacySystemRedirect section="people" />}
412
+ path="/people"
413
+ />
414
+ <Route
415
+ element={
416
+ loading ? (
417
+ <LoadingView label="Loading profile" />
418
+ ) : (
419
+ <PersonProfilePage />
420
+ )
421
+ }
422
+ path="/people/:email"
423
+ />
424
+ <Route
425
+ element={
426
+ loading ? (
427
+ <SystemRouteLoading
428
+ description="People, activity, and model spend."
429
+ label="Loading people"
430
+ title="People"
298
431
  variant="stats"
299
432
  />
300
- </AutomationsPageLayout>
301
- ) : loggedIn ? (
302
- <AutomationsPageLayout>
303
- <AutomationsPage enabled={loggedIn} view="overview" />
304
- </AutomationsPageLayout>
305
- ) : (
306
- <Navigate replace to="/" />
307
- )
308
- }
309
- path="/automations"
310
- />
311
- <Route
312
- element={<LegacySystemRedirect section="locations" />}
313
- path="/locations"
314
- />
315
- <Route
316
- element={<LegacySystemRedirect section="locations" />}
317
- path="/locations/:locationId"
318
- />
319
- <Route
320
- element={
321
- loading ? (
322
- <SystemRouteLoading
323
- description="Public destinations and their conversation activity."
324
- label="Loading locations"
325
- title="Locations"
326
- variant="stats"
327
- />
328
- ) : (
329
- <LocationsPage />
330
- )
331
- }
332
- path="/system/locations"
333
- />
334
- <Route
335
- element={
336
- loading ? (
337
- <SystemPageLayout>
338
- <LoadingView label="Loading location" />
339
- </SystemPageLayout>
340
- ) : (
341
- <LocationDetailPage />
342
- )
343
- }
344
- path="/system/locations/:locationId"
345
- />
346
- <Route
347
- element={
348
- loading ? (
349
- <ConversationWorkspaceLoading detail={false} />
350
- ) : data ? (
351
- <ConversationWorkspace />
352
- ) : (
353
- <LoadingView
354
- label={query.error?.message ?? "Dashboard unavailable"}
355
- />
356
- )
357
- }
358
- path="/"
359
- />
360
- <Route element={<CodePage />} path="/code" />
361
- <Route
362
- element={<Navigate replace to="/" />}
363
- path="/conversations/new"
364
- />
365
- <Route
366
- element={
367
- loading ? (
368
- <ConversationWorkspaceLoading detail />
369
- ) : data ? (
370
- <ConversationWorkspace />
371
- ) : (
372
- <LoadingView
373
- label={query.error?.message ?? "Dashboard unavailable"}
374
- />
375
- )
376
- }
377
- path="/conversations/:conversationId"
378
- />
379
- <Route element={<Navigate replace to="/" />} path="/conversations" />
380
- <Route
381
- element={
382
- loading ? (
383
- <LoadingView label="Loading components" />
384
- ) : !data ? (
385
- <LoadingView
386
- label={query.error?.message ?? "Dashboard unavailable"}
387
- />
388
- ) : data.config.componentGallery ? (
389
- <ComponentsPage />
390
- ) : (
391
- <Navigate replace to="/" />
392
- )
393
- }
394
- path="/dev/*"
395
- />
396
- <Route
397
- element={<LegacySystemRedirect section="people" />}
398
- path="/people"
399
- />
400
- <Route
401
- element={
402
- loading ? (
403
- <LoadingView label="Loading profile" />
404
- ) : (
405
- <PersonProfilePage />
406
- )
407
- }
408
- path="/people/:email"
409
- />
410
- <Route
411
- element={
412
- loading ? (
413
- <SystemRouteLoading
414
- description="People, activity, and model spend."
415
- label="Loading people"
416
- title="People"
417
- variant="stats"
418
- />
419
- ) : (
420
- <PeoplePage />
421
- )
422
- }
423
- path="/system/people"
424
- />
425
- <Route
426
- element={
427
- loading ? (
428
- <SystemRouteLoading
429
- description="Repository recipes Junior can switch into."
430
- label="Loading Workspaces"
431
- title="Workspaces"
432
- variant="list"
433
- />
434
- ) : (
435
- <WorkspacesPage />
436
- )
437
- }
438
- path="/system/workspaces"
439
- />
440
- <Route
441
- element={
442
- loading ? (
443
- <SystemPageLayout>
444
- <LoadingView label="Loading Workspace" />
445
- </SystemPageLayout>
446
- ) : (
447
- <WorkspaceFormPage />
448
- )
449
- }
450
- path="/system/workspaces/new"
451
- />
452
- <Route
453
- element={
454
- loading ? (
455
- <SystemPageLayout>
456
- <LoadingView label="Loading Workspace" />
457
- </SystemPageLayout>
458
- ) : (
459
- <WorkspaceFormPage />
460
- )
461
- }
462
- path="/system/workspaces/:workspaceId"
463
- />
464
- <Route
465
- element={
466
- loading ? (
467
- <SystemRouteLoading
468
- description="Runtime health, model usage, and loaded capabilities."
469
- label="Loading system"
470
- title="System"
471
- variant="overview"
472
- />
473
- ) : data ? (
474
- <SystemRoute coreData={data} />
475
- ) : (
476
- <SystemPageLayout>
477
- <LoadingView
478
- label={query.error?.message ?? "Dashboard unavailable"}
433
+ ) : (
434
+ <PeoplePage />
435
+ )
436
+ }
437
+ path="/system/people"
438
+ />
439
+ <Route
440
+ element={
441
+ loading ? (
442
+ <SystemRouteLoading
443
+ description="Repository recipes Junior can switch into."
444
+ label="Loading Workspaces"
445
+ title="Workspaces"
446
+ variant="list"
479
447
  />
480
- </SystemPageLayout>
481
- )
482
- }
483
- path="/system/*"
484
- />
485
- <Route
486
- element={
487
- loading ? (
488
- <PageRouteLoading
489
- description="Manage your Junior profile and preferences."
490
- label="Loading settings"
491
- title="Settings"
492
- />
493
- ) : loggedIn ? (
494
- <SettingsPage identity={data!.me} />
495
- ) : (
496
- <Navigate replace to="/" />
497
- )
498
- }
499
- path="/settings"
500
- />
501
- <Route
502
- element={
503
- loading ? (
504
- <PageRouteLoading
505
- description="Create and revoke personal API tokens."
506
- label="Loading API tokens"
507
- title="API tokens"
508
- variant="list"
509
- />
510
- ) : loggedIn ? (
511
- <PersonalTokensPage />
512
- ) : (
513
- <Navigate replace to="/" />
514
- )
515
- }
516
- path="/settings/api-tokens"
517
- />
518
- <Route
519
- element={
520
- loading || userPagesQuery.isPending ? (
521
- <MemoryRouteLoading label="Loading memories" />
522
- ) : loggedIn && userPagesQuery.data ? (
523
- <MemoryPermalinkRoute pages={userPagesQuery.data} />
524
- ) : (
525
- <Navigate replace to="/" />
526
- )
527
- }
528
- path="/memories/library"
529
- />
530
- <Route
531
- element={
532
- loading || userPagesQuery.isPending ? (
533
- <MemoryRouteLoading label="Loading memory" />
534
- ) : loggedIn && userPagesQuery.data ? (
535
- <MemoryPermalinkRoute pages={userPagesQuery.data} />
536
- ) : (
537
- <Navigate replace to="/" />
538
- )
539
- }
540
- path="/memories/:memoryId?"
541
- />
542
- <Route
543
- element={
544
- loading || userPagesQuery.isPending ? (
545
- <LoadingView label="Loading page" />
546
- ) : loggedIn && userPagesQuery.data ? (
547
- <PluginUserPageRoute pages={userPagesQuery.data} />
548
- ) : (
549
- <Navigate replace to="/" />
550
- )
551
- }
552
- path="/plugins/:pluginName/:pageId/*"
553
- />
554
- <Route element={<Navigate replace to="/" />} path="*" />
448
+ ) : (
449
+ <WorkspacesPage />
450
+ )
451
+ }
452
+ path="/system/workspaces"
453
+ />
454
+ <Route
455
+ element={
456
+ loading ? (
457
+ <SystemPageLayout>
458
+ <LoadingView label="Loading Workspace" />
459
+ </SystemPageLayout>
460
+ ) : (
461
+ <WorkspaceFormPage />
462
+ )
463
+ }
464
+ path="/system/workspaces/new"
465
+ />
466
+ <Route
467
+ element={
468
+ loading ? (
469
+ <SystemPageLayout>
470
+ <LoadingView label="Loading Workspace" />
471
+ </SystemPageLayout>
472
+ ) : (
473
+ <WorkspaceFormPage />
474
+ )
475
+ }
476
+ path="/system/workspaces/:workspaceId"
477
+ />
478
+ <Route
479
+ element={
480
+ loading ? (
481
+ <SystemRouteLoading
482
+ description="Runtime health, model usage, and loaded capabilities."
483
+ label="Loading system"
484
+ title="System"
485
+ variant="overview"
486
+ />
487
+ ) : data ? (
488
+ <SystemRoute coreData={data} />
489
+ ) : (
490
+ <SystemPageLayout>
491
+ <LoadingView
492
+ label={query.error?.message ?? "Dashboard unavailable"}
493
+ />
494
+ </SystemPageLayout>
495
+ )
496
+ }
497
+ path="/system/*"
498
+ />
499
+ <Route
500
+ element={
501
+ loading ? (
502
+ <PageRouteLoading
503
+ description="Manage your Junior profile and preferences."
504
+ label="Loading settings"
505
+ title="Settings"
506
+ />
507
+ ) : loggedIn ? (
508
+ <SettingsPage identity={data!.me} />
509
+ ) : (
510
+ <Navigate replace to="/" />
511
+ )
512
+ }
513
+ path="/settings"
514
+ />
515
+ <Route
516
+ element={
517
+ loading ? (
518
+ <PageRouteLoading
519
+ description="Create and revoke personal API tokens."
520
+ label="Loading API tokens"
521
+ title="API tokens"
522
+ variant="list"
523
+ />
524
+ ) : loggedIn ? (
525
+ <PersonalTokensPage />
526
+ ) : (
527
+ <Navigate replace to="/" />
528
+ )
529
+ }
530
+ path="/settings/api-tokens"
531
+ />
532
+ <Route
533
+ element={
534
+ loading || userPagesQuery.isPending ? (
535
+ <MemoryRouteLoading label="Loading memories" />
536
+ ) : loggedIn && userPagesQuery.data ? (
537
+ <MemoryPermalinkRoute pages={userPagesQuery.data} />
538
+ ) : (
539
+ <Navigate replace to="/" />
540
+ )
541
+ }
542
+ path="/memories/library"
543
+ />
544
+ <Route
545
+ element={
546
+ loading || userPagesQuery.isPending ? (
547
+ <MemoryRouteLoading label="Loading memory" />
548
+ ) : loggedIn && userPagesQuery.data ? (
549
+ <MemoryPermalinkRoute pages={userPagesQuery.data} />
550
+ ) : (
551
+ <Navigate replace to="/" />
552
+ )
553
+ }
554
+ path="/memories/:memoryId?"
555
+ />
556
+ <Route
557
+ element={
558
+ loading || userPagesQuery.isPending ? (
559
+ <LoadingView label="Loading page" />
560
+ ) : loggedIn && userPagesQuery.data ? (
561
+ <PluginUserPageRoute pages={userPagesQuery.data} />
562
+ ) : (
563
+ <Navigate replace to="/" />
564
+ )
565
+ }
566
+ path="/plugins/:pluginName/:pageId/*"
567
+ />
568
+ <Route element={<Navigate replace to="/" />} path="*" />
555
569
  </Routes>
556
570
  <span
557
571
  aria-hidden="true"