@burdenoff/microfe-timecampus 2026.1030.3 → 2026.1030.4

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":"TimelinePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/timeline/TimelinePage.tsx"],"names":[],"mappings":"AAkZA,wBAAgB,YAAY,gCAqP3B"}
1
+ {"version":3,"file":"TimelinePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/timeline/TimelinePage.tsx"],"names":[],"mappings":"AAwZA,wBAAgB,YAAY,gCAiQ3B"}
@@ -6,95 +6,96 @@ import { EmptyState as a } from "../../components/EmptyState.js";
6
6
  import { useGetTimeCampusTimelineQuery as o, useListProjectsQuery as s, useRecategorizeTimeCampusCaptureEventMutation as c } from "../../../generated/wspace-operations.js";
7
7
  import { PageLayout as l } from "../../components/PageLayout.js";
8
8
  import { calendarHoldLabel as u } from "../focus/focusHelpers.js";
9
- import { driftLabel as d, focusStatusLabel as f, plannedDrift as p, protectedPercent as m } from "./timelineFocus.js";
10
- import { useMemo as h, useState as g } from "react";
11
- import { Activity as _, Brain as v, Calendar as y, CalendarClock as b, Coffee as x, FolderOpen as S, Github as C, GripVertical as w, MessageSquare as T, Shield as E, Users as D, Zap as O } from "lucide-react";
12
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
13
- import { GlassCard as j } from "@burdenoff/fe-libs/ui";
14
- import { DndContext as M, DragOverlay as N, KeyboardSensor as P, PointerSensor as F, useDraggable as I, useDroppable as L, useSensor as R, useSensors as z } from "@dnd-kit/core";
9
+ import { hasAiCategorizedSegment as d, segmentProvenance as f } from "./timelineProvenance.js";
10
+ import { driftLabel as p, focusStatusLabel as m, plannedDrift as h, protectedPercent as g } from "./timelineFocus.js";
11
+ import { useMemo as _, useState as v } from "react";
12
+ import { Activity as y, Brain as b, Calendar as x, CalendarClock as S, Coffee as C, FolderOpen as w, Github as T, GripVertical as E, MessageSquare as D, Shield as O, Sparkles as k, Users as A, Zap as j } from "lucide-react";
13
+ import { jsx as M, jsxs as N } from "react/jsx-runtime";
14
+ import { GlassCard as P } from "@burdenoff/fe-libs/ui";
15
+ import { DndContext as F, DragOverlay as I, KeyboardSensor as L, PointerSensor as R, useDraggable as z, useDroppable as B, useSensor as V, useSensors as H } from "@dnd-kit/core";
15
16
  //#region src/timecampus/pages/timeline/TimelinePage.tsx
16
- var B = {
17
+ var U = {
17
18
  DEEP_WORK: {
18
19
  label: "Deep work",
19
- icon: v,
20
+ icon: b,
20
21
  dot: "bg-status-success-bg",
21
22
  chip: "bg-status-success-bg text-status-success-text"
22
23
  },
23
24
  MEETING: {
24
25
  label: "Meeting",
25
- icon: D,
26
+ icon: A,
26
27
  dot: "bg-status-info-bg",
27
28
  chip: "bg-status-info-bg text-status-info-text"
28
29
  },
29
30
  COMMUNICATION: {
30
31
  label: "Communication",
31
- icon: T,
32
+ icon: D,
32
33
  dot: "bg-status-warning-bg",
33
34
  chip: "bg-status-warning-bg text-status-warning-text"
34
35
  },
35
36
  BREAK: {
36
37
  label: "Break",
37
- icon: x,
38
+ icon: C,
38
39
  dot: "bg-bg-sunken",
39
40
  chip: "bg-bg-sunken text-text-secondary"
40
41
  },
41
42
  OTHER: {
42
43
  label: "Other",
43
- icon: _,
44
+ icon: y,
44
45
  dot: "bg-bg-sunken",
45
46
  chip: "bg-bg-sunken text-text-secondary"
46
47
  }
47
- }, V = {
48
- TIME_ENTRY: O,
49
- MEETING: D,
50
- POMODORO: v,
51
- EMAIL: T,
52
- CAPTURE: C,
53
- FOCUS_SESSION: E,
54
- FOCUS_BLOCK: b
48
+ }, W = {
49
+ TIME_ENTRY: j,
50
+ MEETING: A,
51
+ POMODORO: b,
52
+ EMAIL: D,
53
+ CAPTURE: T,
54
+ FOCUS_SESSION: O,
55
+ FOCUS_BLOCK: S
55
56
  };
56
- function H(e) {
57
+ function G(e) {
57
58
  return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
58
59
  }
59
- function U({ segment: e }) {
60
+ function K({ segment: e }) {
60
61
  let r = e.focus;
61
62
  if (!r) return null;
62
- let i = e.isPlanned, a = i ? b : E, o = f(i, r, e.endTime), s = i ? null : m(r), c = i ? null : p(e.startTime, e.endTime, r), l = u(r.calendarHoldStatus);
63
- return /* @__PURE__ */ A("li", {
63
+ let i = e.isPlanned, a = i ? S : O, o = m(i, r, e.endTime), s = i ? null : g(r), c = i ? null : h(e.startTime, e.endTime, r), l = u(r.calendarHoldStatus);
64
+ return /* @__PURE__ */ N("li", {
64
65
  className: `flex items-start gap-3 p-4 ${i ? "bg-bg-sunken/30" : ""}`,
65
66
  "data-testid": i ? "timeline-focus-block" : "timeline-focus-session",
66
67
  children: [
67
- /* @__PURE__ */ A("div", {
68
+ /* @__PURE__ */ N("div", {
68
69
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
69
- children: [/* @__PURE__ */ k("span", { children: n(e.startTime) }), /* @__PURE__ */ k("span", {
70
+ children: [/* @__PURE__ */ M("span", { children: n(e.startTime) }), /* @__PURE__ */ M("span", {
70
71
  className: "text-text-tertiary",
71
72
  children: t(e.durationSeconds)
72
73
  })]
73
74
  }),
74
- /* @__PURE__ */ k("div", {
75
+ /* @__PURE__ */ M("div", {
75
76
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${i ? "border border-dashed border-status-success-text/60 text-status-success-text" : "bg-status-success-bg text-status-success-text"}`,
76
- children: /* @__PURE__ */ k(a, { className: "h-4 w-4" })
77
+ children: /* @__PURE__ */ M(a, { className: "h-4 w-4" })
77
78
  }),
78
- /* @__PURE__ */ A("div", {
79
+ /* @__PURE__ */ N("div", {
79
80
  className: "min-w-0 flex-1",
80
81
  children: [
81
- /* @__PURE__ */ k("p", {
82
+ /* @__PURE__ */ M("p", {
82
83
  className: "truncate text-sm font-medium text-text-primary",
83
84
  children: e.title || (i ? "Planned focus block" : "Focus session")
84
85
  }),
85
- /* @__PURE__ */ A("div", {
86
+ /* @__PURE__ */ N("div", {
86
87
  className: "mt-1 flex flex-wrap items-center gap-2",
87
88
  children: [
88
- /* @__PURE__ */ k("span", {
89
+ /* @__PURE__ */ M("span", {
89
90
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${i ? "border border-dashed border-border-seam text-text-secondary" : "bg-status-success-bg text-status-success-text"}`,
90
91
  "data-testid": "timeline-focus-status",
91
92
  children: o
92
93
  }),
93
- r.protectionLevel === "STRICT" && /* @__PURE__ */ k("span", {
94
+ r.protectionLevel === "STRICT" && /* @__PURE__ */ M("span", {
94
95
  className: "text-xs text-text-secondary",
95
96
  children: "Strict"
96
97
  }),
97
- r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */ A("span", {
98
+ r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */ N("span", {
98
99
  className: "text-xs tabular-nums text-text-secondary",
99
100
  children: [
100
101
  "Planned ",
@@ -104,7 +105,7 @@ function U({ segment: e }) {
104
105
  n(r.plannedEndTime)
105
106
  ]
106
107
  }),
107
- !i && e.endTime && /* @__PURE__ */ A("span", {
108
+ !i && e.endTime && /* @__PURE__ */ N("span", {
108
109
  className: "text-xs tabular-nums text-text-secondary",
109
110
  children: [
110
111
  "Actual ",
@@ -114,35 +115,35 @@ function U({ segment: e }) {
114
115
  n(e.endTime)
115
116
  ]
116
117
  }),
117
- c && /* @__PURE__ */ A("span", {
118
+ c && /* @__PURE__ */ N("span", {
118
119
  className: "text-xs text-text-tertiary",
119
120
  children: [
120
121
  "Started ",
121
- d(c.startMinutes),
122
- c.endMinutes !== null && `, ended ${d(c.endMinutes, "over", "short")}`
122
+ p(c.startMinutes),
123
+ c.endMinutes !== null && `, ended ${p(c.endMinutes, "over", "short")}`
123
124
  ]
124
125
  }),
125
- l && /* @__PURE__ */ k("span", {
126
+ l && /* @__PURE__ */ M("span", {
126
127
  className: "text-xs text-text-tertiary",
127
128
  children: l
128
129
  })
129
130
  ]
130
131
  }),
131
- !i && /* @__PURE__ */ A("div", {
132
+ !i && /* @__PURE__ */ N("div", {
132
133
  className: "mt-2",
133
134
  "data-testid": "timeline-focus-protection",
134
- children: [/* @__PURE__ */ A("div", {
135
+ children: [/* @__PURE__ */ N("div", {
135
136
  className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
136
137
  role: "img",
137
138
  "aria-label": `${s ?? 0}% of this session stayed protected`,
138
- children: [/* @__PURE__ */ k("span", {
139
+ children: [/* @__PURE__ */ M("span", {
139
140
  className: "h-full bg-status-success-text",
140
141
  style: { width: `${s ?? 0}%` }
141
- }), /* @__PURE__ */ k("span", {
142
+ }), /* @__PURE__ */ M("span", {
142
143
  className: "h-full bg-status-warning-text",
143
144
  style: { width: `${s === null ? 0 : 100 - s}%` }
144
145
  })]
145
- }), /* @__PURE__ */ A("p", {
146
+ }), /* @__PURE__ */ N("p", {
146
147
  className: "mt-1 text-xs tabular-nums text-text-secondary",
147
148
  children: [
148
149
  "Protected ",
@@ -159,7 +160,7 @@ function U({ segment: e }) {
159
160
  ]
160
161
  })]
161
162
  }),
162
- i && /* @__PURE__ */ k("p", {
163
+ i && /* @__PURE__ */ M("p", {
163
164
  className: "mt-1 text-xs text-text-tertiary",
164
165
  children: "Not counted in the day's totals until you run it."
165
166
  })
@@ -168,113 +169,122 @@ function U({ segment: e }) {
168
169
  ]
169
170
  });
170
171
  }
171
- var W = [
172
+ var q = [
172
173
  "DEEP_WORK",
173
174
  "MEETING",
174
175
  "COMMUNICATION",
175
176
  "BREAK",
176
177
  "OTHER"
177
- ], G = {
178
- auto: "Auto-categorized",
179
- user: "You set this",
180
- channel: "From channel rules"
181
- };
182
- function K(e) {
183
- return e ? G[e.toLowerCase()] ?? e : null;
184
- }
185
- function q({ category: e, label: n, dotClassName: r, totalSeconds: i }) {
186
- let { isOver: a, setNodeRef: o } = L({ id: `category:${e}` });
187
- return /* @__PURE__ */ A("div", {
178
+ ];
179
+ function J({ category: e, label: n, dotClassName: r, totalSeconds: i }) {
180
+ let { isOver: a, setNodeRef: o } = B({ id: `category:${e}` });
181
+ return /* @__PURE__ */ N("div", {
188
182
  ref: o,
189
183
  className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors ${a ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-seam bg-bg-surface"}`,
190
184
  children: [
191
- /* @__PURE__ */ k("span", {
185
+ /* @__PURE__ */ M("span", {
192
186
  className: `inline-block h-2.5 w-2.5 rounded-full ${r}`,
193
187
  "aria-hidden": !0
194
188
  }),
195
- /* @__PURE__ */ k("span", {
189
+ /* @__PURE__ */ M("span", {
196
190
  className: "text-sm font-medium text-text-primary",
197
191
  children: n
198
192
  }),
199
- /* @__PURE__ */ k("span", {
193
+ /* @__PURE__ */ M("span", {
200
194
  className: "text-sm tabular-nums text-text-secondary",
201
195
  children: t(i)
202
196
  }),
203
- a && /* @__PURE__ */ k("span", {
197
+ a && /* @__PURE__ */ M("span", {
204
198
  className: "text-xs font-medium text-primary",
205
199
  children: "Drop here"
206
200
  })
207
201
  ]
208
202
  });
209
203
  }
210
- function J({ segment: e, category: r, projectName: i, recategorizing: a, onRecategorize: o }) {
211
- let s = B[r] ?? B.OTHER, c = V[e.source] ?? _, l = K(e.categorySource), { attributes: u, listeners: d, setNodeRef: f, isDragging: p } = I({
204
+ function ee({ segment: e, category: r, projectName: i, recategorizing: a, onRecategorize: o }) {
205
+ let s = U[r] ?? U.OTHER, c = W[e.source] ?? y, l = f(e), { attributes: u, listeners: d, setNodeRef: p, isDragging: m } = z({
212
206
  id: e.id,
213
207
  data: { segment: e },
214
208
  disabled: !e.isRecategorizable
215
209
  });
216
- return /* @__PURE__ */ A("li", {
217
- ref: f,
218
- className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${p ? "opacity-40" : ""}`,
210
+ return /* @__PURE__ */ N("li", {
211
+ ref: p,
212
+ className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${m ? "opacity-40" : ""}`,
219
213
  children: [
220
- /* @__PURE__ */ A("div", {
214
+ /* @__PURE__ */ N("div", {
221
215
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
222
- children: [/* @__PURE__ */ k("span", { children: n(e.startTime) }), /* @__PURE__ */ k("span", {
216
+ children: [/* @__PURE__ */ M("span", { children: n(e.startTime) }), /* @__PURE__ */ M("span", {
223
217
  className: "text-text-tertiary",
224
218
  children: t(e.durationSeconds)
225
219
  })]
226
220
  }),
227
- e.isRecategorizable && /* @__PURE__ */ k("button", {
221
+ e.isRecategorizable && /* @__PURE__ */ M("button", {
228
222
  type: "button",
229
223
  "aria-label": `Drag to recategorize ${e.title || s.label}`,
230
224
  className: "mt-1.5 shrink-0 cursor-grab touch-none text-text-tertiary hover:text-text-secondary active:cursor-grabbing",
231
225
  ...u,
232
226
  ...d,
233
- children: /* @__PURE__ */ k(w, { className: "h-4 w-4" })
227
+ children: /* @__PURE__ */ M(E, { className: "h-4 w-4" })
234
228
  }),
235
- /* @__PURE__ */ k("div", {
229
+ /* @__PURE__ */ M("div", {
236
230
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${s.chip}`,
237
- children: /* @__PURE__ */ k(c, { className: "h-4 w-4" })
231
+ children: /* @__PURE__ */ M(c, { className: "h-4 w-4" })
238
232
  }),
239
- /* @__PURE__ */ A("div", {
233
+ /* @__PURE__ */ N("div", {
240
234
  className: "min-w-0 flex-1",
241
- children: [/* @__PURE__ */ k("p", {
235
+ children: [/* @__PURE__ */ M("p", {
242
236
  className: "truncate text-sm font-medium text-text-primary",
243
237
  children: e.title || s.label
244
- }), /* @__PURE__ */ A("div", {
238
+ }), /* @__PURE__ */ N("div", {
245
239
  className: "mt-1 flex flex-wrap items-center gap-2",
246
240
  children: [
247
- /* @__PURE__ */ k("span", {
241
+ /* @__PURE__ */ M("span", {
248
242
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${s.chip}`,
249
243
  children: s.label
250
244
  }),
251
- i !== void 0 && /* @__PURE__ */ A("span", {
245
+ i !== void 0 && /* @__PURE__ */ N("span", {
252
246
  className: "inline-flex max-w-[12rem] items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
253
- children: [/* @__PURE__ */ k(S, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ k("span", {
247
+ children: [/* @__PURE__ */ M(w, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ M("span", {
254
248
  className: "truncate",
255
249
  children: i
256
250
  })]
257
251
  }),
258
- e.app && /* @__PURE__ */ k("span", {
252
+ e.app && /* @__PURE__ */ M("span", {
259
253
  className: "text-xs text-text-secondary",
260
254
  children: e.app
261
255
  }),
262
- l && /* @__PURE__ */ k("span", {
256
+ l && (l.isAi ? /* @__PURE__ */ N("span", {
257
+ className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
258
+ title: l.detail,
259
+ "data-testid": "timeline-ai-provenance",
260
+ children: [
261
+ /* @__PURE__ */ M(k, {
262
+ className: "h-3 w-3 shrink-0",
263
+ "aria-hidden": !0
264
+ }),
265
+ l.label,
266
+ /* @__PURE__ */ N("span", {
267
+ className: "sr-only",
268
+ children: [". ", l.detail]
269
+ })
270
+ ]
271
+ }) : /* @__PURE__ */ M("span", {
263
272
  className: "text-xs text-text-tertiary",
264
- children: l
265
- })
273
+ title: l.detail,
274
+ children: l.label
275
+ }))
266
276
  ]
267
277
  })]
268
278
  }),
269
- e.isRecategorizable && /* @__PURE__ */ k("select", {
279
+ e.isRecategorizable && /* @__PURE__ */ M("select", {
270
280
  "aria-label": "Recategorize activity",
271
281
  disabled: a,
272
282
  value: r,
273
283
  onChange: (t) => o(e, t.target.value),
274
284
  className: "shrink-0 rounded-md border border-border-seam bg-bg-surface px-2 py-1 text-xs text-text-secondary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40",
275
- children: W.map((e) => /* @__PURE__ */ k("option", {
285
+ children: q.map((e) => /* @__PURE__ */ M("option", {
276
286
  value: e,
277
- children: B[e].label
287
+ children: U[e].label
278
288
  }, e))
279
289
  })
280
290
  ]
@@ -285,11 +295,11 @@ function Y(e) {
285
295
  return (/* @__PURE__ */ new Date(e.getTime() - t * 60 * 1e3)).toISOString().slice(0, 10);
286
296
  }
287
297
  var X = 14;
288
- function ee() {
298
+ function te() {
289
299
  let e = /* @__PURE__ */ new Date();
290
300
  return e.setDate(e.getDate() + X), Y(e);
291
301
  }
292
- function te(e) {
302
+ function ne(e) {
293
303
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
294
304
  return {
295
305
  from: t.toISOString(),
@@ -297,129 +307,141 @@ function te(e) {
297
307
  };
298
308
  }
299
309
  function Z() {
300
- let { workspaceId: u = "" } = e(), [d, f] = g(() => Y(/* @__PURE__ */ new Date())), [p, m] = g(null), { from: b, to: x } = h(() => te(d), [d]), { data: S, loading: C, error: T, refetch: E } = o({
310
+ let { workspaceId: u = "" } = e(), [f, p] = v(() => Y(/* @__PURE__ */ new Date())), [m, h] = v(null), { from: g, to: S } = _(() => ne(f), [f]), { data: C, loading: w, error: T, refetch: D } = o({
301
311
  variables: {
302
- from: b,
303
- to: x
312
+ from: g,
313
+ to: S
304
314
  },
305
315
  skip: !u,
306
316
  fetchPolicy: "cache-and-network"
307
- }), { data: D } = s({
317
+ }), { data: O } = s({
308
318
  variables: { pagination: { limit: 200 } },
309
319
  skip: !u
310
- }), [I, { loading: L }] = c(), V = z(R(F, { activationConstraint: { distance: 6 } }), R(P)), G = S?.timeCampusTimeline, K = G?.segments ?? [], X = G?.summary, Z = h(() => {
320
+ }), [A, { loading: z }] = c(), B = H(V(R, { activationConstraint: { distance: 6 } }), V(L)), W = C?.timeCampusTimeline, X = W?.segments ?? [], Z = W?.summary, re = _(() => {
311
321
  let e = /* @__PURE__ */ new Map();
312
- for (let t of D?.projects?.items ?? []) e.set(t.id, t.name);
322
+ for (let t of O?.projects?.items ?? []) e.set(t.id, t.name);
313
323
  return e;
314
- }, [D?.projects?.items]), ne = h(() => {
324
+ }, [O?.projects?.items]), ie = _(() => {
315
325
  let e = /* @__PURE__ */ new Map();
316
- for (let t of X?.byCategory ?? []) e.set(t.category, {
326
+ for (let t of Z?.byCategory ?? []) e.set(t.category, {
317
327
  totalSeconds: t.totalSeconds,
318
328
  segmentCount: t.segmentCount
319
329
  });
320
330
  return e;
321
- }, [X]), Q = async (e, t) => {
322
- !e.isRecategorizable || e.category === t || (await I({ variables: {
331
+ }, [Z]), Q = async (e, t) => {
332
+ !e.isRecategorizable || e.category === t || (await A({ variables: {
323
333
  id: e.sourceId,
324
334
  category: t
325
- } }), await E());
326
- }, re = (e) => {
335
+ } }), await D());
336
+ }, ae = (e) => {
327
337
  let t = e.active.data.current?.segment;
328
- m(t ?? null);
329
- }, ie = (e) => {
338
+ h(t ?? null);
339
+ }, oe = (e) => {
330
340
  let t = e.active.data.current?.segment;
331
- m(null);
341
+ h(null);
332
342
  let n = e.over?.id;
333
343
  if (!t || typeof n != "string") return;
334
344
  let r = n.replace(/^category:/, "");
335
- W.includes(r) && Q(t, r);
336
- }, ae = X && X.focusRatio != null ? Math.round(X.focusRatio * 100) : 0, $ = X?.firstActivityAt && X?.lastActivityAt ? `${n(X.firstActivityAt)} – ${n(X.lastActivityAt)}` : null;
337
- return /* @__PURE__ */ k(l, {
345
+ q.includes(r) && Q(t, r);
346
+ }, se = Z && Z.focusRatio != null ? Math.round(Z.focusRatio * 100) : 0, $ = Z?.firstActivityAt && Z?.lastActivityAt ? `${n(Z.firstActivityAt)} – ${n(Z.lastActivityAt)}` : null;
347
+ return /* @__PURE__ */ M(l, {
338
348
  title: "Timeline",
339
349
  description: "Your day, assembled automatically",
340
350
  purpose: "See where your time actually went — meetings, deep work, communication and breaks stitched into one honest, chronological view from everything TimeCampus captures, so you can spot the patterns worth changing.",
341
- actions: /* @__PURE__ */ A("div", {
351
+ actions: /* @__PURE__ */ N("div", {
342
352
  className: "flex flex-wrap items-center gap-3",
343
- children: [$ && /* @__PURE__ */ A("span", {
353
+ children: [$ && /* @__PURE__ */ N("span", {
344
354
  className: "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-1 text-xs font-medium tabular-nums text-text-secondary",
345
- children: [/* @__PURE__ */ k(_, { className: "h-3.5 w-3.5" }), $]
346
- }), /* @__PURE__ */ A("label", {
355
+ children: [/* @__PURE__ */ M(y, { className: "h-3.5 w-3.5" }), $]
356
+ }), /* @__PURE__ */ N("label", {
347
357
  className: "flex items-center gap-2 text-sm text-text-secondary",
348
- children: [/* @__PURE__ */ k(y, { className: "h-4 w-4" }), /* @__PURE__ */ k("input", {
358
+ children: [/* @__PURE__ */ M(x, { className: "h-4 w-4" }), /* @__PURE__ */ M("input", {
349
359
  type: "date",
350
- value: d,
351
- max: ee(),
352
- onChange: (e) => f(e.target.value),
360
+ value: f,
361
+ max: te(),
362
+ onChange: (e) => p(e.target.value),
353
363
  className: "rounded-md border border-border-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40"
354
364
  })]
355
365
  })]
356
366
  }),
357
- children: C && !G ? /* @__PURE__ */ A("div", {
367
+ children: w && !W ? /* @__PURE__ */ N("div", {
358
368
  className: "space-y-6",
359
- children: [/* @__PURE__ */ k(i, {
369
+ children: [/* @__PURE__ */ M(i, {
360
370
  variant: "card",
361
371
  count: 4
362
- }), /* @__PURE__ */ k(i, {
372
+ }), /* @__PURE__ */ M(i, {
363
373
  variant: "list",
364
374
  count: 6
365
375
  })]
366
- }) : T ? /* @__PURE__ */ k("div", {
376
+ }) : T ? /* @__PURE__ */ M("div", {
367
377
  className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
368
378
  children: "Failed to load your timeline. Please try again later."
369
- }) : /* @__PURE__ */ A(M, {
370
- sensors: V,
371
- onDragStart: re,
372
- onDragEnd: ie,
373
- children: [/* @__PURE__ */ A("div", {
379
+ }) : /* @__PURE__ */ N(F, {
380
+ sensors: B,
381
+ onDragStart: ae,
382
+ onDragEnd: oe,
383
+ children: [/* @__PURE__ */ N("div", {
374
384
  className: "space-y-6",
375
385
  children: [
376
- /* @__PURE__ */ A("div", {
386
+ /* @__PURE__ */ N("div", {
377
387
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
378
388
  children: [
379
- /* @__PURE__ */ k(r, {
389
+ /* @__PURE__ */ M(r, {
380
390
  featured: !0,
381
391
  title: "Tracked time",
382
- value: t(X?.totalTrackedSeconds ?? 0),
383
- icon: /* @__PURE__ */ k(_, { className: "h-5 w-5" }),
392
+ value: t(Z?.totalTrackedSeconds ?? 0),
393
+ icon: /* @__PURE__ */ M(y, { className: "h-5 w-5" }),
384
394
  description: "Total activity across the day"
385
395
  }),
386
- /* @__PURE__ */ k(r, {
396
+ /* @__PURE__ */ M(r, {
387
397
  title: "Focus ratio",
388
- value: `${ae}%`,
389
- icon: /* @__PURE__ */ k(v, { className: "h-5 w-5" }),
398
+ value: `${se}%`,
399
+ icon: /* @__PURE__ */ M(b, { className: "h-5 w-5" }),
390
400
  description: "Share of time in deep work"
391
401
  }),
392
- /* @__PURE__ */ k(r, {
402
+ /* @__PURE__ */ M(r, {
393
403
  title: "Context switches",
394
- value: X?.contextSwitches ?? 0,
395
- icon: /* @__PURE__ */ k(O, { className: "h-5 w-5" }),
404
+ value: Z?.contextSwitches ?? 0,
405
+ icon: /* @__PURE__ */ M(j, { className: "h-5 w-5" }),
396
406
  description: "Category changes through the day"
397
407
  }),
398
- /* @__PURE__ */ k(r, {
408
+ /* @__PURE__ */ M(r, {
399
409
  title: "Longest focus block",
400
- value: t(X?.longestFocusBlockSeconds ?? 0),
401
- icon: /* @__PURE__ */ k(v, { className: "h-5 w-5" }),
410
+ value: t(Z?.longestFocusBlockSeconds ?? 0),
411
+ icon: /* @__PURE__ */ M(b, { className: "h-5 w-5" }),
402
412
  description: "Your deepest uninterrupted stretch"
403
413
  })
404
414
  ]
405
415
  }),
406
- K.length > 0 && /* @__PURE__ */ A(j, {
416
+ X.length > 0 && /* @__PURE__ */ N(P, {
407
417
  treatment: "glass",
408
418
  className: "p-4 sm:p-6",
409
419
  children: [
410
- /* @__PURE__ */ k("h2", {
420
+ /* @__PURE__ */ M("h2", {
411
421
  className: "mb-1 text-sm font-semibold text-text-primary",
412
422
  children: "Where the time went"
413
423
  }),
414
- /* @__PURE__ */ k("p", {
424
+ /* @__PURE__ */ M("p", {
415
425
  className: "mb-4 text-xs text-text-secondary",
416
426
  children: "Drag a segment from the timeline below onto a category to recategorize it — or use its dropdown."
417
427
  }),
418
- /* @__PURE__ */ k("div", {
428
+ d(X) && /* @__PURE__ */ N("p", {
429
+ className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
430
+ "data-testid": "timeline-ai-disclaimer",
431
+ children: [/* @__PURE__ */ M(k, {
432
+ className: "mt-0.5 h-3 w-3 shrink-0",
433
+ "aria-hidden": !0
434
+ }), /* @__PURE__ */ N("span", { children: [
435
+ "Some activities here were categorized by AI.",
436
+ " ",
437
+ "AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
438
+ ] })]
439
+ }),
440
+ /* @__PURE__ */ M("div", {
419
441
  className: "flex flex-wrap gap-4",
420
- children: W.map((e) => {
421
- let t = B[e], n = ne.get(e);
422
- return /* @__PURE__ */ k(q, {
442
+ children: q.map((e) => {
443
+ let t = U[e], n = ie.get(e);
444
+ return /* @__PURE__ */ M(J, {
423
445
  category: e,
424
446
  label: t.label,
425
447
  dotClassName: t.dot,
@@ -429,31 +451,31 @@ function Z() {
429
451
  })
430
452
  ]
431
453
  }),
432
- K.length === 0 ? /* @__PURE__ */ k(a, {
454
+ X.length === 0 ? /* @__PURE__ */ M(a, {
433
455
  illustration: "empty-generic",
434
456
  title: "No activity captured for this day",
435
457
  description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
436
- }) : /* @__PURE__ */ k(j, {
458
+ }) : /* @__PURE__ */ M(P, {
437
459
  treatment: "glass",
438
460
  glow: !0,
439
461
  className: "overflow-hidden",
440
- children: /* @__PURE__ */ k("ol", {
462
+ children: /* @__PURE__ */ M("ol", {
441
463
  className: "divide-y divide-border-seam",
442
- children: K.map((e) => H(e) ? /* @__PURE__ */ k(U, { segment: e }, e.id) : /* @__PURE__ */ k(J, {
464
+ children: X.map((e) => G(e) ? /* @__PURE__ */ M(K, { segment: e }, e.id) : /* @__PURE__ */ M(ee, {
443
465
  segment: e,
444
466
  category: e.category ?? "OTHER",
445
- projectName: e.projectId ? Z.get(e.projectId) : void 0,
446
- recategorizing: L,
467
+ projectName: e.projectId ? re.get(e.projectId) : void 0,
468
+ recategorizing: z,
447
469
  onRecategorize: Q
448
470
  }, e.id))
449
471
  })
450
472
  })
451
473
  ]
452
- }), /* @__PURE__ */ k(N, { children: p && /* @__PURE__ */ A("div", {
474
+ }), /* @__PURE__ */ M(I, { children: m && /* @__PURE__ */ N("div", {
453
475
  className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
454
- children: [/* @__PURE__ */ k(w, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ k("span", {
476
+ children: [/* @__PURE__ */ M(E, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ M("span", {
455
477
  className: "text-sm font-medium text-text-primary",
456
- children: p.title || B[p.category ?? "OTHER"].label
478
+ children: m.title || U[m.category ?? "OTHER"].label
457
479
  })]
458
480
  }) })]
459
481
  })