@agimon-ai/po-template-advanced 0.0.0-alpha.2 → 0.0.0-alpha.21

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.
@@ -2,8 +2,8 @@ import { defineWebPlugin, defineWebTemplate } from "@agimon-ai/po-core/web";
2
2
  import { DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, HOST_SLOTS, findTransientTab, pluginActivityGroups, refreshWebPluginCompositions, sessionsStore, setDockOpen, settingsSection, transientTabsStore, uiStore, updateWorkspaceAdmission, useActiveSession, useActiveSessionMeta, useDashboardRoute, useDashboardState, useNoSessions, usePluginSlotProps, useSessionMcp, useWebPluginRegistry, watchDashboardTranscript, webTabs, workspaceAdmissionStore, workspacesStore } from "@agimon-ai/po-web-dashboard";
3
3
  import { ActivityDock, AppearanceSettings, CommandPalette, Composer, ContributedSettings, DialogOverlay, ImageSettings, NotificationSettings, PairingApprovalDialog, PluginSettings, PluginSurface, ProviderSettings, RefusedCard, RemoteAccessDialog, RemoteControlSettings, RepositoryWorkspace, SelectionBar, SessionActivity, SessionMcp, SessionRailDialogs, SessionTranscriptView, SettingsMenu, SettingsPanelHost, ThreadView, Timeline, TopBar, WelcomePanel, useSessionRail } from "@agimon-ai/po-web-dashboard/views";
4
4
  import { useStore } from "@tanstack/react-store";
5
- import { useEffect, useRef, useState } from "react";
6
- import { ActivityIcon, AlertIcon, Avatar, AvatarFallback, AvatarImage, BranchIcon, Button, ChevronUpIcon, CloseIcon, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, FolderIcon, ForkIcon, GearIcon, Input, Kbd, KebabIcon, LoaderIcon, NavTab, OptionRow, PlusIcon, ShieldIcon, cn } from "@agimon-ai/po-web-components";
5
+ import { useEffect, useId, useRef, useState } from "react";
6
+ import { ActivityIcon, AlertIcon, Avatar, AvatarFallback, AvatarImage, Badge, BranchIcon, Button, Checkbox, ChevronUpIcon, CloseIcon, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Dot, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, EditIcon, FolderIcon, ForkIcon, GearIcon, Input, Kbd, KebabIcon, LoaderIcon, NavTab, OptionRow, PlusIcon, ShieldIcon, TrashIcon, UsersIcon, cn } from "@agimon-ai/po-web-components";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Link, useNavigate } from "@tanstack/react-router";
9
9
  //#region src/extensions/(frontend)/template/_components/AdvancedFolderBrowser.tsx
@@ -31,7 +31,7 @@ function AdvancedFolderBrowser({ start, listDirectory, onSelect }) {
31
31
  }, [target, listDirectory]);
32
32
  return /* @__PURE__ */ jsxs("div", {
33
33
  "data-testid": "folder-browser",
34
- className: "flex flex-col gap-1 rounded border border-doom-border bg-doom-deep p-1",
34
+ className: "flex flex-col gap-1 rounded border border-po-border bg-po-deep p-1",
35
35
  children: [
36
36
  /* @__PURE__ */ jsxs("div", {
37
37
  className: "flex items-center gap-1 px-1",
@@ -47,7 +47,7 @@ function AdvancedFolderBrowser({ start, listDirectory, onSelect }) {
47
47
  children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-3 w-3" })
48
48
  }),
49
49
  /* @__PURE__ */ jsx("span", {
50
- className: "min-w-0 flex-1 truncate text-sm text-doom-dim",
50
+ className: "min-w-0 flex-1 truncate text-sm text-po-dim",
51
51
  title: listing?.path,
52
52
  children: listing?.path ?? "loading…"
53
53
  }),
@@ -62,7 +62,7 @@ function AdvancedFolderBrowser({ start, listDirectory, onSelect }) {
62
62
  ]
63
63
  }),
64
64
  error ? /* @__PURE__ */ jsx("p", {
65
- className: "px-2 py-1 text-sm text-doom-red",
65
+ className: "px-2 py-1 text-sm text-po-red",
66
66
  children: error
67
67
  }) : null,
68
68
  /* @__PURE__ */ jsxs("div", {
@@ -70,7 +70,7 @@ function AdvancedFolderBrowser({ start, listDirectory, onSelect }) {
70
70
  "aria-label": "folders",
71
71
  className: "max-h-40 overflow-y-auto",
72
72
  children: [listing !== null && listing.directories.length === 0 ? /* @__PURE__ */ jsx("p", {
73
- className: "px-2 py-1 text-sm text-doom-dim",
73
+ className: "px-2 py-1 text-sm text-po-dim",
74
74
  children: "no folders here"
75
75
  }) : null, listing?.directories.map((directory) => /* @__PURE__ */ jsx(OptionRow, {
76
76
  density: "compact",
@@ -149,7 +149,7 @@ function AdvancedAddWorkspaceDialog({ suggestedPaths, actions }) {
149
149
  htmlFor: "add-workspace-name",
150
150
  className: "flex flex-col gap-1",
151
151
  children: [/* @__PURE__ */ jsx("span", {
152
- className: "text-base font-medium text-doom-dim",
152
+ className: "text-base font-medium text-po-dim",
153
153
  children: "name"
154
154
  }), /* @__PURE__ */ jsx(Input, {
155
155
  id: "add-workspace-name",
@@ -170,9 +170,9 @@ function AdvancedAddWorkspaceDialog({ suggestedPaths, actions }) {
170
170
  htmlFor: "add-workspace-root",
171
171
  className: "flex flex-col gap-1",
172
172
  children: [/* @__PURE__ */ jsxs("span", {
173
- className: "text-base font-medium text-doom-dim",
173
+ className: "text-base font-medium text-po-dim",
174
174
  children: ["folder ", /* @__PURE__ */ jsx("span", {
175
- className: "text-doom-dim",
175
+ className: "text-po-dim",
176
176
  children: "(optional; type a path or browse)"
177
177
  })]
178
178
  }), /* @__PURE__ */ jsxs("span", {
@@ -219,7 +219,7 @@ function AdvancedAddWorkspaceDialog({ suggestedPaths, actions }) {
219
219
  role: "listbox",
220
220
  "aria-label": "matching directories",
221
221
  "data-testid": "add-workspace-suggestions",
222
- className: "max-h-40 overflow-y-auto rounded border border-doom-border bg-doom-deep p-1",
222
+ className: "max-h-40 overflow-y-auto rounded border border-po-border bg-po-deep p-1",
223
223
  children: suggestions.map((directory, index) => /* @__PURE__ */ jsx(OptionRow, {
224
224
  density: "compact",
225
225
  active: index === highlight,
@@ -242,11 +242,11 @@ function AdvancedAddWorkspaceDialog({ suggestedPaths, actions }) {
242
242
  }) : null,
243
243
  trimmedPath === "" && shownName.trim() !== "" ? /* @__PURE__ */ jsxs("p", {
244
244
  "data-testid": "add-workspace-default-hint",
245
- className: "text-sm text-doom-dim",
245
+ className: "text-sm text-po-dim",
246
246
  children: ["creates ~/.po/workspace/", shownName.trim()]
247
247
  }) : null,
248
248
  error ? /* @__PURE__ */ jsx("pre", {
249
- className: "max-h-28 overflow-y-auto rounded border border-doom-edge-red bg-doom-tint-red/40 px-2.5 py-2 text-sm whitespace-pre-wrap text-doom-red",
249
+ className: "max-h-28 overflow-y-auto rounded border border-po-edge-red bg-po-tint-red/40 px-2.5 py-2 text-sm whitespace-pre-wrap text-po-red",
250
250
  children: error
251
251
  }) : null,
252
252
  /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
@@ -286,12 +286,12 @@ function AdvancedPendingSetup({ sessionId, setup, actions }) {
286
286
  };
287
287
  return /* @__PURE__ */ jsxs("div", {
288
288
  "data-testid": `pending-session-${setup.id}`,
289
- className: "ml-4 rounded-md border border-doom-border-soft bg-doom-panel p-3",
289
+ className: "ml-4 rounded-md border border-po-border-soft bg-po-panel p-3",
290
290
  children: [
291
291
  /* @__PURE__ */ jsxs("div", {
292
292
  className: "flex items-center justify-between gap-2",
293
293
  children: [/* @__PURE__ */ jsx("span", {
294
- className: "truncate text-base font-semibold text-doom-hi",
294
+ className: "truncate text-base font-semibold text-po-hi",
295
295
  children: setup.name
296
296
  }), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
297
297
  asChild: true,
@@ -310,25 +310,398 @@ function AdvancedPendingSetup({ sessionId, setup, actions }) {
310
310
  }) })] })]
311
311
  }),
312
312
  /* @__PURE__ */ jsx("p", {
313
- className: setup.failed ? "text-sm text-doom-red" : "text-sm text-doom-dim",
313
+ className: setup.failed ? "text-sm text-po-red" : "text-sm text-po-dim",
314
314
  children: setup.status
315
315
  }),
316
316
  setup.recovery ? /* @__PURE__ */ jsx("p", {
317
317
  role: setup.failed ? "alert" : void 0,
318
- className: "text-sm text-doom-dim",
318
+ className: "text-sm text-po-dim",
319
319
  children: setup.recovery
320
320
  }) : null,
321
321
  error ? /* @__PURE__ */ jsx("p", {
322
322
  role: "alert",
323
- className: "text-sm text-doom-red",
323
+ className: "text-sm text-po-red",
324
324
  children: error
325
325
  }) : null
326
326
  ]
327
327
  });
328
328
  }
329
329
  //#endregion
330
+ //#region src/extensions/(frontend)/template/_components/AdvancedSessionGroups.tsx
331
+ /** Mirrors the server's limits so the dialog can say no before a round trip. */
332
+ const MAX_GROUPS = 8;
333
+ const MAX_GROUP_LENGTH = 32;
334
+ /** Every group some session uses, in rail order, with the other sessions in it. */
335
+ function sessionGroupOptions(sessions, editedId, extra = []) {
336
+ return [.../* @__PURE__ */ new Set([...sessions.flatMap((session) => session.groups ?? []), ...extra])].map((name) => ({
337
+ name,
338
+ members: sessions.filter((session) => session.id !== editedId && session.groups?.includes(name) === true).map((session) => session.name || "Untitled")
339
+ }));
340
+ }
341
+ /** The card's group row: one wrapping line of chips under the branch line. */
342
+ function AdvancedSessionGroupChips({ groups, indent }) {
343
+ return /* @__PURE__ */ jsxs("span", {
344
+ "data-testid": "session-groups",
345
+ "aria-label": "groups",
346
+ className: `flex min-w-0 items-start gap-1.5 text-sm text-po-dim ${indent ? "pl-10.5" : ""}`,
347
+ children: [/* @__PURE__ */ jsx(UsersIcon, {
348
+ "aria-hidden": true,
349
+ className: "mt-0.5 size-3.5 shrink-0"
350
+ }), /* @__PURE__ */ jsx("span", {
351
+ className: "flex min-w-0 flex-wrap gap-1",
352
+ children: groups.map((group) => /* @__PURE__ */ jsx(Badge, {
353
+ tone: "magenta",
354
+ size: "xs",
355
+ className: "font-normal",
356
+ children: group
357
+ }, group))
358
+ })]
359
+ });
360
+ }
361
+ /** Why a typed name cannot become a group, or undefined when it can. */
362
+ function createProblem(name, count) {
363
+ if (name.length > MAX_GROUP_LENGTH) return `group names are at most ${String(MAX_GROUP_LENGTH)} characters.`;
364
+ if (count >= MAX_GROUPS) return `a session can belong to at most ${String(MAX_GROUPS)} groups.`;
365
+ }
366
+ /**
367
+ * The groups dialog body. One field holds the chosen groups as removable chips and filters the
368
+ * list under it; the list checks groups on and off, and its last row creates the typed name.
369
+ * Rename and delete act on every session in the group at once; the checks wait for save.
370
+ */
371
+ function AdvancedSessionGroupsView({ options, value, query, active, renaming, deleting, error, busy = false, onQueryChange, onToggle, onCreate, onActive, onRenameStart, onRenameDraft, onRenameConfirm, onDeleteStart, onDeleteConfirm, onRowCancel, onCancel, onSave }) {
372
+ const rowId = useId();
373
+ const typed = query.trim();
374
+ const shown = options.filter((group) => group.name.includes(typed));
375
+ const canCreate = typed !== "" && !options.some((group) => group.name === typed);
376
+ const problem = canCreate ? createProblem(typed, value.length) : void 0;
377
+ return /* @__PURE__ */ jsxs("form", {
378
+ className: "flex flex-col gap-3",
379
+ onSubmit: (event) => {
380
+ event.preventDefault();
381
+ onSave();
382
+ },
383
+ children: [
384
+ /* @__PURE__ */ jsx(DialogDescription, { children: "sessions that share a group can message each other." }),
385
+ /* @__PURE__ */ jsxs("div", {
386
+ className: "flex flex-col overflow-hidden rounded-md border border-po-border focus-within:border-po-edge-green",
387
+ children: [/* @__PURE__ */ jsxs("div", {
388
+ className: "flex flex-wrap items-center gap-1 bg-po-deep px-2 py-1.5",
389
+ children: [value.map((name) => /* @__PURE__ */ jsxs(Badge, {
390
+ tone: "magenta",
391
+ size: "xs",
392
+ className: "font-normal",
393
+ children: [name, /* @__PURE__ */ jsx("button", {
394
+ type: "button",
395
+ "aria-label": `remove ${name}`,
396
+ className: "text-po-magenta",
397
+ onClick: () => onToggle(name),
398
+ children: /* @__PURE__ */ jsx(CloseIcon, {
399
+ "aria-hidden": true,
400
+ className: "size-2.5"
401
+ })
402
+ })]
403
+ }, name)), /* @__PURE__ */ jsx(Input, {
404
+ variant: "bare",
405
+ "data-testid": "session-groups-query",
406
+ "aria-label": "find or create a group",
407
+ autoFocus: true,
408
+ placeholder: value.length === 0 ? "find or create a group" : "add another",
409
+ value: query,
410
+ onChange: (event) => onQueryChange(event.target.value),
411
+ onKeyDown: (event) => {
412
+ if (event.key !== "Enter" || typed === "") return;
413
+ event.preventDefault();
414
+ if (canCreate) {
415
+ if (problem === void 0) onCreate();
416
+ } else if (shown[0] !== void 0) {
417
+ onToggle(shown[0].name);
418
+ onQueryChange("");
419
+ }
420
+ },
421
+ className: "h-6 min-w-24 flex-1"
422
+ })]
423
+ }), /* @__PURE__ */ jsxs("div", {
424
+ className: "flex flex-col border-t border-po-border-soft p-1",
425
+ onMouseLeave: () => onActive(void 0),
426
+ children: [shown.map((group, index) => {
427
+ const on = value.includes(group.name);
428
+ const checkboxId = `${rowId}-${String(index)}`;
429
+ const total = group.members.length + (on ? 1 : 0);
430
+ const sessions = total === 1 ? "its one session" : `all ${String(total)} sessions`;
431
+ if (renaming?.group === group.name) return /* @__PURE__ */ jsxs("div", {
432
+ className: "flex flex-col gap-1 rounded-sm bg-po-deep px-2 py-1.5",
433
+ children: [/* @__PURE__ */ jsxs("span", {
434
+ className: "flex items-center gap-2",
435
+ children: [
436
+ /* @__PURE__ */ jsx(Input, {
437
+ "aria-label": `rename ${group.name}`,
438
+ value: renaming.draft,
439
+ autoFocus: true,
440
+ onChange: (event) => onRenameDraft(event.target.value),
441
+ onKeyDown: (event) => {
442
+ if (event.key !== "Enter") return;
443
+ event.preventDefault();
444
+ onRenameConfirm();
445
+ },
446
+ className: "h-7 flex-1"
447
+ }),
448
+ /* @__PURE__ */ jsx(Button, {
449
+ type: "button",
450
+ variant: "ghost",
451
+ size: "sm",
452
+ onClick: onRowCancel,
453
+ children: "cancel"
454
+ }),
455
+ /* @__PURE__ */ jsx(Button, {
456
+ type: "button",
457
+ variant: "outline",
458
+ size: "sm",
459
+ disabled: busy || renaming.draft.trim() === "",
460
+ onClick: onRenameConfirm,
461
+ children: "rename"
462
+ })
463
+ ]
464
+ }), /* @__PURE__ */ jsxs("span", {
465
+ className: "text-sm text-po-dim",
466
+ children: [
467
+ "renames it on ",
468
+ sessions,
469
+ "."
470
+ ]
471
+ })]
472
+ }, group.name);
473
+ if (deleting === group.name) return /* @__PURE__ */ jsxs("div", {
474
+ className: "flex items-center gap-2 rounded-sm border border-po-red/40 px-2 py-1.5",
475
+ children: [
476
+ /* @__PURE__ */ jsxs("span", {
477
+ className: "flex-1 text-sm text-po-text",
478
+ children: [
479
+ "remove ",
480
+ /* @__PURE__ */ jsx("span", {
481
+ className: "font-semibold text-po-hi",
482
+ children: group.name
483
+ }),
484
+ " from ",
485
+ sessions,
486
+ "? they can no longer message through it."
487
+ ]
488
+ }),
489
+ /* @__PURE__ */ jsx(Button, {
490
+ type: "button",
491
+ variant: "ghost",
492
+ size: "sm",
493
+ onClick: onRowCancel,
494
+ children: "cancel"
495
+ }),
496
+ /* @__PURE__ */ jsx(Button, {
497
+ type: "button",
498
+ variant: "danger",
499
+ size: "sm",
500
+ disabled: busy,
501
+ onClick: onDeleteConfirm,
502
+ children: "delete"
503
+ })
504
+ ]
505
+ }, group.name);
506
+ return /* @__PURE__ */ jsxs("div", {
507
+ "data-testid": `session-group-${group.name}`,
508
+ onMouseEnter: () => onActive(group.name),
509
+ className: `group flex items-start gap-2.5 rounded-sm px-2 py-1.5 ${on ? "bg-po-tint-green" : active === group.name ? "bg-po-deep" : ""}`,
510
+ children: [/* @__PURE__ */ jsxs("label", {
511
+ htmlFor: checkboxId,
512
+ className: "flex min-w-0 flex-1 cursor-pointer items-start gap-2.5",
513
+ children: [/* @__PURE__ */ jsx(Checkbox, {
514
+ id: checkboxId,
515
+ checked: on,
516
+ onCheckedChange: () => onToggle(group.name),
517
+ className: "mt-1"
518
+ }), /* @__PURE__ */ jsxs("span", {
519
+ className: "flex min-w-0 flex-1 flex-col",
520
+ children: [/* @__PURE__ */ jsx("span", {
521
+ className: `text-base ${on ? "font-semibold text-po-hi" : "text-po-text"}`,
522
+ children: group.name
523
+ }), /* @__PURE__ */ jsx("span", {
524
+ className: "truncate text-sm text-po-dim",
525
+ title: group.members.join(", "),
526
+ children: group.members.length === 0 ? "no other sessions yet" : group.members.join(", ")
527
+ })]
528
+ })]
529
+ }), /* @__PURE__ */ jsxs("span", {
530
+ className: `flex shrink-0 items-center gap-0.5 ${active === group.name ? "opacity-100" : "opacity-0 group-focus-within:opacity-100"}`,
531
+ children: [/* @__PURE__ */ jsx(Button, {
532
+ type: "button",
533
+ variant: "ghost",
534
+ size: "icon",
535
+ title: `rename ${group.name}`,
536
+ onClick: () => onRenameStart(group.name),
537
+ children: /* @__PURE__ */ jsx(EditIcon, {
538
+ "aria-hidden": true,
539
+ className: "size-3.5"
540
+ })
541
+ }), /* @__PURE__ */ jsx(Button, {
542
+ type: "button",
543
+ variant: "ghost",
544
+ size: "icon",
545
+ title: `delete ${group.name}`,
546
+ onClick: () => onDeleteStart(group.name),
547
+ children: /* @__PURE__ */ jsx(TrashIcon, {
548
+ "aria-hidden": true,
549
+ className: "size-3.5"
550
+ })
551
+ })]
552
+ })]
553
+ }, group.name);
554
+ }), canCreate ? /* @__PURE__ */ jsxs("button", {
555
+ type: "button",
556
+ "data-testid": "session-groups-create",
557
+ disabled: problem !== void 0,
558
+ onClick: onCreate,
559
+ className: `flex flex-col gap-0.5 rounded-sm px-2 py-1.5 text-left ${problem === void 0 ? "bg-po-deep" : ""}`,
560
+ children: [/* @__PURE__ */ jsxs("span", {
561
+ className: `flex items-center gap-2.5 text-base ${problem === void 0 ? "text-po-magenta" : "text-po-faint"}`,
562
+ children: [/* @__PURE__ */ jsx(PlusIcon, {
563
+ "aria-hidden": true,
564
+ className: "size-3.5"
565
+ }), /* @__PURE__ */ jsxs("span", {
566
+ className: "truncate",
567
+ children: [
568
+ "create group “",
569
+ typed,
570
+ "”"
571
+ ]
572
+ })]
573
+ }), problem === void 0 ? null : /* @__PURE__ */ jsx("span", {
574
+ className: "pl-6 text-sm text-po-red",
575
+ children: problem
576
+ })]
577
+ }) : null]
578
+ })]
579
+ }),
580
+ /* @__PURE__ */ jsxs("span", {
581
+ className: "text-sm text-po-dim",
582
+ children: [
583
+ value.length,
584
+ " of ",
585
+ MAX_GROUPS,
586
+ " groups"
587
+ ]
588
+ }),
589
+ error === void 0 ? null : /* @__PURE__ */ jsx("span", {
590
+ "data-testid": "session-groups-error",
591
+ className: "text-sm text-po-red",
592
+ children: error
593
+ }),
594
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
595
+ type: "button",
596
+ variant: "outline",
597
+ size: "md",
598
+ onClick: onCancel,
599
+ children: "cancel"
600
+ }), /* @__PURE__ */ jsx(Button, {
601
+ type: "submit",
602
+ variant: "primary",
603
+ size: "md",
604
+ disabled: busy,
605
+ children: "save"
606
+ })] })
607
+ ]
608
+ });
609
+ }
610
+ /** Opens over the rail from a card's menu, like rename, and holds the edit until save or cancel. */
611
+ function AdvancedSessionGroupsDialog({ session, sessions, actions, onClose }) {
612
+ const [value, setValue] = useState(() => [...session.groups ?? []]);
613
+ const [query, setQuery] = useState("");
614
+ const [active, setActive] = useState();
615
+ const [renaming, setRenaming] = useState();
616
+ const [deleting, setDeleting] = useState();
617
+ const [error, setError] = useState();
618
+ const [busy, setBusy] = useState(false);
619
+ const run = async (work, done) => {
620
+ setBusy(true);
621
+ setError(void 0);
622
+ const result = await work();
623
+ setBusy(false);
624
+ if (result === void 0) done();
625
+ else setError(result.error);
626
+ };
627
+ const rowCancel = () => {
628
+ setRenaming(void 0);
629
+ setDeleting(void 0);
630
+ };
631
+ return /* @__PURE__ */ jsx(Dialog, {
632
+ open: true,
633
+ onOpenChange: (next) => !next && !busy && onClose(),
634
+ children: /* @__PURE__ */ jsxs(DialogContent, {
635
+ width: "sm",
636
+ "data-testid": `session-groups-dialog-${session.id}`,
637
+ "aria-describedby": void 0,
638
+ children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "session groups" }) }), /* @__PURE__ */ jsx(DialogBody, { children: /* @__PURE__ */ jsx(AdvancedSessionGroupsView, {
639
+ options: sessionGroupOptions(sessions, session.id, value),
640
+ value,
641
+ query,
642
+ active,
643
+ renaming,
644
+ deleting,
645
+ error,
646
+ busy,
647
+ onQueryChange: setQuery,
648
+ onToggle: (group) => {
649
+ setError(void 0);
650
+ if (value.includes(group)) setValue(value.filter((name) => name !== group));
651
+ else if (value.length >= MAX_GROUPS) setError(createProblem("", value.length));
652
+ else setValue([...value, group]);
653
+ },
654
+ onCreate: () => {
655
+ const name = query.trim();
656
+ if (name === "" || createProblem(name, value.length) !== void 0) return;
657
+ setValue([...value, name]);
658
+ setQuery("");
659
+ },
660
+ onActive: setActive,
661
+ onRenameStart: (group) => {
662
+ setDeleting(void 0);
663
+ setRenaming({
664
+ group,
665
+ draft: group
666
+ });
667
+ },
668
+ onRenameDraft: (draft) => setRenaming((current) => current === void 0 ? current : {
669
+ ...current,
670
+ draft
671
+ }),
672
+ onRenameConfirm: () => {
673
+ if (renaming === void 0) return;
674
+ const to = renaming.draft.trim();
675
+ if (to === "" || to === renaming.group) {
676
+ rowCancel();
677
+ return;
678
+ }
679
+ run(() => actions.renameGroup(renaming.group, to), () => {
680
+ setValue((current) => [...new Set(current.map((name) => name === renaming.group ? to : name))]);
681
+ rowCancel();
682
+ });
683
+ },
684
+ onDeleteStart: (group) => {
685
+ setRenaming(void 0);
686
+ setDeleting(group);
687
+ },
688
+ onDeleteConfirm: () => {
689
+ if (deleting === void 0) return;
690
+ run(() => actions.deleteGroup(deleting), () => {
691
+ setValue((current) => current.filter((name) => name !== deleting));
692
+ rowCancel();
693
+ });
694
+ },
695
+ onRowCancel: rowCancel,
696
+ onCancel: onClose,
697
+ onSave: () => void run(() => actions.setSessionGroups(session.id, value), onClose)
698
+ }) })]
699
+ })
700
+ });
701
+ }
702
+ //#endregion
330
703
  //#region src/extensions/(frontend)/template/_components/AdvancedSessionCard.tsx
331
- function AdvancedSessionCard({ session, actions }) {
704
+ function AdvancedSessionCard({ session, sessions, actions }) {
332
705
  const key = `rail/session/${session.id}`;
333
706
  const [mode, setMode] = useDashboardState(`${key}/mode`, "view");
334
707
  const [draft, setDraft] = useDashboardState(`${key}/draft`, "");
@@ -341,7 +714,7 @@ function AdvancedSessionCard({ session, actions }) {
341
714
  };
342
715
  const { active } = session;
343
716
  const error = removeError || session.error;
344
- const cardClass = active ? "rounded-lg border border-doom-edge-green bg-doom-tint-green px-3 py-3 hover:bg-doom-tint-green" : "rounded-lg border border-transparent px-3 py-3 hover:bg-doom-panel";
717
+ const cardClass = active ? "rounded-lg border border-po-edge-green bg-po-tint-green px-3 py-3 hover:bg-po-tint-green" : "rounded-lg border border-transparent px-3 py-3 hover:bg-po-panel";
345
718
  const commitRename = () => {
346
719
  actions.renameSession(session.id, draft);
347
720
  enterMode("view");
@@ -358,11 +731,11 @@ function AdvancedSessionCard({ session, actions }) {
358
731
  const failed = session.status.startsWith("failed") || session.status.includes(" failed");
359
732
  const running = session.status.startsWith("running");
360
733
  const status = /* @__PURE__ */ jsxs("span", {
361
- className: `flex min-w-0 items-start gap-1.5 text-sm leading-snug ${failed ? "text-doom-red" : running ? "text-doom-yellow" : active ? "text-doom-text" : "text-doom-dim"}`,
734
+ className: `flex min-w-0 items-start gap-1.5 text-sm leading-snug ${failed ? "text-po-red" : running ? "text-po-yellow" : active ? "text-po-text" : "text-po-dim"}`,
362
735
  children: [session.awaitingInput ? /* @__PURE__ */ jsx(AlertIcon, {
363
736
  "data-testid": "session-awaiting-input",
364
737
  "aria-label": "Waiting for your input",
365
- className: "mt-0.5 size-3 shrink-0 text-doom-magenta"
738
+ className: "mt-0.5 size-3 shrink-0 text-po-magenta"
366
739
  }) : running ? /* @__PURE__ */ jsx(LoaderIcon, {
367
740
  "aria-hidden": true,
368
741
  className: "mt-0.5 size-3 shrink-0 animate-spin"
@@ -380,18 +753,18 @@ function AdvancedSessionCard({ session, actions }) {
380
753
  children: [
381
754
  session.nested && session.provenance === "workflow-session" ? /* @__PURE__ */ jsx(ActivityIcon, {
382
755
  "aria-label": "workflow session",
383
- className: `mt-1 size-3 shrink-0 ${active ? "text-doom-green" : "text-doom-faint"}`
756
+ className: `mt-1 size-3 shrink-0 ${active ? "text-po-green" : "text-po-faint"}`
384
757
  }) : session.nested && session.provenance ? /* @__PURE__ */ jsx(ForkIcon, {
385
758
  "aria-label": session.provenance === "worktree" ? "automatic per-conversation worktree" : session.provenance,
386
- className: `mt-1 size-3 shrink-0 ${active ? "text-doom-green" : "text-doom-faint"}`
759
+ className: `mt-1 size-3 shrink-0 ${active ? "text-po-green" : "text-po-faint"}`
387
760
  }) : null,
388
761
  /* @__PURE__ */ jsx("span", {
389
- className: "min-w-0 flex-1 text-base font-semibold break-words text-doom-hi",
762
+ className: "min-w-0 flex-1 text-base font-semibold break-words text-po-hi",
390
763
  children: session.name || "Untitled"
391
764
  }),
392
765
  session.ordinal <= 9 ? /* @__PURE__ */ jsx("span", {
393
766
  title: `press ${String(session.ordinal)} to focus`,
394
- className: "grid size-5 shrink-0 place-items-center rounded-full bg-doom-panel text-2xs text-doom-dim transition-opacity group-focus-within:opacity-0 group-hover:opacity-0",
767
+ className: "grid size-5 shrink-0 place-items-center rounded-full bg-po-panel text-2xs text-po-dim transition-opacity group-focus-within:opacity-0 group-hover:opacity-0",
395
768
  children: session.ordinal
396
769
  }) : null
397
770
  ]
@@ -408,7 +781,7 @@ function AdvancedSessionCard({ session, actions }) {
408
781
  src: session.profile.avatarUrl,
409
782
  alt: ""
410
783
  }) : null, /* @__PURE__ */ jsx(AvatarFallback, {
411
- className: "bg-doom-tint-green text-xs font-semibold text-doom-green",
784
+ className: "bg-po-tint-green text-xs font-semibold text-po-green",
412
785
  children: session.profile.initials
413
786
  })]
414
787
  }) : null, /* @__PURE__ */ jsxs("span", {
@@ -418,22 +791,26 @@ function AdvancedSessionCard({ session, actions }) {
418
791
  }),
419
792
  session.git ? /* @__PURE__ */ jsxs("span", {
420
793
  "data-testid": "session-branch",
421
- className: `flex min-w-0 items-center gap-1.5 text-sm text-doom-dim ${session.profile ? "pl-10.5" : ""}`,
794
+ className: `flex min-w-0 items-center gap-1.5 text-sm text-po-dim ${session.profile ? "pl-10.5" : ""}`,
422
795
  children: [
423
- /* @__PURE__ */ jsx(BranchIcon, { className: `size-3.5 shrink-0 ${active ? "text-doom-green" : ""}` }),
796
+ /* @__PURE__ */ jsx(BranchIcon, { className: `size-3.5 shrink-0 ${active ? "text-po-green" : ""}` }),
424
797
  /* @__PURE__ */ jsx("span", {
425
798
  className: "truncate font-mono",
426
799
  children: session.git.branch
427
800
  }),
428
801
  session.git.dirty ? /* @__PURE__ */ jsx("span", {
429
- className: "shrink-0 text-doom-yellow",
802
+ className: "shrink-0 text-po-yellow",
430
803
  children: "modified"
431
804
  }) : null
432
805
  ]
433
806
  }) : null,
807
+ session.groups !== void 0 && session.groups.length > 0 ? /* @__PURE__ */ jsx(AdvancedSessionGroupChips, {
808
+ groups: session.groups,
809
+ indent: session.profile !== void 0
810
+ }) : null,
434
811
  error ? /* @__PURE__ */ jsx("span", {
435
812
  "data-testid": "session-error",
436
- className: "line-clamp-3 text-sm break-words text-doom-red",
813
+ className: "line-clamp-3 text-sm break-words text-po-red",
437
814
  children: error
438
815
  }) : null
439
816
  ] });
@@ -467,7 +844,7 @@ function AdvancedSessionCard({ session, actions }) {
467
844
  size: "icon",
468
845
  "data-testid": `session-menu-${session.id}`,
469
846
  title: "session actions",
470
- className: active ? "text-doom-dim hover:bg-doom-tint-green hover:text-doom-hi data-[state=open]:bg-doom-tint-green data-[state=open]:text-doom-hi" : "text-doom-faint hover:bg-doom-deep hover:text-doom-hi data-[state=open]:bg-doom-deep data-[state=open]:text-doom-hi",
847
+ className: active ? "text-po-dim hover:bg-po-tint-green hover:text-po-hi data-[state=open]:bg-po-tint-green data-[state=open]:text-po-hi" : "text-po-faint hover:bg-po-deep hover:text-po-hi data-[state=open]:bg-po-deep data-[state=open]:text-po-hi",
471
848
  children: /* @__PURE__ */ jsx(KebabIcon, { className: "h-3 w-3" })
472
849
  })
473
850
  }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
@@ -485,6 +862,11 @@ function AdvancedSessionCard({ session, actions }) {
485
862
  },
486
863
  children: "rename"
487
864
  }),
865
+ /* @__PURE__ */ jsx(DropdownMenuItem, {
866
+ "data-testid": `session-groups-${session.id}`,
867
+ onSelect: () => enterMode("groups"),
868
+ children: "groups"
869
+ }),
488
870
  /* @__PURE__ */ jsx(DropdownMenuItem, {
489
871
  "data-testid": `session-resume-${session.id}`,
490
872
  onSelect: () => actions.resumeSession(session.id),
@@ -543,6 +925,12 @@ function AdvancedSessionCard({ session, actions }) {
543
925
  }) })]
544
926
  })
545
927
  }),
928
+ mode === "groups" ? /* @__PURE__ */ jsx(AdvancedSessionGroupsDialog, {
929
+ session,
930
+ sessions,
931
+ actions,
932
+ onClose: () => enterMode("view")
933
+ }) : null,
546
934
  /* @__PURE__ */ jsx(Dialog, {
547
935
  open: mode === "confirm",
548
936
  onOpenChange: (next) => !next && enterMode("view"),
@@ -553,7 +941,7 @@ function AdvancedSessionCard({ session, actions }) {
553
941
  children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "remove session" }) }), /* @__PURE__ */ jsxs(DialogBody, { children: [/* @__PURE__ */ jsxs(DialogDescription, { children: [
554
942
  "this stops ",
555
943
  /* @__PURE__ */ jsx("span", {
556
- className: "font-semibold text-doom-hi",
944
+ className: "font-semibold text-po-hi",
557
945
  children: session.name || "untitled"
558
946
  }),
559
947
  " and removes it from the rail. anything it is running ends now, but its saved history remains available to resume."
@@ -583,7 +971,7 @@ function AdvancedSessionCard({ session, actions }) {
583
971
  //#endregion
584
972
  //#region src/extensions/(frontend)/template/_components/AdvancedWorkspaceGroup.tsx
585
973
  /** A folder heading over its sessions; only a hover tint marks the row. */
586
- function AdvancedWorkspaceGroup({ workspace, actions }) {
974
+ function AdvancedWorkspaceGroup({ workspace, sessions, actions }) {
587
975
  const key = `rail/workspace/${workspace.id}`;
588
976
  const [removeOpen, setRemoveOpen] = useDashboardState(`${key}/open`, false);
589
977
  const [removeError, setRemoveError] = useDashboardState(`${key}/error`, "");
@@ -604,19 +992,19 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
604
992
  className: "flex flex-col gap-1.5",
605
993
  children: [
606
994
  /* @__PURE__ */ jsxs("div", {
607
- className: "flex min-w-0 items-start gap-2.5 rounded-md px-2 py-1 transition-colors hover:bg-doom-panel/60",
995
+ className: "flex min-w-0 items-start gap-2.5 rounded-md px-2 py-1 transition-colors hover:bg-po-panel/60",
608
996
  children: [
609
997
  /* @__PURE__ */ jsx(FolderIcon, {
610
998
  "aria-hidden": true,
611
- className: "mt-0.5 size-4 shrink-0 text-doom-dim"
999
+ className: "mt-0.5 size-4 shrink-0 text-po-dim"
612
1000
  }),
613
1001
  /* @__PURE__ */ jsxs("div", {
614
1002
  className: "flex min-w-0 flex-1 flex-col",
615
1003
  children: [/* @__PURE__ */ jsx("p", {
616
- className: "truncate text-base font-semibold text-doom-hi",
1004
+ className: "truncate text-base font-semibold text-po-hi",
617
1005
  children: name
618
1006
  }), /* @__PURE__ */ jsx("p", {
619
- className: "truncate font-mono text-sm text-doom-dim",
1007
+ className: "truncate font-mono text-sm text-po-dim",
620
1008
  title: root,
621
1009
  children: root
622
1010
  })]
@@ -629,7 +1017,7 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
629
1017
  "aria-label": `New session in ${name}`,
630
1018
  disabled: !available,
631
1019
  onClick: () => actions.createSession(id),
632
- className: "text-doom-faint hover:text-doom-hi",
1020
+ className: "text-po-faint hover:text-po-hi",
633
1021
  children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-3.5" })
634
1022
  }), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
635
1023
  asChild: true,
@@ -639,7 +1027,7 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
639
1027
  "data-testid": `workspace-menu-${id}`,
640
1028
  title: "Workspace actions",
641
1029
  "aria-label": `${name} actions`,
642
- className: "text-doom-faint hover:text-doom-hi",
1030
+ className: "text-po-faint hover:text-po-hi",
643
1031
  children: /* @__PURE__ */ jsx(KebabIcon, { className: "size-3.5" })
644
1032
  })
645
1033
  }), /* @__PURE__ */ jsxs(DropdownMenuContent, { children: [
@@ -666,17 +1054,18 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
666
1054
  ]
667
1055
  }),
668
1056
  !available ? /* @__PURE__ */ jsx("p", {
669
- className: "px-9 text-sm text-doom-red",
1057
+ className: "px-9 text-sm text-po-red",
670
1058
  children: "Workspace unavailable"
671
1059
  }) : null,
672
1060
  workspace.sessions.length > 0 ? /* @__PURE__ */ jsx("div", {
673
1061
  className: "flex flex-col gap-1",
674
1062
  children: workspace.sessions.map((session) => /* @__PURE__ */ jsx(AdvancedSessionCard, {
675
1063
  session,
1064
+ sessions,
676
1065
  actions
677
1066
  }, session.id))
678
1067
  }) : available ? /* @__PURE__ */ jsx("p", {
679
- className: "px-9 pb-1 text-sm text-doom-dim",
1068
+ className: "px-9 pb-1 text-sm text-po-dim",
680
1069
  children: "No sessions yet. Start or resume one."
681
1070
  }) : null,
682
1071
  /* @__PURE__ */ jsx(Dialog, {
@@ -690,7 +1079,7 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
690
1079
  /* @__PURE__ */ jsxs(DialogDescription, { children: [
691
1080
  "this unregisters ",
692
1081
  /* @__PURE__ */ jsx("span", {
693
- className: "font-semibold text-doom-hi",
1082
+ className: "font-semibold text-po-hi",
694
1083
  children: name
695
1084
  }),
696
1085
  " from Po only. files at",
@@ -700,7 +1089,7 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
700
1089
  ] }),
701
1090
  removeError ? /* @__PURE__ */ jsx("p", {
702
1091
  "data-testid": `workspace-delete-error-${id}`,
703
- className: "text-sm text-doom-red",
1092
+ className: "text-sm text-po-red",
704
1093
  children: removeError
705
1094
  }) : null,
706
1095
  /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
@@ -730,6 +1119,7 @@ function AdvancedWorkspaceGroup({ workspace, actions }) {
730
1119
  /** The persistent session rail: workspaces with their sessions, remote access, and settings. */
731
1120
  function AdvancedRail({ rail, onClose }) {
732
1121
  const { remote, actions } = rail;
1122
+ const sessions = rail.workspaces.flatMap((workspace) => workspace.sessions);
733
1123
  const live = remote.status === "on" || remote.status === "starting";
734
1124
  const remoteDetail = remote.status === "on" ? `Remote access on, ${String(remote.deviceCount)} device${remote.deviceCount === 1 ? "" : "s"} paired` : void 0;
735
1125
  return /* @__PURE__ */ jsxs("div", {
@@ -748,7 +1138,7 @@ function AdvancedRail({ rail, onClose }) {
748
1138
  className: "size-9 rounded-lg"
749
1139
  }), /* @__PURE__ */ jsx("span", {
750
1140
  "aria-hidden": "true",
751
- className: "text-2xl font-semibold text-doom-hi",
1141
+ className: "text-2xl font-semibold text-po-hi",
752
1142
  children: "Po"
753
1143
  })]
754
1144
  }), /* @__PURE__ */ jsxs("span", {
@@ -760,7 +1150,7 @@ function AdvancedRail({ rail, onClose }) {
760
1150
  title: remoteDetail ?? "Remote access",
761
1151
  "aria-label": remoteDetail ?? `Remote access is ${remote.status}`,
762
1152
  onClick: actions.openRemoteAccess,
763
- className: `gap-1.5 rounded-md ${remote.status === "failed" ? "" : "bg-doom-panel"}`,
1153
+ className: `gap-1.5 rounded-md ${remote.status === "failed" ? "" : "bg-po-panel"}`,
764
1154
  children: [live ? /* @__PURE__ */ jsx(Dot, {
765
1155
  tone: "yellow",
766
1156
  pulse: true,
@@ -773,7 +1163,7 @@ function AdvancedRail({ rail, onClose }) {
773
1163
  title: "Hide sessions",
774
1164
  "aria-label": "Hide sessions",
775
1165
  onClick: onClose,
776
- className: "text-doom-dim md:hidden",
1166
+ className: "text-po-dim md:hidden",
777
1167
  children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-3.5" })
778
1168
  })]
779
1169
  })]
@@ -781,7 +1171,7 @@ function AdvancedRail({ rail, onClose }) {
781
1171
  /* @__PURE__ */ jsxs("div", {
782
1172
  className: "flex items-center justify-between px-5 pt-4 pb-2",
783
1173
  children: [/* @__PURE__ */ jsx("h2", {
784
- className: "text-lg font-semibold text-doom-hi",
1174
+ className: "text-lg font-semibold text-po-hi",
785
1175
  children: "Workspaces"
786
1176
  }), /* @__PURE__ */ jsx(Button, {
787
1177
  variant: "ghost",
@@ -790,7 +1180,7 @@ function AdvancedRail({ rail, onClose }) {
790
1180
  title: "Add workspace",
791
1181
  "aria-label": "Add workspace",
792
1182
  onClick: actions.openAddWorkspace,
793
- className: "text-doom-faint hover:text-doom-hi",
1183
+ className: "text-po-faint hover:text-po-hi",
794
1184
  children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-3.5" })
795
1185
  })]
796
1186
  }),
@@ -798,18 +1188,19 @@ function AdvancedRail({ rail, onClose }) {
798
1188
  className: "flex flex-col gap-4 px-3 pb-3",
799
1189
  children: [rail.workspaces.map((workspace) => /* @__PURE__ */ jsx(AdvancedWorkspaceGroup, {
800
1190
  workspace,
1191
+ sessions,
801
1192
  actions
802
1193
  }, workspace.id)), rail.workspaces.length === 0 ? /* @__PURE__ */ jsxs("div", {
803
- className: "flex flex-col gap-3 rounded-lg border border-dashed border-doom-border px-4 py-5",
1194
+ className: "flex flex-col gap-3 rounded-lg border border-dashed border-po-border px-4 py-5",
804
1195
  children: [/* @__PURE__ */ jsx("p", {
805
- className: "text-sm text-doom-dim",
1196
+ className: "text-sm text-po-dim",
806
1197
  children: "Add a folder to start working with Po."
807
1198
  }), /* @__PURE__ */ jsxs(Button, {
808
1199
  variant: "outline",
809
1200
  size: "md",
810
1201
  "data-testid": "add-workspace-empty",
811
1202
  onClick: actions.openAddWorkspace,
812
- className: "justify-start gap-2 bg-doom-panel",
1203
+ className: "justify-start gap-2 bg-po-panel",
813
1204
  children: [/* @__PURE__ */ jsx(PlusIcon, { className: "size-3.5" }), "Add workspace"]
814
1205
  })]
815
1206
  }) : null]
@@ -817,10 +1208,10 @@ function AdvancedRail({ rail, onClose }) {
817
1208
  rail.pluginContent,
818
1209
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
819
1210
  /* @__PURE__ */ jsxs("div", {
820
- className: "sticky bottom-0 mt-auto shrink-0 bg-doom-rail",
1211
+ className: "sticky bottom-0 mt-auto shrink-0 bg-po-rail",
821
1212
  children: [remote.status === "off" ? null : /* @__PURE__ */ jsxs("div", {
822
1213
  "data-testid": "remote-banner",
823
- className: `flex flex-col gap-1.5 border-t border-doom-border-soft px-4 py-2 text-sm ${remote.status === "failed" ? "bg-doom-tint-red text-doom-red" : "bg-doom-tint-yellow text-doom-yellow"}`,
1214
+ className: `flex flex-col gap-1.5 border-t border-po-border-soft px-4 py-2 text-sm ${remote.status === "failed" ? "bg-po-tint-red text-po-red" : "bg-po-tint-yellow text-po-yellow"}`,
824
1215
  children: [/* @__PURE__ */ jsxs("output", {
825
1216
  className: "flex min-w-0 items-center gap-2",
826
1217
  children: [/* @__PURE__ */ jsx(Dot, { tone: remote.status === "failed" ? "red" : "yellow" }), /* @__PURE__ */ jsx("span", {
@@ -844,24 +1235,24 @@ function AdvancedRail({ rail, onClose }) {
844
1235
  })]
845
1236
  })]
846
1237
  }), /* @__PURE__ */ jsxs("div", {
847
- className: "flex flex-col gap-1 border-t border-doom-border-soft px-3 py-3",
1238
+ className: "flex flex-col gap-1 border-t border-po-border-soft px-3 py-3",
848
1239
  children: [/* @__PURE__ */ jsxs(Button, {
849
1240
  variant: "ghost",
850
1241
  size: "lg",
851
1242
  "data-testid": "settings-open",
852
1243
  onClick: actions.openSettings,
853
- className: "justify-start gap-2.5 px-2 text-doom-text",
854
- children: [/* @__PURE__ */ jsx(GearIcon, { className: "size-5 text-doom-dim" }), "Settings"]
1244
+ className: "justify-start gap-2.5 px-2 text-po-text",
1245
+ children: [/* @__PURE__ */ jsx(GearIcon, { className: "size-5 text-po-dim" }), "Settings"]
855
1246
  }), /* @__PURE__ */ jsxs("span", {
856
- className: "px-2 text-sm text-doom-dim max-sm:hidden",
1247
+ className: "px-2 text-sm text-po-dim max-sm:hidden",
857
1248
  children: [
858
1249
  /* @__PURE__ */ jsx(Kbd, {
859
- className: "bg-doom-panel",
1250
+ className: "bg-po-panel",
860
1251
  children: "ctrl+k"
861
1252
  }),
862
1253
  " commands · ",
863
1254
  /* @__PURE__ */ jsx(Kbd, {
864
- className: "bg-doom-panel",
1255
+ className: "bg-po-panel",
865
1256
  children: "ctrl+t"
866
1257
  }),
867
1258
  " new session"
@@ -885,7 +1276,7 @@ function AdvancedLayout({ view, slots, rail, navigationOpen, desktopActivityOpen
885
1276
  /* @__PURE__ */ jsx("aside", {
886
1277
  ref: scrollRef,
887
1278
  "data-testid": "session-rail-panel",
888
- className: `fixed inset-y-0 left-0 z-40 flex w-[min(320px,calc(100vw-48px))] shrink-0 flex-col overflow-y-auto border-r border-doom-border-soft bg-doom-rail transition-transform md:visible md:static md:z-auto md:w-[320px] md:translate-x-0 ${navigationOpen ? "visible translate-x-0" : "invisible -translate-x-full"}`,
1279
+ className: `fixed inset-y-0 left-0 z-40 flex w-[min(320px,calc(100vw-48px))] shrink-0 flex-col overflow-y-auto border-r border-po-border-soft bg-po-rail transition-transform md:visible md:static md:z-auto md:w-[320px] md:translate-x-0 ${navigationOpen ? "visible translate-x-0" : "invisible -translate-x-full"}`,
889
1280
  children: /* @__PURE__ */ jsx(AdvancedRail, {
890
1281
  rail,
891
1282
  onClose: () => onNavigationOpenChange(false)
@@ -925,7 +1316,7 @@ function AdvancedLayout({ view, slots, rail, navigationOpen, desktopActivityOpen
925
1316
  "data-testid": "activity-show",
926
1317
  title: "Show activity",
927
1318
  onClick: () => onDesktopActivityOpenChange(true),
928
- className: "hidden h-auto shrink-0 rounded-none border-l border-doom-border-soft bg-doom-rail px-2 py-3 font-semibold text-doom-dim hover:bg-doom-panel hover:text-doom-hi lg:flex",
1319
+ className: "hidden h-auto shrink-0 rounded-none border-l border-po-border-soft bg-po-rail px-2 py-3 font-semibold text-po-dim hover:bg-po-panel hover:text-po-hi lg:flex",
929
1320
  style: { writingMode: "vertical-rl" },
930
1321
  children: "Activity"
931
1322
  }),
@@ -1017,7 +1408,7 @@ function AdvancedConversation() {
1017
1408
  }),
1018
1409
  notices: transferLabel === null ? null : /* @__PURE__ */ jsxs("output", {
1019
1410
  "data-testid": "voice-transfer-transition",
1020
- className: "border-b border-doom-cyan/30 bg-doom-cyan/10 px-4 py-2 text-center text-base font-medium text-doom-cyan",
1411
+ className: "border-b border-po-cyan/30 bg-po-cyan/10 px-4 py-2 text-center text-base font-medium text-po-cyan",
1021
1412
  children: [
1022
1413
  "Transferring voice to ",
1023
1414
  transferLabel,
@@ -1029,6 +1420,7 @@ function AdvancedConversation() {
1029
1420
  controls: !mcpView && !tab && !noSessions && dormantMeta === null ? /* @__PURE__ */ jsx(SelectionBar, {}) : null,
1030
1421
  activity: /* @__PURE__ */ jsx(ActivityDock, {
1031
1422
  mcp,
1423
+ tabId,
1032
1424
  onClose: closeActivity,
1033
1425
  onOpenContent: () => setMobileActivityOpen(false)
1034
1426
  })
@@ -1077,21 +1469,21 @@ function AdvancedSettings() {
1077
1469
  ]);
1078
1470
  return /* @__PURE__ */ jsxs("div", {
1079
1471
  "data-testid": "settings",
1080
- className: "flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-doom-bg",
1472
+ className: "flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-po-bg",
1081
1473
  children: [/* @__PURE__ */ jsxs("header", {
1082
- className: "grid shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-2 border-b border-doom-border px-3 py-2 sm:h-14 sm:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] sm:px-6 sm:py-0",
1474
+ className: "grid shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-2 border-b border-po-border px-3 py-2 sm:h-14 sm:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] sm:px-6 sm:py-0",
1083
1475
  children: [
1084
1476
  /* @__PURE__ */ jsx("h1", {
1085
- className: "order-1 min-w-0 truncate text-xl font-semibold text-doom-hi sm:order-none",
1477
+ className: "order-1 min-w-0 truncate text-xl font-semibold text-po-hi sm:order-none",
1086
1478
  children: "Settings"
1087
1479
  }),
1088
1480
  /* @__PURE__ */ jsxs("nav", {
1089
- className: "order-3 col-span-2 flex w-full items-center gap-1 rounded-lg bg-doom-panel p-1 sm:order-none sm:col-span-1 sm:w-auto",
1481
+ className: "order-3 col-span-2 flex w-full items-center gap-1 rounded-lg bg-po-panel p-1 sm:order-none sm:col-span-1 sm:w-auto",
1090
1482
  "aria-label": "settings workspace",
1091
1483
  children: [/* @__PURE__ */ jsx(NavTab, {
1092
1484
  asChild: true,
1093
1485
  active: workspace === "general",
1094
- className: "min-h-8 flex-1 justify-center rounded-md px-4 focus-visible:ring-2 focus-visible:ring-doom-green sm:flex-none",
1486
+ className: "min-h-8 flex-1 justify-center rounded-md px-4 focus-visible:ring-2 focus-visible:ring-po-green sm:flex-none",
1095
1487
  "aria-current": workspace === "general" ? "true" : void 0,
1096
1488
  children: /* @__PURE__ */ jsx(Link, {
1097
1489
  to: "/settings/$section",
@@ -1103,7 +1495,7 @@ function AdvancedSettings() {
1103
1495
  }), /* @__PURE__ */ jsx(NavTab, {
1104
1496
  asChild: true,
1105
1497
  active: workspace === "repository",
1106
- className: "min-h-8 flex-1 justify-center rounded-md px-4 focus-visible:ring-2 focus-visible:ring-doom-green sm:flex-none",
1498
+ className: "min-h-8 flex-1 justify-center rounded-md px-4 focus-visible:ring-2 focus-visible:ring-po-green sm:flex-none",
1107
1499
  "aria-current": workspace === "repository" ? "true" : void 0,
1108
1500
  children: /* @__PURE__ */ jsx(Link, {
1109
1501
  to: "/settings/$section",