@burdenoff/microfe-timecampus 2026.1107.2 → 2026.1107.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelsPage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/channels/ChannelsPage.tsx"],"names":[],"mappings":"AAokBA,wBAAgB,YAAY,gCA0uB3B"}
1
+ {"version":3,"file":"ChannelsPage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/channels/ChannelsPage.tsx"],"names":[],"mappings":"AAskBA,wBAAgB,YAAY,gCAwvB3B"}
@@ -10,26 +10,26 @@ import { Modal as u } from "../../components/Modal.js";
10
10
  import { ToastContainer as oe, useToast as se } from "../../components/Toast.js";
11
11
  import "../../components/index.js";
12
12
  import { TimeCampusCaptureChannelPrivacyMode as d, TimeCampusCaptureChannelStatus as f, TimeCampusCaptureChannelSyncStatus as p, TimeCampusCaptureChannelType as m } from "../../../generated/wspace-types.js";
13
- import { CHANNEL_CATALOG as ce, PRIVACY_OPTIONS as h, catalogEntry as g, channelSetupHint as le, formatRetention as _, formatSyncInterval as ue, isOverdue as v, matchesChannelSearch as de, oauthCallbackUrl as fe, parseOptionalPositiveInt as y, privacyLabel as pe, pullHealth as b, statusDisplay as x } from "./channelCatalog.js";
14
- import { useMemo as me, useState as S } from "react";
15
- import { AlertTriangle as C, AppWindow as w, Calendar as T, Check as he, Code2 as ge, Copy as _e, Globe as ve, Link2 as ye, Pause as E, Play as be, Plug as xe, PlugZap as D, Plus as Se, RefreshCw as O, Search as Ce, Settings2 as we, Smartphone as k, Terminal as A, Trash2 as Te, Unplug as Ee, Webhook as j, Workflow as De } from "lucide-react";
16
- import { useApolloClient as Oe } from "@apollo/client/react";
13
+ import { CHANNEL_CATALOG as ce, PRIVACY_OPTIONS as h, catalogEntry as g, channelSetupHint as le, formatRetention as _, formatSyncInterval as ue, groupPullProviders as de, isOverdue as v, matchesChannelSearch as fe, oauthCallbackUrl as pe, parseOptionalPositiveInt as y, privacyLabel as me, pullHealth as b, pullProviderGroupLabel as he, statusDisplay as x } from "./channelCatalog.js";
14
+ import { useMemo as ge, useState as S } from "react";
15
+ import { AlertTriangle as C, AppWindow as w, Calendar as T, Check as _e, Code2 as ve, Copy as ye, Globe as be, Link2 as xe, Pause as E, Play as Se, Plug as Ce, PlugZap as D, Plus as we, RefreshCw as O, Search as Te, Settings2 as Ee, Smartphone as k, Terminal as A, Trash2 as De, Unplug as Oe, Webhook as j, Workflow as ke } from "lucide-react";
16
+ import { useApolloClient as Ae } from "@apollo/client/react";
17
17
  import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
18
- import { GlassCard as ke } from "@burdenoff/fe-libs/ui";
19
- import { ConnectionDialog as Ae } from "@burdenoff/fe-libs/connections";
18
+ import { GlassCard as je } from "@burdenoff/fe-libs/ui";
19
+ import { ConnectionDialog as Me } from "@burdenoff/fe-libs/connections";
20
20
  //#region src/timecampus/pages/channels/ChannelsPage.tsx
21
- var F = 3650, I = 10080, L = "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50", R = "inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", z = "inline-flex items-center justify-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", je = "inline-flex items-center justify-center gap-1.5 rounded-md bg-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50", B = {
22
- [m.Browser]: /* @__PURE__ */ N(ve, { className: "h-5 w-5" }),
21
+ var F = 3650, I = 10080, L = "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50", R = "inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", z = "inline-flex items-center justify-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", Ne = "inline-flex items-center justify-center gap-1.5 rounded-md bg-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50", B = {
22
+ [m.Browser]: /* @__PURE__ */ N(be, { className: "h-5 w-5" }),
23
23
  [m.Desktop]: /* @__PURE__ */ N(w, { className: "h-5 w-5" }),
24
24
  [m.Mobile]: /* @__PURE__ */ N(k, { className: "h-5 w-5" }),
25
- [m.Ide]: /* @__PURE__ */ N(ge, { className: "h-5 w-5" }),
25
+ [m.Ide]: /* @__PURE__ */ N(ve, { className: "h-5 w-5" }),
26
26
  [m.Cli]: /* @__PURE__ */ N(A, { className: "h-5 w-5" }),
27
27
  [m.Calendar]: /* @__PURE__ */ N(T, { className: "h-5 w-5" }),
28
28
  [m.Api]: /* @__PURE__ */ N(j, { className: "h-5 w-5" }),
29
- [m.Integration]: /* @__PURE__ */ N(ye, { className: "h-5 w-5" }),
30
- [m.Custom]: /* @__PURE__ */ N(De, { className: "h-5 w-5" })
29
+ [m.Integration]: /* @__PURE__ */ N(xe, { className: "h-5 w-5" }),
30
+ [m.Custom]: /* @__PURE__ */ N(ke, { className: "h-5 w-5" })
31
31
  };
32
- function Me(e, t = 1) {
32
+ function Pe(e, t = 1) {
33
33
  let n = e.name.trim();
34
34
  if (!n || n.length > 120) return { error: "Give the channel a name of up to 120 characters." };
35
35
  let r = y(e.retentionDays, F);
@@ -42,7 +42,7 @@ function Me(e, t = 1) {
42
42
  syncIntervalMinutes: i.value
43
43
  };
44
44
  }
45
- function Ne({ form: e, onChange: n, idPrefix: r, pullMinInterval: i }) {
45
+ function Fe({ form: e, onChange: n, idPrefix: r, pullMinInterval: i }) {
46
46
  let a = i != null;
47
47
  return /* @__PURE__ */ P("div", {
48
48
  className: "space-y-4",
@@ -139,7 +139,7 @@ function Ne({ form: e, onChange: n, idPrefix: r, pullMinInterval: i }) {
139
139
  ]
140
140
  });
141
141
  }
142
- function Pe(e) {
142
+ function Ie(e) {
143
143
  return {
144
144
  name: e.name,
145
145
  privacyMode: e.privacyMode,
@@ -147,9 +147,9 @@ function Pe(e) {
147
147
  syncIntervalMinutes: e.syncIntervalMinutes == null ? "" : String(e.syncIntervalMinutes)
148
148
  };
149
149
  }
150
- function Fe({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, onResume: te, onSyncNow: ne, onReconnectAccount: re }) {
150
+ function Le({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, onResume: te, onSyncNow: ne, onReconnectAccount: re }) {
151
151
  let ie = g(e.type), o = x(e.status), ae = v(e.status, e.lastSyncAt, e.syncIntervalMinutes), s = e.status === f.Disconnected, c = b(e), u = e.pullSync && (s || c === "reconnect");
152
- return /* @__PURE__ */ P(ke, {
152
+ return /* @__PURE__ */ P(je, {
153
153
  treatment: "glass",
154
154
  className: "flex flex-col p-4 sm:p-5",
155
155
  "data-testid": "channel-card",
@@ -191,7 +191,7 @@ function Fe({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, o
191
191
  variant: "error"
192
192
  }),
193
193
  /* @__PURE__ */ N(l, {
194
- label: pe(e.privacyMode),
194
+ label: me(e.privacyMode),
195
195
  variant: "muted"
196
196
  })
197
197
  ]
@@ -257,7 +257,7 @@ function Fe({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, o
257
257
  className: R,
258
258
  onClick: a,
259
259
  "aria-label": `Manage ${e.name}`,
260
- children: [/* @__PURE__ */ N(we, { className: "h-4 w-4" }), "Manage"]
260
+ children: [/* @__PURE__ */ N(Ee, { className: "h-4 w-4" }), "Manage"]
261
261
  }),
262
262
  u ? /* @__PURE__ */ P("button", {
263
263
  type: "button",
@@ -279,7 +279,7 @@ function Fe({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, o
279
279
  onClick: ee,
280
280
  disabled: r,
281
281
  "aria-label": `${e.status === f.Paused ? "Resume" : "Pause"} ${e.name}`,
282
- children: e.status === f.Paused ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(be, { className: "h-4 w-4" }), "Resume"] }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(E, { className: "h-4 w-4" }), "Pause"] })
282
+ children: e.status === f.Paused ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(Se, { className: "h-4 w-4" }), "Resume"] }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(E, { className: "h-4 w-4" }), "Pause"] })
283
283
  }),
284
284
  e.pullSync && e.status === f.Active && !u && /* @__PURE__ */ P("button", {
285
285
  type: "button",
@@ -294,7 +294,7 @@ function Fe({ channel: e, busy: r, syncing: i, onManage: a, onTogglePause: ee, o
294
294
  ]
295
295
  });
296
296
  }
297
- function Ie({ channelId: e, type: t }) {
297
+ function Re({ channelId: e, type: t }) {
298
298
  let [n, r] = S(!1);
299
299
  return /* @__PURE__ */ P("div", { children: [
300
300
  /* @__PURE__ */ N("p", {
@@ -318,7 +318,7 @@ function Ie({ channelId: e, type: t }) {
318
318
  }
319
319
  },
320
320
  "aria-label": "Copy channel ID",
321
- children: [N(n ? he : _e, { className: "h-4 w-4" }), n ? "Copied" : "Copy"]
321
+ children: [N(n ? _e : ye, { className: "h-4 w-4" }), n ? "Copied" : "Copy"]
322
322
  })]
323
323
  }),
324
324
  /* @__PURE__ */ N("p", {
@@ -328,7 +328,7 @@ function Ie({ channelId: e, type: t }) {
328
328
  })
329
329
  ] });
330
330
  }
331
- function Le(e) {
331
+ function ze(e) {
332
332
  return e.status === p.Synced ? {
333
333
  title: e.ingested === 0 ? "Up to date: nothing new to capture" : `Captured ${e.ingested.toLocaleString()} new ${e.ingested === 1 ? "event" : "events"}`,
334
334
  variant: "success"
@@ -339,23 +339,23 @@ function Le(e) {
339
339
  };
340
340
  }
341
341
  function V() {
342
- let { workspaceId: n = "", apiGatewayUrl: l } = e(), p = Oe(), { toasts: m, addToast: h, dismissToast: le } = se(), [_, ue] = S(""), { data: v, loading: y, error: pe, refetch: b } = re({
342
+ let { workspaceId: n = "", apiGatewayUrl: l } = e(), p = Ae(), { toasts: m, addToast: h, dismissToast: le } = se(), [_, ue] = S(""), { data: v, loading: y, error: me, refetch: b } = re({
343
343
  variables: { includeDisconnected: !0 },
344
344
  skip: !n,
345
345
  fetchPolicy: "cache-and-network"
346
- }), [x, { loading: C }] = ee(), [w, { loading: T }] = s(), [he] = ne(), [ge] = ie(), [_e] = te(), [ve] = o(), { data: ye } = ae({ skip: !n }), E = ye?.timeCampusCapturePullProviders ?? [], [be, O] = S(null), [we, k] = S(null), [A, j] = S(null), [ke, F] = S(!1), [I, V] = S(null), [Re, ze] = S({
346
+ }), [x, { loading: C }] = ee(), [w, { loading: T }] = s(), [_e] = ne(), [ve] = ie(), [ye] = te(), [be] = o(), { data: xe } = ae({ skip: !n }), E = xe?.timeCampusCapturePullProviders ?? [], [Se, O] = S(null), [Ee, k] = S(null), [A, j] = S(null), [je, F] = S(!1), [I, V] = S(null), [Be, Ve] = S({
347
347
  name: "",
348
348
  privacyMode: d.Full,
349
349
  retentionDays: "",
350
350
  syncIntervalMinutes: ""
351
- }), [Be, H] = S(null), [U, W] = S(null), [G, Ve] = S(null), [K, q] = S(null), [He, J] = S(null), [Y, X] = S(null), [Ue, We] = S(!1), Z = me(() => v?.myTimeCampusCaptureChannels ?? [], [v]), Ge = me(() => Z.filter((e) => de(e, _)), [Z, _]), Ke = Z.filter((e) => e.status === f.Active).length, qe = Z.reduce((e, t) => e + t.totalEvents, 0), Je = {
351
+ }), [He, H] = S(null), [U, W] = S(null), [G, Ue] = S(null), [K, q] = S(null), [We, J] = S(null), [Y, X] = S(null), [Ge, Ke] = S(!1), Z = ge(() => v?.myTimeCampusCaptureChannels ?? [], [v]), qe = ge(() => Z.filter((e) => fe(e, _)), [Z, _]), Je = Z.filter((e) => e.status === f.Active).length, Ye = Z.reduce((e, t) => e + t.totalEvents, 0), Xe = {
352
352
  title: "Channels",
353
353
  description: "Manage and configure your connected capture sources",
354
354
  purpose: "Channels are the sources that feed your automatic timeline: the browser extension, desktop and mobile apps, editors, the command line, calendars and your own API clients. Connect a source here, then decide how much detail it may store, how long its data is kept, and pause or disconnect it at any time. Your channels are private to you."
355
- }, Ye = () => {
355
+ }, Ze = () => {
356
356
  V(null), W(null), H(null), F(!0);
357
- }, Xe = (e) => {
358
- V(e), ze({
357
+ }, Qe = (e) => {
358
+ V(e), Ve({
359
359
  name: g(e).defaultName,
360
360
  privacyMode: d.Full,
361
361
  retentionDays: "",
@@ -363,9 +363,9 @@ function V() {
363
363
  }), H(null);
364
364
  }, Q = () => {
365
365
  F(!1), V(null), W(null);
366
- }, Ze = async () => {
366
+ }, $e = async () => {
367
367
  if (!I) return;
368
- let e = Me(Re);
368
+ let e = Pe(Be);
369
369
  if ("error" in e) {
370
370
  H(e.error);
371
371
  return;
@@ -383,13 +383,13 @@ function V() {
383
383
  } catch (e) {
384
384
  H(e instanceof Error && e.message ? e.message : "Couldn't connect this channel. Please try again.");
385
385
  }
386
- }, Qe = (e) => E.find((t) => t.key === e.provider), $e = (e) => {
386
+ }, et = (e) => E.find((t) => t.key === e.provider), tt = (e) => {
387
387
  Q(), j({
388
388
  provider: e,
389
389
  reconnect: null
390
390
  });
391
- }, et = (e) => {
392
- let t = Qe(e);
391
+ }, nt = (e) => {
392
+ let t = et(e);
393
393
  if (!t) {
394
394
  h({
395
395
  title: "This account can't be connected from here",
@@ -401,13 +401,13 @@ function V() {
401
401
  provider: t,
402
402
  reconnect: e
403
403
  });
404
- }, tt = async (e, t = !1) => {
404
+ }, rt = async (e, t = !1) => {
405
405
  k(e);
406
406
  try {
407
- let n = await ve({ variables: { id: e } });
407
+ let n = await be({ variables: { id: e } });
408
408
  if (n.error) throw Error(n.error.message);
409
409
  let r = n.data?.syncTimeCampusCaptureChannel;
410
- r && !t && h(Le(r));
410
+ r && !t && h(ze(r));
411
411
  } catch (e) {
412
412
  t || h({
413
413
  title: "Couldn't sync this channel",
@@ -417,7 +417,7 @@ function V() {
417
417
  } finally {
418
418
  k(null), await b();
419
419
  }
420
- }, nt = async (e) => {
420
+ }, it = async (e) => {
421
421
  let t = A;
422
422
  if (!t) return;
423
423
  let { provider: n, reconnect: r } = t;
@@ -450,7 +450,7 @@ function V() {
450
450
  title: `${n.label} connected`,
451
451
  description: "Pulling your recent activity now.",
452
452
  variant: "success"
453
- }), await tt(t);
453
+ }), await rt(t);
454
454
  } catch (e) {
455
455
  h({
456
456
  title: `Couldn't connect ${n.label}`,
@@ -458,13 +458,13 @@ function V() {
458
458
  variant: "error"
459
459
  });
460
460
  }
461
- }, rt = (e) => {
462
- Ve(e), q(Pe(e)), J(null);
461
+ }, at = (e) => {
462
+ Ue(e), q(Ie(e)), J(null);
463
463
  }, $ = () => {
464
- Ve(null), q(null);
465
- }, it = async () => {
464
+ Ue(null), q(null);
465
+ }, ot = async () => {
466
466
  if (!G || !K) return;
467
- let e = Me(K, G.pullSync ? Qe(G)?.minSyncIntervalMinutes ?? 1 : 1);
467
+ let e = Pe(K, G.pullSync ? et(G)?.minSyncIntervalMinutes ?? 1 : 1);
468
468
  if ("error" in e) {
469
469
  J(e.error);
470
470
  return;
@@ -483,7 +483,7 @@ function V() {
483
483
  } catch (e) {
484
484
  J(e instanceof Error && e.message ? e.message : "Couldn't save these settings. Please try again.");
485
485
  }
486
- }, at = async (e, t) => {
486
+ }, st = async (e, t) => {
487
487
  O(e.id);
488
488
  try {
489
489
  let n = await w({ variables: {
@@ -505,13 +505,13 @@ function V() {
505
505
  } finally {
506
506
  O(null);
507
507
  }
508
- }, ot = async () => {
508
+ }, ct = async () => {
509
509
  if (!Y) return;
510
510
  let { channel: e } = Y;
511
- We(!0);
511
+ Ke(!0);
512
512
  try {
513
513
  if (Y.kind === "disconnect") {
514
- let t = await he({ variables: { id: e.id } });
514
+ let t = await _e({ variables: { id: e.id } });
515
515
  if (t.error) throw Error(t.error.message);
516
516
  h({
517
517
  title: `${e.name} disconnected`,
@@ -519,7 +519,7 @@ function V() {
519
519
  variant: "success"
520
520
  });
521
521
  } else if (Y.kind === "purge") {
522
- let t = await ge({ variables: {
522
+ let t = await ve({ variables: {
523
523
  id: e.id,
524
524
  confirm: !0
525
525
  } });
@@ -530,7 +530,7 @@ function V() {
530
530
  variant: "success"
531
531
  });
532
532
  } else {
533
- let t = await _e({ variables: {
533
+ let t = await ye({ variables: {
534
534
  id: e.id,
535
535
  confirm: !0
536
536
  } });
@@ -548,25 +548,25 @@ function V() {
548
548
  variant: "error"
549
549
  });
550
550
  } finally {
551
- We(!1);
551
+ Ke(!1);
552
552
  }
553
- }, st = /* @__PURE__ */ P("button", {
553
+ }, lt = /* @__PURE__ */ P("button", {
554
554
  type: "button",
555
555
  className: z,
556
- onClick: Ye,
557
- children: [/* @__PURE__ */ N(Se, { className: "h-4 w-4" }), "Connect channel"]
558
- }), ct = !n || y && !v;
556
+ onClick: Ze,
557
+ children: [/* @__PURE__ */ N(we, { className: "h-4 w-4" }), "Connect channel"]
558
+ }), ut = !n || y && !v;
559
559
  return /* @__PURE__ */ P(c, {
560
- ...Je,
561
- actions: st,
560
+ ...Xe,
561
+ actions: lt,
562
562
  children: [
563
- ct ? /* @__PURE__ */ N("div", {
563
+ ut ? /* @__PURE__ */ N("div", {
564
564
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
565
565
  children: /* @__PURE__ */ N(i, {
566
566
  variant: "card",
567
567
  count: 4
568
568
  })
569
- }) : pe && !v ? /* @__PURE__ */ N("div", {
569
+ }) : me && !v ? /* @__PURE__ */ N("div", {
570
570
  className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
571
571
  children: "We couldn't load your channels right now. Please try again in a moment."
572
572
  }) : /* @__PURE__ */ P("div", {
@@ -577,27 +577,27 @@ function V() {
577
577
  /* @__PURE__ */ N(r, {
578
578
  title: "Channels",
579
579
  value: Z.length,
580
- icon: /* @__PURE__ */ N(xe, { className: "h-5 w-5" })
580
+ icon: /* @__PURE__ */ N(Ce, { className: "h-5 w-5" })
581
581
  }),
582
582
  /* @__PURE__ */ N(r, {
583
583
  title: "Capturing now",
584
- value: Ke,
584
+ value: Je,
585
585
  icon: /* @__PURE__ */ N(D, { className: "h-5 w-5" })
586
586
  }),
587
587
  /* @__PURE__ */ N(r, {
588
588
  title: "Events captured",
589
- value: qe.toLocaleString(),
590
- icon: /* @__PURE__ */ N(De, { className: "h-5 w-5" })
589
+ value: Ye.toLocaleString(),
590
+ icon: /* @__PURE__ */ N(ke, { className: "h-5 w-5" })
591
591
  })
592
592
  ]
593
593
  }), Z.length === 0 ? /* @__PURE__ */ N(a, {
594
594
  illustration: "empty-data",
595
595
  title: "No channels connected yet",
596
596
  description: "Connect your first source — a browser, an editor, your calendar or an API client — and its activity will start assembling your timeline.",
597
- action: st
597
+ action: lt
598
598
  }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", {
599
599
  className: "relative max-w-md",
600
- children: [/* @__PURE__ */ N(Ce, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ N("input", {
600
+ children: [/* @__PURE__ */ N(Te, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ N("input", {
601
601
  type: "search",
602
602
  "aria-label": "Search channels",
603
603
  placeholder: "Search channels...",
@@ -605,7 +605,7 @@ function V() {
605
605
  onChange: (e) => ue(e.target.value),
606
606
  className: t(L, "mt-0 pl-9")
607
607
  })]
608
- }), Ge.length === 0 ? /* @__PURE__ */ P("p", {
608
+ }), qe.length === 0 ? /* @__PURE__ */ P("p", {
609
609
  className: "text-sm text-text-secondary",
610
610
  children: [
611
611
  "No channels match \"",
@@ -614,20 +614,20 @@ function V() {
614
614
  ]
615
615
  }) : /* @__PURE__ */ N("div", {
616
616
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
617
- children: Ge.map((e) => /* @__PURE__ */ N(Fe, {
617
+ children: qe.map((e) => /* @__PURE__ */ N(Le, {
618
618
  channel: e,
619
- busy: be === e.id || T,
620
- onManage: () => rt(e),
621
- onTogglePause: () => at(e, e.status === f.Paused ? f.Active : f.Paused),
622
- onResume: () => at(e, f.Active),
623
- syncing: we === e.id,
624
- onSyncNow: () => tt(e.id),
625
- onReconnectAccount: () => et(e)
619
+ busy: Se === e.id || T,
620
+ onManage: () => at(e),
621
+ onTogglePause: () => st(e, e.status === f.Paused ? f.Active : f.Paused),
622
+ onResume: () => st(e, f.Active),
623
+ syncing: Ee === e.id,
624
+ onSyncNow: () => rt(e.id),
625
+ onReconnectAccount: () => nt(e)
626
626
  }, e.id))
627
627
  })] })]
628
628
  }),
629
629
  /* @__PURE__ */ N(u, {
630
- open: ke,
630
+ open: je,
631
631
  onClose: Q,
632
632
  title: U ? "Channel connected" : I ? `Connect ${g(I).label}` : "Connect a channel",
633
633
  description: U ? "Your source can start sending activity to this channel." : I ? "Choose how much this source may store and how long to keep it." : "Pick the kind of source you want to capture from.",
@@ -645,7 +645,7 @@ function V() {
645
645
  }), /* @__PURE__ */ N("button", {
646
646
  type: "button",
647
647
  className: z,
648
- onClick: Ze,
648
+ onClick: $e,
649
649
  disabled: C,
650
650
  children: C ? "Connecting..." : "Connect"
651
651
  })] }) : /* @__PURE__ */ N("button", {
@@ -654,15 +654,15 @@ function V() {
654
654
  onClick: Q,
655
655
  children: "Cancel"
656
656
  }),
657
- children: U ? /* @__PURE__ */ N(Ie, {
657
+ children: U ? /* @__PURE__ */ N(Re, {
658
658
  channelId: U.id,
659
659
  type: U.type
660
- }) : I ? /* @__PURE__ */ P(M, { children: [Be && /* @__PURE__ */ N("div", {
660
+ }) : I ? /* @__PURE__ */ P(M, { children: [He && /* @__PURE__ */ N("div", {
661
661
  className: "mb-4 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
662
- children: Be
663
- }), /* @__PURE__ */ N(Ne, {
664
- form: Re,
665
- onChange: ze,
662
+ children: He
663
+ }), /* @__PURE__ */ N(Fe, {
664
+ form: Be,
665
+ onChange: Ve,
666
666
  idPrefix: "connect"
667
667
  })] }) : /* @__PURE__ */ P("div", {
668
668
  className: "space-y-5",
@@ -679,26 +679,33 @@ function V() {
679
679
  children: "TimeCampus pulls your activity on a schedule. You sign in with the provider; TimeCampus never sees or stores your password or token."
680
680
  }),
681
681
  /* @__PURE__ */ N("div", {
682
- className: "mt-2 grid grid-cols-1 gap-3 sm:grid-cols-2",
683
- children: E.map((e) => /* @__PURE__ */ P("button", {
684
- type: "button",
685
- onClick: () => $e(e),
686
- "data-testid": `pull-provider-${e.key}`,
687
- className: "flex items-start gap-3 rounded-lg border border-border-subtle p-3 text-left hover:bg-bg-sunken/50",
688
- children: [/* @__PURE__ */ N("span", {
689
- className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
690
- children: B[e.channelType]
691
- }), /* @__PURE__ */ P("span", {
692
- className: "min-w-0",
682
+ className: "mt-3 space-y-4",
683
+ children: de(E).map(({ group: e, providers: t }) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("h4", {
684
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
685
+ "data-testid": `pull-provider-group-${e}`,
686
+ children: he(e)
687
+ }), /* @__PURE__ */ N("div", {
688
+ className: "mt-2 grid grid-cols-1 gap-3 sm:grid-cols-2",
689
+ children: t.map((e) => /* @__PURE__ */ P("button", {
690
+ type: "button",
691
+ onClick: () => tt(e),
692
+ "data-testid": `pull-provider-${e.key}`,
693
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle p-3 text-left hover:bg-bg-sunken/50",
693
694
  children: [/* @__PURE__ */ N("span", {
694
- className: "block text-sm font-medium text-text-primary",
695
- children: e.label
696
- }), /* @__PURE__ */ N("span", {
697
- className: "block text-xs text-text-secondary",
698
- children: e.description
695
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
696
+ children: B[e.channelType]
697
+ }), /* @__PURE__ */ P("span", {
698
+ className: "min-w-0",
699
+ children: [/* @__PURE__ */ N("span", {
700
+ className: "block text-sm font-medium text-text-primary",
701
+ children: e.label
702
+ }), /* @__PURE__ */ N("span", {
703
+ className: "block text-xs text-text-secondary",
704
+ children: e.description
705
+ })]
699
706
  })]
700
- })]
701
- }, e.key))
707
+ }, e.key))
708
+ })] }, e))
702
709
  })
703
710
  ]
704
711
  }), /* @__PURE__ */ P("section", {
@@ -711,7 +718,7 @@ function V() {
711
718
  className: "mt-2 grid grid-cols-1 gap-3 sm:grid-cols-2",
712
719
  children: ce.map((e) => /* @__PURE__ */ P("button", {
713
720
  type: "button",
714
- onClick: () => Xe(e.type),
721
+ onClick: () => Qe(e.type),
715
722
  className: "flex items-start gap-3 rounded-lg border border-border-subtle p-3 text-left hover:bg-bg-sunken/50",
716
723
  children: [/* @__PURE__ */ N("span", {
717
724
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
@@ -731,17 +738,17 @@ function V() {
731
738
  })]
732
739
  })
733
740
  }),
734
- /* @__PURE__ */ N(Ae, {
741
+ /* @__PURE__ */ N(Me, {
735
742
  open: A !== null,
736
743
  onClose: () => j(null),
737
744
  client: p,
738
- callbackUrl: fe(l),
745
+ callbackUrl: pe(l),
739
746
  providerKey: A?.provider.integrationProviderKey ?? null,
740
747
  providerSource: "catalog",
741
748
  requireVault: !1,
742
749
  defaultVisibility: "RESTRICTED",
743
750
  defaultName: A ? `${A.provider.label} (TimeCampus)` : void 0,
744
- onConnectionCreated: nt
751
+ onConnectionCreated: it
745
752
  }),
746
753
  /* @__PURE__ */ N(u, {
747
754
  open: G !== null && Y === null,
@@ -757,24 +764,24 @@ function V() {
757
764
  }), /* @__PURE__ */ N("button", {
758
765
  type: "button",
759
766
  className: z,
760
- onClick: it,
767
+ onClick: ot,
761
768
  disabled: T,
762
769
  children: T ? "Saving..." : "Save changes"
763
770
  })] }),
764
771
  children: G && K && /* @__PURE__ */ P("div", {
765
772
  className: "space-y-6",
766
773
  children: [
767
- He && /* @__PURE__ */ N("div", {
774
+ We && /* @__PURE__ */ N("div", {
768
775
  className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-3 text-sm text-status-error-text",
769
- children: He
776
+ children: We
770
777
  }),
771
- /* @__PURE__ */ N(Ne, {
778
+ /* @__PURE__ */ N(Fe, {
772
779
  form: K,
773
780
  onChange: q,
774
781
  idPrefix: "manage",
775
- pullMinInterval: G.pullSync ? Qe(G)?.minSyncIntervalMinutes ?? 1 : void 0
782
+ pullMinInterval: G.pullSync ? et(G)?.minSyncIntervalMinutes ?? 1 : void 0
776
783
  }),
777
- !G.pullSync && /* @__PURE__ */ N(Ie, {
784
+ !G.pullSync && /* @__PURE__ */ N(Re, {
778
785
  channelId: G.id,
779
786
  type: G.type
780
787
  }),
@@ -799,7 +806,7 @@ function V() {
799
806
  kind: "disconnect",
800
807
  channel: G
801
808
  }),
802
- children: [/* @__PURE__ */ N(Ee, { className: "h-4 w-4" }), "Disconnect"]
809
+ children: [/* @__PURE__ */ N(Oe, { className: "h-4 w-4" }), "Disconnect"]
803
810
  }),
804
811
  /* @__PURE__ */ P("button", {
805
812
  type: "button",
@@ -808,16 +815,16 @@ function V() {
808
815
  kind: "purge",
809
816
  channel: G
810
817
  }),
811
- children: [/* @__PURE__ */ N(Te, { className: "h-4 w-4" }), "Delete captured data"]
818
+ children: [/* @__PURE__ */ N(De, { className: "h-4 w-4" }), "Delete captured data"]
812
819
  }),
813
820
  /* @__PURE__ */ P("button", {
814
821
  type: "button",
815
- className: je,
822
+ className: Ne,
816
823
  onClick: () => X({
817
824
  kind: "remove",
818
825
  channel: G
819
826
  }),
820
- children: [/* @__PURE__ */ N(Te, { className: "h-4 w-4" }), "Remove channel"]
827
+ children: [/* @__PURE__ */ N(De, { className: "h-4 w-4" }), "Remove channel"]
821
828
  })
822
829
  ]
823
830
  })
@@ -837,10 +844,10 @@ function V() {
837
844
  children: "Cancel"
838
845
  }), /* @__PURE__ */ N("button", {
839
846
  type: "button",
840
- className: Y?.kind === "disconnect" ? z : je,
841
- onClick: ot,
842
- disabled: Ue,
843
- children: Ue ? "Working..." : Y?.kind === "disconnect" ? "Disconnect" : Y?.kind === "purge" ? "Delete data" : "Remove"
847
+ className: Y?.kind === "disconnect" ? z : Ne,
848
+ onClick: ct,
849
+ disabled: Ge,
850
+ children: Ge ? "Working..." : Y?.kind === "disconnect" ? "Disconnect" : Y?.kind === "purge" ? "Delete data" : "Remove"
844
851
  })] }),
845
852
  children: /* @__PURE__ */ P("p", {
846
853
  className: "text-sm text-text-secondary",