@opengeni/react 2.3.0-canary.0 → 2.5.0-canary.1

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 (46) hide show
  1. package/README.md +9 -2
  2. package/dist/{chunk-LS4POUTY.js → chunk-6H6S5V4Z.js} +250 -120
  3. package/dist/chunk-6H6S5V4Z.js.map +1 -0
  4. package/dist/{chunk-SE4W4WQ3.js → chunk-ATQJEWCA.js} +154 -114
  5. package/dist/chunk-ATQJEWCA.js.map +1 -0
  6. package/dist/{chunk-LTCHJ4MS.js → chunk-KSDXER4X.js} +21 -7
  7. package/dist/chunk-KSDXER4X.js.map +1 -0
  8. package/dist/{chunk-RSXJN73N.js → chunk-MXJGO7LE.js} +34 -1
  9. package/dist/chunk-MXJGO7LE.js.map +1 -0
  10. package/dist/{chunk-JOAVA2TW.js → chunk-T7VAYG2I.js} +8 -7
  11. package/dist/{chunk-JOAVA2TW.js.map → chunk-T7VAYG2I.js.map} +1 -1
  12. package/dist/components/composer.d.ts +1 -1
  13. package/dist/components/fleet-tile.d.ts +1 -1
  14. package/dist/components/message-timeline.d.ts +7 -2
  15. package/dist/composer.js +2 -2
  16. package/dist/hooks/use-session-events.d.ts +2 -1
  17. package/dist/hooks/use-session-lineage.d.ts +4 -0
  18. package/dist/hooks/use-session.d.ts +6 -0
  19. package/dist/hooks/use-workspace-sessions.d.ts +6 -0
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.js +41 -19
  22. package/dist/index.js.map +1 -1
  23. package/dist/older-history.d.ts +29 -0
  24. package/dist/session-ui.d.ts +2 -0
  25. package/dist/session-ui.js +5 -2
  26. package/dist/session.d.ts +2 -0
  27. package/dist/session.js +5 -3
  28. package/package.json +2 -2
  29. package/src/components/composer.tsx +19 -5
  30. package/src/components/fleet-tile.tsx +7 -5
  31. package/src/components/message-timeline.tsx +399 -160
  32. package/src/components/tip-follow.ts +18 -7
  33. package/src/hooks/use-composer.ts +20 -6
  34. package/src/hooks/use-session-events.ts +84 -76
  35. package/src/hooks/use-session-lineage.ts +26 -8
  36. package/src/hooks/use-session.ts +35 -8
  37. package/src/hooks/use-workspace-sessions.ts +38 -13
  38. package/src/index.ts +2 -0
  39. package/src/older-history.ts +69 -0
  40. package/src/session-ui.ts +2 -0
  41. package/src/session.ts +2 -0
  42. package/src/timeline/activity-rail.tsx +1 -0
  43. package/dist/chunk-LS4POUTY.js.map +0 -1
  44. package/dist/chunk-LTCHJ4MS.js.map +0 -1
  45. package/dist/chunk-RSXJN73N.js.map +0 -1
  46. package/dist/chunk-SE4W4WQ3.js.map +0 -1
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  buildTimeline,
3
3
  groupTimeline,
4
+ invokeOlderHistoryLoaderWithReceiptCapture,
4
5
  mcpToolLeaf,
5
6
  toolDisplayName
6
- } from "./chunk-RSXJN73N.js";
7
+ } from "./chunk-MXJGO7LE.js";
7
8
  import {
8
9
  EmptyQueueStateSurface,
9
10
  TimelineAnnotationsChip,
@@ -5583,6 +5584,7 @@ function ActivityRail({
5583
5584
  "div",
5584
5585
  {
5585
5586
  "data-og-timeline-row-anchor": "",
5587
+ "data-og-item": item.id,
5586
5588
  "data-og-annotation-source-key": item.kind === "tool-call" ? item.annotationSource?.eventId : void 0,
5587
5589
  className: cn(newFamily && "mt-3", enteringIds.has(item.id) && "animate-og-row-enter"),
5588
5590
  children: row
@@ -6761,7 +6763,6 @@ function StatusDot({ status, className }) {
6761
6763
  import {
6762
6764
  ArrowDownIcon as ArrowDownIcon2,
6763
6765
  ArrowRightIcon as ArrowRightIcon2,
6764
- ArrowUpToLineIcon,
6765
6766
  BotIcon as BotIcon3,
6766
6767
  CheckCircle2Icon,
6767
6768
  CheckIcon as CheckIcon3,
@@ -6981,6 +6982,9 @@ function tipFollowStep(state, input) {
6981
6982
  );
6982
6983
  }
6983
6984
  const target = targetScrollTop(scrollHeight, clientHeight);
6985
+ if (pinned && frameGrowth > 0) {
6986
+ cameraTop = Math.min(target, cameraTop + frameGrowth);
6987
+ }
6984
6988
  const debt = target - cameraTop;
6985
6989
  const hot = now < noted.hotUntil;
6986
6990
  const settling = !hot && Math.abs(debt) < TIP_FOLLOW_CATCHUP_DEBT_PX;
@@ -7142,8 +7146,38 @@ var TimelineAnnotationSelection = lazy4(() => import("./timeline-annotation-sele
7142
7146
  var PIN_THRESHOLD_PX = 48;
7143
7147
  var OLDER_PREFETCH_MARGIN_PX = 400;
7144
7148
  var OLDER_PREFETCH_ROOT_MARGIN = `${OLDER_PREFETCH_MARGIN_PX}px 0px 0px 0px`;
7149
+ var PRIMARY_ACTION_CLASS = "inline-flex w-full shrink-0 items-center justify-center gap-1.5 rounded-og-md bg-og-accent px-3 py-1.5 text-og-menu font-medium text-og-accent-fg sm:w-auto";
7150
+ var MESSAGE_BUBBLE_CLASS = "w-fit max-w-full min-w-0 rounded-og-lg rounded-br-og-xs border border-og-border bg-og-surface-2 px-4 py-2.5 text-og-md leading-6 text-og-fg";
7151
+ var WAITING_PILL_CLASS = "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting";
7152
+ var LOADING_CHIP_CLASS = "pointer-events-none inline-flex items-center rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1 text-og-control font-medium shadow-og-md backdrop-blur";
7153
+ function invokeOlderLoad(load, noProgress, attempt) {
7154
+ try {
7155
+ const result = invokeOlderHistoryLoaderWithReceiptCapture(load, (receipt2) => {
7156
+ attempt[2] = receipt2;
7157
+ });
7158
+ const receipt = attempt[2] ?? (typeof result?.committed === "boolean" ? result : void 0);
7159
+ if (receipt) {
7160
+ attempt[2] = receipt;
7161
+ void receipt.then(
7162
+ (value) => value === false && !receipt.committed && noProgress(),
7163
+ noProgress
7164
+ );
7165
+ return 1;
7166
+ }
7167
+ if (typeof result?.then != "function") {
7168
+ return;
7169
+ }
7170
+ void result.then(
7171
+ (value) => value === false && noProgress(),
7172
+ noProgress
7173
+ );
7174
+ } catch {
7175
+ noProgress();
7176
+ }
7177
+ return 1;
7178
+ }
7145
7179
  function maxScrollOf(node) {
7146
- return Math.max(0, node.scrollHeight - node.clientHeight);
7180
+ return node.scrollHeight - node.clientHeight;
7147
7181
  }
7148
7182
  function wheelConsumedByNestedScrollable(event) {
7149
7183
  if (event.deltaY >= 0) {
@@ -7209,12 +7243,16 @@ function MessageTimeline({
7209
7243
  className
7210
7244
  }) {
7211
7245
  const resolvedItems = useMemo6(() => {
7212
- const projected = items ?? buildTimeline(events ?? []);
7246
+ const projectedItems = items ?? buildTimeline(events ?? []);
7213
7247
  if (!shouldRenderAuthNeeded) {
7214
- return projected;
7248
+ return projectedItems;
7215
7249
  }
7216
- return projected.filter((item) => item.kind !== "auth-needed" || shouldRenderAuthNeeded(item));
7250
+ return projectedItems.filter(
7251
+ (item) => item.kind !== "auth-needed" || shouldRenderAuthNeeded(item)
7252
+ );
7217
7253
  }, [items, events, shouldRenderAuthNeeded]);
7254
+ const sourceItems = items || events;
7255
+ const olderBoundaryKey = sourceItems?.[0]?.id;
7218
7256
  const allGroups = useMemo6(() => groupTimeline(resolvedItems), [resolvedItems]);
7219
7257
  const annotationSources = useMemo6(() => {
7220
7258
  const sources = /* @__PURE__ */ new Map();
@@ -7234,8 +7272,11 @@ function MessageTimeline({
7234
7272
  const [bulkActive, setBulkActive] = useState14(true);
7235
7273
  const olderPrefetchArmedRef = useRef11(false);
7236
7274
  const [olderPrefetchArmed, setOlderPrefetchArmed] = useState14(false);
7237
- const olderLoadGateRef = useRef11("armed");
7238
- const underfillLoadWindowRef = useRef11(null);
7275
+ const olderLoadAttemptRef = useRef11(null);
7276
+ const [underfillSettledAttempt, setUnderfillSettledAttempt] = useState14(
7277
+ null
7278
+ );
7279
+ const underfillRetryReadyRef = useRef11(false);
7239
7280
  const resizeFollowRafRef = useRef11(null);
7240
7281
  const firstGroupKey = allGroups[0] ? timelineGroupKey(allGroups[0]) : null;
7241
7282
  const [revealed, setRevealed] = useState14(resolvedItems[0]?.id === "c");
@@ -7259,11 +7300,11 @@ function MessageTimeline({
7259
7300
  const foldMemoryRef = useRef11(/* @__PURE__ */ new Map());
7260
7301
  const userMessageDisclosureMemoryRef = useRef11(/* @__PURE__ */ new Map());
7261
7302
  const seenActivityIdsRef = useRef11(/* @__PURE__ */ new Set());
7262
- const groupKeyByItemIdRef = useRef11(/* @__PURE__ */ new Map());
7303
+ const firstItemGroupKeyRef = useRef11(null);
7263
7304
  const groupOffsetByKeyRef = useRef11(/* @__PURE__ */ new Map());
7305
+ const firstItemContentTopRef = useRef11(null);
7264
7306
  const firstItemId = resolvedItems[0]?.id ?? null;
7265
- const lastItemId = resolvedItems.at(-1)?.id ?? null;
7266
- const loadedWindowKey = JSON.stringify([firstItemId, lastItemId, resolvedItems.length]);
7307
+ const underfillRetryReady = underfillRetryReadyRef.current = !!(underfillSettledAttempt && underfillSettledAttempt === olderLoadAttemptRef.current && hasOlder && onLoadOlder && !loadingOlder);
7267
7308
  const firstKeyChangedForBulk = previousBulkFirstKeyRef.current !== void 0 && previousBulkFirstKeyRef.current !== firstGroupKey;
7268
7309
  const bulkRender = allGroups.length > 0 && (bulkActive || firstKeyChangedForBulk);
7269
7310
  const applyPinned = useCallback3((value) => {
@@ -7272,6 +7313,14 @@ function MessageTimeline({
7272
7313
  setPinned(value);
7273
7314
  }
7274
7315
  }, []);
7316
+ const rearmOlderPrefetchAfterLeavingTop = useCallback3((node) => {
7317
+ if (node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7318
+ const state = olderLoadAttemptRef.current?.[1];
7319
+ if (state === 2 || state === 3) {
7320
+ olderLoadAttemptRef.current = null;
7321
+ }
7322
+ }
7323
+ }, []);
7275
7324
  const revealedRef = useRef11(revealed);
7276
7325
  revealedRef.current = revealed;
7277
7326
  const followRef = useRef11(createTipFollowState());
@@ -7295,7 +7344,7 @@ function MessageTimeline({
7295
7344
  }
7296
7345
  }, []);
7297
7346
  const cancelLeaveFallback = useCallback3(() => {
7298
- if (leaveFallbackRafRef.current !== null) {
7347
+ if (leaveFallbackRafRef.current != null) {
7299
7348
  cancelFrame(leaveFallbackRafRef.current);
7300
7349
  leaveFallbackRafRef.current = null;
7301
7350
  }
@@ -7306,7 +7355,7 @@ function MessageTimeline({
7306
7355
  }, [cancelLeaveFallback]);
7307
7356
  const stopFollow = useCallback3(() => {
7308
7357
  followRef.current = tipFollowCancel(followRef.current);
7309
- if (followFrameRef.current !== null) {
7358
+ if (followFrameRef.current != null) {
7310
7359
  cancelFrame(followFrameRef.current);
7311
7360
  followFrameRef.current = null;
7312
7361
  }
@@ -7341,7 +7390,7 @@ function MessageTimeline({
7341
7390
  if (programmaticScrollRef.current > 0) {
7342
7391
  return;
7343
7392
  }
7344
- if (followRef.current.running || followFrameRef.current !== null) {
7393
+ if (followRef.current.running || followFrameRef.current != null) {
7345
7394
  return;
7346
7395
  }
7347
7396
  if (isNearBottom(node) || maxScrollOf(node) <= 1) {
@@ -7349,11 +7398,9 @@ function MessageTimeline({
7349
7398
  return;
7350
7399
  }
7351
7400
  releasePinFromReader(node);
7352
- if (olderLoadGateRef.current === "cooling" && node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7353
- olderLoadGateRef.current = "armed";
7354
- }
7401
+ rearmOlderPrefetchAfterLeavingTop(node);
7355
7402
  },
7356
- [autoFollow, clearPendingReaderLeave, releasePinFromReader]
7403
+ [autoFollow, clearPendingReaderLeave, rearmOlderPrefetchAfterLeavingTop, releasePinFromReader]
7357
7404
  );
7358
7405
  const scheduleLeaveFallback = useCallback3(() => {
7359
7406
  if (supportsScrollEndEvent()) {
@@ -7383,7 +7430,7 @@ function MessageTimeline({
7383
7430
  releasePinFromReader(node);
7384
7431
  };
7385
7432
  const onPointerDown = (event) => {
7386
- if (event.button !== 0 && event.pointerType === "mouse") {
7433
+ if (event.button && event.pointerType === "mouse") {
7387
7434
  return;
7388
7435
  }
7389
7436
  if (event.target instanceof Element && event.target.closest("button, a, input, textarea, select, [role='button']")) {
@@ -7463,22 +7510,37 @@ function MessageTimeline({
7463
7510
  [beginUserMessageDisclosureChange]
7464
7511
  );
7465
7512
  const requestOlderIfUnderfilled = useCallback3(
7466
- (node) => {
7467
- if (underfillLoadWindowRef.current !== null && underfillLoadWindowRef.current !== loadedWindowKey) {
7468
- olderLoadGateRef.current = "armed";
7513
+ (node, retry) => {
7514
+ let currentAttempt = olderLoadAttemptRef.current;
7515
+ if (retry && (currentAttempt !== retry || retry[0] !== olderBoundaryKey)) {
7516
+ return;
7469
7517
  }
7470
- if (node.clientHeight <= 1 || maxScrollOf(node) > 1 || !hasOlder || loadingOlder || !onLoadOlder || underfillLoadWindowRef.current === loadedWindowKey) {
7518
+ const underfilled = maxScrollOf(node) <= 1;
7519
+ if (!retry && underfilled && currentAttempt?.[1] === 3) {
7520
+ currentAttempt[1] = 0;
7521
+ setUnderfillSettledAttempt(currentAttempt);
7471
7522
  return;
7472
7523
  }
7473
- underfillLoadWindowRef.current = loadedWindowKey;
7474
- if (olderPrefetchArmedRef.current) {
7475
- olderLoadGateRef.current = "cooling";
7524
+ if (!retry && underfilled && currentAttempt?.[1] === 2) {
7525
+ currentAttempt = olderLoadAttemptRef.current = null;
7476
7526
  }
7477
- onLoadOlder();
7527
+ if (node.clientHeight <= 1 || !retry && !underfilled || !hasOlder || loadingOlder || !onLoadOlder || currentAttempt && !retry) {
7528
+ return;
7529
+ }
7530
+ const attempt = olderLoadAttemptRef.current = [olderBoundaryKey];
7531
+ setUnderfillSettledAttempt(null);
7532
+ const noProgress = () => {
7533
+ if (scrollRef.current && olderLoadAttemptRef.current === attempt) {
7534
+ setUnderfillSettledAttempt(attempt);
7535
+ }
7536
+ };
7537
+ invokeOlderLoad(onLoadOlder, noProgress, attempt);
7478
7538
  },
7479
- [hasOlder, loadedWindowKey, loadingOlder, onLoadOlder]
7539
+ [hasOlder, loadingOlder, olderBoundaryKey, onLoadOlder]
7540
+ );
7541
+ const driveFollowRef = useRef11(
7542
+ requestOlderIfUnderfilled
7480
7543
  );
7481
- const driveFollowRef = useRef11(() => void 0);
7482
7544
  const driveFollow = useCallback3(
7483
7545
  (node, nowMs) => {
7484
7546
  if (!pinnedRef.current || hasNewerRef.current) {
@@ -7519,7 +7581,7 @@ function MessageTimeline({
7519
7581
  // A direct glue write re-based the camera — drop any stale fraction.
7520
7582
  cameraTop: null
7521
7583
  };
7522
- if (followFrameRef.current === null) {
7584
+ if (followFrameRef.current == null) {
7523
7585
  followFrameRef.current = requestFrame((frameNow) => {
7524
7586
  followFrameRef.current = null;
7525
7587
  const current = scrollRef.current;
@@ -7550,7 +7612,7 @@ function MessageTimeline({
7550
7612
  syncScrollBaseline(node);
7551
7613
  if (result.state.running) {
7552
7614
  cancelLeaveFallback();
7553
- if (followFrameRef.current === null) {
7615
+ if (followFrameRef.current == null) {
7554
7616
  followFrameRef.current = requestFrame((frameNow) => {
7555
7617
  followFrameRef.current = null;
7556
7618
  const current = scrollRef.current;
@@ -7559,7 +7621,7 @@ function MessageTimeline({
7559
7621
  }
7560
7622
  });
7561
7623
  }
7562
- } else if (followFrameRef.current !== null) {
7624
+ } else if (followFrameRef.current != null) {
7563
7625
  cancelFrame(followFrameRef.current);
7564
7626
  followFrameRef.current = null;
7565
7627
  }
@@ -7575,11 +7637,50 @@ function MessageTimeline({
7575
7637
  return;
7576
7638
  }
7577
7639
  const previousFirstItemId = previousFirstItemIdRef.current;
7578
- const previousGroupKeyByItemId = groupKeyByItemIdRef.current;
7640
+ const previousFirstItemGroupKey = firstItemGroupKeyRef.current;
7579
7641
  const previousGroupOffsetByKey = groupOffsetByKeyRef.current;
7642
+ const previousItemContentTop = firstItemContentTopRef.current;
7580
7643
  const previousScrollTop = lastScrollTopRef.current;
7581
- const firstItemChanged = previousFirstItemId !== null && firstItemId !== previousFirstItemId;
7644
+ const previousMaxScroll = lastMaxScrollRef.current;
7645
+ const wasAtLiveTailBeforeCommit = previousMaxScroll <= 1 || previousMaxScroll - previousScrollTop < Math.min(PIN_THRESHOLD_PX, previousMaxScroll);
7646
+ const firstItemChanged = !!previousFirstItemId && firstItemId !== previousFirstItemId;
7582
7647
  const prepended = firstItemChanged && resolvedItems.some((item) => item.id === previousFirstItemId);
7648
+ const attempt = olderLoadAttemptRef.current;
7649
+ const committedZeroOverlapOlderReplacement = !!(attempt?.[2]?.committed && firstItemChanged && !prepended);
7650
+ const restorePrependAnchor = () => {
7651
+ let delta = null;
7652
+ if (previousFirstItemId && previousItemContentTop != null) {
7653
+ const itemEl = node.querySelector(
7654
+ `[data-og-item="${cssEscapeAttribute(previousFirstItemId)}"]`
7655
+ );
7656
+ if (itemEl instanceof HTMLElement) {
7657
+ const scrollerTop = node.getBoundingClientRect().top;
7658
+ const currentItemTop = itemEl.getBoundingClientRect().top - scrollerTop + node.scrollTop;
7659
+ delta = Math.round(currentItemTop - previousItemContentTop);
7660
+ }
7661
+ }
7662
+ const anchorKey = previousFirstItemGroupKey;
7663
+ const previousAnchorTop = anchorKey != null ? previousGroupOffsetByKey.get(anchorKey) : void 0;
7664
+ const anchorEl = anchorKey != null ? node.querySelector(`[data-og-group-key="${cssEscapeAttribute(anchorKey)}"]`) : null;
7665
+ if (delta == null && anchorEl instanceof HTMLElement && previousAnchorTop !== void 0) {
7666
+ const moved = Math.round(anchorEl.offsetTop - previousAnchorTop);
7667
+ if (moved) {
7668
+ delta = moved;
7669
+ }
7670
+ }
7671
+ if (delta == null) {
7672
+ const heightDelta = Math.round(node.scrollHeight - previousScrollHeightRef.current);
7673
+ if (heightDelta > 0) {
7674
+ delta = heightDelta;
7675
+ }
7676
+ }
7677
+ if (delta != null) {
7678
+ const expected = previousScrollTop + delta;
7679
+ if (Math.abs(node.scrollTop - expected) > 2) {
7680
+ writeScrollTop(node, expected);
7681
+ }
7682
+ }
7683
+ };
7583
7684
  if (pendingJumpToStartRef.current && firstItemChanged) {
7584
7685
  pendingJumpToStartRef.current = false;
7585
7686
  stopFollow();
@@ -7590,6 +7691,25 @@ function MessageTimeline({
7590
7691
  applyPinned(true);
7591
7692
  snapToBottom(node);
7592
7693
  }
7694
+ } else if (committedZeroOverlapOlderReplacement) {
7695
+ clearPendingReaderLeave();
7696
+ stopFollow();
7697
+ writeScrollTop(node, maxScrollOf(node));
7698
+ if (attempt?.[1] === 1 && pinnedRef.current) {
7699
+ applyPinned(false);
7700
+ }
7701
+ } else if (prepended) {
7702
+ if (autoFollow && pinnedRef.current && !hasNewer && !pendingReaderLeaveRef.current && (wasAtLiveTailBeforeCommit || olderLoadAttemptRef.current)) {
7703
+ clearPendingReaderLeave();
7704
+ snapToBottom(node);
7705
+ } else {
7706
+ restorePrependAnchor();
7707
+ if (autoFollow && pinnedRef.current && !hasNewer) {
7708
+ stopFollow();
7709
+ clearPendingReaderLeave();
7710
+ applyPinned(false);
7711
+ }
7712
+ }
7593
7713
  } else if (autoFollow && pinnedRef.current && !hasNewer) {
7594
7714
  if (!revealedRef.current) {
7595
7715
  snapToBottom(node);
@@ -7601,44 +7721,15 @@ function MessageTimeline({
7601
7721
  } else {
7602
7722
  driveFollow(node);
7603
7723
  }
7604
- } else if (prepended) {
7605
- const anchorKey = previousFirstItemId !== null ? previousGroupKeyByItemId.get(previousFirstItemId) : void 0;
7606
- const previousAnchorTop = anchorKey !== void 0 ? previousGroupOffsetByKey.get(anchorKey) : void 0;
7607
- const anchorEl = anchorKey !== void 0 ? node.querySelector(`[data-og-group-key="${cssEscapeAttribute(anchorKey)}"]`) : null;
7608
- let delta = null;
7609
- if (anchorEl instanceof HTMLElement && previousAnchorTop !== void 0) {
7610
- const moved = Math.round(anchorEl.offsetTop - previousAnchorTop);
7611
- if (moved !== 0) {
7612
- delta = moved;
7613
- }
7614
- }
7615
- if (delta === null) {
7616
- const heightDelta = Math.round(node.scrollHeight - previousScrollHeightRef.current);
7617
- if (heightDelta > 0) {
7618
- delta = heightDelta;
7619
- }
7620
- }
7621
- if (delta !== null) {
7622
- const expected = previousScrollTop + delta;
7623
- if (Math.abs(node.scrollTop - expected) > 2) {
7624
- writeScrollTop(node, expected);
7625
- }
7626
- }
7627
7724
  }
7628
- if (prepended && !pinnedRef.current && olderLoadGateRef.current === "cooling" && node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7629
- olderLoadGateRef.current = "armed";
7725
+ if (prepended && !pinnedRef.current && node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7726
+ rearmOlderPrefetchAfterLeavingTop(node);
7630
7727
  }
7631
7728
  previousFirstItemIdRef.current = firstItemId;
7632
7729
  previousScrollHeightRef.current = node.scrollHeight;
7633
7730
  syncScrollBaseline(node);
7634
- const nextKeyByItemId = /* @__PURE__ */ new Map();
7635
- for (const { group, key } of groups) {
7636
- for (const itemId of timelineGroupItemIds(group)) {
7637
- nextKeyByItemId.set(itemId, key);
7638
- }
7639
- }
7640
- groupKeyByItemIdRef.current = nextKeyByItemId;
7641
- const needOffsets = prepended || firstItemChanged || !pinnedRef.current || Boolean(hasNewer);
7731
+ firstItemGroupKeyRef.current = groups[0]?.key ?? null;
7732
+ const needOffsets = prepended || firstItemChanged || !pinnedRef.current || hasNewer || firstItemContentTopRef.current == null;
7642
7733
  if (needOffsets) {
7643
7734
  const nextOffsetByKey = /* @__PURE__ */ new Map();
7644
7735
  for (const { key } of groups) {
@@ -7648,10 +7739,29 @@ function MessageTimeline({
7648
7739
  }
7649
7740
  }
7650
7741
  groupOffsetByKeyRef.current = nextOffsetByKey;
7742
+ const firstItemEl = firstItemId ? node.querySelector(`[data-og-item="${cssEscapeAttribute(firstItemId)}"]`) : null;
7743
+ firstItemContentTopRef.current = firstItemId && firstItemEl instanceof HTMLElement ? firstItemEl.getBoundingClientRect().top - node.getBoundingClientRect().top + node.scrollTop : null;
7744
+ }
7745
+ if (!attempt) {
7746
+ return;
7651
7747
  }
7748
+ if (!attempt[2]?.committed && attempt[0] === olderBoundaryKey) {
7749
+ return;
7750
+ }
7751
+ if (!attempt[2]?.committed && attempt[0] && !sourceItems?.find((entry) => entry.id === attempt[0])) {
7752
+ attempt[0] = olderBoundaryKey;
7753
+ return;
7754
+ }
7755
+ if (!attempt[1] || !hasOlder) {
7756
+ setUnderfillSettledAttempt(olderLoadAttemptRef.current = null);
7757
+ return;
7758
+ }
7759
+ olderLoadAttemptRef.current = [olderBoundaryKey, 2];
7760
+ rearmOlderPrefetchAfterLeavingTop(node);
7761
+ requestOlderIfUnderfilled(node);
7652
7762
  });
7653
7763
  useLayoutEffect3(() => {
7654
- if (revealed || allGroups.length === 0) {
7764
+ if (revealed || !allGroups.length) {
7655
7765
  return;
7656
7766
  }
7657
7767
  let cancelled = false;
@@ -7679,7 +7789,7 @@ function MessageTimeline({
7679
7789
  return () => {
7680
7790
  cancelled = true;
7681
7791
  cancelFrame(frame1);
7682
- if (frame2 !== 0) {
7792
+ if (frame2) {
7683
7793
  cancelFrame(frame2);
7684
7794
  }
7685
7795
  };
@@ -7695,7 +7805,6 @@ function MessageTimeline({
7695
7805
  olderPrefetchArmedRef.current = false;
7696
7806
  setOlderPrefetchArmed(false);
7697
7807
  }
7698
- olderLoadGateRef.current = "armed";
7699
7808
  wantPinRef.current = false;
7700
7809
  pendingJumpToStartRef.current = false;
7701
7810
  previousFirstItemIdRef.current = null;
@@ -7704,12 +7813,12 @@ function MessageTimeline({
7704
7813
  lastMaxScrollRef.current = 0;
7705
7814
  lastScrollHeightRef.current = 0;
7706
7815
  lastClientHeightRef.current = 0;
7707
- groupKeyByItemIdRef.current = /* @__PURE__ */ new Map();
7816
+ firstItemGroupKeyRef.current = null;
7708
7817
  groupOffsetByKeyRef.current = /* @__PURE__ */ new Map();
7818
+ firstItemContentTopRef.current = null;
7709
7819
  foldMemoryRef.current.clear();
7710
7820
  userMessageDisclosureMemoryRef.current.clear();
7711
7821
  disclosureKeepsUnpinnedRef.current = false;
7712
- underfillLoadWindowRef.current = null;
7713
7822
  seenActivityIdsRef.current.clear();
7714
7823
  applyPinned(true);
7715
7824
  }, [allGroups.length, revealed, applyPinned]);
@@ -7738,20 +7847,46 @@ function MessageTimeline({
7738
7847
  (entries) => {
7739
7848
  const intersecting = entries.some((entry) => entry.isIntersecting);
7740
7849
  if (!intersecting) {
7741
- olderLoadGateRef.current = "armed";
7850
+ const attempt2 = olderLoadAttemptRef.current;
7851
+ if (attempt2?.[1] === 2 || attempt2?.[1] === 3) {
7852
+ olderLoadAttemptRef.current = null;
7853
+ }
7742
7854
  return;
7743
7855
  }
7744
- if (olderLoadGateRef.current !== "armed") {
7856
+ if (olderLoadAttemptRef.current) {
7745
7857
  return;
7746
7858
  }
7747
- olderLoadGateRef.current = "cooling";
7748
- onLoadOlder();
7859
+ const attempt = olderLoadAttemptRef.current = [olderBoundaryKey, 1];
7860
+ const noProgress = () => {
7861
+ if (!scrollRef.current || olderLoadAttemptRef.current !== attempt) {
7862
+ return;
7863
+ }
7864
+ attempt[1] = 3;
7865
+ if (root.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7866
+ olderLoadAttemptRef.current = null;
7867
+ } else if (maxScrollOf(root) <= 1) {
7868
+ attempt[1] = 0;
7869
+ setUnderfillSettledAttempt(attempt);
7870
+ }
7871
+ };
7872
+ if (!invokeOlderLoad(onLoadOlder, noProgress, attempt) && olderLoadAttemptRef.current === attempt) {
7873
+ olderLoadAttemptRef.current[1] = 2;
7874
+ requestOlderIfUnderfilled(root);
7875
+ }
7749
7876
  },
7750
7877
  { root, rootMargin: OLDER_PREFETCH_ROOT_MARGIN }
7751
7878
  );
7752
7879
  observer.observe(target);
7753
7880
  return () => observer.disconnect();
7754
- }, [olderPrefetchArmed, hasOlder, loadingOlder, onLoadOlder, firstGroupKey]);
7881
+ }, [
7882
+ firstGroupKey,
7883
+ hasOlder,
7884
+ loadingOlder,
7885
+ olderBoundaryKey,
7886
+ olderPrefetchArmed,
7887
+ onLoadOlder,
7888
+ requestOlderIfUnderfilled
7889
+ ]);
7755
7890
  useEffect11(() => {
7756
7891
  const root = scrollRef.current;
7757
7892
  const target = bottomSentinelRef.current;
@@ -7776,7 +7911,7 @@ function MessageTimeline({
7776
7911
  return;
7777
7912
  }
7778
7913
  const observer = new ResizeObserver(() => {
7779
- if (resizeFollowRafRef.current !== null) {
7914
+ if (resizeFollowRafRef.current != null) {
7780
7915
  return;
7781
7916
  }
7782
7917
  resizeFollowRafRef.current = requestFrame(() => {
@@ -7800,7 +7935,7 @@ function MessageTimeline({
7800
7935
  observer.observe(node);
7801
7936
  return () => {
7802
7937
  observer.disconnect();
7803
- if (resizeFollowRafRef.current !== null) {
7938
+ if (resizeFollowRafRef.current != null) {
7804
7939
  cancelFrame(resizeFollowRafRef.current);
7805
7940
  resizeFollowRafRef.current = null;
7806
7941
  }
@@ -7873,9 +8008,7 @@ function MessageTimeline({
7873
8008
  if (readerArmed && readerUp > TIP_FOLLOW_READER_UP_EPS_PX && !nearBottomPinned) {
7874
8009
  readerIntentArmRef.current = false;
7875
8010
  releasePinFromReader(node);
7876
- if (olderLoadGateRef.current === "cooling" && node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7877
- olderLoadGateRef.current = "armed";
7878
- }
8011
+ rearmOlderPrefetchAfterLeavingTop(node);
7879
8012
  return;
7880
8013
  }
7881
8014
  if (!nearBottomPinned && readerUp <= TIP_FOLLOW_READER_UP_EPS_PX) {
@@ -7905,9 +8038,7 @@ function MessageTimeline({
7905
8038
  olderPrefetchArmedRef.current = true;
7906
8039
  setOlderPrefetchArmed(true);
7907
8040
  }
7908
- if (olderLoadGateRef.current === "cooling" && node.scrollTop > OLDER_PREFETCH_MARGIN_PX) {
7909
- olderLoadGateRef.current = "armed";
7910
- }
8041
+ rearmOlderPrefetchAfterLeavingTop(node);
7911
8042
  };
7912
8043
  const onScrollEnd = () => {
7913
8044
  const node = scrollRef.current;
@@ -7958,7 +8089,7 @@ function MessageTimeline({
7958
8089
  autoFollow && pinned && !hasNewer ? "[overflow-anchor:none]" : "[overflow-anchor:auto]"
7959
8090
  ),
7960
8091
  children: /* @__PURE__ */ jsxs14("div", { className: "relative mx-auto flex w-full max-w-3xl flex-col gap-5", children: [
7961
- groups.length === 0 ? emptyState ?? /* @__PURE__ */ jsx18("p", { className: "py-10 text-center text-og-menu text-og-fg-subtle", children: "No activity yet." }) : null,
8092
+ !groups.length ? emptyState ?? /* @__PURE__ */ jsx18("p", { className: "py-10 text-center text-og-menu text-og-fg-subtle", children: "No activity yet." }) : null,
7962
8093
  hasOlder && olderPrefetchArmed ? (
7963
8094
  // Overlaid, not a layout row: mounting/unmounting the sentinel
7964
8095
  // must never shift content (that shift was itself a wobble).
@@ -8028,7 +8159,7 @@ function MessageTimeline({
8028
8159
  ] })
8029
8160
  }
8030
8161
  ),
8031
- /* @__PURE__ */ jsx18(AnimatePresence3, { children: loadingOlder || loadingOldest || hasOlder && onJumpToStart && olderPrefetchArmed ? (
8162
+ /* @__PURE__ */ jsx18(AnimatePresence3, { children: loadingOlder || loadingOldest || hasOlder && onJumpToStart && olderPrefetchArmed || underfillRetryReady ? (
8032
8163
  // Floating over the scroller (not a timeline row) so showing and
8033
8164
  // hiding it never reflows history under the reader.
8034
8165
  /* @__PURE__ */ jsxs14(
@@ -8040,20 +8171,26 @@ function MessageTimeline({
8040
8171
  transition: { duration: 0.15, ease: "easeOut" },
8041
8172
  "data-og-loading-older": "",
8042
8173
  "aria-live": "polite",
8043
- className: "absolute inset-x-0 top-3 z-10 flex justify-center gap-2",
8174
+ className: "absolute inset-x-0 top-3 z-10 flex justify-center",
8044
8175
  children: [
8045
- loadingOlder || loadingOldest ? /* @__PURE__ */ jsx18("span", { className: "pointer-events-none inline-flex items-center rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1 text-og-control font-medium shadow-og-md backdrop-blur", children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: loadingOldest ? "Jumping to start\u2026" : "Loading earlier activity\u2026" }) }) : null,
8046
- hasOlder && onJumpToStart && !loadingOldest ? /* @__PURE__ */ jsxs14(
8176
+ loadingOlder || loadingOldest ? /* @__PURE__ */ jsx18("span", { className: LOADING_CHIP_CLASS, children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: loadingOldest ? "Jumping to start\u2026" : "Loading earlier activity\u2026" }) }) : null,
8177
+ hasOlder && !loadingOlder && !loadingOldest && (underfillRetryReady || onJumpToStart) ? /* @__PURE__ */ jsx18(
8047
8178
  "button",
8048
8179
  {
8049
8180
  type: "button",
8050
- "data-og-jump-to-start": "",
8051
- disabled: loadingOlder,
8181
+ "data-og-retry": underfillRetryReady || void 0,
8182
+ "data-og-jump-to-start": !underfillRetryReady || void 0,
8052
8183
  onClick: () => {
8184
+ const node = scrollRef.current;
8185
+ if (underfillRetryReady) {
8186
+ if (node && underfillRetryReadyRef.current) {
8187
+ requestOlderIfUnderfilled(node, underfillSettledAttempt);
8188
+ }
8189
+ return;
8190
+ }
8053
8191
  applyPinned(false);
8054
8192
  pendingJumpToStartRef.current = true;
8055
8193
  const seq = ++jumpToStartSeqRef.current;
8056
- const node = scrollRef.current;
8057
8194
  void Promise.resolve(onJumpToStart()).then(
8058
8195
  () => {
8059
8196
  const scroller = scrollRef.current ?? node;
@@ -8073,15 +8210,8 @@ function MessageTimeline({
8073
8210
  }
8074
8211
  );
8075
8212
  },
8076
- className: cn(
8077
- "inline-flex items-center gap-1.5 rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1.5",
8078
- "text-og-control font-medium text-og-fg shadow-og-md backdrop-blur",
8079
- "hover:border-og-border-strong disabled:opacity-60"
8080
- ),
8081
- children: [
8082
- /* @__PURE__ */ jsx18(ArrowUpToLineIcon, { className: "size-3.5" }),
8083
- "Jump to start"
8084
- ]
8213
+ className: "rounded-full border border-og-border px-3 py-1.5 text-og-control",
8214
+ children: underfillRetryReady ? "Retry earlier activity" : "Jump to start"
8085
8215
  }
8086
8216
  ) : null
8087
8217
  ]
@@ -8098,7 +8228,7 @@ function MessageTimeline({
8098
8228
  "data-og-loading-newer": "",
8099
8229
  "aria-live": "polite",
8100
8230
  className: "pointer-events-none absolute inset-x-0 bottom-14 z-10 flex justify-center",
8101
- children: /* @__PURE__ */ jsx18("span", { className: "inline-flex items-center rounded-full border border-og-border bg-og-surface-3/90 px-3 py-1 text-og-control font-medium shadow-og-md backdrop-blur", children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: "Loading later activity\u2026" }) })
8231
+ children: /* @__PURE__ */ jsx18("span", { className: LOADING_CHIP_CLASS, children: /* @__PURE__ */ jsx18("span", { className: "og-shimmer-text", children: "Loading later activity\u2026" }) })
8102
8232
  }
8103
8233
  ) : null }),
8104
8234
  /* @__PURE__ */ jsx18(AnimatePresence3, { children: (!pinned && autoFollow || hasNewer) && autoFollow ? /* @__PURE__ */ jsxs14(
@@ -8261,7 +8391,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
8261
8391
  const enter = useEntranceAnimation();
8262
8392
  const settleChrome = useTurnSettleOpen();
8263
8393
  const foldMemory = useFoldMemory();
8264
- const activityShouldFold = group.kind === "activity" && Boolean(group.outcome || foldLiveCluster && clusterIsSettled(group));
8394
+ const activityShouldFold = group.kind === "activity" && !!(group.outcome || foldLiveCluster && clusterIsSettled(group));
8265
8395
  const containsGeneratedImage = timelineGroupContainsGeneratedImage(group);
8266
8396
  const liveActivitySettle = useLiveSettleFold(activityShouldFold && !insideTurn);
8267
8397
  const turnDefaultOpen = !insideTurn && group.kind === "turn" && (group.outcome === "failed" || timelineGroupContainsAuthNeeded(group) || containsGeneratedImage);
@@ -8272,7 +8402,7 @@ var TimelineGroupView = memo2(function TimelineGroupView2({
8272
8402
  group.groups.flatMap((child) => child.kind === "activity" ? [child.id] : [])
8273
8403
  );
8274
8404
  }
8275
- const settleFold = group.kind === "turn" ? Boolean(enter && !insideTurn && !turnDefaultOpen) : liveActivitySettle;
8405
+ const settleFold = group.kind === "turn" ? !!(enter && !insideTurn && !turnDefaultOpen) : liveActivitySettle;
8276
8406
  switch (group.kind) {
8277
8407
  case "activity":
8278
8408
  if (insideTurn) {
@@ -8564,7 +8694,7 @@ function trailingAgentTextAfterTurn(group, next) {
8564
8694
  }
8565
8695
  if (next?.kind === "item" && next.item.kind === "agent-message") {
8566
8696
  const turnIds = collectTurnIdsFromGroups(group.groups);
8567
- if (turnIds.size === 0) {
8697
+ if (!turnIds.size) {
8568
8698
  return void 0;
8569
8699
  }
8570
8700
  if (!next.item.turnId || !turnIds.has(next.item.turnId)) {
@@ -8579,7 +8709,7 @@ function collectTurnCopyText(groups, trailingAgentText) {
8579
8709
  const parts = [collectAgentMessageText(groups), trailingAgentText?.trim() ?? ""].filter(
8580
8710
  (part) => part.length > 0
8581
8711
  );
8582
- if (parts.length === 0) {
8712
+ if (!parts.length) {
8583
8713
  return void 0;
8584
8714
  }
8585
8715
  return parts.join("\n\n");
@@ -8641,11 +8771,11 @@ var COMPACTION_TRIGGER_LABEL = {
8641
8771
  function CompactionRow({ item }) {
8642
8772
  const enter = useEntranceAnimation();
8643
8773
  const trigger = item.trigger && item.phase !== "started" ? COMPACTION_TRIGGER_LABEL[item.trigger] : null;
8644
- const before = item.estimatedTokensBefore !== null ? Math.round(item.estimatedTokensBefore).toLocaleString("en-US") : null;
8645
- const after = item.estimatedTokensAfter !== null ? Math.round(item.estimatedTokensAfter).toLocaleString("en-US") : null;
8774
+ const before = item.estimatedTokensBefore != null ? Math.round(item.estimatedTokensBefore).toLocaleString("en-US") : null;
8775
+ const after = item.estimatedTokensAfter != null ? Math.round(item.estimatedTokensAfter).toLocaleString("en-US") : null;
8646
8776
  const title = item.phase === "started" ? "Compacting conversation history\u2026" : item.phase === "compacted" ? before && after ? `Conversation history compacted \xB7 ~${before} \u2192 ~${after} estimated history tokens` : "Conversation history compacted" : "Couldn\u2019t compact conversation history";
8647
8777
  const subtitle = item.phase === "compacted" ? "Chat history above is unchanged" : item.phase === "skipped" ? compactionSkipSubtitle(item.skipReason) : null;
8648
- const pill = item.phase === "skipped" && item.skipReason === "summarization_failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.phase === "started" ? "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting" : "border-og-border bg-og-surface-1 text-og-fg-muted";
8778
+ const pill = item.phase === "skipped" && item.skipReason === "summarization_failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.phase === "started" ? WAITING_PILL_CLASS : "border-og-border bg-og-surface-1 text-og-fg-muted";
8649
8779
  return /* @__PURE__ */ jsx18("div", { className: cn(enter && "animate-og-enter", "flex justify-center"), children: /* @__PURE__ */ jsxs14(
8650
8780
  "div",
8651
8781
  {
@@ -8710,7 +8840,7 @@ ${annotation.note}`).join("\n\n"),
8710
8840
  label: "Copy message",
8711
8841
  className: "w-fit max-w-full min-w-0",
8712
8842
  trailing: /* @__PURE__ */ jsx18(MessageFooterTime, { occurredAt: item.occurredAt }),
8713
- children: /* @__PURE__ */ jsxs14("div", { className: "w-fit max-w-full min-w-0 rounded-og-lg rounded-br-og-xs border border-og-border bg-og-surface-2 px-4 py-2.5 text-og-md leading-6 text-og-fg", children: [
8843
+ children: /* @__PURE__ */ jsxs14("div", { className: MESSAGE_BUBBLE_CLASS, children: [
8714
8844
  item.text ? /* @__PURE__ */ jsx18("div", { "data-og-annotation-source-key": item.annotationSource?.eventId, children: renderMessageText ? renderMessageText(item.text, item) : /* @__PURE__ */ jsx18(UserMessageBody, { messageId: item.id, text: item.text, children: /* @__PURE__ */ jsx18(Markdown, { children: item.text }) }) }) : null,
8715
8845
  (item.annotations?.length ?? 0) > 0 ? /* @__PURE__ */ jsx18(
8716
8846
  TimelineAnnotationsChip,
@@ -8809,7 +8939,7 @@ function HumanInputConversationRow({ item }) {
8809
8939
  label: "Copy answer",
8810
8940
  className: "w-fit max-w-[90%] min-w-0 sm:max-w-[82%]",
8811
8941
  trailing: /* @__PURE__ */ jsx18(MessageFooterTime, { occurredAt: item.occurredAt }),
8812
- children: /* @__PURE__ */ jsxs14("div", { className: "w-fit max-w-full min-w-0 rounded-og-lg rounded-br-og-xs border border-og-border bg-og-surface-2 px-4 py-2.5 text-og-md leading-6 text-og-fg", children: [
8942
+ children: /* @__PURE__ */ jsxs14("div", { className: MESSAGE_BUBBLE_CLASS, children: [
8813
8943
  /* @__PURE__ */ jsx18("p", { className: "text-og-xs font-medium text-og-fg-subtle", children: settledLabel }),
8814
8944
  item.response.outcome === "answered" ? /* @__PURE__ */ jsx18("div", { className: "mt-1.5 space-y-3", children: item.answers.length > 0 ? item.answers.map((answer, answerIndex) => /* @__PURE__ */ jsxs14("div", { children: [
8815
8945
  multipleQuestions ? /* @__PURE__ */ jsxs14("p", { className: "text-og-sm font-semibold text-og-fg", children: [
@@ -8901,7 +9031,7 @@ function WorkerCompletionRow({
8901
9031
  const [open, setOpen] = useState14(false);
8902
9032
  const meta = workerCompletionMeta(item);
8903
9033
  const Icon = meta.icon;
8904
- const showPausedReason = item.childStatus !== "failed" && item.goalStatus === "paused" && Boolean(item.pausedReason?.trim());
9034
+ const showPausedReason = item.childStatus !== "failed" && item.goalStatus === "paused" && !!item.pausedReason?.trim();
8905
9035
  const details = [
8906
9036
  ...item.text.trim() ? [{ label: "Report", value: item.text.trim() }] : [],
8907
9037
  ...item.evidence?.trim() ? [{ label: "Evidence", value: item.evidence.trim(), muted: true }] : [],
@@ -9005,14 +9135,14 @@ var GOAL_META = {
9005
9135
  },
9006
9136
  paused: {
9007
9137
  label: "Goal paused",
9008
- pill: "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting",
9138
+ pill: WAITING_PILL_CLASS,
9009
9139
  icon: PauseIcon2
9010
9140
  },
9011
9141
  resumed: { label: "Goal resumed", pill: NEUTRAL_PILL, icon: PlayIcon2 },
9012
9142
  cleared: { label: "Goal cleared", pill: NEUTRAL_PILL, icon: Trash2Icon2 },
9013
9143
  held: {
9014
9144
  label: "Goal held",
9015
- pill: "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting",
9145
+ pill: WAITING_PILL_CLASS,
9016
9146
  icon: PauseCircleIcon
9017
9147
  },
9018
9148
  continuation: { label: "Continuing toward the goal", pill: NEUTRAL_PILL, icon: ArrowRightIcon2 }
@@ -9183,7 +9313,7 @@ function formatVideoDuration(seconds) {
9183
9313
  }
9184
9314
  function NoticeRow({ item }) {
9185
9315
  const enter = useEntranceAnimation();
9186
- const tone = item.tone === "failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.tone === "waiting" ? "border-og-status-waiting/35 bg-og-status-waiting/10 text-og-status-waiting" : "border-og-border bg-og-surface-1 text-og-fg-muted";
9316
+ const tone = item.tone === "failed" ? "border-og-status-failed/35 bg-og-status-failed/10 text-og-status-failed" : item.tone === "waiting" ? WAITING_PILL_CLASS : "border-og-border bg-og-surface-1 text-og-fg-muted";
9187
9317
  return /* @__PURE__ */ jsxs14(
9188
9318
  "div",
9189
9319
  {
@@ -9280,7 +9410,7 @@ function AuthNeededRow({
9280
9410
  onClick: () => void start(),
9281
9411
  disabled: busy,
9282
9412
  className: cn(
9283
- "inline-flex w-full shrink-0 items-center justify-center gap-1.5 rounded-og-md bg-og-accent px-3 py-1.5 text-og-menu font-medium text-og-accent-fg sm:w-auto",
9413
+ PRIMARY_ACTION_CLASS,
9284
9414
  "transition-colors hover:bg-og-accent-strong disabled:opacity-70 pointer-coarse:min-h-9"
9285
9415
  ),
9286
9416
  children: [
@@ -9295,7 +9425,7 @@ function AuthNeededRow({
9295
9425
  rel: "noreferrer",
9296
9426
  target: "_blank",
9297
9427
  className: cn(
9298
- "inline-flex w-full shrink-0 items-center justify-center gap-1.5 rounded-og-md bg-og-accent px-3 py-1.5 text-og-menu font-medium text-og-accent-fg sm:w-auto",
9428
+ PRIMARY_ACTION_CLASS,
9299
9429
  "transition-colors hover:bg-og-accent-strong pointer-coarse:min-h-9"
9300
9430
  ),
9301
9431
  children: [
@@ -9340,7 +9470,7 @@ function AuthProviderLogo({ src, label }) {
9340
9470
  }
9341
9471
  function monogram(label) {
9342
9472
  const words = label.trim().split(/\s+/).filter(Boolean);
9343
- if (words.length === 0) {
9473
+ if (!words.length) {
9344
9474
  return "?";
9345
9475
  }
9346
9476
  if (words.length === 1) {
@@ -9438,4 +9568,4 @@ export {
9438
9568
  MessageTimeline,
9439
9569
  TimelineRow
9440
9570
  };
9441
- //# sourceMappingURL=chunk-LS4POUTY.js.map
9571
+ //# sourceMappingURL=chunk-6H6S5V4Z.js.map