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