@peasant-labs/fairtrade 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/lib/{GraphLegend-sgixmPER.js → GraphLegend-kO2WP4yM.js} +1248 -1162
  2. package/dist/lib/analytics.css +1 -1
  3. package/dist/lib/analytics.js +29 -21
  4. package/dist/lib/base.css +4 -2
  5. package/dist/lib/commons.js +815 -829
  6. package/dist/lib/components.css +1 -1
  7. package/dist/lib/fonts.css +19 -21
  8. package/dist/lib/graph.css +1 -1
  9. package/dist/lib/graph.js +418 -420
  10. package/dist/lib/tokens.css +7 -4
  11. package/dist/lib/tokens.json +20 -7
  12. package/dist/lib/types/BrandMark.d.ts +2 -2
  13. package/dist/lib/types/ConnectionState.d.ts +2 -2
  14. package/dist/lib/types/DataTable.d.ts +74 -10
  15. package/dist/lib/types/DiffView.d.ts +1 -1
  16. package/dist/lib/types/GroupedMultiSelect.d.ts +1 -1
  17. package/dist/lib/types/HelperGroup.d.ts +3 -3
  18. package/dist/lib/types/Publish.d.ts +4 -4
  19. package/dist/lib/types/Redaction.d.ts +2 -2
  20. package/dist/lib/types/Settings.d.ts +6 -0
  21. package/dist/lib/types/Timeline.d.ts +5 -5
  22. package/dist/lib/types/analytics/format.d.ts +5 -5
  23. package/dist/lib/types/format.d.ts +4 -0
  24. package/dist/lib/types/index.d.ts +1 -1
  25. package/dist/lib/types/redaction-categories.d.ts +17 -0
  26. package/dist/lib/types/transcript/TurnCard.d.ts +3 -1
  27. package/dist/lib/types/transcript/scroll-position.d.ts +10 -0
  28. package/dist/lib/types/transcript/state-capabilities.d.ts +1 -1
  29. package/dist/lib/types/transcript/title.d.ts +1 -1
  30. package/dist/lib/types/transcript/view-model.d.ts +2 -2
  31. package/dist/lib/ui-Y-iKXft1.js +14076 -0
  32. package/dist/lib/ui.js +4 -4
  33. package/package.json +17 -9
  34. package/dist/lib/ui-C2WXsEFz.js +0 -23542
package/dist/lib/graph.js CHANGED
@@ -1,18 +1,18 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, St as b, T as x, U as S, V as C, W as w, X as T, Y as E, Z as D, _ as O, a as k, at as A, b as j, c as ee, d as M, dt as N, et as P, g as F, gt as te, h as ne, i as I, it as re, j as ie, k as ae, mt as oe, n as se, nt as ce, o as le, ot as ue, p as de, q as fe, r as pe, rt as me, s as he, st as ge, t as _e, tt as ve, v as ye, w as be, x as xe, y as L, z as Se } from "./GraphLegend-sgixmPER.js";
2
- import { memo as Ce, useCallback as R, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
3
- import { Fragment as we, jsx as U, jsxs as W } from "react/jsx-runtime";
4
- import { Box as Te, Check as Ee, ChevronDown as De, ChevronRight as G, Coins as Oe, CornerDownRight as ke, FileCode as Ae, FileDiff as je, FileText as Me, Folder as Ne, GitMerge as Pe, Hash as Fe, Map as Ie, Maximize2 as Le, MessageSquare as Re, Minus as ze, Plus as Be, RotateCcw as Ve, RotateCw as He, Search as Ue, Share2 as We, Tag as Ge, TriangleAlert as Ke, X as qe } from "lucide-react";
5
- import { AllChangeBindings as Je, AllDiffLineKinds as Ye, AllEdgeViolationKinds as Xe, AllFileChangeStatuses as Ze, AllInsightKinds as Qe, AllInsightProvenances as $e, AllMapNodeKinds as et, AllReadAttributionStates as tt, AllReadStateGrades as nt, ChangeBinding as rt, DiffLineKind as it, EdgeViolationKind as at, FileChangeStatus as ot, InsightKind as st, InsightProvenance as ct, MapNodeKind as lt, ReadAttributionState as ut, ReadStateGrade as dt, isChangeBinding as ft, isDiffLineKind as pt, isEdgeViolationKind as mt, isFileChangeStatus as ht, isInsightKind as gt, isInsightProvenance as _t, isMapNodeKind as vt, isReadAttributionState as yt, isReadStateGrade as bt } from "@peasant-labs/schema";
6
- import { Background as xt, BackgroundVariant as St, Handle as K, MiniMap as Ct, Position as q, ReactFlow as wt, ReactFlowProvider as Tt, useEdgesState as Et, useNodesState as Dt, useReactFlow as Ot } from "@xyflow/react";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, Et as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, T as x, U as S, V as C, W as w, X as T, Y as E, Z as D, _ as O, a as k, at as A, b as j, c as M, ct as N, d as P, et as F, g as I, gt as ee, h as te, i as L, it as ne, j as re, k as ie, n as ae, nt as oe, o as se, ot as ce, p as le, pt as ue, q as de, r as fe, rt as pe, s as me, st as he, t as ge, tt as _e, v as ve, vt as ye, w as be, wt as xe, x as Se, y as R, z as Ce } from "./GraphLegend-kO2WP4yM.js";
2
+ import { memo as we, useCallback as z, useEffect as B, useMemo as V, useRef as H, useState as U } from "react";
3
+ import { Fragment as Te, jsx as W, jsxs as G } from "react/jsx-runtime";
4
+ import { Box as Ee, Check as De, ChevronDown as Oe, ChevronRight as K, Coins as ke, CornerDownRight as Ae, FileCode as je, FileDiff as Me, FileText as Ne, Folder as Pe, GitMerge as Fe, Hash as Ie, Map as Le, Maximize2 as Re, MessageSquare as ze, Minus as Be, Plus as Ve, RotateCcw as He, RotateCw as Ue, Search as We, Share2 as Ge, Star as Ke, Tag as qe, TriangleAlert as Je, X as Ye } from "lucide-react";
5
+ import { AllChangeBindings as Xe, AllDiffLineKinds as Ze, AllEdgeViolationKinds as Qe, AllFileChangeStatuses as $e, AllInsightKinds as et, AllInsightProvenances as tt, AllMapNodeKinds as nt, AllReadAttributionStates as rt, AllReadStateGrades as it, ChangeBinding as at, DiffLineKind as ot, EdgeViolationKind as st, FileChangeStatus as ct, InsightKind as lt, InsightProvenance as ut, MapNodeKind as dt, ReadAttributionState as ft, ReadStateGrade as pt, isChangeBinding as mt, isDiffLineKind as ht, isEdgeViolationKind as gt, isFileChangeStatus as _t, isInsightKind as vt, isInsightProvenance as yt, isMapNodeKind as bt, isReadAttributionState as xt, isReadStateGrade as St } from "@peasant-labs/schema";
6
+ import { Background as Ct, BackgroundVariant as wt, Handle as q, MiniMap as Tt, Position as J, ReactFlow as Et, ReactFlowProvider as Dt, useEdgesState as Ot, useNodesState as kt, useReactFlow as At } from "@xyflow/react";
7
7
  //#region src/ui/graph/changeGraph.js
8
- var kt = 6e4, At = 60 * kt, jt = 24 * At, Mt = 7 * jt;
9
- function J(e, t) {
8
+ var jt = 6e4, Mt = 60 * jt, Nt = 24 * Mt, Pt = 7 * Nt;
9
+ function Y(e, t) {
10
10
  if (e == null) return "";
11
11
  let n = Math.max(0, t - e);
12
- return n < At ? `${Math.max(1, Math.floor(n / kt))}m ago` : n < jt ? `${Math.floor(n / At)}h ago` : n < Mt ? `${Math.floor(n / jt)}d ago` : `${Math.floor(n / Mt)}wk ago`;
12
+ return n < Mt ? `${Math.max(1, Math.floor(n / jt))}m ago` : n < Nt ? `${Math.floor(n / Mt)}h ago` : n < Pt ? `${Math.floor(n / Nt)}d ago` : `${Math.floor(n / Pt)}wk ago`;
13
13
  }
14
- function Nt(e, { nowMs: t }) {
15
- let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => Pt(t) - Pt(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
14
+ function Ft(e, { nowMs: t }) {
15
+ let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => It(t) - It(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
16
16
  change: e,
17
17
  lane: t + 1,
18
18
  baseHash: e.baseHash,
@@ -32,7 +32,7 @@ function Nt(e, { nowMs: t }) {
32
32
  branch: i.branch,
33
33
  session: (i.sessionCount ?? 0) > 0,
34
34
  tip: !0,
35
- time: J(n.tipMs, t)
35
+ time: Y(n.tipMs, t)
36
36
  });
37
37
  }
38
38
  };
@@ -51,13 +51,13 @@ function Nt(e, { nowMs: t }) {
51
51
  return t ? [t] : [];
52
52
  }),
53
53
  merged: c ? !0 : void 0,
54
- time: J(e.timeMs, t)
54
+ time: Y(e.timeMs, t)
55
55
  });
56
56
  }), h(-Infinity);
57
57
  let g = u.map((e) => ({
58
58
  branch: e.branch,
59
59
  mergedAtMs: e.mergedAtMs ?? null,
60
- when: J(e.mergedAtMs, t)
60
+ when: Y(e.mergedAtMs, t)
61
61
  })), _ = a.filter((e) => e.hasCommitBinding === !0 && !s.has(e.sessionId));
62
62
  return {
63
63
  commits: p,
@@ -68,56 +68,56 @@ function Nt(e, { nowMs: t }) {
68
68
  outsideWindowSessions: _
69
69
  };
70
70
  }
71
- function Pt(e) {
71
+ function It(e) {
72
72
  return e.tipCommitMs ?? Infinity;
73
73
  }
74
74
  //#endregion
75
75
  //#region src/ui/graph/Changes.jsx
76
- function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l }) {
77
- let u = l ?? Date.now(), { commits: d, reverted: f, unlinkedSessions: p, outsideWindowSessions: m, openCount: h, mergedCount: g } = B(() => Nt(e, { nowMs: u }), [e, u]), _ = e.defaultBranch, v = B(() => new Set(d.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [d]), [y, b] = H([]);
78
- z(() => {
76
+ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l }) {
77
+ let u = l ?? Date.now(), { commits: d, reverted: f, unlinkedSessions: p, outsideWindowSessions: m, openCount: h, mergedCount: g } = V(() => Ft(e, { nowMs: u }), [e, u]), _ = e.defaultBranch, v = V(() => new Set(d.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [d]), [y, b] = U([]);
78
+ B(() => {
79
79
  b((e) => {
80
80
  let t = e.filter((e) => v.has(e));
81
81
  return t.length === e.length ? e : t;
82
82
  });
83
83
  }, [v]);
84
- let x = R((e) => {
84
+ let x = z((e) => {
85
85
  v.has(e) && b((t) => {
86
86
  let n = new Set(t);
87
87
  return n.has(e) ? n.delete(e) : n.add(e), [...n];
88
88
  });
89
89
  }, [v]);
90
- return /* @__PURE__ */ W("div", {
90
+ return /* @__PURE__ */ G("div", {
91
91
  className: "gmp-root gmp-changes-root",
92
- children: [/* @__PURE__ */ W("div", {
92
+ children: [/* @__PURE__ */ G("div", {
93
93
  className: "gmp-changes-head",
94
- children: [/* @__PURE__ */ W("div", { children: [t && /* @__PURE__ */ W("span", {
94
+ children: [/* @__PURE__ */ G("div", { children: [t && /* @__PURE__ */ G("span", {
95
95
  className: "label",
96
- children: ["lines of work · ", t]
97
- }), /* @__PURE__ */ W("div", {
96
+ children: ["lines of work, ", t]
97
+ }), /* @__PURE__ */ G("div", {
98
98
  className: "gmp-changes-sub mono",
99
99
  children: [
100
- _ ? `default branch ${_} · ` : "",
100
+ _ ? `default branch ${_}, ` : "",
101
101
  h,
102
- " open · ",
102
+ " open, ",
103
103
  g,
104
104
  " merged"
105
105
  ]
106
- })] }), /* @__PURE__ */ W("button", {
106
+ })] }), /* @__PURE__ */ G("button", {
107
107
  type: "button",
108
108
  className: "btn btn-secondary btn-sm",
109
109
  onClick: () => {
110
110
  r ? r({ type: "open-map" }) : a?.();
111
111
  },
112
- children: [/* @__PURE__ */ U(Te, {
112
+ children: [/* @__PURE__ */ W(Ee, {
113
113
  size: 14,
114
114
  "aria-hidden": "true"
115
115
  }), " open the map"]
116
116
  })]
117
- }), /* @__PURE__ */ W("div", {
117
+ }), /* @__PURE__ */ G("div", {
118
118
  className: "gmp-changes-body",
119
119
  children: [
120
- /* @__PURE__ */ U(ve, {
120
+ /* @__PURE__ */ W(_e, {
121
121
  className: "gmp-cg",
122
122
  commits: d,
123
123
  selectedId: n,
@@ -130,16 +130,16 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
130
130
  expandedCommitSessions: y,
131
131
  onToggleCommitSessions: x
132
132
  }),
133
- p.length > 0 && /* @__PURE__ */ W("section", {
133
+ p.length > 0 && /* @__PURE__ */ G("section", {
134
134
  className: "gmp-unlinked-sessions",
135
135
  "aria-labelledby": "gmp-unlinked-sessions-heading",
136
- children: [/* @__PURE__ */ U("h2", {
136
+ children: [/* @__PURE__ */ W("h2", {
137
137
  id: "gmp-unlinked-sessions-heading",
138
138
  className: "sb-head gmp-unlinked-sessions-head",
139
139
  children: "sessions not linked to a commit"
140
- }), /* @__PURE__ */ U("div", {
140
+ }), /* @__PURE__ */ W("div", {
141
141
  className: "gmp-unlinked-sessions-list",
142
- children: p.map((e) => /* @__PURE__ */ W("button", {
142
+ children: p.map((e) => /* @__PURE__ */ G("button", {
143
143
  type: "button",
144
144
  className: "gmp-unlinked-session",
145
145
  onClick: () => {
@@ -149,20 +149,20 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
149
149
  source: { kind: "unlinked" }
150
150
  }) : c?.(e.sessionId);
151
151
  },
152
- children: [/* @__PURE__ */ U(N, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
152
+ children: [/* @__PURE__ */ W(ue, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
153
153
  }, e.sessionId))
154
154
  })]
155
155
  }),
156
- m.length > 0 && /* @__PURE__ */ W("section", {
156
+ m.length > 0 && /* @__PURE__ */ G("section", {
157
157
  className: "gmp-unlinked-sessions",
158
158
  "aria-labelledby": "gmp-outside-window-sessions-heading",
159
- children: [/* @__PURE__ */ U("h2", {
159
+ children: [/* @__PURE__ */ W("h2", {
160
160
  id: "gmp-outside-window-sessions-heading",
161
161
  className: "sb-head gmp-unlinked-sessions-head",
162
162
  children: "sessions linked outside this visible commit window"
163
- }), /* @__PURE__ */ U("div", {
163
+ }), /* @__PURE__ */ W("div", {
164
164
  className: "gmp-unlinked-sessions-list",
165
- children: m.map((e) => /* @__PURE__ */ W("button", {
165
+ children: m.map((e) => /* @__PURE__ */ G("button", {
166
166
  type: "button",
167
167
  className: "gmp-unlinked-session",
168
168
  onClick: () => {
@@ -172,18 +172,18 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
172
172
  source: { kind: "outside-window" }
173
173
  }) : c?.(e.sessionId);
174
174
  },
175
- children: [/* @__PURE__ */ U(N, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
175
+ children: [/* @__PURE__ */ W(ue, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
176
176
  }, e.sessionId))
177
177
  })]
178
178
  }),
179
- f.length > 0 && /* @__PURE__ */ W("div", {
179
+ f.length > 0 && /* @__PURE__ */ G("div", {
180
180
  className: "gmp-merged-sec",
181
- children: [/* @__PURE__ */ U("div", {
181
+ children: [/* @__PURE__ */ W("div", {
182
182
  className: "sb-head gmp-merged-head",
183
183
  children: "already merged in"
184
- }), /* @__PURE__ */ U("div", {
184
+ }), /* @__PURE__ */ W("div", {
185
185
  className: "gmp-merged-list",
186
- children: f.map((e) => /* @__PURE__ */ W("button", {
186
+ children: f.map((e) => /* @__PURE__ */ G("button", {
187
187
  type: "button",
188
188
  className: "gmp-merged-chip gmp-merged-revert",
189
189
  onClick: () => {
@@ -200,35 +200,35 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
200
200
  }) : i?.(t);
201
201
  },
202
202
  children: [
203
- /* @__PURE__ */ U(Pe, {
204
- size: 13,
203
+ /* @__PURE__ */ W(Fe, {
204
+ size: 14,
205
205
  "aria-hidden": "true"
206
206
  }),
207
- " reverted · ",
207
+ " reverted, ",
208
208
  e.branch,
209
- " · then undone · ",
209
+ ", then undone, ",
210
210
  e.when
211
211
  ]
212
212
  }, e.branch))
213
213
  })]
214
214
  }),
215
- /* @__PURE__ */ W("div", {
215
+ /* @__PURE__ */ G("div", {
216
216
  className: "gmp-changes-legend",
217
217
  children: [
218
- /* @__PURE__ */ W("span", {
218
+ /* @__PURE__ */ G("span", {
219
219
  className: "gmp-legend-item",
220
- children: [/* @__PURE__ */ U("span", {
220
+ children: [/* @__PURE__ */ W("span", {
221
221
  className: "cg-dot cg-dot-filled",
222
- style: {
223
- width: 9,
224
- height: 9
225
- },
226
- "aria-hidden": "true"
222
+ "aria-hidden": "true",
223
+ children: /* @__PURE__ */ W(Ke, {
224
+ className: "cg-spark",
225
+ "aria-hidden": "true"
226
+ })
227
227
  }), " commit with a recorded session"]
228
228
  }),
229
- /* @__PURE__ */ W("span", {
229
+ /* @__PURE__ */ G("span", {
230
230
  className: "gmp-legend-item",
231
- children: [/* @__PURE__ */ U("span", {
231
+ children: [/* @__PURE__ */ W("span", {
232
232
  className: "cg-dot cg-dot-hollow",
233
233
  style: {
234
234
  width: 9,
@@ -237,9 +237,9 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
237
237
  "aria-hidden": "true"
238
238
  }), " no session captured"]
239
239
  }),
240
- /* @__PURE__ */ U("span", {
240
+ /* @__PURE__ */ W("span", {
241
241
  className: "gmp-legend-item gmp-legend-dim",
242
- children: "a filled dot also flies a sparkle · select a commit to open it"
242
+ children: "a star marks a recorded session, select a commit to open it"
243
243
  })
244
244
  ]
245
245
  })
@@ -249,29 +249,29 @@ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
249
249
  }
250
250
  //#endregion
251
251
  //#region src/ui/graph/ChangeDetail.jsx
252
- var It = {
252
+ var Rt = {
253
253
  M: "changed",
254
254
  A: "added",
255
255
  D: "deleted",
256
256
  R: "renamed"
257
- }, Lt = {
257
+ }, zt = {
258
258
  A: "chip-ok",
259
259
  M: "",
260
260
  D: "chip-err",
261
261
  R: "chip-warn"
262
- }, Rt = {
262
+ }, Bt = {
263
263
  context: "ctx",
264
264
  add: "add",
265
265
  del: "del"
266
266
  };
267
- function zt(e) {
267
+ function Vt(e) {
268
268
  let t = (e.split("/").pop() ?? e).replace(/[-_]+/g, " ").trim();
269
269
  return t.charAt(0).toUpperCase() + t.slice(1);
270
270
  }
271
- var Bt = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
- function Vt(e) {
271
+ var Ht = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
+ function Ut(e) {
273
273
  let t = e.oldStart, n = e.newStart, r = e.lines.map((e) => {
274
- let r = Rt[e.kind] ?? "ctx";
274
+ let r = Bt[e.kind] ?? "ctx";
275
275
  return r === "add" ? {
276
276
  type: r,
277
277
  newNo: n++,
@@ -292,99 +292,99 @@ function Vt(e) {
292
292
  lines: r
293
293
  };
294
294
  }
295
- function Ht({ file: e, diff: t, open: n, onToggle: r }) {
296
- t && _(t);
295
+ function Wt({ file: e, diff: t, open: n, onToggle: r }) {
296
+ t && v(t);
297
297
  let i = e.status, a = t ? new Set(t.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
298
- return /* @__PURE__ */ W("div", {
298
+ return /* @__PURE__ */ G("div", {
299
299
  className: "gmp-file",
300
- children: [/* @__PURE__ */ W("button", {
300
+ children: [/* @__PURE__ */ G("button", {
301
301
  type: "button",
302
302
  className: "gmp-file-head",
303
303
  "aria-expanded": n,
304
304
  onClick: r,
305
305
  children: [
306
- U(n ? De : G, {
306
+ W(n ? Oe : K, {
307
307
  size: 14,
308
308
  "aria-hidden": "true"
309
309
  }),
310
- /* @__PURE__ */ U("span", {
310
+ /* @__PURE__ */ W("span", {
311
311
  className: "mono gmp-file-path",
312
312
  children: e.path
313
313
  }),
314
- /* @__PURE__ */ U("span", {
315
- className: "chip gmp-file-status " + (Lt[i] ?? ""),
316
- children: It[i] ?? i
314
+ /* @__PURE__ */ W("span", {
315
+ className: "chip gmp-file-status " + (zt[i] ?? ""),
316
+ children: Rt[i] ?? i
317
317
  }),
318
- a != null && a > 0 && /* @__PURE__ */ W("span", {
318
+ a != null && a > 0 && /* @__PURE__ */ G("span", {
319
319
  className: "gmp-file-convos metaitem",
320
320
  children: [
321
- /* @__PURE__ */ U(Re, {
322
- size: 13,
321
+ /* @__PURE__ */ W(ze, {
322
+ size: 14,
323
323
  "aria-hidden": "true"
324
324
  }),
325
325
  " ",
326
- /* @__PURE__ */ U("span", {
326
+ /* @__PURE__ */ W("span", {
327
327
  className: "tnum",
328
328
  children: a
329
329
  })
330
330
  ]
331
331
  })
332
332
  ]
333
- }), n && /* @__PURE__ */ U("div", {
333
+ }), n && /* @__PURE__ */ W("div", {
334
334
  className: "gmp-file-body",
335
- children: t ? t.error ? /* @__PURE__ */ U("p", {
335
+ children: t ? t.error ? /* @__PURE__ */ W("p", {
336
336
  className: "gmp-diff-state gmp-diff-error mono",
337
337
  children: t.error
338
- }) : t.binary ? /* @__PURE__ */ U("p", {
338
+ }) : t.binary ? /* @__PURE__ */ W("p", {
339
339
  className: "gmp-diff-state mono",
340
340
  children: "binary file — no textual diff."
341
- }) : t.hunks.length === 0 ? /* @__PURE__ */ U("p", {
341
+ }) : t.hunks.length === 0 ? /* @__PURE__ */ W("p", {
342
342
  className: "gmp-diff-state mono",
343
343
  children: "no line changes."
344
- }) : t.hunks.map((e, n) => /* @__PURE__ */ W("div", {
344
+ }) : t.hunks.map((e, n) => /* @__PURE__ */ G("div", {
345
345
  className: "gmp-hunk",
346
346
  children: [
347
- e.sessionTitle && /* @__PURE__ */ W("div", {
347
+ e.sessionTitle && /* @__PURE__ */ G("div", {
348
348
  className: "gmp-hunk-attrib",
349
349
  children: [
350
- /* @__PURE__ */ U(ke, {
351
- size: 13,
350
+ /* @__PURE__ */ W(Ae, {
351
+ size: 14,
352
352
  "aria-hidden": "true"
353
353
  }),
354
- /* @__PURE__ */ U("span", {
354
+ /* @__PURE__ */ W("span", {
355
355
  className: "gmp-hunk-from",
356
356
  children: "from"
357
357
  }),
358
- /* @__PURE__ */ U("span", {
358
+ /* @__PURE__ */ W("span", {
359
359
  className: "gmp-hunk-link",
360
360
  children: e.sessionTitle
361
361
  }),
362
- e.sessionId && /* @__PURE__ */ U("span", {
362
+ e.sessionId && /* @__PURE__ */ W("span", {
363
363
  className: "mono gmp-hunk-hash",
364
364
  children: e.sessionId.slice(0, 7)
365
365
  })
366
366
  ]
367
367
  }),
368
- /* @__PURE__ */ U(P, {
368
+ /* @__PURE__ */ W(F, {
369
369
  file: "",
370
- hunks: [Vt(e)],
370
+ hunks: [Ut(e)],
371
371
  className: "gmp-hunk-diff"
372
372
  }),
373
- t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ U("p", {
373
+ t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ W("p", {
374
374
  className: "gmp-diff-state mono",
375
375
  children: "diff truncated (file exceeds the size cap)."
376
376
  })
377
377
  ]
378
- }, n)) : /* @__PURE__ */ U("p", {
378
+ }, n)) : /* @__PURE__ */ W("p", {
379
379
  className: "gmp-diff-state mono",
380
380
  children: "loading diff…"
381
381
  })
382
382
  })]
383
383
  });
384
384
  }
385
- function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {} }) {
385
+ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {} }) {
386
386
  D(e);
387
- let [u, d] = H(l), [f, p] = H(null), [m, h] = H(!1), [g, _] = H(""), v = V({}), y = V(null), b = n ?? zt(e.branch), x = e.work.length, S = e.newEdges.length, C = e.removedEdges.length, w = (e) => d((t) => ({
387
+ let [u, d] = U(l), [f, p] = U(null), [m, h] = U(!1), [g, _] = U(""), v = H({}), y = H(null), b = n ?? Vt(e.branch), x = e.work.length, S = e.newEdges.length, C = e.removedEdges.length, w = (e) => d((t) => ({
388
388
  ...t,
389
389
  [e]: !t[e]
390
390
  }));
@@ -410,45 +410,45 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
410
410
  t && i?.(t), h(!1), _("");
411
411
  }
412
412
  let O = e.files[0]?.path;
413
- return /* @__PURE__ */ W("div", {
413
+ return /* @__PURE__ */ G("div", {
414
414
  className: "gmp-root gmp-detail-root",
415
415
  ref: y,
416
416
  children: [
417
- /* @__PURE__ */ W("div", {
417
+ /* @__PURE__ */ G("div", {
418
418
  className: "gmp-detail-head",
419
419
  children: [
420
- /* @__PURE__ */ W("div", {
420
+ /* @__PURE__ */ G("div", {
421
421
  className: "crumb",
422
422
  children: [
423
423
  "review ",
424
- /* @__PURE__ */ U(G, {
425
- size: 13,
424
+ /* @__PURE__ */ W(K, {
425
+ size: 14,
426
426
  "aria-hidden": "true"
427
427
  }),
428
428
  " ",
429
429
  e.defaultBranch,
430
430
  " ",
431
- /* @__PURE__ */ U(G, {
432
- size: 13,
431
+ /* @__PURE__ */ W(K, {
432
+ size: 14,
433
433
  "aria-hidden": "true"
434
434
  }),
435
435
  " ",
436
- /* @__PURE__ */ U("span", {
436
+ /* @__PURE__ */ W("span", {
437
437
  className: "cur",
438
438
  children: e.branch
439
439
  })
440
440
  ]
441
441
  }),
442
- /* @__PURE__ */ U("div", {
442
+ /* @__PURE__ */ W("div", {
443
443
  className: "gmp-detail-title",
444
444
  children: b
445
445
  }),
446
- /* @__PURE__ */ W("p", {
446
+ /* @__PURE__ */ G("p", {
447
447
  className: "gmp-caption",
448
448
  children: [
449
449
  "this line of work touched",
450
450
  " ",
451
- /* @__PURE__ */ W("button", {
451
+ /* @__PURE__ */ G("button", {
452
452
  type: "button",
453
453
  className: "gmp-frag" + (f === "files" ? " gmp-frag-on" : ""),
454
454
  onClick: () => T("files", O),
@@ -457,7 +457,7 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
457
457
  " ",
458
458
  "across",
459
459
  " ",
460
- /* @__PURE__ */ W("button", {
460
+ /* @__PURE__ */ G("button", {
461
461
  type: "button",
462
462
  className: "gmp-frag" + (f === "conversations" ? " gmp-frag-on" : ""),
463
463
  onClick: () => T("conversations"),
@@ -465,7 +465,7 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
465
465
  }),
466
466
  ", reshaping",
467
467
  " ",
468
- /* @__PURE__ */ W("button", {
468
+ /* @__PURE__ */ G("button", {
469
469
  type: "button",
470
470
  className: "gmp-frag" + (f === "conn" ? " gmp-frag-on" : ""),
471
471
  onClick: () => T("conn"),
@@ -480,30 +480,30 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
480
480
  "."
481
481
  ]
482
482
  }),
483
- /* @__PURE__ */ U("span", {
483
+ /* @__PURE__ */ W("span", {
484
484
  className: "gmp-caption-hint mono",
485
485
  children: "click any number to jump to its proof"
486
486
  })
487
487
  ]
488
488
  }),
489
- (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ W("div", {
489
+ (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ G("div", {
490
490
  className: "gmp-signals",
491
- children: [e.frictions.map((e, t) => /* @__PURE__ */ W("span", {
491
+ children: [e.frictions.map((e, t) => /* @__PURE__ */ G("span", {
492
492
  className: "gmp-signal",
493
493
  children: [
494
- /* @__PURE__ */ U(He, {
494
+ /* @__PURE__ */ W(Ue, {
495
495
  size: 14,
496
496
  "aria-hidden": "true"
497
497
  }),
498
498
  " ",
499
499
  e.label,
500
- " · ",
501
- /* @__PURE__ */ U("span", {
500
+ ", ",
501
+ /* @__PURE__ */ W("span", {
502
502
  className: "mono",
503
503
  children: e.file
504
504
  }),
505
505
  " ",
506
- /* @__PURE__ */ W("b", {
506
+ /* @__PURE__ */ G("b", {
507
507
  className: "tnum",
508
508
  children: [e.count, "×"]
509
509
  }),
@@ -511,15 +511,15 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
511
511
  e.sessions,
512
512
  " conversations"
513
513
  ]
514
- }, t)), e.violations.length > 0 && /* @__PURE__ */ W("span", {
514
+ }, t)), e.violations.length > 0 && /* @__PURE__ */ G("span", {
515
515
  className: "gmp-signal gmp-signal-warn",
516
516
  children: [
517
- /* @__PURE__ */ U(Ke, {
517
+ /* @__PURE__ */ W(Je, {
518
518
  size: 14,
519
519
  "aria-hidden": "true"
520
520
  }),
521
521
  " ",
522
- /* @__PURE__ */ U("b", {
522
+ /* @__PURE__ */ W("b", {
523
523
  className: "tnum",
524
524
  children: e.violations.length
525
525
  }),
@@ -527,13 +527,13 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
527
527
  ]
528
528
  })]
529
529
  }),
530
- /* @__PURE__ */ W("div", {
530
+ /* @__PURE__ */ G("div", {
531
531
  className: "gmp-totals",
532
532
  children: [
533
- /* @__PURE__ */ W("span", {
533
+ /* @__PURE__ */ G("span", {
534
534
  className: "metaitem tnum",
535
535
  children: [
536
- /* @__PURE__ */ U(je, {
536
+ /* @__PURE__ */ W(Me, {
537
537
  size: 14,
538
538
  "aria-hidden": "true"
539
539
  }),
@@ -542,37 +542,37 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
542
542
  " files touched"
543
543
  ]
544
544
  }),
545
- /* @__PURE__ */ W("span", {
545
+ /* @__PURE__ */ G("span", {
546
546
  className: "metaitem tnum",
547
547
  children: [
548
- /* @__PURE__ */ W("span", {
548
+ /* @__PURE__ */ G("span", {
549
549
  className: "gmp-add",
550
550
  children: ["+", S]
551
551
  }),
552
552
  "/",
553
- /* @__PURE__ */ W("span", {
553
+ /* @__PURE__ */ G("span", {
554
554
  className: "gmp-del",
555
555
  children: ["−", C]
556
556
  }),
557
557
  " connections"
558
558
  ]
559
559
  }),
560
- /* @__PURE__ */ W("span", {
560
+ /* @__PURE__ */ G("span", {
561
561
  className: "metaitem tnum",
562
562
  children: [
563
- /* @__PURE__ */ U(Fe, {
563
+ /* @__PURE__ */ W(Ie, {
564
564
  size: 14,
565
565
  "aria-hidden": "true"
566
566
  }),
567
567
  " ai wrote ",
568
- Bt(Number(e.outputTokens)),
568
+ Ht(Number(e.outputTokens)),
569
569
  " tokens"
570
570
  ]
571
571
  }),
572
- e.costUsd != null && /* @__PURE__ */ W("span", {
572
+ e.costUsd != null && /* @__PURE__ */ G("span", {
573
573
  className: "metaitem tnum",
574
574
  children: [
575
- /* @__PURE__ */ U(Oe, {
575
+ /* @__PURE__ */ W(ke, {
576
576
  size: 14,
577
577
  "aria-hidden": "true"
578
578
  }),
@@ -582,18 +582,18 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
582
582
  })
583
583
  ]
584
584
  }),
585
- /* @__PURE__ */ W("div", {
585
+ /* @__PURE__ */ G("div", {
586
586
  className: "gmp-detail-sec",
587
- children: [/* @__PURE__ */ U("div", {
587
+ children: [/* @__PURE__ */ W("div", {
588
588
  className: "sb-head gmp-detail-sechead",
589
- children: "files changed · click a path to open its diff"
590
- }), /* @__PURE__ */ U("div", {
589
+ children: "files changed, click a path to open its diff"
590
+ }), /* @__PURE__ */ W("div", {
591
591
  className: "gmp-files",
592
- children: e.files.map((e) => /* @__PURE__ */ U("div", {
592
+ children: e.files.map((e) => /* @__PURE__ */ W("div", {
593
593
  ref: (t) => {
594
594
  v.current[e.path] = t;
595
595
  },
596
- children: /* @__PURE__ */ U(Ht, {
596
+ children: /* @__PURE__ */ W(Wt, {
597
597
  file: e,
598
598
  diff: u[e.path] ? t?.(e) : void 0,
599
599
  open: !!u[e.path],
@@ -602,58 +602,58 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
602
602
  }, e.path))
603
603
  })]
604
604
  }),
605
- /* @__PURE__ */ W("div", {
605
+ /* @__PURE__ */ G("div", {
606
606
  className: "gmp-detail-sec",
607
- children: [/* @__PURE__ */ U("div", {
607
+ children: [/* @__PURE__ */ W("div", {
608
608
  className: "sb-head gmp-detail-sechead",
609
609
  children: "your annotation"
610
- }), /* @__PURE__ */ W("div", {
610
+ }), /* @__PURE__ */ G("div", {
611
611
  className: "gmp-annot",
612
612
  children: [
613
- r && /* @__PURE__ */ W("span", {
613
+ r && /* @__PURE__ */ G("span", {
614
614
  className: "gmp-label-chip gmp-annot-chip",
615
615
  children: [
616
- /* @__PURE__ */ U(Ge, {
617
- size: 12,
616
+ /* @__PURE__ */ W(qe, {
617
+ size: 14,
618
618
  "aria-hidden": "true"
619
619
  }),
620
620
  " ",
621
621
  r,
622
- /* @__PURE__ */ U("button", {
622
+ /* @__PURE__ */ W("button", {
623
623
  type: "button",
624
624
  className: "gmp-annot-x",
625
625
  "aria-label": "remove annotation",
626
626
  onClick: () => a?.(),
627
- children: /* @__PURE__ */ U(qe, {
628
- size: 11,
627
+ children: /* @__PURE__ */ W(Ye, {
628
+ size: 14,
629
629
  "aria-hidden": "true"
630
630
  })
631
631
  })
632
632
  ]
633
633
  }),
634
- /* @__PURE__ */ W("button", {
634
+ /* @__PURE__ */ G("button", {
635
635
  type: "button",
636
636
  className: "gmp-annot-add",
637
637
  "aria-expanded": m,
638
638
  onClick: () => h((e) => !e),
639
639
  children: [
640
- /* @__PURE__ */ U(Ge, {
641
- size: 13,
640
+ /* @__PURE__ */ W(qe, {
641
+ size: 14,
642
642
  "aria-hidden": "true"
643
643
  }),
644
644
  " ",
645
645
  r ? "change label" : "add a label"
646
646
  ]
647
647
  }),
648
- m && /* @__PURE__ */ W("form", {
648
+ m && /* @__PURE__ */ G("form", {
649
649
  className: "gmp-annot-pop",
650
650
  onSubmit: E,
651
651
  children: [
652
- /* @__PURE__ */ U("span", {
652
+ /* @__PURE__ */ W("span", {
653
653
  className: "label",
654
654
  children: "user.custom_label"
655
655
  }),
656
- /* @__PURE__ */ U("input", {
656
+ /* @__PURE__ */ W("input", {
657
657
  className: "input",
658
658
  type: "text",
659
659
  autoFocus: !0,
@@ -662,18 +662,18 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
662
662
  placeholder: "e.g. good handoff",
663
663
  "aria-label": "annotation value"
664
664
  }),
665
- /* @__PURE__ */ W("div", {
665
+ /* @__PURE__ */ G("div", {
666
666
  className: "gmp-annot-pop-foot",
667
- children: [/* @__PURE__ */ U("button", {
667
+ children: [/* @__PURE__ */ W("button", {
668
668
  type: "button",
669
669
  className: "btn btn-ghost btn-sm",
670
670
  onClick: () => h(!1),
671
671
  children: "cancel"
672
- }), /* @__PURE__ */ W("button", {
672
+ }), /* @__PURE__ */ G("button", {
673
673
  type: "submit",
674
674
  className: "btn btn-primary btn-sm",
675
- children: [/* @__PURE__ */ U(Ee, {
676
- size: 13,
675
+ children: [/* @__PURE__ */ W(De, {
676
+ size: 14,
677
677
  "aria-hidden": "true"
678
678
  }), " save"]
679
679
  })]
@@ -683,24 +683,24 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
683
683
  ]
684
684
  })]
685
685
  }),
686
- /* @__PURE__ */ W("div", {
686
+ /* @__PURE__ */ G("div", {
687
687
  className: "gmp-exits",
688
688
  children: [
689
- /* @__PURE__ */ W("button", {
689
+ /* @__PURE__ */ G("button", {
690
690
  type: "button",
691
691
  className: "btn btn-secondary btn-sm",
692
692
  onClick: () => o?.(),
693
- children: [/* @__PURE__ */ U(Te, {
693
+ children: [/* @__PURE__ */ W(Ee, {
694
694
  size: 14,
695
695
  "aria-hidden": "true"
696
696
  }), " see this work on the code map"]
697
697
  }),
698
- /* @__PURE__ */ W("button", {
698
+ /* @__PURE__ */ G("button", {
699
699
  type: "button",
700
700
  className: "btn btn-secondary btn-sm",
701
701
  onClick: () => s?.(),
702
702
  children: [
703
- /* @__PURE__ */ U(We, {
703
+ /* @__PURE__ */ W(Ge, {
704
704
  size: 14,
705
705
  "aria-hidden": "true"
706
706
  }),
@@ -709,16 +709,16 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
709
709
  " conversations…"
710
710
  ]
711
711
  }),
712
- /* @__PURE__ */ W("button", {
712
+ /* @__PURE__ */ G("button", {
713
713
  type: "button",
714
714
  className: "btn btn-secondary btn-sm",
715
715
  onClick: () => c?.(),
716
- children: [/* @__PURE__ */ U(Me, {
716
+ children: [/* @__PURE__ */ W(Ne, {
717
717
  size: 14,
718
718
  "aria-hidden": "true"
719
719
  }), " copy recap"]
720
720
  }),
721
- /* @__PURE__ */ W("code", {
721
+ /* @__PURE__ */ G("code", {
722
722
  className: "gmp-gitdiff mono",
723
723
  children: [
724
724
  "git diff ",
@@ -729,7 +729,7 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
729
729
  })
730
730
  ]
731
731
  }),
732
- /* @__PURE__ */ U("p", {
732
+ /* @__PURE__ */ W("p", {
733
733
  className: "gmp-boundary mono",
734
734
  children: "shows what changed and the recorded work behind it, not whether the change is correct or secure."
735
735
  })
@@ -738,31 +738,31 @@ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
738
738
  }
739
739
  //#endregion
740
740
  //#region src/ui/graph/CodeMap.jsx
741
- var Wt = Object.freeze({
741
+ var Kt = Object.freeze({
742
742
  project: "overview",
743
743
  package: "folders",
744
744
  file: "files"
745
- }), Gt = Object.freeze({
745
+ }), qt = Object.freeze({
746
746
  overview: "project",
747
747
  folders: "package",
748
748
  files: "file"
749
749
  });
750
- function Kt({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 520, ariaLabel: d = "code map", className: f = "", viewport: p, onViewportChange: m, state: h, onStateChange: g }) {
751
- let _ = B(() => {
750
+ function Jt({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 520, ariaLabel: d = "code map", className: f = "", viewport: p, onViewportChange: m, state: h, onStateChange: g }) {
751
+ let _ = V(() => {
752
752
  let t = /* @__PURE__ */ new Map();
753
753
  for (let n of e?.nodes ?? []) t.set(n.id, n);
754
754
  return t;
755
- }, [e?.nodes]), v = B(() => h === void 0 ? null : L(h), [h]), y = B(() => v ? j(e, v) : null, [e, v]), b = B(() => qt(e && {
755
+ }, [e?.nodes]), v = V(() => h === void 0 ? null : R(h), [h]), y = V(() => v ? j(e, v) : null, [e, v]), b = V(() => Yt(e && {
756
756
  ...e,
757
757
  nodes: y?.canvas.allNodes ?? e.nodes
758
- }), [e, y?.canvas.allNodes]), x = y ? Wt[y.canvas.grain] ?? "folders" : Wt[t?.level ?? "package"], S = y?.canvas.expandedIds ?? t?.expanded, C = V(x);
758
+ }), [e, y?.canvas.allNodes]), x = y ? Kt[y.canvas.grain] ?? "folders" : Kt[t?.level ?? "package"], S = y?.canvas.expandedIds ?? t?.expanded, C = H(x);
759
759
  C.current = x;
760
760
  function w(e) {
761
761
  if (!v) return;
762
762
  let t = r(v, e);
763
- ye(v, t) || g?.(t);
763
+ ve(v, t) || g?.(t);
764
764
  }
765
- return /* @__PURE__ */ U(ne, {
765
+ return /* @__PURE__ */ W(te, {
766
766
  data: b,
767
767
  grain: x,
768
768
  expandedIds: S,
@@ -778,13 +778,13 @@ function Kt({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a,
778
778
  onExpand: o,
779
779
  onGrainChange: (e) => {
780
780
  C.current = e, n?.({
781
- level: Gt[e] ?? "package",
781
+ level: qt[e] ?? "package",
782
782
  expanded: []
783
783
  });
784
784
  },
785
785
  onExpandedIdsChange: (e) => {
786
786
  n?.({
787
- level: Gt[C.current] ?? "package",
787
+ level: qt[C.current] ?? "package",
788
788
  expanded: e
789
789
  });
790
790
  },
@@ -799,16 +799,16 @@ function Kt({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a,
799
799
  canonicalControlled: v !== null
800
800
  });
801
801
  }
802
- function qt(t) {
802
+ function Yt(t) {
803
803
  t && e(t);
804
- let n = t?.nodes ?? [], r = Yt(t?.violations ?? []);
804
+ let n = t?.nodes ?? [], r = Zt(t?.violations ?? []);
805
805
  return {
806
806
  nodes: n.map((e) => ({
807
807
  id: e.id,
808
808
  label: e.name || e.id,
809
809
  kind: e.kind === "file" ? "file" : "folder",
810
810
  loc: e.loc ?? 0,
811
- coverage: Jt(e.recordedFiles, e.totalFiles),
811
+ coverage: Xt(e.recordedFiles, e.totalFiles),
812
812
  parent: e.parent || void 0,
813
813
  violations: r.get(e.id) ?? 0,
814
814
  layer: e.layer,
@@ -822,24 +822,24 @@ function qt(t) {
822
822
  }))
823
823
  };
824
824
  }
825
- function Jt(e, t) {
825
+ function Xt(e, t) {
826
826
  let n = Number(t) || 0;
827
827
  if (n <= 0) return 0;
828
828
  let r = Math.max(0, Math.min(1, (Number(e) || 0) / n));
829
829
  return Math.max(0, Math.min(4, Math.round(r * 4)));
830
830
  }
831
- function Yt(e) {
831
+ function Zt(e) {
832
832
  let t = /* @__PURE__ */ new Map();
833
- for (let n of e) Xt(t, n.from), Xt(t, n.to);
833
+ for (let n of e) Qt(t, n.from), Qt(t, n.to);
834
834
  return t;
835
835
  }
836
- function Xt(e, t) {
836
+ function Qt(e, t) {
837
837
  t && e.set(t, (e.get(t) ?? 0) + 1);
838
838
  }
839
839
  //#endregion
840
840
  //#region src/ui/graph/CodeMapNavigator.jsx
841
- function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: f = "code map navigator" }) {
842
- let [p, m] = H(() => /* @__PURE__ */ new Set()), [h, g] = H(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = V(/* @__PURE__ */ new Map()), b = B(() => j(e, L({
841
+ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: f = "code map navigator" }) {
842
+ let [p, m] = U(() => /* @__PURE__ */ new Set()), [h, g] = U(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = H(/* @__PURE__ */ new Map()), b = V(() => j(e, R({
843
843
  grain: t,
844
844
  expandedIds: Array.from(_),
845
845
  selectedId: i,
@@ -848,7 +848,7 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
848
848
  })), [
849
849
  e,
850
850
  t,
851
- $t(_),
851
+ tn(_),
852
852
  i,
853
853
  v,
854
854
  c
@@ -891,27 +891,27 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
891
891
  } else return;
892
892
  e.preventDefault(), i && O(i);
893
893
  }
894
- return /* @__PURE__ */ W("section", {
894
+ return /* @__PURE__ */ G("section", {
895
895
  className: "gmp-navigator",
896
896
  "aria-label": f,
897
897
  children: [
898
- /* @__PURE__ */ W("header", {
898
+ /* @__PURE__ */ G("header", {
899
899
  className: "gmp-navigator-head",
900
- children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
900
+ children: [/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("p", {
901
901
  className: "gmp-navigator-kicker",
902
902
  children: "browse the codebase"
903
- }), /* @__PURE__ */ U("p", {
903
+ }), /* @__PURE__ */ W("p", {
904
904
  className: "gmp-navigator-note",
905
905
  children: "choose an area for its recorded work, then open the spatial map when relationships matter"
906
- })] }), /* @__PURE__ */ W("label", {
906
+ })] }), /* @__PURE__ */ G("label", {
907
907
  className: "gmp-navigator-search",
908
908
  children: [
909
- /* @__PURE__ */ U(Ue, { "aria-hidden": "true" }),
910
- /* @__PURE__ */ U("span", {
909
+ /* @__PURE__ */ W(We, { "aria-hidden": "true" }),
910
+ /* @__PURE__ */ W("span", {
911
911
  className: "mc-sr",
912
912
  children: "filter code areas"
913
913
  }),
914
- /* @__PURE__ */ U("input", {
914
+ /* @__PURE__ */ W("input", {
915
915
  value: c,
916
916
  onChange: (e) => {
917
917
  d?.({
@@ -924,13 +924,13 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
924
924
  ]
925
925
  })]
926
926
  }),
927
- b.staleSelectedId ? /* @__PURE__ */ W("p", {
927
+ b.staleSelectedId ? /* @__PURE__ */ G("p", {
928
928
  className: "gmp-navigator-missing",
929
929
  role: "status",
930
930
  children: [
931
931
  "the selected code area is not present in this map.",
932
932
  " ",
933
- /* @__PURE__ */ U("button", {
933
+ /* @__PURE__ */ W("button", {
934
934
  type: "button",
935
935
  onClick: () => {
936
936
  d?.({ type: "clear-selection" }), a?.(null, null);
@@ -939,20 +939,20 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
939
939
  })
940
940
  ]
941
941
  }) : null,
942
- /* @__PURE__ */ W("div", {
942
+ /* @__PURE__ */ G("div", {
943
943
  className: "gmp-navigator-body",
944
- children: [/* @__PURE__ */ U("div", {
945
- role: "tree",
944
+ children: [/* @__PURE__ */ W("div", {
945
+ role: x.length ? "tree" : void 0,
946
946
  "aria-label": "code areas",
947
947
  className: "gmp-navigator-tree",
948
948
  "data-grain": t,
949
- children: x.length === 0 ? /* @__PURE__ */ U("p", {
949
+ children: x.length === 0 ? /* @__PURE__ */ W("p", {
950
950
  className: "gmp-navigator-empty",
951
951
  role: "status",
952
952
  children: "no code areas match this filter"
953
953
  }) : x.map((e, t) => {
954
954
  let n = e.canExpand || e.forcedOpen, r = e.expanded, a = S === e.node.id;
955
- return /* @__PURE__ */ U(Qt, {
955
+ return /* @__PURE__ */ W(en, {
956
956
  row: e,
957
957
  hasChildren: n,
958
958
  isExpanded: r,
@@ -971,25 +971,25 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
971
971
  onKeyDown: (e) => A(e, t)
972
972
  }, e.node.id);
973
973
  })
974
- }), /* @__PURE__ */ U("aside", {
974
+ }), /* @__PURE__ */ W("aside", {
975
975
  className: "gmp-navigator-actions",
976
976
  "aria-label": "selected code area",
977
- children: C ? /* @__PURE__ */ W(we, { children: [
978
- /* @__PURE__ */ U("p", {
977
+ children: C ? /* @__PURE__ */ G(Te, { children: [
978
+ /* @__PURE__ */ W("p", {
979
979
  className: "gmp-navigator-selected",
980
980
  children: C.name || C.id
981
981
  }),
982
- /* @__PURE__ */ U("p", {
982
+ /* @__PURE__ */ W("p", {
983
983
  className: "gmp-navigator-selected-path",
984
984
  children: C.id
985
985
  }),
986
- T ? /* @__PURE__ */ W("button", {
986
+ T ? /* @__PURE__ */ G("button", {
987
987
  type: "button",
988
988
  className: "gmp-navigator-action",
989
989
  onClick: () => D(C.id),
990
- children: [/* @__PURE__ */ U(G, { "aria-hidden": "true" }), _.has(C.id) ? "hide children" : "show children"]
990
+ children: [/* @__PURE__ */ W(K, { "aria-hidden": "true" }), _.has(C.id) ? "hide children" : "show children"]
991
991
  }) : null,
992
- /* @__PURE__ */ W("button", {
992
+ /* @__PURE__ */ G("button", {
993
993
  type: "button",
994
994
  className: "gmp-navigator-action gmp-navigator-action--primary",
995
995
  onClick: () => {
@@ -998,9 +998,9 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
998
998
  id: C.id
999
999
  }), u?.(C.id);
1000
1000
  },
1001
- children: [/* @__PURE__ */ U(Ie, { "aria-hidden": "true" }), " open in map"]
1001
+ children: [/* @__PURE__ */ W(Le, { "aria-hidden": "true" }), " open in map"]
1002
1002
  })
1003
- ] }) : /* @__PURE__ */ U("p", {
1003
+ ] }) : /* @__PURE__ */ W("p", {
1004
1004
  className: "gmp-navigator-empty",
1005
1005
  children: "select an area to see its recorded work and map context"
1006
1006
  })
@@ -1009,16 +1009,17 @@ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
1009
1009
  ]
1010
1010
  });
1011
1011
  }
1012
- function Qt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1013
- return /* @__PURE__ */ W("div", {
1012
+ function en({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1013
+ return /* @__PURE__ */ G("div", {
1014
1014
  role: "none",
1015
1015
  className: "gmp-navigator-row-wrap",
1016
1016
  "data-selected": r,
1017
1017
  style: { "--gmp-tree-depth": e.depth },
1018
- children: [t ? /* @__PURE__ */ U("button", {
1018
+ children: [t ? /* @__PURE__ */ W("button", {
1019
1019
  type: "button",
1020
1020
  className: "gmp-navigator-disclosure",
1021
1021
  tabIndex: -1,
1022
+ "aria-hidden": "true",
1022
1023
  "aria-label": `${n ? "hide" : "show"} children for ${e.node.name || e.node.id}`,
1023
1024
  "aria-expanded": n,
1024
1025
  "aria-disabled": e.forcedOpen ? "true" : void 0,
@@ -1026,14 +1027,14 @@ function Qt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1026
1027
  onClick: (t) => {
1027
1028
  t.stopPropagation(), e.forcedOpen || c();
1028
1029
  },
1029
- children: /* @__PURE__ */ U(G, {
1030
+ children: /* @__PURE__ */ W(K, {
1030
1031
  className: "gmp-navigator-chevron",
1031
1032
  "aria-hidden": "true"
1032
1033
  })
1033
- }) : /* @__PURE__ */ U("span", {
1034
+ }) : /* @__PURE__ */ W("span", {
1034
1035
  className: "gmp-navigator-disclosure-placeholder",
1035
1036
  "aria-hidden": "true"
1036
- }), /* @__PURE__ */ W("div", {
1037
+ }), /* @__PURE__ */ G("div", {
1037
1038
  ref: a,
1038
1039
  role: "treeitem",
1039
1040
  "aria-level": e.depth + 1,
@@ -1048,77 +1049,74 @@ function Qt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1048
1049
  },
1049
1050
  onKeyDown: l,
1050
1051
  children: [
1051
- e.node.kind === "file" ? /* @__PURE__ */ U(Ae, { "aria-hidden": "true" }) : /* @__PURE__ */ U(Ne, { "aria-hidden": "true" }),
1052
- /* @__PURE__ */ U("span", {
1052
+ e.node.kind === "file" ? /* @__PURE__ */ W(je, { "aria-hidden": "true" }) : /* @__PURE__ */ W(Pe, { "aria-hidden": "true" }),
1053
+ /* @__PURE__ */ W("span", {
1053
1054
  className: "gmp-navigator-path",
1054
1055
  children: e.node.name || e.node.id
1055
1056
  }),
1056
- /* @__PURE__ */ W("span", {
1057
+ /* @__PURE__ */ G("span", {
1057
1058
  className: "gmp-navigator-meta",
1058
- children: [/* @__PURE__ */ W("span", { children: [en(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ U("span", { children: tn(e.node.recordedFiles, e.node.totalFiles) })]
1059
+ children: [/* @__PURE__ */ G("span", { children: [nn(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ W("span", { children: rn(e.node.recordedFiles, e.node.totalFiles) })]
1059
1060
  })
1060
1061
  ]
1061
1062
  })]
1062
1063
  });
1063
1064
  }
1064
- function $t(e) {
1065
+ function tn(e) {
1065
1066
  return Array.from(e).sort().join("\0");
1066
1067
  }
1067
- function en(e) {
1068
- return new Intl.NumberFormat("en", {
1069
- notation: "compact",
1070
- maximumFractionDigits: 1
1071
- }).format(Number(e) || 0);
1068
+ function nn(e) {
1069
+ return N(Number(e) || 0);
1072
1070
  }
1073
- function tn(e, t) {
1071
+ function rn(e, t) {
1074
1072
  let n = Number(t) || 0;
1075
1073
  return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1076
1074
  }
1077
1075
  //#endregion
1078
1076
  //#region src/ui/graph/CodeMapComposition.jsx
1079
- function nn({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 480, ariaLabel: d = "code map", canvasSlot: f, rail: p, toolbar: m, sheetTitle: h = "code area", sheetMeta: g, railSide: _ = "right", legend: v, canvasWrapperClassName: y = "", canvasWrapperStyle: b, className: x = "", presentation: S = "canvas", navigatorSlot: C, onPresentationChange: w, viewport: T, onViewportChange: E, state: D, defaultState: O, onStateChange: k }) {
1080
- let A = D !== void 0 || O !== void 0, [j, ee] = H(() => L(O)), M = B(() => A ? L(D ?? j) : null, [
1077
+ function an({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 480, ariaLabel: d = "code map", canvasSlot: f, rail: p, toolbar: m, sheetTitle: h = "code area", sheetMeta: g, railSide: _ = "right", legend: v, canvasWrapperClassName: y = "", canvasWrapperStyle: b, className: x = "", presentation: S = "canvas", navigatorSlot: C, onPresentationChange: w, viewport: T, onViewportChange: E, state: D, defaultState: O, onStateChange: k }) {
1078
+ let A = D !== void 0 || O !== void 0, [j, M] = U(() => R(O)), N = V(() => A ? R(D ?? j) : null, [
1081
1079
  A,
1082
1080
  D,
1083
1081
  j
1084
- ]), N = M?.presentation ?? S;
1085
- function P(e, t) {
1086
- D === void 0 && ee(e), k?.(e), t?.(e);
1087
- }
1082
+ ]), P = N?.presentation ?? S;
1088
1083
  function F(e, t) {
1089
- if (!M) return;
1090
- let n = r(M, e);
1091
- ye(M, n) || P(n, t);
1084
+ D === void 0 && M(e), k?.(e), t?.(e);
1085
+ }
1086
+ function I(e, t) {
1087
+ if (!N) return;
1088
+ let n = r(N, e);
1089
+ ve(N, n) || F(n, t);
1092
1090
  }
1093
- let te = A || w ? /* @__PURE__ */ W(we, { children: [/* @__PURE__ */ W("div", {
1091
+ let ee = A || w ? /* @__PURE__ */ G(Te, { children: [/* @__PURE__ */ G("div", {
1094
1092
  className: "gmp-presentation-switch",
1095
1093
  role: "group",
1096
1094
  "aria-label": "code map view",
1097
- children: [/* @__PURE__ */ U("button", {
1095
+ children: [/* @__PURE__ */ W("button", {
1098
1096
  type: "button",
1099
- "aria-pressed": N === "navigator",
1100
- onClick: () => A ? F({
1097
+ "aria-pressed": P === "navigator",
1098
+ onClick: () => A ? I({
1101
1099
  type: "set-presentation",
1102
1100
  presentation: "navigator"
1103
1101
  }, () => w?.("navigator")) : w?.("navigator"),
1104
- children: N === "canvas" ? "back to browse" : "browse"
1105
- }), /* @__PURE__ */ U("button", {
1102
+ children: P === "canvas" ? "back to browse" : "browse"
1103
+ }), /* @__PURE__ */ W("button", {
1106
1104
  type: "button",
1107
- "aria-pressed": N === "canvas",
1108
- onClick: () => A ? F({
1105
+ "aria-pressed": P === "canvas",
1106
+ onClick: () => A ? I({
1109
1107
  type: "set-presentation",
1110
1108
  presentation: "canvas"
1111
1109
  }, () => w?.("canvas")) : w?.("canvas"),
1112
1110
  children: "spatial map"
1113
1111
  })]
1114
- }), m] }) : m, ne = f ?? /* @__PURE__ */ U(Kt, {
1112
+ }), m] }) : m, te = f ?? /* @__PURE__ */ W(Jt, {
1115
1113
  payload: e,
1116
- zoom: M ? {
1117
- level: M.grain,
1118
- expanded: M.expandedIds
1114
+ zoom: N ? {
1115
+ level: N.grain,
1116
+ expanded: N.expandedIds
1119
1117
  } : t,
1120
1118
  onZoomChange: n,
1121
- selectedId: M ? M.selectedId : i,
1119
+ selectedId: N ? N.selectedId : i,
1122
1120
  onSelect: a,
1123
1121
  onExpand: o,
1124
1122
  highlightedIds: s,
@@ -1126,76 +1124,76 @@ function nn({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a,
1126
1124
  structureEdgeDeltas: l,
1127
1125
  height: u,
1128
1126
  ariaLabel: d,
1129
- viewport: M ? M.viewport ?? void 0 : T,
1127
+ viewport: N ? N.viewport ?? void 0 : T,
1130
1128
  onViewportChange: E,
1131
- state: M ?? void 0,
1132
- onStateChange: M ? (e) => P(e) : void 0
1133
- }), I = C ?? (M && e ? /* @__PURE__ */ U(Zt, {
1129
+ state: N ?? void 0,
1130
+ onStateChange: N ? (e) => F(e) : void 0
1131
+ }), L = C ?? (N && e ? /* @__PURE__ */ W($t, {
1134
1132
  payload: e,
1135
- grain: M.grain,
1136
- expandedIds: M.expandedIds,
1137
- selectedId: M.selectedId,
1138
- focusedId: M.navigatorFocusedId,
1139
- filter: M.navigatorFilter,
1140
- onStateAction: (t) => F(t, () => {
1133
+ grain: N.grain,
1134
+ expandedIds: N.expandedIds,
1135
+ selectedId: N.selectedId,
1136
+ focusedId: N.navigatorFocusedId,
1137
+ filter: N.navigatorFilter,
1138
+ onStateAction: (t) => I(t, () => {
1141
1139
  t.type === "select" ? a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? a?.(null, null) : t.type === "set-expanded" ? n?.({
1142
- level: M.grain,
1140
+ level: N.grain,
1143
1141
  expanded: Array.from(t.ids)
1144
1142
  }) : t.type === "open-in-map" && (a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), w?.("canvas"));
1145
1143
  }),
1146
1144
  ariaLabel: `browse ${d}`
1147
- }) : null), re = N === "navigator" && I !== null;
1148
- return /* @__PURE__ */ U("div", {
1145
+ }) : null), ne = P === "navigator" && L !== null;
1146
+ return /* @__PURE__ */ W("div", {
1149
1147
  className: ["gmp-root", x].filter(Boolean).join(" "),
1150
- children: /* @__PURE__ */ W(de, {
1151
- toolbar: te,
1148
+ children: /* @__PURE__ */ G(le, {
1149
+ toolbar: ee,
1152
1150
  rail: p,
1153
1151
  sheetTitle: h,
1154
1152
  sheetMeta: g,
1155
1153
  railSide: _,
1156
- children: [/* @__PURE__ */ U("div", {
1154
+ children: [/* @__PURE__ */ W("div", {
1157
1155
  className: ["gmp-map-canvas-region", y].filter(Boolean).join(" "),
1158
1156
  style: b,
1159
1157
  "data-testid": "gmp-map-canvas-region",
1160
- children: re ? I : ne
1161
- }), !re && v !== !1 && (v ?? /* @__PURE__ */ U(rn, {}))]
1158
+ children: ne ? L : te
1159
+ }), !ne && v !== !1 && (v ?? /* @__PURE__ */ W(on, {}))]
1162
1160
  })
1163
1161
  });
1164
1162
  }
1165
- function rn() {
1166
- return /* @__PURE__ */ W("p", {
1163
+ function on() {
1164
+ return /* @__PURE__ */ G("p", {
1167
1165
  className: "gmp-map-legend",
1168
1166
  children: [
1169
- /* @__PURE__ */ W("span", {
1167
+ /* @__PURE__ */ G("span", {
1170
1168
  className: "gmp-legend-item",
1171
- children: [/* @__PURE__ */ U("span", {
1169
+ children: [/* @__PURE__ */ W("span", {
1172
1170
  className: "gmp-map-swatch",
1173
1171
  "aria-hidden": "true"
1174
1172
  }), " code area (folder or file)"]
1175
1173
  }),
1176
- /* @__PURE__ */ W("span", {
1174
+ /* @__PURE__ */ G("span", {
1177
1175
  className: "gmp-legend-item gmp-legend-dim",
1178
- children: [/* @__PURE__ */ U("span", {
1176
+ children: [/* @__PURE__ */ W("span", {
1179
1177
  className: "gmp-map-swatch gmp-map-swatch--empty",
1180
1178
  "aria-hidden": "true"
1181
1179
  }), " no saved conversation behind it"]
1182
1180
  }),
1183
- /* @__PURE__ */ U("span", {
1181
+ /* @__PURE__ */ W("span", {
1184
1182
  className: "gmp-legend-item gmp-legend-dim",
1185
1183
  children: "brighter = more of it built with AI on record"
1186
1184
  }),
1187
- /* @__PURE__ */ W("span", {
1185
+ /* @__PURE__ */ G("span", {
1188
1186
  className: "gmp-legend-item gmp-legend-dim",
1189
- children: [/* @__PURE__ */ U("span", {
1187
+ children: [/* @__PURE__ */ W("span", {
1190
1188
  className: "gmp-map-swatch gmp-map-swatch--edge",
1191
1189
  "aria-hidden": "true"
1192
1190
  }), " one area uses another"]
1193
1191
  }),
1194
- /* @__PURE__ */ U("span", {
1192
+ /* @__PURE__ */ W("span", {
1195
1193
  className: "gmp-legend-item gmp-map-legend-danger",
1196
1194
  children: "⚠ tangle — two areas that depend on each other"
1197
1195
  }),
1198
- /* @__PURE__ */ U("span", {
1196
+ /* @__PURE__ */ W("span", {
1199
1197
  className: "gmp-legend-item gmp-legend-dim",
1200
1198
  children: "double-click a folder to open its files"
1201
1199
  })
@@ -1204,26 +1202,26 @@ function rn() {
1204
1202
  }
1205
1203
  //#endregion
1206
1204
  //#region src/ui/graph/timelineNavigation.js
1207
- function Y(e) {
1205
+ function sn(e) {
1208
1206
  return typeof e == "object" && !!e && !Array.isArray(e);
1209
1207
  }
1210
1208
  function X(e, t) {
1211
1209
  let n = Object.keys(e).sort();
1212
1210
  return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1213
1211
  }
1214
- function an(e) {
1212
+ function cn(e) {
1215
1213
  return typeof e == "string" && e.length > 0;
1216
1214
  }
1217
- function on(e) {
1218
- return e === null || an(e);
1215
+ function ln(e) {
1216
+ return e === null || cn(e);
1219
1217
  }
1220
- function sn(e) {
1218
+ function un(e) {
1221
1219
  let t = !1;
1222
- if (Y(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && Y(e.change) ? t = X(e.change, ["id", "branch"]) && an(e.change.id) && on(e.change.branch) : e.type === "open-session" && X(e, [
1220
+ if (sn(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && sn(e.change) ? t = X(e.change, ["id", "branch"]) && cn(e.change.id) && ln(e.change.branch) : e.type === "open-session" && X(e, [
1223
1221
  "type",
1224
1222
  "sessionId",
1225
1223
  "source"
1226
- ]) && an(e.sessionId) && Y(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && Y(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && an(e.source.commit.id) && on(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && X(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && X(e, ["type"]) && (t = !0)), !t) throw TypeError([
1224
+ ]) && cn(e.sessionId) && sn(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && sn(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && cn(e.source.commit.id) && ln(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && X(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && X(e, ["type"]) && (t = !0)), !t) throw TypeError([
1227
1225
  "Timeline navigation action rejected.",
1228
1226
  "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1229
1227
  "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
@@ -1235,32 +1233,37 @@ function sn(e) {
1235
1233
  }
1236
1234
  //#endregion
1237
1235
  //#region src/ui/graph/ScentTag.jsx
1238
- function cn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...a }) {
1239
- if (!ie.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${ie.join(", ")}.`);
1240
- return r ? /* @__PURE__ */ W("button", {
1236
+ function dn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...a }) {
1237
+ if (!re.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${re.join(", ")}.`);
1238
+ if (!r) {
1239
+ let n = /* @__PURE__ */ W("span", {
1240
+ className: `tlp-scent${i ? ` ${i}` : ""}`,
1241
+ tabIndex: t ? 0 : void 0,
1242
+ ...a,
1243
+ children: e
1244
+ });
1245
+ return t ? /* @__PURE__ */ W(o, {
1246
+ content: t,
1247
+ children: n
1248
+ }) : n;
1249
+ }
1250
+ let s = /* @__PURE__ */ W("button", {
1241
1251
  type: "button",
1242
1252
  className: `tlp-scent tlp-scent-filter${n ? " tlp-scent-filter-active" : ""}${i ? ` ${i}` : ""}`,
1243
- title: t || void 0,
1244
1253
  "aria-pressed": n,
1245
1254
  onClick: () => r(n ? null : e),
1246
1255
  ...a,
1247
- children: [e, /* @__PURE__ */ U("span", {
1248
- className: "tlp-sr",
1249
- role: "status",
1250
- "aria-live": "polite",
1251
- children: n ? `filtering by ${e}` : ""
1252
- })]
1253
- }) : /* @__PURE__ */ U("span", {
1254
- className: `tlp-scent${i ? ` ${i}` : ""}`,
1255
- title: t || void 0,
1256
- ...a,
1257
1256
  children: e
1258
1257
  });
1258
+ return t ? /* @__PURE__ */ W(o, {
1259
+ content: t,
1260
+ children: s
1261
+ }) : s;
1259
1262
  }
1260
1263
  //#endregion
1261
1264
  //#region src/ui/graph/RankedRow.jsx
1262
- function ln({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1263
- return /* @__PURE__ */ W("button", {
1265
+ function fn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1266
+ return /* @__PURE__ */ G("button", {
1264
1267
  type: "button",
1265
1268
  className: [
1266
1269
  "tlp-ranked-row",
@@ -1271,32 +1274,32 @@ function ln({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1271
1274
  onClick: () => r?.(e.id),
1272
1275
  ...a,
1273
1276
  children: [
1274
- /* @__PURE__ */ U(oe, {
1277
+ /* @__PURE__ */ W(ee, {
1275
1278
  className: "tlp-ranked-doi-scope",
1276
- children: /* @__PURE__ */ U(te, {
1279
+ children: /* @__PURE__ */ W(ye, {
1277
1280
  label: e.name,
1278
1281
  loc: t,
1279
- recorded: e.doi,
1282
+ recorded: Number(e.doi.toFixed(2)),
1280
1283
  total: 1,
1281
1284
  selected: n,
1282
1285
  as: "span",
1283
1286
  className: "tlp-ranked-doi"
1284
1287
  })
1285
1288
  }),
1286
- /* @__PURE__ */ U("span", {
1289
+ /* @__PURE__ */ W("span", {
1287
1290
  className: "tlp-ranked-name",
1288
1291
  title: e.name,
1289
1292
  children: e.name
1290
1293
  }),
1291
- /* @__PURE__ */ U("span", {
1294
+ /* @__PURE__ */ W("span", {
1292
1295
  className: "tlp-ranked-tags",
1293
1296
  "aria-label": "comprehension signals",
1294
- children: e.scentTags.map((t) => /* @__PURE__ */ U(cn, {
1297
+ children: e.scentTags.map((t) => /* @__PURE__ */ W(dn, {
1295
1298
  tag: t,
1296
1299
  hoverText: t.startsWith("agent wrote:") ? e.hoverText ?? void 0 : void 0
1297
1300
  }, t))
1298
1301
  }),
1299
- /* @__PURE__ */ U("span", {
1302
+ /* @__PURE__ */ W("span", {
1300
1303
  className: "tlp-ranked-doi-val tnum",
1301
1304
  "aria-hidden": "true",
1302
1305
  children: e.doi.toFixed(2)
@@ -1311,8 +1314,8 @@ var Z = [
1311
1314
  "debt",
1312
1315
  "churn"
1313
1316
  ];
1314
- function un({ rankMode: e, onChange: t, className: n = "", ...r }) {
1315
- let i = V([]), a = (e) => {
1317
+ function pn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1318
+ let i = H([]), a = (e) => {
1316
1319
  let n = Z[e];
1317
1320
  n && (t(n), i.current[e]?.focus());
1318
1321
  }, o = (e, t) => {
@@ -1341,7 +1344,7 @@ function un({ rankMode: e, onChange: t, className: n = "", ...r }) {
1341
1344
  role: "radiogroup",
1342
1345
  "aria-label": "rank mode",
1343
1346
  ...r,
1344
- children: [Z.map((n, r) => /* @__PURE__ */ U("button", {
1347
+ children: Z.map((n, r) => /* @__PURE__ */ W("button", {
1345
1348
  type: "button",
1346
1349
  role: "radio",
1347
1350
  "aria-checked": e === n,
@@ -1353,18 +1356,13 @@ function un({ rankMode: e, onChange: t, className: n = "", ...r }) {
1353
1356
  onClick: () => t(n),
1354
1357
  onKeyDown: (e) => o(e, r),
1355
1358
  children: n
1356
- }, n)), /* @__PURE__ */ U("span", {
1357
- className: "tlp-sr",
1358
- role: "status",
1359
- "aria-live": "polite",
1360
- children: `rank mode: ${e}`
1361
- })]
1359
+ }, n))
1362
1360
  });
1363
1361
  }
1364
1362
  //#endregion
1365
1363
  //#region src/ui/graph/InsightPanel.jsx
1366
- function dn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1367
- if (s(e), e.length === 0) return /* @__PURE__ */ U("p", {
1364
+ function mn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1365
+ if (c(e), e.length === 0) return /* @__PURE__ */ W("p", {
1368
1366
  className: `tlp-insight-empty${n ? ` ${n}` : ""}`,
1369
1367
  ...r,
1370
1368
  children: "no insights recorded for this node yet."
@@ -1374,35 +1372,35 @@ function dn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1374
1372
  let e = i.get(t.kind) ?? [];
1375
1373
  e.push(t), i.set(t.kind, e);
1376
1374
  }
1377
- return /* @__PURE__ */ U("div", {
1375
+ return /* @__PURE__ */ W("div", {
1378
1376
  className: `tlp-insight-panel${n ? ` ${n}` : ""}`,
1379
1377
  ...r,
1380
- children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ W("section", {
1378
+ children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ G("section", {
1381
1379
  className: "tlp-insight-group",
1382
1380
  "aria-label": S[e],
1383
- children: [/* @__PURE__ */ U("h3", {
1381
+ children: [/* @__PURE__ */ W("p", {
1384
1382
  className: "tlp-insight-group-title",
1385
1383
  children: S[e]
1386
- }), /* @__PURE__ */ U("ul", {
1384
+ }), /* @__PURE__ */ W("ul", {
1387
1385
  className: "tlp-insight-list",
1388
- children: n.map((e, n) => /* @__PURE__ */ W("li", {
1386
+ children: n.map((e, n) => /* @__PURE__ */ G("li", {
1389
1387
  className: "tlp-insight-item",
1390
1388
  children: [
1391
- /* @__PURE__ */ U("span", {
1389
+ /* @__PURE__ */ W("span", {
1392
1390
  className: `tlp-insight-provenance ${w[e.provenance].markerClass}`,
1393
1391
  "aria-hidden": "true"
1394
1392
  }),
1395
- /* @__PURE__ */ U("span", {
1393
+ /* @__PURE__ */ W("span", {
1396
1394
  className: "tlp-insight-title",
1397
1395
  children: e.title
1398
1396
  }),
1399
- e.summary && /* @__PURE__ */ U("span", {
1397
+ e.summary && /* @__PURE__ */ W("span", {
1400
1398
  className: "tlp-insight-summary",
1401
1399
  children: e.summary
1402
1400
  }),
1403
- /* @__PURE__ */ U("span", {
1401
+ /* @__PURE__ */ W("span", {
1404
1402
  className: "tlp-insight-evidence",
1405
- children: e.evidence.map((e, n) => /* @__PURE__ */ U("button", {
1403
+ children: e.evidence.map((e, n) => /* @__PURE__ */ W("button", {
1406
1404
  type: "button",
1407
1405
  className: "tlp-insight-evidence-link",
1408
1406
  onClick: () => t?.(e.sessionId),
@@ -1435,7 +1433,7 @@ var Q = Object.freeze({
1435
1433
  subagentSpawnColor: "var(--edge)",
1436
1434
  subagentReturnColor: "var(--edge)",
1437
1435
  errorColor: "var(--edge-error)"
1438
- }), fn = {
1436
+ }), hn = {
1439
1437
  planning: "var(--edge)",
1440
1438
  exploration: "var(--edge)",
1441
1439
  implementation: "var(--edge)",
@@ -1447,7 +1445,7 @@ var Q = Object.freeze({
1447
1445
  recovery: "var(--edge)",
1448
1446
  abandonment: "var(--edge)"
1449
1447
  };
1450
- function pn(e) {
1448
+ function gn(e) {
1451
1449
  let t = /* @__PURE__ */ new Map();
1452
1450
  for (let n of e) {
1453
1451
  let e = t.get(n.turnIndex) ?? [];
@@ -1455,13 +1453,13 @@ function pn(e) {
1455
1453
  }
1456
1454
  return t;
1457
1455
  }
1458
- function mn(e) {
1456
+ function _n(e) {
1459
1457
  let t = /* @__PURE__ */ new Map();
1460
1458
  for (let n of e) for (let e = n.startTurn; e <= n.endTurn; e++) t.set(e, n.type);
1461
1459
  return t;
1462
1460
  }
1463
- function hn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1464
- let c = pn(r), l = mn(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1461
+ function vn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1462
+ let c = gn(r), l = _n(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1465
1463
  for (let n = 0; n < e.length; n++) {
1466
1464
  let r = e[n], i = !!r.content?.trim(), y = (r.toolCalls?.length ?? 0) > 0;
1467
1465
  if (!i && !y || r.role === "system" && !y && (!r.content || r.content.trim().length < 8)) continue;
@@ -1528,7 +1526,7 @@ function hn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1528
1526
  }
1529
1527
  if (h) {
1530
1528
  let e = x !== g && x !== void 0, t = b !== _, n = "sequential", r = $.sequentialColor, i = $.sequentialWidth, a;
1531
- t && b > _ ? (n = "spawn", r = $.subagentSpawnColor, i = 2, a = "6 4") : t && b < _ ? (n = "return", r = $.subagentReturnColor, i = 1.5, a = "2 3") : e && x && (n = "phase-transition", r = fn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1529
+ t && b > _ ? (n = "spawn", r = $.subagentSpawnColor, i = 2, a = "6 4") : t && b < _ ? (n = "return", r = $.subagentReturnColor, i = 1.5, a = "2 3") : e && x && (n = "phase-transition", r = hn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1532
1530
  let o = w || v;
1533
1531
  f.push({
1534
1532
  id: `e-${h}-${D}`,
@@ -1544,7 +1542,7 @@ function hn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1544
1542
  },
1545
1543
  data: {
1546
1544
  edgeType: n,
1547
- phaseColor: x ? fn[x] : void 0
1545
+ phaseColor: x ? hn[x] : void 0
1548
1546
  }
1549
1547
  });
1550
1548
  }
@@ -1555,7 +1553,7 @@ function hn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1555
1553
  edges: f
1556
1554
  };
1557
1555
  }
1558
- function gn(e) {
1556
+ function yn(e) {
1559
1557
  let t = /* @__PURE__ */ new Map();
1560
1558
  for (let n of e) {
1561
1559
  if (n.type !== "turn") continue;
@@ -1587,10 +1585,10 @@ function gn(e) {
1587
1585
  }
1588
1586
  //#endregion
1589
1587
  //#region src/ui/transcript/graph/engine/useCanvasSync.js
1590
- function _n(e, t, n) {
1591
- let r = Ot();
1588
+ function bn(e, t, n) {
1589
+ let r = At();
1592
1590
  return {
1593
- focusPhase: R((i) => {
1591
+ focusPhase: z((i) => {
1594
1592
  let a = e[i];
1595
1593
  if (!a) return;
1596
1594
  let o = /* @__PURE__ */ new Set();
@@ -1618,7 +1616,7 @@ function _n(e, t, n) {
1618
1616
  r,
1619
1617
  n
1620
1618
  ]),
1621
- focusTurn: R((e) => {
1619
+ focusTurn: z((e) => {
1622
1620
  let n = t[e]?.index ?? e, i = r.getNodes().find((e) => e.type === "turn" && e.data.turn.index === n);
1623
1621
  i && r.setCenter(i.position.x + Q.turnWidth / 2, i.position.y + Q.turnBaseHeight / 2, {
1624
1622
  zoom: 1,
@@ -1629,28 +1627,28 @@ function _n(e, t, n) {
1629
1627
  }
1630
1628
  //#endregion
1631
1629
  //#region src/ui/transcript/graph/engine/nodes/TurnCardNode.jsx
1632
- function vn(e, t) {
1630
+ function xn(e, t) {
1633
1631
  if (!e) return "";
1634
1632
  let n = e.replace(/\s+/g, " ").trim();
1635
1633
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
1636
1634
  }
1637
- function yn({ data: e, selected: t }) {
1635
+ function Sn({ data: e, selected: t }) {
1638
1636
  let { turn: n, annotations: r, isSearchMatch: i, isFilteredOut: a, isSelected: o, turnNumber: s, provider: c } = e, l = n.depth ?? 0, u = n.role === "assistant" && l > 0, d = r.some((e) => e.type === "error"), f = r.some((e) => e.type === "retry"), p = r.some((e) => e.type === "revert");
1639
- return /* @__PURE__ */ W("div", {
1637
+ return /* @__PURE__ */ G("div", {
1640
1638
  "data-turn-index": n.index,
1641
1639
  "data-harness": u ? void 0 : n.role === "assistant" ? c : void 0,
1642
1640
  style: { width: Q.turnWidth },
1643
1641
  children: [
1644
- /* @__PURE__ */ U(K, {
1642
+ /* @__PURE__ */ W(q, {
1645
1643
  type: "target",
1646
- position: q.Top,
1644
+ position: J.Top,
1647
1645
  className: "tb-gnode-handle tb-gnode-handle-top"
1648
1646
  }),
1649
- /* @__PURE__ */ U(k, {
1647
+ /* @__PURE__ */ W(k, {
1650
1648
  role: n.role,
1651
1649
  agentName: u ? n.agentName : void 0,
1652
1650
  turnNumber: s,
1653
- contentPreview: vn(n.content, 160),
1651
+ contentPreview: xn(n.content, 160),
1654
1652
  toolCount: n.toolCalls?.length ?? 0,
1655
1653
  totalTokens: (n.tokensIn ?? 0) + (n.tokensOut ?? 0),
1656
1654
  tokensIn: n.tokensIn ?? void 0,
@@ -1663,24 +1661,24 @@ function yn({ data: e, selected: t }) {
1663
1661
  isSelected: t || o,
1664
1662
  provider: c
1665
1663
  }),
1666
- /* @__PURE__ */ U(K, {
1664
+ /* @__PURE__ */ W(q, {
1667
1665
  type: "source",
1668
- position: q.Bottom,
1666
+ position: J.Bottom,
1669
1667
  className: "tb-gnode-handle tb-gnode-handle-bottom"
1670
1668
  }),
1671
- /* @__PURE__ */ U(K, {
1669
+ /* @__PURE__ */ W(q, {
1672
1670
  type: "source",
1673
1671
  id: "tool-source",
1674
- position: q.Right,
1672
+ position: J.Right,
1675
1673
  className: "tb-gnode-handle tb-gnode-handle-right"
1676
1674
  })
1677
1675
  ]
1678
1676
  });
1679
1677
  }
1680
- var bn = Ce(yn);
1678
+ var Cn = we(Sn);
1681
1679
  //#endregion
1682
1680
  //#region src/ui/transcript/graph/engine/nodes/ToolPillNode.jsx
1683
- function xn({ data: e }) {
1681
+ function wn({ data: e }) {
1684
1682
  let { toolCalls: t, previewById: n, totalDurationMs: r, hasError: i, isFilteredOut: a } = e, o = t.map((e) => ({
1685
1683
  id: e.id,
1686
1684
  name: e.name,
@@ -1690,14 +1688,14 @@ function xn({ data: e }) {
1690
1688
  exitCode: e.exitCode ?? void 0,
1691
1689
  preview: n[e.id] ?? ""
1692
1690
  }));
1693
- return /* @__PURE__ */ W("div", {
1691
+ return /* @__PURE__ */ G("div", {
1694
1692
  style: { width: Q.toolCallWidth },
1695
- children: [/* @__PURE__ */ U(K, {
1693
+ children: [/* @__PURE__ */ W(q, {
1696
1694
  type: "target",
1697
1695
  id: "tool-target",
1698
- position: q.Left,
1696
+ position: J.Left,
1699
1697
  className: "tb-gnode-handle tb-gnode-handle-left"
1700
- }), /* @__PURE__ */ U(I, {
1698
+ }), /* @__PURE__ */ W(L, {
1701
1699
  tools: o,
1702
1700
  totalDurationMs: r,
1703
1701
  hasError: i,
@@ -1705,68 +1703,68 @@ function xn({ data: e }) {
1705
1703
  })]
1706
1704
  });
1707
1705
  }
1708
- var Sn = Ce(xn);
1706
+ var Tn = we(wn);
1709
1707
  //#endregion
1710
1708
  //#region src/ui/transcript/graph/engine/nodes/SubagentBranchNode.jsx
1711
- function Cn({ data: e }) {
1709
+ function En({ data: e }) {
1712
1710
  let { agentName: t, depth: n } = e;
1713
- return /* @__PURE__ */ U(pe, {
1711
+ return /* @__PURE__ */ W(fe, {
1714
1712
  agentName: t,
1715
1713
  depth: n
1716
1714
  });
1717
1715
  }
1718
- var wn = Ce(Cn);
1716
+ var Dn = we(En);
1719
1717
  //#endregion
1720
1718
  //#region src/ui/transcript/graph/engine/GraphControls.jsx
1721
- function Tn({ className: e = "" }) {
1722
- let t = Ot();
1723
- return /* @__PURE__ */ W("div", {
1719
+ function On({ className: e = "" }) {
1720
+ let t = At();
1721
+ return /* @__PURE__ */ G("div", {
1724
1722
  className: ["tb-graph-controls", e].filter(Boolean).join(" "),
1725
1723
  children: [
1726
- /* @__PURE__ */ U(En, {
1724
+ /* @__PURE__ */ W(kn, {
1727
1725
  label: "zoom in",
1728
1726
  onClick: () => t.zoomIn({ duration: 150 }),
1729
- children: /* @__PURE__ */ U(Be, {
1730
- size: 12,
1727
+ children: /* @__PURE__ */ W(Ve, {
1728
+ size: 14,
1731
1729
  strokeWidth: 2
1732
1730
  })
1733
1731
  }),
1734
- /* @__PURE__ */ U(En, {
1732
+ /* @__PURE__ */ W(kn, {
1735
1733
  label: "zoom out",
1736
1734
  onClick: () => t.zoomOut({ duration: 150 }),
1737
- children: /* @__PURE__ */ U(ze, {
1738
- size: 12,
1735
+ children: /* @__PURE__ */ W(Be, {
1736
+ size: 14,
1739
1737
  strokeWidth: 2
1740
1738
  })
1741
1739
  }),
1742
- /* @__PURE__ */ U(En, {
1740
+ /* @__PURE__ */ W(kn, {
1743
1741
  label: "fit view",
1744
1742
  onClick: () => t.fitView({
1745
1743
  padding: .1,
1746
1744
  duration: 250
1747
1745
  }),
1748
- children: /* @__PURE__ */ U(Le, {
1749
- size: 11,
1746
+ children: /* @__PURE__ */ W(Re, {
1747
+ size: 14,
1750
1748
  strokeWidth: 1.75
1751
1749
  })
1752
1750
  }),
1753
- /* @__PURE__ */ U(En, {
1751
+ /* @__PURE__ */ W(kn, {
1754
1752
  label: "reset",
1755
1753
  onClick: () => t.setViewport({
1756
1754
  x: 0,
1757
1755
  y: 0,
1758
1756
  zoom: 1
1759
1757
  }, { duration: 200 }),
1760
- children: /* @__PURE__ */ U(Ve, {
1761
- size: 11,
1758
+ children: /* @__PURE__ */ W(He, {
1759
+ size: 14,
1762
1760
  strokeWidth: 1.75
1763
1761
  })
1764
1762
  })
1765
1763
  ]
1766
1764
  });
1767
1765
  }
1768
- function En({ label: e, onClick: t, children: n }) {
1769
- return /* @__PURE__ */ U("button", {
1766
+ function kn({ label: e, onClick: t, children: n }) {
1767
+ return /* @__PURE__ */ W("button", {
1770
1768
  type: "button",
1771
1769
  onClick: t,
1772
1770
  "aria-label": e,
@@ -1777,9 +1775,9 @@ function En({ label: e, onClick: t, children: n }) {
1777
1775
  }
1778
1776
  //#endregion
1779
1777
  //#region src/ui/transcript/graph/engine/TrajectoryGraphLegend.jsx
1780
- function Dn({ provider: e, className: t = "" }) {
1781
- let n = e && b(e).toLocaleLowerCase("en-US") || "agent";
1782
- return /* @__PURE__ */ U(se, {
1778
+ function An({ provider: e, className: t = "" }) {
1779
+ let n = e && xe(e).toLocaleLowerCase("en-US") || "agent";
1780
+ return /* @__PURE__ */ W(ae, {
1783
1781
  className: ["tb-graph-legend", t].filter(Boolean).join(" "),
1784
1782
  items: [
1785
1783
  {
@@ -1808,21 +1806,21 @@ function Dn({ provider: e, className: t = "" }) {
1808
1806
  }
1809
1807
  //#endregion
1810
1808
  //#region src/ui/transcript/graph/engine/TrajectoryGraph.jsx
1811
- var On = {
1812
- turn: bn,
1813
- toolCall: Sn,
1814
- subagentLane: wn
1809
+ var jn = {
1810
+ turn: Cn,
1811
+ toolCall: Tn,
1812
+ subagentLane: Dn
1815
1813
  };
1816
- function kn(e) {
1817
- return /* @__PURE__ */ U(Tt, { children: /* @__PURE__ */ U(An, { ...e }) });
1814
+ function Mn(e) {
1815
+ return /* @__PURE__ */ W(Dt, { children: /* @__PURE__ */ W(Nn, { ...e }) });
1818
1816
  }
1819
- function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotations: i, searchMatches: a, searchQuery: o, activeMatchIndex: s, focusTurn: c, focusPhase: l, onPhaseActivate: u, onViewportChange: d, selectedTurns: f, provider: p, className: m = "" }) {
1820
- let h = Ot(), { focusTurn: g, focusPhase: _ } = _n(r, e, u), v = B(() => {
1817
+ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotations: i, searchMatches: a, searchQuery: o, activeMatchIndex: s, focusTurn: c, focusPhase: l, onPhaseActivate: u, onViewportChange: d, selectedTurns: f, provider: p, className: m = "" }) {
1818
+ let h = At(), { focusTurn: g, focusPhase: _ } = bn(r, e, u), v = V(() => {
1821
1819
  if (n.length === e.length) return /* @__PURE__ */ new Set();
1822
1820
  let t = new Set(n), r = /* @__PURE__ */ new Set();
1823
1821
  for (let n = 0; n < e.length; n++) t.has(e[n]) && r.add(n);
1824
1822
  return r;
1825
- }, [e, n]), y = B(() => hn({
1823
+ }, [e, n]), y = V(() => vn({
1826
1824
  turns: e,
1827
1825
  toolVMsByTurn: t,
1828
1826
  phases: r,
@@ -1840,13 +1838,13 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1840
1838
  v,
1841
1839
  o,
1842
1840
  f
1843
- ]), b = B(() => y.nodes.map((e) => e.type === "turn" ? {
1841
+ ]), b = V(() => y.nodes.map((e) => e.type === "turn" ? {
1844
1842
  ...e,
1845
1843
  data: {
1846
1844
  ...e.data,
1847
1845
  provider: p
1848
1846
  }
1849
- } : e), [y.nodes, p]), x = B(() => gn(b), [b]), S = B(() => y.edges.map((e) => {
1847
+ } : e), [y.nodes, p]), x = V(() => yn(b), [b]), S = V(() => y.edges.map((e) => {
1850
1848
  let t = e.sourceHandle === "tool-source";
1851
1849
  return {
1852
1850
  ...e,
@@ -1859,9 +1857,9 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1859
1857
  },
1860
1858
  animated: t ? !1 : e.animated
1861
1859
  };
1862
- }), [y.edges]), C = B(() => [...x, ...b], [x, b]), [w, T, E] = Dt(C), [D, O, k] = Et(S), A = V(e.length), j = V(o), ee = V(n.length);
1863
- z(() => {
1864
- (e.length !== A.current || o !== j.current || n.length !== ee.current) && (T(C), O(S), A.current = e.length, j.current = o, ee.current = n.length);
1860
+ }), [y.edges]), C = V(() => [...x, ...b], [x, b]), [w, T, E] = kt(C), [D, O, k] = Ot(S), A = H(e.length), j = H(o), M = H(n.length);
1861
+ B(() => {
1862
+ (e.length !== A.current || o !== j.current || n.length !== M.current) && (T(C), O(S), A.current = e.length, j.current = o, M.current = n.length);
1865
1863
  }, [
1866
1864
  C,
1867
1865
  S,
@@ -1870,7 +1868,7 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1870
1868
  n.length,
1871
1869
  T,
1872
1870
  O
1873
- ]), z(() => {
1871
+ ]), B(() => {
1874
1872
  if (s === void 0) return;
1875
1873
  let t = e[s]?.index;
1876
1874
  if (t === void 0) return;
@@ -1885,17 +1883,17 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1885
1883
  h,
1886
1884
  e
1887
1885
  ]);
1888
- let M = V(-1);
1889
- z(() => {
1890
- !c || c.seq === M.current || (M.current = c.seq, g(c.target));
1886
+ let N = H(-1);
1887
+ B(() => {
1888
+ !c || c.seq === N.current || (N.current = c.seq, g(c.target));
1891
1889
  }, [c, g]);
1892
- let N = V(-1);
1893
- z(() => {
1894
- !l || l.seq === N.current || (N.current = l.seq, _(l.target));
1890
+ let P = H(-1);
1891
+ B(() => {
1892
+ !l || l.seq === P.current || (P.current = l.seq, _(l.target));
1895
1893
  }, [l, _]);
1896
- let P = V(!1);
1897
- z(() => {
1898
- w.length > 0 && !P.current && (P.current = !0, setTimeout(() => {
1894
+ let F = H(!1);
1895
+ B(() => {
1896
+ w.length > 0 && !F.current && (F.current = !0, setTimeout(() => {
1899
1897
  let e = w.find((e) => e.type === "turn");
1900
1898
  e ? h.setCenter(e.position.x + Q.turnWidth / 2, e.position.y + Q.turnBaseHeight, {
1901
1899
  zoom: 1.05,
@@ -1910,13 +1908,13 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1910
1908
  h,
1911
1909
  w
1912
1910
  ]);
1913
- let F = R((e) => {
1911
+ let I = z((e) => {
1914
1912
  if (e.type === "turn") {
1915
1913
  let t = e.data;
1916
1914
  return t.annotations?.some?.((e) => e.type === "error") ? "var(--danger)" : t.isFilteredOut ? "var(--rule)" : t.turn.role === "user" ? "var(--teal)" : t.turn.role === "assistant" ? "var(--amber)" : "var(--ink-2)";
1917
1915
  }
1918
1916
  return e.type === "toolCall" ? "var(--ink-3)" : "var(--rule)";
1919
- }, []), te = R((e, t) => {
1917
+ }, []), ee = z((e, t) => {
1920
1918
  if (t.type !== "turn") return;
1921
1919
  let n = t.data;
1922
1920
  d?.({
@@ -1924,22 +1922,22 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1924
1922
  end: n.turn.index
1925
1923
  });
1926
1924
  }, [d]);
1927
- return /* @__PURE__ */ U("div", {
1925
+ return /* @__PURE__ */ W("div", {
1928
1926
  className: [
1929
1927
  "tb-root",
1930
1928
  "tb-graph",
1931
1929
  m
1932
1930
  ].filter(Boolean).join(" "),
1933
- children: /* @__PURE__ */ W("div", {
1931
+ children: /* @__PURE__ */ G("div", {
1934
1932
  className: "tb-graph-flow",
1935
1933
  children: [
1936
- /* @__PURE__ */ W(wt, {
1934
+ /* @__PURE__ */ G(Et, {
1937
1935
  nodes: w,
1938
1936
  edges: D,
1939
1937
  onNodesChange: E,
1940
1938
  onEdgesChange: k,
1941
- onNodeClick: te,
1942
- nodeTypes: On,
1939
+ onNodeClick: ee,
1940
+ nodeTypes: jn,
1943
1941
  fitView: !1,
1944
1942
  minZoom: .2,
1945
1943
  maxZoom: 2,
@@ -1955,26 +1953,26 @@ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1955
1953
  panOnDrag: !0,
1956
1954
  panOnScroll: !0,
1957
1955
  zoomOnScroll: !0,
1958
- children: [/* @__PURE__ */ U(xt, {
1959
- variant: St.Dots,
1956
+ children: [/* @__PURE__ */ W(Ct, {
1957
+ variant: wt.Dots,
1960
1958
  gap: 20,
1961
1959
  size: 1,
1962
1960
  color: "var(--rule)"
1963
- }), /* @__PURE__ */ U(Ct, {
1961
+ }), /* @__PURE__ */ W(Tt, {
1964
1962
  zoomable: !0,
1965
1963
  pannable: !0,
1966
- nodeColor: F,
1964
+ nodeColor: I,
1967
1965
  nodeStrokeColor: "var(--rule)",
1968
1966
  nodeBorderRadius: 0,
1969
1967
  maskColor: "color-mix(in srgb, var(--canvas) 70%, transparent)",
1970
1968
  className: "tb-graph-minimap"
1971
1969
  })]
1972
1970
  }),
1973
- /* @__PURE__ */ U(Tn, {}),
1974
- /* @__PURE__ */ U(Dn, { provider: p })
1971
+ /* @__PURE__ */ W(On, {}),
1972
+ /* @__PURE__ */ W(An, { provider: p })
1975
1973
  ]
1976
1974
  })
1977
1975
  });
1978
1976
  }
1979
1977
  //#endregion
1980
- export { Je as AllChangeBindings, Ye as AllDiffLineKinds, Xe as AllEdgeViolationKinds, Ze as AllFileChangeStatuses, Qe as AllInsightKinds, $e as AllInsightProvenances, et as AllMapNodeKinds, tt as AllReadAttributionStates, nt as AllReadStateGrades, d as CHANGE_BINDINGS, F as CODE_MAP_STATE_VERSION, O as CODE_MAP_VIEWPORT_SCALE, x as COVERAGE_CAP, rt as ChangeBinding, Ut as ChangeDetail, Ft as Changes, Kt as CodeMap, nn as CodeMapComposition, Zt as CodeMapNavigator, a as DEBT_VIEWED, fe as DIFF_LINE_KINDS, i as DOI_WEIGHTS, rn as DefaultMapLegend, it as DiffLineKind, $ as EDGE_DEFAULTS, u as EDGE_VIOLATION_KINDS, at as EdgeViolationKind, E as FILE_CHANGE_STATUSES, ot as FileChangeStatus, le as GRAPH_APP_SECTIONS, _e as GRAPH_LEGEND_ITEMS, ge as GhostCommitNode, A as GhostGroup, he as GraphAppShell, Tn as GraphControls, se as GraphLegend, ee as GraphSectionNav, pe as GraphSubagentBranch, I as GraphToolNode, k as GraphTurnNode, me as HighlightEdge, st as InsightKind, dn as InsightPanel, ct as InsightProvenance, M as LOCAL_APP_SECTIONS, T as MAP_NODE_KINDS, lt as MapNodeKind, Q as NODE_DIMENSIONS, h as RANK_CAP, ae as RANK_FLOOR, t as RECENCY_HALF_LIFE_DAYS, un as RankModeControl, ln as RankedRow, ut as ReadAttributionState, dt as ReadStateGrade, ie as SCENT_TAGS, cn as ScentTag, ue as SessionLane, re as SessionOverflowDisclosure, wn as SubagentBranchNode, Sn as ToolPillNode, ce as TouchedFileCluster, kn as TrajectoryGraph, Dn as TrajectoryGraphLegend, bn as TurnCardNode, D as assertChangeDetailPayloadEnums, _ as assertChangeDiffPayloadEnums, e as assertCodeMapPayloadEnums, sn as assertTimelineNavigationAction, Nt as buildChangesGraph, qt as codeMapPayloadToMapData, ye as codeMapStatesEqual, gn as computeLaneHeaders, p as coverage, L as createCodeMapState, m as debt, g as debtHoverText, o as debtState, j as deriveCodeMapView, l as deriveRankedRows, xe as deriveTimelineHighlight, f as gateRankedRows, J as humanizeAge, v as hunkClears, ft as isChangeBinding, y as isCodeMapViewportScale, pt as isDiffLineKind, mt as isEdgeViolationKind, ht as isFileChangeStatus, gt as isInsightKind, _t as isInsightProvenance, vt as isMapNodeKind, yt as isReadAttributionState, bt as isReadStateGrade, Se as partialReadHoverText, n as rankMapNodes, C as rankMapNodesIntrinsic, r as reduceCodeMapState, be as resolveEscapeAction, c as scentTagsFor, hn as turnsToFlow, _n as useCanvasSync };
1978
+ export { Xe as AllChangeBindings, Ze as AllDiffLineKinds, Qe as AllEdgeViolationKinds, $e as AllFileChangeStatuses, et as AllInsightKinds, tt as AllInsightProvenances, nt as AllMapNodeKinds, rt as AllReadAttributionStates, it as AllReadStateGrades, f as CHANGE_BINDINGS, I as CODE_MAP_STATE_VERSION, O as CODE_MAP_VIEWPORT_SCALE, x as COVERAGE_CAP, at as ChangeBinding, Gt as ChangeDetail, Lt as Changes, Jt as CodeMap, an as CodeMapComposition, $t as CodeMapNavigator, a as DEBT_VIEWED, de as DIFF_LINE_KINDS, i as DOI_WEIGHTS, on as DefaultMapLegend, ot as DiffLineKind, $ as EDGE_DEFAULTS, d as EDGE_VIOLATION_KINDS, st as EdgeViolationKind, E as FILE_CHANGE_STATUSES, ct as FileChangeStatus, se as GRAPH_APP_SECTIONS, ge as GRAPH_LEGEND_ITEMS, he as GhostCommitNode, A as GhostGroup, me as GraphAppShell, On as GraphControls, ae as GraphLegend, M as GraphSectionNav, fe as GraphSubagentBranch, L as GraphToolNode, k as GraphTurnNode, pe as HighlightEdge, lt as InsightKind, mn as InsightPanel, ut as InsightProvenance, P as LOCAL_APP_SECTIONS, T as MAP_NODE_KINDS, dt as MapNodeKind, Q as NODE_DIMENSIONS, g as RANK_CAP, ie as RANK_FLOOR, t as RECENCY_HALF_LIFE_DAYS, pn as RankModeControl, fn as RankedRow, ft as ReadAttributionState, pt as ReadStateGrade, re as SCENT_TAGS, dn as ScentTag, ce as SessionLane, ne as SessionOverflowDisclosure, Dn as SubagentBranchNode, Tn as ToolPillNode, oe as TouchedFileCluster, Mn as TrajectoryGraph, An as TrajectoryGraphLegend, Cn as TurnCardNode, D as assertChangeDetailPayloadEnums, v as assertChangeDiffPayloadEnums, e as assertCodeMapPayloadEnums, un as assertTimelineNavigationAction, Ft as buildChangesGraph, Yt as codeMapPayloadToMapData, ve as codeMapStatesEqual, yn as computeLaneHeaders, m as coverage, R as createCodeMapState, h as debt, _ as debtHoverText, s as debtState, j as deriveCodeMapView, u as deriveRankedRows, Se as deriveTimelineHighlight, p as gateRankedRows, Y as humanizeAge, y as hunkClears, mt as isChangeBinding, b as isCodeMapViewportScale, ht as isDiffLineKind, gt as isEdgeViolationKind, _t as isFileChangeStatus, vt as isInsightKind, yt as isInsightProvenance, bt as isMapNodeKind, xt as isReadAttributionState, St as isReadStateGrade, Ce as partialReadHoverText, n as rankMapNodes, C as rankMapNodesIntrinsic, r as reduceCodeMapState, be as resolveEscapeAction, l as scentTagsFor, vn as turnsToFlow, bn as useCanvasSync };