@meetreeve/ui 0.30.0 → 0.33.0

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.
package/dist/index.mjs CHANGED
@@ -493,9 +493,38 @@ function useResponsivePlaceholder(desktop, mobile) {
493
493
  }
494
494
 
495
495
  // src/how-to-clip.tsx
496
- import { useEffect as useEffect3, useRef as useRef2, useState as useState4 } from "react";
496
+ import { useEffect as useEffect4, useRef as useRef2, useState as useState5 } from "react";
497
497
  import { Pause, Play } from "lucide-react";
498
498
 
499
+ // src/lib/use-in-view.ts
500
+ import { useEffect as useEffect3, useState as useState4 } from "react";
501
+ function useInView(el, { enabled = true, threshold = 0 } = {}) {
502
+ const [seen, setSeen] = useState4(null);
503
+ useEffect3(() => {
504
+ if (!enabled || !el) return;
505
+ if (typeof IntersectionObserver === "undefined") {
506
+ setSeen({ el, threshold });
507
+ return () => setSeen(null);
508
+ }
509
+ let active = true;
510
+ const io = new IntersectionObserver(
511
+ (entries) => {
512
+ if (!active) return;
513
+ const entry = entries[entries.length - 1];
514
+ if (entry) setSeen(entry.isIntersecting && entry.intersectionRatio >= threshold ? { el, threshold } : null);
515
+ },
516
+ { threshold }
517
+ );
518
+ io.observe(el);
519
+ return () => {
520
+ active = false;
521
+ io.disconnect();
522
+ setSeen(null);
523
+ };
524
+ }, [el, enabled, threshold]);
525
+ return enabled && el !== null && seen?.el === el && seen.threshold === threshold;
526
+ }
527
+
499
528
  // src/use-prefers-reduced-motion.ts
500
529
  var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
501
530
  function usePrefersReducedMotion() {
@@ -506,25 +535,49 @@ function prefersReducedMotionNow() {
506
535
  }
507
536
 
508
537
  // src/how-to-clip.tsx
509
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
538
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
510
539
  var SAFE_SLUG = /^[a-z0-9-]{1,64}$/;
511
- function HowToClip({ slug, label, clipBaseUrl, className }) {
540
+ var VISIBLE_THRESHOLD = 0.25;
541
+ function HowToClip({
542
+ slug,
543
+ label,
544
+ clipBaseUrl,
545
+ fit = "contain",
546
+ playWhenVisible = false,
547
+ overlay,
548
+ posterOnly = false,
549
+ className
550
+ }) {
512
551
  const reduceMotion = usePrefersReducedMotion();
513
- const [autoplayRefused, setAutoplayRefused] = useState4(false);
514
- const [paused, setPaused] = useState4(true);
552
+ const [autoplayRefused, setAutoplayRefused] = useState5(false);
553
+ const [paused, setPaused] = useState5(true);
515
554
  const userPausedStem = useRef2(null);
516
555
  const attempt = useRef2(0);
517
556
  const ref = useRef2(null);
557
+ const [frame, setFrame] = useState5(null);
518
558
  const base = clipBaseUrl?.trim();
519
559
  const stem = base && SAFE_SLUG.test(slug) ? `${base.replace(/\/+$/, "")}/${slug}` : null;
520
- useEffect3(() => {
560
+ const gated = playWhenVisible && !posterOnly && !!stem;
561
+ const inView = useInView(frame, { enabled: gated, threshold: VISIBLE_THRESHOLD });
562
+ const [attachedStem, setAttachedStem] = useState5(null);
563
+ if (gated && inView && attachedStem !== stem) setAttachedStem(stem);
564
+ const attached = !gated || attachedStem === stem;
565
+ const live = !gated || inView;
566
+ const videoKey = posterOnly ? null : stem;
567
+ const [pausedFor, setPausedFor] = useState5(videoKey);
568
+ if (pausedFor !== videoKey) {
569
+ setPausedFor(videoKey);
570
+ setPaused(true);
571
+ }
572
+ useEffect4(() => {
521
573
  if (userPausedStem.current !== stem) userPausedStem.current = null;
522
- if (!stem || reduceMotion || prefersReducedMotionNow()) return;
574
+ if (!stem || posterOnly || !live) return;
523
575
  const video = ref.current;
524
576
  if (!video) return;
525
577
  const id = ++attempt.current;
526
578
  const latest = () => attempt.current === id;
527
- if (userPausedStem.current === null) {
579
+ const motionOk = !reduceMotion && !prefersReducedMotionNow();
580
+ if (motionOk && userPausedStem.current === null) {
528
581
  const playing = typeof video.play === "function" ? video.play() : void 0;
529
582
  if (playing) {
530
583
  playing.then(
@@ -542,9 +595,19 @@ function HowToClip({ slug, label, clipBaseUrl, className }) {
542
595
  attempt.current += 1;
543
596
  video.pause();
544
597
  };
545
- }, [reduceMotion, stem]);
598
+ }, [reduceMotion, stem, live, posterOnly]);
546
599
  if (!stem) return null;
547
- const controls = reduceMotion || autoplayRefused;
600
+ const fitClass = fit === "cover" ? "object-cover" : "object-contain";
601
+ const frameClass = "aspect-video w-full rounded-lg border border-border bg-muted";
602
+ const overlayLayer = overlay == null ? null : /* @__PURE__ */ jsx3("div", { "data-how-to-clip-overlay": "", className: "pointer-events-none absolute inset-0 overflow-hidden rounded-lg", children: overlay });
603
+ if (posterOnly) {
604
+ return /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
605
+ /* @__PURE__ */ jsx3("img", { src: `${stem}-poster.jpg`, alt: label, className: cn(frameClass, fitClass, className) }),
606
+ overlayLayer
607
+ ] });
608
+ }
609
+ const controls = autoplayRefused && live;
610
+ const showToggle = !autoplayRefused && live;
548
611
  const toggle = () => {
549
612
  const video = ref.current;
550
613
  if (!video) return;
@@ -554,14 +617,14 @@ function HowToClip({ slug, label, clipBaseUrl, className }) {
554
617
  else if (typeof video.play === "function") void video.play()?.catch(() => {
555
618
  });
556
619
  };
557
- return /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
558
- /* @__PURE__ */ jsxs3(
620
+ return /* @__PURE__ */ jsxs3("div", { ref: setFrame, className: "relative", children: [
621
+ /* @__PURE__ */ jsx3(
559
622
  "video",
560
623
  {
561
624
  ref,
562
625
  "aria-label": label,
563
626
  poster: `${stem}-poster.jpg`,
564
- className: cn("aspect-video w-full rounded-lg border border-border bg-muted object-contain", className),
627
+ className: cn(frameClass, fitClass, className),
565
628
  loop: true,
566
629
  muted: true,
567
630
  playsInline: true,
@@ -569,20 +632,21 @@ function HowToClip({ slug, label, clipBaseUrl, className }) {
569
632
  controls,
570
633
  onPlay: () => setPaused(false),
571
634
  onPause: () => setPaused(true),
572
- children: [
635
+ children: attached && /* @__PURE__ */ jsxs3(Fragment2, { children: [
573
636
  /* @__PURE__ */ jsx3("source", { src: `${stem}.webm`, type: "video/webm" }),
574
637
  /* @__PURE__ */ jsx3("source", { src: `${stem}.mp4`, type: "video/mp4" })
575
- ]
638
+ ] })
576
639
  },
577
640
  stem
578
641
  ),
579
- !controls && /* @__PURE__ */ jsx3(
642
+ overlayLayer,
643
+ showToggle && /* @__PURE__ */ jsx3(
580
644
  "button",
581
645
  {
582
646
  type: "button",
583
647
  onClick: toggle,
584
648
  "aria-label": `${paused ? "Play" : "Pause"} clip: ${label}`,
585
- className: "absolute right-2 bottom-2 inline-flex size-11 items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:hidden",
649
+ className: "absolute right-2 bottom-2 inline-flex size-11 items-center justify-center rounded-full border border-border bg-background text-foreground shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",
586
650
  children: paused ? /* @__PURE__ */ jsx3(Play, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx3(Pause, { "aria-hidden": true, className: "size-4" })
587
651
  }
588
652
  )
@@ -704,7 +768,7 @@ function InfoTip({ children, label = "More information", side = "top", align = "
704
768
  }
705
769
 
706
770
  // src/app-sidebar.tsx
707
- import { useCallback as useCallback3, useEffect as useEffect6, useId as useId3, useMemo, useRef as useRef6, useState as useState8 } from "react";
771
+ import { useCallback as useCallback3, useEffect as useEffect7, useId as useId3, useMemo, useRef as useRef6, useState as useState9 } from "react";
708
772
  import { Menu as Menu2, PanelLeftClose, PanelLeftOpen, X as X2 } from "lucide-react";
709
773
 
710
774
  // src/lib/resolve-icon.ts
@@ -725,7 +789,7 @@ function resolveIcon(name) {
725
789
  }
726
790
 
727
791
  // src/lib/use-dismissable-disclosure.ts
728
- import { useEffect as useEffect4 } from "react";
792
+ import { useEffect as useEffect5 } from "react";
729
793
  function useDismissableDisclosure({
730
794
  open,
731
795
  onClose,
@@ -733,10 +797,10 @@ function useDismissableDisclosure({
733
797
  triggerRef,
734
798
  initialFocusRef
735
799
  }) {
736
- useEffect4(() => {
800
+ useEffect5(() => {
737
801
  if (open) initialFocusRef?.current?.focus();
738
802
  }, [open]);
739
- useEffect4(() => {
803
+ useEffect5(() => {
740
804
  if (!open) return;
741
805
  const onKey = (e) => {
742
806
  if (e.key === "Escape") {
@@ -770,7 +834,11 @@ var zGroupRungItem = z.object({
770
834
  id: z.string().min(1),
771
835
  label: z.string().min(1),
772
836
  icon: z.string().min(1),
773
- children: z.array(z.string().min(1)).min(1)
837
+ children: z.array(z.string().min(1)).min(1),
838
+ // An app path only: agent-authored JSON must not point a sidebar row at
839
+ // another origin. Browsers read a backslash as "/" and drop tabs and
840
+ // newlines, so "/\x" and "/<tab>/x" would both become "//x".
841
+ href: z.string().regex(/^\/(?!\/)[^\s\\\u0000-\u001f\u007f]*$/, 'group href must be an app path: one leading "/", no backslash, whitespace or control characters').optional()
774
842
  });
775
843
  var zRungItem = z.discriminatedUnion("type", [zAppRungItem, zGroupRungItem]);
776
844
  var zSidebarRungShape = z.object({
@@ -939,13 +1007,13 @@ function resolveLadder(raw, registry, groupOrder) {
939
1007
  }
940
1008
 
941
1009
  // src/ladder/use-ladder-rung.ts
942
- import { useLayoutEffect, useRef as useRef3, useState as useState5 } from "react";
1010
+ import { useLayoutEffect, useRef as useRef3, useState as useState6 } from "react";
943
1011
  var DEFAULT_ROW_HEIGHT = 36;
944
1012
  var DEFAULT_HYSTERESIS_ROWS = 1;
945
1013
  function useLadderRung(ladder, containerRef, options = {}) {
946
1014
  const rowHeight = options.rowHeight ?? DEFAULT_ROW_HEIGHT;
947
1015
  const hysteresisRows = options.hysteresisRows ?? DEFAULT_HYSTERESIS_ROWS;
948
- const [rungIndex, setRungIndex] = useState5(0);
1016
+ const [rungIndex, setRungIndex] = useState6(0);
949
1017
  const rungIndexRef = useRef3(0);
950
1018
  const ladderSignature = `${ladder.version}:${ladder.rungs.map((r2) => r2.rows).join(",")}`;
951
1019
  useLayoutEffect(() => {
@@ -984,7 +1052,7 @@ function useLadderRung(ladder, containerRef, options = {}) {
984
1052
  }
985
1053
 
986
1054
  // src/app-sidebar-recent-fit.ts
987
- import { useLayoutEffect as useLayoutEffect2, useRef as useRef4, useState as useState6 } from "react";
1055
+ import { useLayoutEffect as useLayoutEffect2, useRef as useRef4, useState as useState7 } from "react";
988
1056
  function fitRecentRows(m, count, showsMore) {
989
1057
  const budget = m.shared - m.navReserve;
990
1058
  for (let n = count; n > 1; n--) {
@@ -994,7 +1062,7 @@ function fitRecentRows(m, count, showsMore) {
994
1062
  return Math.min(1, count);
995
1063
  }
996
1064
  function useRecentFit(sectionRef, navRef, { active, count, total, moreLink, hasMore, navReserveRows, rowHeight }) {
997
- const [fit, setFit] = useState6(null);
1065
+ const [fit, setFit] = useState7(null);
998
1066
  const moreHeightRef = useRef4(null);
999
1067
  const gapRef = useRef4(null);
1000
1068
  useLayoutEffect2(() => {
@@ -1041,17 +1109,21 @@ function useRecentFit(sectionRef, navRef, { active, count, total, moreLink, hasM
1041
1109
  }
1042
1110
 
1043
1111
  // src/ladder/flyout.tsx
1044
- import { useCallback as useCallback2, useEffect as useEffect5, useId as useId2, useLayoutEffect as useLayoutEffect3, useRef as useRef5, useState as useState7 } from "react";
1045
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1112
+ import { useCallback as useCallback2, useEffect as useEffect6, useId as useId2, useLayoutEffect as useLayoutEffect3, useRef as useRef5, useState as useState8 } from "react";
1113
+ import { ChevronRight } from "lucide-react";
1114
+ import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1046
1115
  var PANEL_GAP = 4;
1047
1116
  var HOVER_CLOSE_DELAY_MS = 300;
1048
1117
  var HOVER_SLOP = 16;
1049
1118
  var HOVER_SWITCH_DELAY_MS = 150;
1119
+ var GROUP_LINK_KEY = "\0group-href";
1050
1120
  function Flyout({
1051
1121
  label,
1052
1122
  icon,
1053
1123
  active,
1054
1124
  children,
1125
+ href,
1126
+ hrefActive = false,
1055
1127
  linkComponent,
1056
1128
  collapsed = false,
1057
1129
  onOpenChange,
@@ -1059,9 +1131,9 @@ function Flyout({
1059
1131
  hoverOpenDelayMs = 0,
1060
1132
  className
1061
1133
  }) {
1062
- const [hoverOpen, setHoverOpen] = useState7(false);
1063
- const [clickOpen, setClickOpen] = useState7(false);
1064
- const [panelPosition, setPanelPosition] = useState7(null);
1134
+ const [hoverOpen, setHoverOpen] = useState8(false);
1135
+ const [clickOpen, setClickOpen] = useState8(false);
1136
+ const [panelPosition, setPanelPosition] = useState8(null);
1065
1137
  const wantsOpen = hoverOpen || clickOpen;
1066
1138
  const open = wantsOpen && !forceClosed;
1067
1139
  const panelId = useId2();
@@ -1100,17 +1172,17 @@ function Flyout({
1100
1172
  setHoverOpen(false);
1101
1173
  }, HOVER_CLOSE_DELAY_MS);
1102
1174
  };
1103
- useEffect5(() => cancelClose, [cancelClose]);
1175
+ useEffect6(() => cancelClose, [cancelClose]);
1104
1176
  const reposition = useCallback2(() => {
1105
1177
  const rect = triggerRef.current?.getBoundingClientRect();
1106
1178
  if (rect) setPanelPosition({ top: rect.top, left: rect.right + PANEL_GAP });
1107
1179
  }, []);
1108
1180
  const onOpenChangeRef = useRef5(onOpenChange);
1109
1181
  onOpenChangeRef.current = onOpenChange;
1110
- useEffect5(() => {
1182
+ useEffect6(() => {
1111
1183
  onOpenChangeRef.current?.(wantsOpen);
1112
1184
  }, [wantsOpen]);
1113
- useEffect5(() => {
1185
+ useEffect6(() => {
1114
1186
  if (forceClosed) {
1115
1187
  cancelClose();
1116
1188
  setHoverOpen(false);
@@ -1120,7 +1192,7 @@ function Flyout({
1120
1192
  useLayoutEffect3(() => {
1121
1193
  if (open) reposition();
1122
1194
  }, [open, reposition]);
1123
- useEffect5(() => {
1195
+ useEffect6(() => {
1124
1196
  if (!open) return;
1125
1197
  window.addEventListener("resize", reposition);
1126
1198
  window.addEventListener("scroll", reposition, true);
@@ -1139,9 +1211,32 @@ function Flyout({
1139
1211
  panelRef,
1140
1212
  triggerRef
1141
1213
  });
1142
- useEffect5(() => {
1214
+ useEffect6(() => {
1143
1215
  if (clickOpen && panelPosition) firstItemRef.current?.focus();
1144
1216
  }, [clickOpen, panelPosition]);
1217
+ const toggleClickOpen = () => {
1218
+ cancelOpen();
1219
+ setClickOpen((v) => !v);
1220
+ };
1221
+ const closeOnNavigate = () => {
1222
+ cancelClose();
1223
+ setHoverOpen(false);
1224
+ setClickOpen(false);
1225
+ };
1226
+ const splitRow = href !== void 0 && !collapsed;
1227
+ const panelRows = href !== void 0 && collapsed ? [{ moduleId: GROUP_LINK_KEY, label, href, active: hrefActive }, ...children] : children;
1228
+ const rowStateClass2 = active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground";
1229
+ const iconAndLabel = /* @__PURE__ */ jsxs6(Fragment3, { children: [
1230
+ /* @__PURE__ */ jsx6(
1231
+ Icon,
1232
+ {
1233
+ className: cn("size-4 shrink-0", active ? "text-sidebar-accent-foreground" : "text-sidebar-foreground/70"),
1234
+ strokeWidth: 1.5,
1235
+ "aria-hidden": "true"
1236
+ }
1237
+ ),
1238
+ /* @__PURE__ */ jsx6("span", { className: cn("truncate", collapsed && "sr-only"), children: label })
1239
+ ] });
1145
1240
  return /* @__PURE__ */ jsxs6(
1146
1241
  "div",
1147
1242
  {
@@ -1150,7 +1245,7 @@ function Flyout({
1150
1245
  onMouseEnter: hoverEnter,
1151
1246
  onMouseLeave: hoverLeave,
1152
1247
  children: [
1153
- /* @__PURE__ */ jsxs6(
1248
+ !splitRow ? /* @__PURE__ */ jsx6(
1154
1249
  "button",
1155
1250
  {
1156
1251
  ref: triggerRef,
@@ -1159,37 +1254,52 @@ function Flyout({
1159
1254
  "aria-expanded": open,
1160
1255
  "aria-controls": panelId,
1161
1256
  title: collapsed ? label : void 0,
1162
- onClick: () => {
1163
- cancelOpen();
1164
- setClickOpen((v) => !v);
1165
- },
1257
+ onClick: toggleClickOpen,
1166
1258
  className: cn(
1167
1259
  "group flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-sm transition-colors",
1168
1260
  collapsed && "justify-center px-0",
1169
- // DEV-6586: this trigger renders as a row inside AppSidebar's own
1170
- // `<nav>` (a `bg-sidebar` surface that stays dark navy in both
1171
- // themes) — same fix as NavLink, same measured ratios (default
1172
- // 8.05:1, hover 13.65:1, active 10.95:1). The flyout PANEL below
1173
- // is intentionally left on document tokens: it renders via
1174
- // `position: fixed`, floating over the main content area on
1175
- // `bg-background`, not over the sidebar.
1176
- active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground"
1261
+ rowStateClass2
1177
1262
  ),
1178
- children: [
1179
- /* @__PURE__ */ jsx6(
1180
- Icon,
1181
- {
1182
- className: cn(
1183
- "size-4 shrink-0",
1184
- active ? "text-sidebar-accent-foreground" : "text-sidebar-foreground/70"
1185
- ),
1186
- strokeWidth: 1.5,
1187
- "aria-hidden": "true"
1188
- }
1189
- ),
1190
- /* @__PURE__ */ jsx6("span", { className: cn("truncate", collapsed && "sr-only"), children: label })
1191
- ]
1263
+ children: iconAndLabel
1192
1264
  }
1265
+ ) : (
1266
+ // DEV-19583: one row, two controls. The link navigates; the chevron
1267
+ // is the disclosure, and stays `triggerRef` so Esc returns focus to
1268
+ // it and the panel anchors to the row's right edge as before.
1269
+ /* @__PURE__ */ jsxs6(
1270
+ "div",
1271
+ {
1272
+ "data-testid": "ladder-flyout-row",
1273
+ className: cn("group flex w-full items-stretch rounded-md text-sm transition-colors", rowStateClass2),
1274
+ children: [
1275
+ /* @__PURE__ */ jsx6(
1276
+ LinkEl,
1277
+ {
1278
+ href,
1279
+ "data-testid": "ladder-flyout-link",
1280
+ "aria-current": hrefActive ? "page" : void 0,
1281
+ onClick: closeOnNavigate,
1282
+ className: "flex min-w-0 flex-1 items-center gap-2.5 rounded-md px-3 py-1.5",
1283
+ children: iconAndLabel
1284
+ }
1285
+ ),
1286
+ /* @__PURE__ */ jsx6(
1287
+ "button",
1288
+ {
1289
+ ref: triggerRef,
1290
+ type: "button",
1291
+ "data-testid": "ladder-flyout-trigger",
1292
+ "aria-expanded": open,
1293
+ "aria-controls": panelId,
1294
+ "aria-label": `${label} pages`,
1295
+ onClick: toggleClickOpen,
1296
+ className: "flex shrink-0 items-center justify-center rounded-md px-2",
1297
+ children: /* @__PURE__ */ jsx6(ChevronRight, { className: "size-3.5", strokeWidth: 1.5, "aria-hidden": "true" })
1298
+ }
1299
+ )
1300
+ ]
1301
+ }
1302
+ )
1193
1303
  ),
1194
1304
  open && panelPosition && // DEV-13848 hit area: a DOM child of the wrapper above, so the pointer
1195
1305
  // moving through it never fires the wrapper's mouseleave. Starts at
@@ -1217,7 +1327,7 @@ function Flyout({
1217
1327
  "flex min-w-[12rem] flex-col gap-0.5 rounded-md border border-border bg-background p-2 shadow-lg",
1218
1328
  !prefersReducedMotion && "transition-all duration-150 ease-out"
1219
1329
  ),
1220
- children: children.map((child, i) => (
1330
+ children: panelRows.map((child, i) => (
1221
1331
  // `ref` on the first row (DEV-4391): the "focus moves into the
1222
1332
  // panel on click open" behavior above needs a real
1223
1333
  // HTMLAnchorElement here. A custom `linkComponent` must forward
@@ -1234,6 +1344,7 @@ function Flyout({
1234
1344
  ref: i === 0 ? firstItemRef : void 0,
1235
1345
  href: child.href,
1236
1346
  "aria-current": child.active ? "page" : void 0,
1347
+ onClick: child.moduleId === GROUP_LINK_KEY ? closeOnNavigate : void 0,
1237
1348
  style: TOUCH_TARGET_STYLE,
1238
1349
  className: cn(
1239
1350
  "flex items-center truncate rounded-md px-3 py-1.5 text-sm transition-colors",
@@ -1254,7 +1365,7 @@ function Flyout({
1254
1365
  }
1255
1366
 
1256
1367
  // src/app-sidebar.tsx
1257
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1368
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1258
1369
  var DEFAULT_COLLAPSE_STORAGE_KEY = "reeve-sidebar-collapsed";
1259
1370
  var COLLAPSED_WIDTH_CLASS = "w-14";
1260
1371
  var EXPANDED_WIDTH_CLASS = "w-64";
@@ -1331,21 +1442,21 @@ function AppSidebar({
1331
1442
  const isActiveFn = isActive ?? isHrefActive;
1332
1443
  const isDesktop = useMediaQuery(`(min-width: ${BREAKPOINTS.md}px)`);
1333
1444
  const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
1334
- const [mobileOpen, setMobileOpen] = useState8(false);
1445
+ const [mobileOpen, setMobileOpen] = useState9(false);
1335
1446
  const containerRef = useRef6(null);
1336
1447
  const drawerId = useId3();
1337
1448
  const recentHeadingId = useId3();
1338
1449
  const mobileTriggerRef = useRef6(null);
1339
1450
  const mobileDrawerRef = useRef6(null);
1340
1451
  const mobileCloseRef = useRef6(null);
1341
- const [collapsed, setCollapsed] = useState8(defaultCollapsed);
1342
- const [collapseHydrated, setCollapseHydrated] = useState8(false);
1452
+ const [collapsed, setCollapsed] = useState9(defaultCollapsed);
1453
+ const [collapseHydrated, setCollapseHydrated] = useState9(false);
1343
1454
  const collapsedRef = useRef6(defaultCollapsed);
1344
1455
  function applyCollapsed(next) {
1345
1456
  collapsedRef.current = next;
1346
1457
  setCollapsed(next);
1347
1458
  }
1348
- useEffect6(() => {
1459
+ useEffect7(() => {
1349
1460
  if (!collapsible) return;
1350
1461
  try {
1351
1462
  const stored = localStorage.getItem(storageKey);
@@ -1355,7 +1466,7 @@ function AppSidebar({
1355
1466
  }
1356
1467
  setCollapseHydrated(true);
1357
1468
  }, []);
1358
- useEffect6(() => {
1469
+ useEffect7(() => {
1359
1470
  if (!collapsible || !collapseHydrated) return;
1360
1471
  try {
1361
1472
  localStorage.setItem(storageKey, String(collapsed));
@@ -1367,7 +1478,7 @@ function AppSidebar({
1367
1478
  applyCollapsed(next);
1368
1479
  onCollapsedChange?.(next);
1369
1480
  }
1370
- const [openFlyoutId, setOpenFlyoutId] = useState8(null);
1481
+ const [openFlyoutId, setOpenFlyoutId] = useState9(null);
1371
1482
  const handleFlyoutOpenChange = useCallback3((id, isOpen) => {
1372
1483
  setOpenFlyoutId((current) => {
1373
1484
  if (isOpen) return id;
@@ -1398,7 +1509,7 @@ function AppSidebar({
1398
1509
  rowHeight: ladderOptions?.rowHeight ?? DEFAULT_ROW_HEIGHT
1399
1510
  });
1400
1511
  const recentFocusIdRef = useRef6(null);
1401
- useEffect6(() => {
1512
+ useEffect7(() => {
1402
1513
  const id = recentFocusIdRef.current;
1403
1514
  if (id === null) return;
1404
1515
  const root = recentRef.current;
@@ -1411,7 +1522,7 @@ function AppSidebar({
1411
1522
  const target = id === RECENT_MORE_TEST_ID ? rows[rows.length - 1] : root.querySelector(`[data-testid="${RECENT_MORE_TEST_ID}"]`);
1412
1523
  target?.focus();
1413
1524
  }, [recentFit, recent]);
1414
- useEffect6(() => {
1525
+ useEffect7(() => {
1415
1526
  if (isDesktop) setMobileOpen(false);
1416
1527
  }, [isDesktop]);
1417
1528
  useDismissableDisclosure({
@@ -1449,12 +1560,17 @@ function AppSidebar({
1449
1560
  active: isActiveFn(href, activePath)
1450
1561
  };
1451
1562
  });
1452
- const active = children.some((c) => c.active);
1563
+ const groupPath = item.href?.split(/[?#]/)[0];
1564
+ const groupHrefActive = groupPath !== void 0 && isActiveFn(groupPath, activePath);
1565
+ const active = groupHrefActive || children.some((c) => c.active);
1566
+ const hrefActive = groupHrefActive && activePath === groupPath;
1453
1567
  return /* @__PURE__ */ jsx7(
1454
1568
  Flyout,
1455
1569
  {
1456
1570
  label: item.label,
1457
1571
  icon: item.icon,
1572
+ href: item.href,
1573
+ hrefActive,
1458
1574
  active,
1459
1575
  linkComponent,
1460
1576
  collapsed: collapsedRow,
@@ -1545,7 +1661,23 @@ function AppSidebar({
1545
1661
  "aria-labelledby": headingId,
1546
1662
  className: "flex shrink-0 flex-col px-3 pt-4",
1547
1663
  children: [
1548
- /* @__PURE__ */ jsx7("p", { id: headingId, className: "shrink-0 px-3 pb-1 text-xs font-medium text-sidebar-foreground/60", children: recent.label ?? "Recent" }),
1664
+ recent.href === void 0 ? /* @__PURE__ */ jsx7("p", { id: headingId, className: "shrink-0 px-3 pb-1 text-xs font-medium text-sidebar-foreground/60", children: recent.label ?? "Recent" }) : (
1665
+ // DEV-19583: same box as the <p> (block, same padding), so the
1666
+ // recent-fit row measurement doesn't move; the drawer, which is
1667
+ // not measured, gives it the touch floor like its rows.
1668
+ /* @__PURE__ */ jsx7(
1669
+ LinkEl,
1670
+ {
1671
+ id: headingId,
1672
+ href: recent.href,
1673
+ "data-testid": `${testId}-heading`,
1674
+ style: rowStyle,
1675
+ onClick: onPicked,
1676
+ className: "block shrink-0 rounded-md px-3 pb-1 text-xs font-medium text-sidebar-foreground/60 transition-colors hover:text-sidebar-foreground",
1677
+ children: recent.label ?? "Recent"
1678
+ }
1679
+ )
1680
+ ),
1549
1681
  /* @__PURE__ */ jsx7(
1550
1682
  "ul",
1551
1683
  {
@@ -1587,7 +1719,7 @@ function AppSidebar({
1587
1719
  }
1588
1720
  );
1589
1721
  }
1590
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1722
+ return /* @__PURE__ */ jsxs7(Fragment4, { children: [
1591
1723
  !isDesktop && /* @__PURE__ */ jsx7(
1592
1724
  "button",
1593
1725
  {
@@ -1734,7 +1866,7 @@ function groupItemsByOrg(rows, get) {
1734
1866
  import * as React from "react";
1735
1867
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1736
1868
  import { Slottable } from "@radix-ui/react-slot";
1737
- import { ChevronRight } from "lucide-react";
1869
+ import { ChevronRight as ChevronRight2 } from "lucide-react";
1738
1870
  import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1739
1871
  function DropdownMenu(props) {
1740
1872
  return /* @__PURE__ */ jsx8(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
@@ -1807,7 +1939,7 @@ var DropdownMenuSubTrigger = React.forwardRef(function DropdownMenuSubTrigger2({
1807
1939
  ...props,
1808
1940
  children: [
1809
1941
  /* @__PURE__ */ jsx8(Slottable, { children }),
1810
- /* @__PURE__ */ jsx8(ChevronRight, { className: "ml-auto size-4 text-muted-foreground", "aria-hidden": "true" })
1942
+ /* @__PURE__ */ jsx8(ChevronRight2, { className: "ml-auto size-4 text-muted-foreground", "aria-hidden": "true" })
1811
1943
  ]
1812
1944
  }
1813
1945
  );
@@ -1841,7 +1973,7 @@ function DropdownMenuLabel({
1841
1973
  }
1842
1974
 
1843
1975
  // src/context-switcher.tsx
1844
- import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1976
+ import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1845
1977
  var BADGE_TONE_CLASSES = {
1846
1978
  danger: "bg-destructive-subtle text-destructive-subtle-foreground",
1847
1979
  warning: "bg-warning-subtle text-warning-subtle-foreground",
@@ -2009,11 +2141,11 @@ function ContextSwitcher({
2009
2141
  children: item.name
2010
2142
  }
2011
2143
  ),
2012
- badge && /* @__PURE__ */ jsxs9(Fragment3, { children: [
2144
+ badge && /* @__PURE__ */ jsxs9(Fragment5, { children: [
2013
2145
  " ",
2014
2146
  /* @__PURE__ */ jsx9(StatusBadge, { badge })
2015
2147
  ] }),
2016
- item.kindLabel && /* @__PURE__ */ jsxs9(Fragment3, { children: [
2148
+ item.kindLabel && /* @__PURE__ */ jsxs9(Fragment5, { children: [
2017
2149
  " ",
2018
2150
  /* @__PURE__ */ jsx9(
2019
2151
  "span",
@@ -2045,8 +2177,8 @@ function ContextSwitcher({
2045
2177
  }
2046
2178
 
2047
2179
  // src/connector-picker.tsx
2048
- import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef7, useState as useState9 } from "react";
2049
- import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
2180
+ import { useCallback as useCallback4, useEffect as useEffect8, useRef as useRef7, useState as useState10 } from "react";
2181
+ import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
2050
2182
  function accessLabel(access) {
2051
2183
  return access === "read" ? "Read" : "Read + write";
2052
2184
  }
@@ -2109,9 +2241,9 @@ function ConnectorPicker({
2109
2241
  clipBaseUrl
2110
2242
  }) {
2111
2243
  const gated = lens !== "owner";
2112
- const [entries, setEntries] = useState9(null);
2113
- const [loadError, setLoadError] = useState9(null);
2114
- const [uiState, setUiState] = useState9({});
2244
+ const [entries, setEntries] = useState10(null);
2245
+ const [loadError, setLoadError] = useState10(null);
2246
+ const [uiState, setUiState] = useState10({});
2115
2247
  const reconnectingRef = useRef7(/* @__PURE__ */ new Set());
2116
2248
  const reconnectChecksRef = useRef7(/* @__PURE__ */ new Map());
2117
2249
  const refreshInFlightRef = useRef7(false);
@@ -2138,7 +2270,7 @@ function ConnectorPicker({
2138
2270
  return null;
2139
2271
  }
2140
2272
  }, [gated]);
2141
- useEffect7(() => {
2273
+ useEffect8(() => {
2142
2274
  if (gated) return;
2143
2275
  void load();
2144
2276
  }, [gated, load, purpose]);
@@ -2183,7 +2315,7 @@ function ConnectorPicker({
2183
2315
  refreshInFlightRef.current = false;
2184
2316
  }
2185
2317
  }, [load]);
2186
- useEffect7(() => {
2318
+ useEffect8(() => {
2187
2319
  if (gated) return;
2188
2320
  function handleReturn() {
2189
2321
  if (document.visibilityState === "hidden") return;
@@ -2405,12 +2537,12 @@ function ConnectorTile({
2405
2537
  const isDisconnecting = ui?.kind === "disconnecting";
2406
2538
  const errorMessage = ui?.kind === "error" ? ui.message : null;
2407
2539
  const unhealthy = isUnhealthy(entry);
2408
- const [kind, setKind] = useState9("personal");
2540
+ const [kind, setKind] = useState10("personal");
2409
2541
  const choices = accessChoices(entry);
2410
- const [access, setAccess] = useState9(null);
2542
+ const [access, setAccess] = useState10(null);
2411
2543
  const connectAccess = choices.length ? access && choices.includes(access) ? access : choices[choices.length - 1] : void 0;
2412
- const [sharingOpen, setSharingOpen] = useState9(false);
2413
- const [setupOpen, setSetupOpen] = useState9(false);
2544
+ const [sharingOpen, setSharingOpen] = useState10(false);
2545
+ const [setupOpen, setSetupOpen] = useState10(false);
2414
2546
  const credentialFields = entry.credential_fields ?? [];
2415
2547
  const pasteSupported = credentialsSupported && credentialFields.length > 0;
2416
2548
  const guide = entry.guide ?? null;
@@ -2444,7 +2576,7 @@ function ConnectorTile({
2444
2576
  ] }),
2445
2577
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
2446
2578
  (isConnected || choices.length === 0) && /* @__PURE__ */ jsx10("span", { "data-testid": `connector-capability-${entry.slug}`, children: accessLabel(tileAccess(entry)) }),
2447
- isConnected && /* @__PURE__ */ jsxs10(Fragment4, { children: [
2579
+ isConnected && /* @__PURE__ */ jsxs10(Fragment6, { children: [
2448
2580
  /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: "\xB7" }),
2449
2581
  /* @__PURE__ */ jsxs10(
2450
2582
  "span",
@@ -2693,9 +2825,9 @@ function groundGuide(guide) {
2693
2825
  return { prerequisites, steps, scopeNote, verify, ungrounded };
2694
2826
  }
2695
2827
  function CopyableValue({ value, testId }) {
2696
- const [copied, setCopied] = useState9(false);
2828
+ const [copied, setCopied] = useState10(false);
2697
2829
  const timer = useRef7(null);
2698
- useEffect7(
2830
+ useEffect8(
2699
2831
  () => () => {
2700
2832
  if (timer.current) clearTimeout(timer.current);
2701
2833
  },
@@ -2743,7 +2875,7 @@ function SetupGuidePanel({
2743
2875
  }) {
2744
2876
  const { prerequisites, steps, scopeNote, verify, ungrounded } = groundGuide(guide);
2745
2877
  const leaked = ungrounded.length > 0;
2746
- useEffect7(() => {
2878
+ useEffect8(() => {
2747
2879
  if (!leaked) return;
2748
2880
  console.error(
2749
2881
  `[ConnectorPicker] setup guide for "${entry.slug}" arrived with ungrounded placeholders:`,
@@ -2827,17 +2959,17 @@ function CredentialForm({
2827
2959
  onSubmitCredentials,
2828
2960
  onTestCredentials
2829
2961
  }) {
2830
- const [values, setValues] = useState9(() => {
2962
+ const [values, setValues] = useState10(() => {
2831
2963
  const initial = {};
2832
2964
  for (const field of fields) {
2833
2965
  if (field.defaultValue) initial[field.key] = field.defaultValue;
2834
2966
  }
2835
2967
  return initial;
2836
2968
  });
2837
- const [busy, setBusy] = useState9(false);
2838
- const [testing, setTesting] = useState9(false);
2839
- const [error, setError] = useState9(null);
2840
- const [result, setResult] = useState9(null);
2969
+ const [busy, setBusy] = useState10(false);
2970
+ const [testing, setTesting] = useState10(false);
2971
+ const [error, setError] = useState10(null);
2972
+ const [result, setResult] = useState10(null);
2841
2973
  const entryRef = useRef7(entry);
2842
2974
  entryRef.current = entry;
2843
2975
  const updateField = useCallback4((key, value) => {
@@ -3020,11 +3152,11 @@ function ManageSharing({
3020
3152
  addGrant,
3021
3153
  revokeGrant
3022
3154
  }) {
3023
- const [grants, setGrants] = useState9(null);
3024
- const [error, setError] = useState9(null);
3025
- const [busy, setBusy] = useState9(false);
3026
- const [granteeType, setGranteeType] = useState9("user");
3027
- const [granteeId, setGranteeId] = useState9("");
3155
+ const [grants, setGrants] = useState10(null);
3156
+ const [error, setError] = useState10(null);
3157
+ const [busy, setBusy] = useState10(false);
3158
+ const [granteeType, setGranteeType] = useState10("user");
3159
+ const [granteeId, setGranteeId] = useState10("");
3028
3160
  const roleOptions = entry.org_connect?.role_options ?? [];
3029
3161
  const entryRef = useRef7(entry);
3030
3162
  entryRef.current = entry;
@@ -3036,7 +3168,7 @@ function ManageSharing({
3036
3168
  setError(errorMessageFrom(err, DEFAULT_GRANTS_LOAD_ERROR));
3037
3169
  }
3038
3170
  }, [listGrants]);
3039
- useEffect7(() => {
3171
+ useEffect8(() => {
3040
3172
  void load();
3041
3173
  }, [load]);
3042
3174
  const handleAdd = useCallback4(async () => {
@@ -3317,15 +3449,15 @@ function UnlockCta({
3317
3449
  // src/chat-canvas-shell/chat-canvas-shell.tsx
3318
3450
  import {
3319
3451
  useCallback as useCallback5,
3320
- useEffect as useEffect10,
3452
+ useEffect as useEffect11,
3321
3453
  useMemo as useMemo2,
3322
3454
  useRef as useRef9,
3323
- useState as useState12
3455
+ useState as useState13
3324
3456
  } from "react";
3325
3457
 
3326
3458
  // src/lib/use-isomorphic-layout-effect.ts
3327
- import { useEffect as useEffect8, useLayoutEffect as useLayoutEffect4 } from "react";
3328
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect8 : useLayoutEffect4;
3459
+ import { useEffect as useEffect9, useLayoutEffect as useLayoutEffect4 } from "react";
3460
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect9 : useLayoutEffect4;
3329
3461
 
3330
3462
  // src/page-surface.tsx
3331
3463
  import { jsx as jsx14 } from "react/jsx-runtime";
@@ -3411,7 +3543,7 @@ import {
3411
3543
  createContext as createContext2,
3412
3544
  useContext as useContext2,
3413
3545
  useId as useId4,
3414
- useState as useState10,
3546
+ useState as useState11,
3415
3547
  useSyncExternalStore as useSyncExternalStore2
3416
3548
  } from "react";
3417
3549
  var SLOT_KEYS = ["title", "info", "tabs", "actions", "dateControls"];
@@ -3466,7 +3598,7 @@ var noopSubscribe = () => () => {
3466
3598
  function useCanvasPage(slot) {
3467
3599
  const store = useContext2(CanvasPageStoreContext);
3468
3600
  const id = useId4();
3469
- const [seq] = useState10(() => store?.nextSeq() ?? 0);
3601
+ const [seq] = useState11(() => store?.nextSeq() ?? 0);
3470
3602
  useIsomorphicLayoutEffect(() => {
3471
3603
  store?.set(id, seq, slot);
3472
3604
  });
@@ -3490,7 +3622,7 @@ function useCanvasPageSnapshot() {
3490
3622
  }
3491
3623
 
3492
3624
  // src/chat-canvas-shell/canvas-header.tsx
3493
- import { Fragment as Fragment5, useEffect as useEffect9, useId as useId5, useRef as useRef8, useState as useState11 } from "react";
3625
+ import { Fragment as Fragment7, useEffect as useEffect10, useId as useId5, useRef as useRef8, useState as useState12 } from "react";
3494
3626
  import { MessageSquare } from "lucide-react";
3495
3627
  import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
3496
3628
  var MODE_LABELS = {
@@ -3514,7 +3646,7 @@ function useLayoutShortcuts(layout, enabled) {
3514
3646
  useIsomorphicLayoutEffect(() => {
3515
3647
  latest.current = layout;
3516
3648
  });
3517
- useEffect9(() => {
3649
+ useEffect10(() => {
3518
3650
  if (!enabled) return;
3519
3651
  const onKeyDown = (e) => {
3520
3652
  if (e.defaultPrevented || e.isComposing) return;
@@ -3529,8 +3661,8 @@ function useLayoutShortcuts(layout, enabled) {
3529
3661
  }, [enabled]);
3530
3662
  }
3531
3663
  function useIsMac() {
3532
- const [mac, setMac] = useState11(false);
3533
- useEffect9(() => {
3664
+ const [mac, setMac] = useState12(false);
3665
+ useEffect10(() => {
3534
3666
  setMac(/Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent));
3535
3667
  }, []);
3536
3668
  return mac;
@@ -3641,8 +3773,8 @@ function CanvasHeader({ className }) {
3641
3773
  "data-canvas-header-controls": "",
3642
3774
  className: "order-3 flex w-full flex-wrap items-center gap-2 pb-2 @5xl:ml-auto @5xl:w-auto @5xl:min-w-0 @5xl:justify-end @5xl:py-1.5",
3643
3775
  children: [
3644
- /* @__PURE__ */ jsx15(Fragment5, { children: dates }, `dates:${datesKey}`),
3645
- /* @__PURE__ */ jsx15(Fragment5, { children: actions }, `actions:${owners.actions ?? ""}`)
3776
+ /* @__PURE__ */ jsx15(Fragment7, { children: dates }, `dates:${datesKey}`),
3777
+ /* @__PURE__ */ jsx15(Fragment7, { children: actions }, `actions:${owners.actions ?? ""}`)
3646
3778
  ]
3647
3779
  }
3648
3780
  ) : null,
@@ -3741,21 +3873,21 @@ function ChatCanvasShell({
3741
3873
  const pctKey = `${storageKey}:split-pct:v2`;
3742
3874
  const lastPageKey = `${storageKey}:last-page`;
3743
3875
  const hasChat = chat !== void 0 && chat !== null && chat !== false;
3744
- const [requestedMode, setRequestedMode] = useState12(
3876
+ const [requestedMode, setRequestedMode] = useState13(
3745
3877
  () => initialMode(pathname, homePath)
3746
3878
  );
3747
- const [splitPct, setSplitPctState] = useState12(DEFAULT_SPLIT_PCT);
3748
- const [livePct, setLivePct] = useState12(null);
3749
- const [panesWidth, setPanesWidth] = useState12(0);
3879
+ const [splitPct, setSplitPctState] = useState13(DEFAULT_SPLIT_PCT);
3880
+ const [livePct, setLivePct] = useState13(null);
3881
+ const [panesWidth, setPanesWidth] = useState13(0);
3750
3882
  const reduceMotion = usePrefersReducedMotion();
3751
3883
  const panesRef = useRef9(null);
3752
3884
  const chatPaneRef = useRef9(null);
3753
3885
  const canvasPaneRef = useRef9(null);
3754
3886
  const drag = useRef9(null);
3755
3887
  const lastPage = useRef9(null);
3756
- const [pageStore] = useState12(createCanvasPageStore);
3757
- const [seenPathname, setSeenPathname] = useState12(pathname);
3758
- const [seenStorageKey, setSeenStorageKey] = useState12(storageKey);
3888
+ const [pageStore] = useState13(createCanvasPageStore);
3889
+ const [seenPathname, setSeenPathname] = useState13(pathname);
3890
+ const [seenStorageKey, setSeenStorageKey] = useState13(storageKey);
3759
3891
  useIsomorphicLayoutEffect(() => {
3760
3892
  setSplitPctState(parseStoredSplitPct(readStorage(pctKey)));
3761
3893
  const stored = readStorage(lastPageKey);
@@ -3763,7 +3895,7 @@ function ChatCanvasShell({
3763
3895
  drag.current = null;
3764
3896
  }, [pctKey, lastPageKey]);
3765
3897
  const savedPathname = useRef9(null);
3766
- useEffect10(() => {
3898
+ useEffect11(() => {
3767
3899
  if (savedPathname.current === pathname) return;
3768
3900
  savedPathname.current = pathname;
3769
3901
  if (!pathname || pathname === homePath) return;
@@ -3792,7 +3924,7 @@ function ChatCanvasShell({
3792
3924
  const canSplit = !(panesWidth > 0) || panesWidth >= SPLIT_MIN_PANES_PX;
3793
3925
  const mode = !hasChat ? "dashboard" : requestedMode === "split" && !canSplit ? "chat" : requestedMode;
3794
3926
  if (mode !== "split" && livePct !== null) setLivePct(null);
3795
- useEffect10(() => {
3927
+ useEffect11(() => {
3796
3928
  if (mode !== "split") drag.current = null;
3797
3929
  }, [mode]);
3798
3930
  const setSplitPct = useCallback5(
@@ -7474,7 +7606,7 @@ function ConfirmDialog({
7474
7606
  }
7475
7607
 
7476
7608
  // src/controls/action-menu.tsx
7477
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
7609
+ import { Fragment as Fragment8, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
7478
7610
  function useActionRunner() {
7479
7611
  const [asking, setAsking] = React4.useState(null);
7480
7612
  const [open, setOpen] = React4.useState(false);
@@ -7554,7 +7686,7 @@ function ActionMenuItems({ actions, onRun }) {
7554
7686
  },
7555
7687
  a.id
7556
7688
  );
7557
- return /* @__PURE__ */ jsxs17(Fragment6, { children: [
7689
+ return /* @__PURE__ */ jsxs17(Fragment8, { children: [
7558
7690
  safe.map(row),
7559
7691
  safe.length > 0 && danger.length > 0 ? /* @__PURE__ */ jsx19(DropdownMenuSeparator, {}) : null,
7560
7692
  danger.map(row)