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