@flamingo-stack/openframe-frontend-core 0.0.210 → 0.0.212

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 (72) hide show
  1. package/dist/{chunk-R5RNRH62.js → chunk-3E5ANY55.js} +14 -5
  2. package/dist/chunk-3E5ANY55.js.map +1 -0
  3. package/dist/{chunk-WJBPLMBX.js → chunk-5BNWGK6D.js} +2 -2
  4. package/dist/{chunk-6RZYJICV.cjs → chunk-P5EE2VJX.cjs} +1 -1
  5. package/dist/chunk-P5EE2VJX.cjs.map +1 -0
  6. package/dist/{chunk-ATEUJQKU.js → chunk-QKFBZLIR.js} +2 -2
  7. package/dist/{chunk-MDTIOPVS.cjs → chunk-VTUIMMHO.cjs} +24 -24
  8. package/dist/{chunk-MDTIOPVS.cjs.map → chunk-VTUIMMHO.cjs.map} +1 -1
  9. package/dist/{chunk-TWKPYZNQ.cjs → chunk-WI76ZUBE.cjs} +26 -17
  10. package/dist/chunk-WI76ZUBE.cjs.map +1 -0
  11. package/dist/{chunk-VBFOCTMD.cjs → chunk-ZFBLC5GV.cjs} +17 -17
  12. package/dist/{chunk-VBFOCTMD.cjs.map → chunk-ZFBLC5GV.cjs.map} +1 -1
  13. package/dist/{chunk-7L4DWM7P.js → chunk-ZG2YY5E7.js} +1 -1
  14. package/dist/chunk-ZG2YY5E7.js.map +1 -0
  15. package/dist/components/chat/hooks/use-chat-identity.d.ts +3 -3
  16. package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -1
  17. package/dist/components/chat/index.cjs +3 -3
  18. package/dist/components/chat/index.js +2 -2
  19. package/dist/components/contact/index.cjs +4 -4
  20. package/dist/components/contact/index.js +3 -3
  21. package/dist/components/features/index.cjs +3 -3
  22. package/dist/components/features/index.js +2 -2
  23. package/dist/components/footer-waitlist-button.d.ts +21 -2
  24. package/dist/components/footer-waitlist-button.d.ts.map +1 -1
  25. package/dist/components/index.cjs +87 -91
  26. package/dist/components/index.cjs.map +1 -1
  27. package/dist/components/index.js +12 -16
  28. package/dist/components/index.js.map +1 -1
  29. package/dist/components/navigation/index.cjs +3 -3
  30. package/dist/components/navigation/index.js +2 -2
  31. package/dist/components/navigation/sticky-section-nav.d.ts.map +1 -1
  32. package/dist/components/tickets/help-center-card.d.ts.map +1 -1
  33. package/dist/components/tickets/index.cjs +139 -98
  34. package/dist/components/tickets/index.cjs.map +1 -1
  35. package/dist/components/tickets/index.js +95 -54
  36. package/dist/components/tickets/index.js.map +1 -1
  37. package/dist/components/tickets/ticket-row.d.ts.map +1 -1
  38. package/dist/components/ui/index.cjs +3 -3
  39. package/dist/components/ui/index.js +2 -2
  40. package/dist/contexts/chat-runtime-context.d.ts +6 -3
  41. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  42. package/dist/contexts/index.cjs +2 -2
  43. package/dist/contexts/index.js +1 -1
  44. package/dist/index.cjs +5 -3
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.js +4 -2
  47. package/dist/utils/index.cjs +10 -0
  48. package/dist/utils/index.cjs.map +1 -1
  49. package/dist/utils/index.d.ts +1 -0
  50. package/dist/utils/index.d.ts.map +1 -1
  51. package/dist/utils/index.js +10 -1
  52. package/dist/utils/index.js.map +1 -1
  53. package/dist/utils/scroll-into-view.d.ts +63 -0
  54. package/dist/utils/scroll-into-view.d.ts.map +1 -0
  55. package/package.json +1 -1
  56. package/src/components/chat/hooks/use-chat-identity.ts +8 -7
  57. package/src/components/footer-waitlist-button.tsx +33 -16
  58. package/src/components/navigation/sticky-section-nav.tsx +6 -4
  59. package/src/components/tickets/help-center-card.tsx +55 -1
  60. package/src/components/tickets/help-center-list.tsx +9 -1
  61. package/src/components/tickets/ticket-detail-drawer.tsx +19 -4
  62. package/src/components/tickets/ticket-row.tsx +30 -19
  63. package/src/contexts/chat-runtime-context.tsx +6 -3
  64. package/src/stories/EmbeddableChat.stories.tsx +1 -1
  65. package/src/utils/index.ts +12 -0
  66. package/src/utils/scroll-into-view.ts +74 -0
  67. package/dist/chunk-6RZYJICV.cjs.map +0 -1
  68. package/dist/chunk-7L4DWM7P.js.map +0 -1
  69. package/dist/chunk-R5RNRH62.js.map +0 -1
  70. package/dist/chunk-TWKPYZNQ.cjs.map +0 -1
  71. /package/dist/{chunk-WJBPLMBX.js.map → chunk-5BNWGK6D.js.map} +0 -0
  72. /package/dist/{chunk-ATEUJQKU.js.map → chunk-QKFBZLIR.js.map} +0 -0
@@ -9,11 +9,11 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkVBFOCTMDcjs = require('../../chunk-VBFOCTMD.cjs');
12
+ var _chunkZFBLC5GVcjs = require('../../chunk-ZFBLC5GV.cjs');
13
13
  require('../../chunk-VFKQMAUF.cjs');
14
14
 
15
15
 
16
- var _chunkMDTIOPVScjs = require('../../chunk-MDTIOPVS.cjs');
16
+ var _chunkVTUIMMHOcjs = require('../../chunk-VTUIMMHO.cjs');
17
17
 
18
18
 
19
19
 
@@ -35,14 +35,15 @@ var _chunkMDTIOPVScjs = require('../../chunk-MDTIOPVS.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunkTWKPYZNQcjs = require('../../chunk-TWKPYZNQ.cjs');
38
+
39
+ var _chunkWI76ZUBEcjs = require('../../chunk-WI76ZUBE.cjs');
39
40
 
40
41
 
41
42
  var _chunkEH3RWVF3cjs = require('../../chunk-EH3RWVF3.cjs');
42
43
  require('../../chunk-24KCAECR.cjs');
43
44
  require('../../chunk-65CPJ4SX.cjs');
44
45
  require('../../chunk-XQFFGR6U.cjs');
45
- require('../../chunk-6RZYJICV.cjs');
46
+ require('../../chunk-P5EE2VJX.cjs');
46
47
  require('../../chunk-27APPAJN.cjs');
47
48
  require('../../chunk-BZFW3FOF.cjs');
48
49
 
@@ -97,7 +98,7 @@ function TicketOpenForm({
97
98
  }) {
98
99
  const [subject, setSubject] = _react.useState.call(void 0, "");
99
100
  const [content, setContent] = _react.useState.call(void 0, "");
100
- const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkTWKPYZNQcjs.useChatAttachments.call(void 0, );
101
+ const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkWI76ZUBEcjs.useChatAttachments.call(void 0, );
101
102
  const trimmedSubject = subject.trim();
102
103
  const trimmedContent = content.trim();
103
104
  const overCap = content.length > TICKET_TEXT_MAX_CHARS;
@@ -117,7 +118,7 @@ function TicketOpenForm({
117
118
  clear();
118
119
  }
119
120
  };
120
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
121
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
121
122
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
122
123
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
123
124
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
@@ -156,7 +157,7 @@ function TicketOpenForm({
156
157
  }
157
158
  ),
158
159
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
159
- _chunkTWKPYZNQcjs.Textarea,
160
+ _chunkWI76ZUBEcjs.Textarea,
160
161
  {
161
162
  id: "ticket-content",
162
163
  placeholder: "Describe your issue or question in detail...",
@@ -180,7 +181,7 @@ function TicketOpenForm({
180
181
  )
181
182
  ] }),
182
183
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
183
- _chunkTWKPYZNQcjs.ChatAttachmentChipStrip,
184
+ _chunkWI76ZUBEcjs.ChatAttachmentChipStrip,
184
185
  {
185
186
  attachments,
186
187
  onRemove: removeAttachment,
@@ -189,7 +190,7 @@ function TicketOpenForm({
189
190
  ),
190
191
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
191
192
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
192
- _chunkTWKPYZNQcjs.ChatAttachmentAddButton,
193
+ _chunkWI76ZUBEcjs.ChatAttachmentAddButton,
193
194
  {
194
195
  attachmentsEnabled: !supportSystemDown,
195
196
  attachmentsCount: attachments.length,
@@ -227,7 +228,7 @@ _chunkUXZ3ZJ3Mcjs.init_button2.call(void 0, );
227
228
 
228
229
  var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
229
230
  function useTicketEngagements(externalTicketId, enabled = true) {
230
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
231
+ const identity = _chunkWI76ZUBEcjs.useChatIdentity.call(void 0, );
231
232
  const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _ => _.user, 'optionalAccess', _2 => _2.email]), () => ( "anon"));
232
233
  const queryEnabled = enabled && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _3 => _3.user, 'optionalAccess', _4 => _4.email]) && !!externalTicketId && !externalTicketId.startsWith("temp-");
233
234
  const query = _reactquery.useQuery.call(void 0, {
@@ -241,7 +242,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
241
242
  refetchOnMount: "always",
242
243
  refetchOnWindowFocus: true,
243
244
  queryFn: async () => {
244
- const response = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
245
+ const response = await _chunkWI76ZUBEcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
245
246
  method: "POST",
246
247
  body: JSON.stringify({ ticket_id: externalTicketId })
247
248
  });
@@ -289,7 +290,7 @@ function TicketLinkedDeliveryCard({
289
290
  {
290
291
  className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
291
292
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
292
- _chunkVBFOCTMDcjs.DeliveryRow,
293
+ _chunkZFBLC5GVcjs.DeliveryRow,
293
294
  {
294
295
  item,
295
296
  href: clickup.delivery_href,
@@ -342,7 +343,7 @@ function TicketDetailDrawer({
342
343
  }
343
344
  var TURN_SEPARATOR_RE = /[\s]{1,16}---[\s]{1,16}/g;
344
345
  function TicketTimelinePanel({ ticket }) {
345
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
346
+ const identity = _chunkWI76ZUBEcjs.useChatIdentity.call(void 0, );
346
347
  const externalId = isOptimistic(ticket) ? null : ticket.external_id;
347
348
  const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
348
349
  const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
@@ -354,10 +355,10 @@ function TicketTimelinePanel({ ticket }) {
354
355
  const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.avatarUrl]), () => ( void 0)) : void 0;
355
356
  if (bodyTurns.length === 0 && engagements.length === 0) {
356
357
  if (isLoading) {
357
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.ConversationCardRowSkeletonList, { rows: 2 });
358
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.ConversationCardRowSkeletonList, { rows: 2 });
358
359
  }
359
360
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
360
- _chunkVBFOCTMDcjs.EmptyState,
361
+ _chunkZFBLC5GVcjs.EmptyState,
361
362
  {
362
363
  type: "generic",
363
364
  title: "No conversation yet",
@@ -372,7 +373,7 @@ function TicketTimelinePanel({ ticket }) {
372
373
  const role = i === 0 ? "Original message" : isResolution ? "Resolution" : `Update ${i}`;
373
374
  const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
374
375
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
375
- _chunkVBFOCTMDcjs.ConversationCardRow,
376
+ _chunkZFBLC5GVcjs.ConversationCardRow,
376
377
  {
377
378
  author: customerName,
378
379
  role,
@@ -402,10 +403,10 @@ function TicketTimelinePanel({ ticket }) {
402
403
  avatarSrc = void 0;
403
404
  }
404
405
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
405
- _chunkVBFOCTMDcjs.ConversationCardRow,
406
+ _chunkZFBLC5GVcjs.ConversationCardRow,
406
407
  {
407
408
  author,
408
- role: isCustomer ? "Reply" : "Note",
409
+ role: "Reply",
409
410
  avatarSrc,
410
411
  timestamp: eng.createdAt,
411
412
  body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
@@ -419,7 +420,7 @@ function TicketTimelinePanel({ ticket }) {
419
420
  // content rendered — drawer is showing the customer's body
420
421
  // turns + cached engagements while a background refetch is
421
422
  // in flight. Single row keeps the placeholder modest.
422
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.ConversationCardRowSkeletonList, { rows: 1 })
423
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.ConversationCardRowSkeletonList, { rows: 1 })
423
424
  ] });
424
425
  }
425
426
  function mapEngagementAttachments(files) {
@@ -472,7 +473,7 @@ function OpenActions({
472
473
  const [messageText, setMessageText] = _react.useState.call(void 0, "");
473
474
  const [resolution, setResolution] = _react.useState.call(void 0, "");
474
475
  const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
475
- const attachments = _chunkTWKPYZNQcjs.useChatAttachments.call(void 0, );
476
+ const attachments = _chunkWI76ZUBEcjs.useChatAttachments.call(void 0, );
476
477
  const disabled = busy || supportSystemDown;
477
478
  const ticketRef = { id: ticket.id, external_id: ticket.external_id };
478
479
  const hasText = messageText.trim().length > 0;
@@ -495,7 +496,7 @@ function OpenActions({
495
496
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
496
497
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
497
498
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
498
- _chunkTWKPYZNQcjs.Textarea,
499
+ _chunkWI76ZUBEcjs.Textarea,
499
500
  {
500
501
  value: messageText,
501
502
  onChange: (e) => setMessageText(e.target.value),
@@ -506,7 +507,7 @@ function OpenActions({
506
507
  }
507
508
  ),
508
509
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
509
- _chunkTWKPYZNQcjs.ChatAttachmentChipStrip,
510
+ _chunkWI76ZUBEcjs.ChatAttachmentChipStrip,
510
511
  {
511
512
  attachments: attachments.attachments,
512
513
  onRemove: attachments.removeAttachment,
@@ -516,7 +517,7 @@ function OpenActions({
516
517
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center gap-2 flex-wrap", children: [
517
518
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
518
519
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
519
- _chunkTWKPYZNQcjs.ChatAttachmentAddButton,
520
+ _chunkWI76ZUBEcjs.ChatAttachmentAddButton,
520
521
  {
521
522
  attachmentsEnabled: !supportSystemDown,
522
523
  attachmentsCount: attachments.attachments.length,
@@ -551,13 +552,13 @@ function OpenActions({
551
552
  ] })
552
553
  ] })
553
554
  ] }),
554
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
555
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogHeader, { children: [
556
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
555
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWI76ZUBEcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
556
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWI76ZUBEcjs.AlertDialogHeader, { children: [
557
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
558
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
558
559
  ] }),
559
560
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
560
- _chunkTWKPYZNQcjs.Textarea,
561
+ _chunkWI76ZUBEcjs.Textarea,
561
562
  {
562
563
  value: resolution,
563
564
  onChange: (e) => setResolution(e.target.value),
@@ -567,9 +568,9 @@ function OpenActions({
567
568
  className: "mt-2"
568
569
  }
569
570
  ),
570
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.AlertDialogFooter, { children: [
571
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWI76ZUBEcjs.AlertDialogFooter, { children: [
571
572
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
572
- _chunkTWKPYZNQcjs.AlertDialogCancel,
573
+ _chunkWI76ZUBEcjs.AlertDialogCancel,
573
574
  {
574
575
  disabled: busy,
575
576
  className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
@@ -577,7 +578,7 @@ function OpenActions({
577
578
  }
578
579
  ),
579
580
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
580
- _chunkTWKPYZNQcjs.AlertDialogAction,
581
+ _chunkWI76ZUBEcjs.AlertDialogAction,
581
582
  {
582
583
  onClick: () => void confirmClose(),
583
584
  disabled: busy,
@@ -605,14 +606,22 @@ function TicketRow({
605
606
  }) {
606
607
  const optimistic = isOptimistic(ticket);
607
608
  const rowRef = _react.useRef.call(void 0, null);
608
- _react.useEffect.call(void 0, () => {
609
- if (!expanded || optimistic) return;
610
- requestAnimationFrame(() => {
611
- requestAnimationFrame(() => {
612
- _optionalChain([rowRef, 'access', _30 => _30.current, 'optionalAccess', _31 => _31.scrollIntoView, 'call', _32 => _32({ behavior: "smooth", block: "start" })]);
613
- });
609
+ const handleClick = _react.useCallback.call(void 0, () => {
610
+ onToggle(ticket.id);
611
+ _chunkWI76ZUBEcjs.scrollElementIntoView.call(void 0, rowRef.current, {
612
+ adjustTargetY: (raw) => {
613
+ if (!rowRef.current) return raw;
614
+ const expandedDrawer = document.querySelector(
615
+ 'div[id^="ticket-drawer-"]'
616
+ );
617
+ if (!(expandedDrawer instanceof HTMLElement)) return raw;
618
+ const drawerRect = expandedDrawer.getBoundingClientRect();
619
+ const myRect = rowRef.current.getBoundingClientRect();
620
+ if (drawerRect.bottom > myRect.top) return raw;
621
+ return raw - drawerRect.height;
622
+ }
614
623
  });
615
- }, [expanded, optimistic]);
624
+ }, [onToggle, ticket.id]);
616
625
  const tileData = {
617
626
  id: ticket.id,
618
627
  title: _nullishCoalesce(ticket.subject, () => ( "(untitled)")),
@@ -625,7 +634,7 @@ function TicketRow({
625
634
  // so the badge accurately reflects "Closed" with a checkmark.
626
635
  statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
627
636
  category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
628
- timeAgo: ticket.hubspot_updated_at ? _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
637
+ timeAgo: ticket.hubspot_updated_at ? _chunkWI76ZUBEcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
629
638
  // Linked-work chip: surfaced whenever the ticket has a linked
630
639
  // ClickUp task. Uses the linked task's own status so the chip text
631
640
  // reads "Working" / "Waiting on version release" / etc. — useful
@@ -633,17 +642,17 @@ function TicketRow({
633
642
  // when the task exists but its status hasn't synced yet.
634
643
  linkedTaskLabel: ticket.clickup ? ticket.clickup.status ? ticket.clickup.status.replace(/\b\w/g, (c) => c.toUpperCase()) : "Linked work" : void 0
635
644
  };
636
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, className: "scroll-mt-4", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
645
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
637
646
  Collapsible,
638
647
  {
639
648
  open: expanded && !optimistic,
640
649
  className: "border-b border-ods-border last:border-b-0",
641
650
  children: [
642
651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
643
- _chunkTWKPYZNQcjs.ChatTicketItem,
652
+ _chunkWI76ZUBEcjs.ChatTicketItem,
644
653
  {
645
654
  ticket: tileData,
646
- onClick: optimistic ? void 0 : onToggle,
655
+ onClick: optimistic ? void 0 : handleClick,
647
656
  "aria-expanded": expanded && !optimistic,
648
657
  "aria-controls": `ticket-drawer-${ticket.id}`
649
658
  }
@@ -704,7 +713,7 @@ function useTicketsList(filters) {
704
713
  pageSize
705
714
  };
706
715
  if (statusFilter) body.status = statusFilter;
707
- const response = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
716
+ const response = await _chunkWI76ZUBEcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
708
717
  method: "POST",
709
718
  body: JSON.stringify(body)
710
719
  });
@@ -716,12 +725,12 @@ function useTicketsList(filters) {
716
725
  }
717
726
  });
718
727
  const data = query.data;
719
- const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _33 => _33.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _34 => _34.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _35 => _35.tickets, 'optionalAccess', _36 => _36.length]), () => ( 0)))));
720
- const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _37 => _37.page]), () => ( page));
721
- const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _38 => _38.pageSize]), () => ( pageSize));
722
- const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _39 => _39.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
728
+ const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _30 => _30.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _31 => _31.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _32 => _32.tickets, 'optionalAccess', _33 => _33.length]), () => ( 0)))));
729
+ const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _34 => _34.page]), () => ( page));
730
+ const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _35 => _35.pageSize]), () => ( pageSize));
731
+ const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _36 => _36.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
723
732
  return {
724
- tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _40 => _40.tickets]), () => ( [])),
733
+ tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _37 => _37.tickets]), () => ( [])),
725
734
  // Loading-state-truth = `data === undefined`. TanStack v5's
726
735
  // `isPending` / `isLoading` flags can be `false` in transient
727
736
  // windows where the query is enabled-but-fetch-not-yet-fired
@@ -743,7 +752,7 @@ function useTicketsList(filters) {
743
752
  // - Background refetch with existing data: data !== undefined → no load
744
753
  // - Filter-change refetch landing on empty results: data?.tickets===[]
745
754
  // + isFetching → bridge skeleton (the `||` branch)
746
- isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _41 => _41.tickets]), () => ( []))).length === 0),
755
+ isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _38 => _38.tickets]), () => ( []))).length === 0),
747
756
  isFetching: query.isFetching,
748
757
  error: _nullishCoalesce(query.error, () => ( null)),
749
758
  refetch: () => {
@@ -792,7 +801,7 @@ function useTicketActions(options) {
792
801
  }, []);
793
802
  const executeTicketAction = _react.useCallback.call(void 0,
794
803
  async (toolName, args) => {
795
- const res = await _chunkTWKPYZNQcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
804
+ const res = await _chunkWI76ZUBEcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
796
805
  method: "POST",
797
806
  body: JSON.stringify({ tool_name: toolName, args })
798
807
  });
@@ -898,7 +907,7 @@ function useTicketActions(options) {
898
907
  const result = await executeTicketAction("create_ticket", {
899
908
  subject: input.subject.trim(),
900
909
  content: input.content.trim(),
901
- ..._optionalChain([input, 'access', _42 => _42.attachments, 'optionalAccess', _43 => _43.length]) ? { attachments: input.attachments } : {}
910
+ ..._optionalChain([input, 'access', _39 => _39.attachments, 'optionalAccess', _40 => _40.length]) ? { attachments: input.attachments } : {}
902
911
  });
903
912
  if (result.mirror_synced === false) {
904
913
  toast2(TOAST_COPY.open_mirror_pending);
@@ -986,7 +995,7 @@ function useTicketActions(options) {
986
995
  ticket,
987
996
  {
988
997
  status: "CLOSED",
989
- ..._optionalChain([resolution, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]) ? { resolution: resolution.trim() } : {}
998
+ ..._optionalChain([resolution, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()]) ? { resolution: resolution.trim() } : {}
990
999
  },
991
1000
  TOAST_COPY.close_success,
992
1001
  "close ticket"
@@ -1048,7 +1057,7 @@ function mapTicketActionError(err) {
1048
1057
  removeRowFromCache: false
1049
1058
  };
1050
1059
  case "RATE_LIMITED": {
1051
- const retryAfterRaw = _optionalChain([err, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.headers, 'access', _48 => _48.get, 'call', _49 => _49("Retry-After")]);
1060
+ const retryAfterRaw = _optionalChain([err, 'access', _43 => _43.response, 'optionalAccess', _44 => _44.headers, 'access', _45 => _45.get, 'call', _46 => _46("Retry-After")]);
1052
1061
  const retryAfterSeconds = retryAfterRaw ? parseInt(retryAfterRaw, 10) : void 0;
1053
1062
  return {
1054
1063
  code: err.code,
@@ -1106,13 +1115,13 @@ function resolveErrorCode(bodyCode, status) {
1106
1115
  // src/components/tickets/ticket-center.tsx
1107
1116
 
1108
1117
  function TicketCenter({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1109
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
1118
+ const identity = _chunkWI76ZUBEcjs.useChatIdentity.call(void 0, );
1110
1119
  if (identity.isLoading) {
1111
1120
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
1112
1121
  }
1113
- if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _50 => _50.user, 'optionalAccess', _51 => _51.email])) {
1122
+ if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _47 => _47.user, 'optionalAccess', _48 => _48.email])) {
1114
1123
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1115
- _chunkVBFOCTMDcjs.EmptyState,
1124
+ _chunkZFBLC5GVcjs.EmptyState,
1116
1125
  {
1117
1126
  type: "generic",
1118
1127
  title: "Sign in to manage tickets",
@@ -1183,7 +1192,7 @@ function TicketCenterAuthed({
1183
1192
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
1184
1193
  lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
1185
1194
  "Updated ",
1186
- _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
1195
+ _chunkWI76ZUBEcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
1187
1196
  ] }),
1188
1197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1189
1198
  _chunkUXZ3ZJ3Mcjs.Button,
@@ -1199,15 +1208,15 @@ function TicketCenterAuthed({
1199
1208
  )
1200
1209
  ] })
1201
1210
  ] }),
1202
- isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1203
- _chunkVBFOCTMDcjs.EmptyState,
1211
+ isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1212
+ _chunkZFBLC5GVcjs.EmptyState,
1204
1213
  {
1205
1214
  type: "generic",
1206
1215
  title: "No tickets yet",
1207
1216
  description: "Open one above to start the conversation.",
1208
1217
  showCTA: false
1209
1218
  }
1210
- ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1219
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1211
1220
  TicketRow,
1212
1221
  {
1213
1222
  ticket,
@@ -1227,7 +1236,7 @@ function TicketCenterAuthed({
1227
1236
  }
1228
1237
  function TicketCenterSkeleton() {
1229
1238
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
1230
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "p-6", children: [
1239
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWI76ZUBEcjs.Card, { className: "p-6", children: [
1231
1240
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
1232
1241
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-10 w-full mb-3" }),
1233
1242
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-24 w-full" })
@@ -1236,7 +1245,7 @@ function TicketCenterSkeleton() {
1236
1245
  ] });
1237
1246
  }
1238
1247
  function TicketListSkeleton() {
1239
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTWKPYZNQcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
1248
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWI76ZUBEcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
1240
1249
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
1241
1250
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-4 w-2/3" }),
1242
1251
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-3 w-full" })
@@ -1249,10 +1258,12 @@ function TicketListSkeleton() {
1249
1258
  // src/components/tickets/help-center-list.tsx
1250
1259
 
1251
1260
 
1252
- _chunkVBFOCTMDcjs.init_unified_pagination.call(void 0, );
1261
+ _chunkZFBLC5GVcjs.init_unified_pagination.call(void 0, );
1253
1262
 
1254
1263
  // src/components/tickets/help-center-card.tsx
1255
1264
 
1265
+
1266
+ var STICKY_HEADER_OFFSET_PX = 96;
1256
1267
  function HelpCenterCard({
1257
1268
  ticket,
1258
1269
  expanded,
@@ -1267,24 +1278,42 @@ function HelpCenterCard({
1267
1278
  const optimistic = isOptimistic(ticket);
1268
1279
  const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
1269
1280
  const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
1270
- const relativeUpdated = ticket.hubspot_updated_at ? _chunkTWKPYZNQcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
1281
+ const relativeUpdated = ticket.hubspot_updated_at ? _chunkWI76ZUBEcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
1271
1282
  const title = (ticket.subject || "").trim() || "(untitled)";
1272
1283
  const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
1273
1284
  const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
1274
1285
  const isExpandable = !optimistic;
1275
1286
  const isExpanded = expanded && isExpandable;
1287
+ const rowRef = _react.useRef.call(void 0, null);
1288
+ const handleClick = _react.useCallback.call(void 0, () => {
1289
+ onToggle(ticket.id);
1290
+ _chunkWI76ZUBEcjs.scrollElementIntoView.call(void 0, rowRef.current, {
1291
+ headerOffset: STICKY_HEADER_OFFSET_PX,
1292
+ adjustTargetY: (raw) => {
1293
+ if (!rowRef.current) return raw;
1294
+ const expandedDrawer = document.querySelector(
1295
+ 'div[id^="help-center-drawer-"]'
1296
+ );
1297
+ if (!(expandedDrawer instanceof HTMLElement)) return raw;
1298
+ const drawerRect = expandedDrawer.getBoundingClientRect();
1299
+ const myRect = rowRef.current.getBoundingClientRect();
1300
+ if (drawerRect.bottom > myRect.top) return raw;
1301
+ return raw - drawerRect.height;
1302
+ }
1303
+ });
1304
+ }, [onToggle, ticket.id]);
1276
1305
  const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1277
1306
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1278
- _chunkTWKPYZNQcjs.StatusBadge,
1307
+ _chunkWI76ZUBEcjs.StatusBadge,
1279
1308
  {
1280
1309
  text: rawStatus,
1281
- colorScheme: _chunkTWKPYZNQcjs.getStatusColorScheme.call(void 0, rawStatus),
1310
+ colorScheme: _chunkWI76ZUBEcjs.getStatusColorScheme.call(void 0, rawStatus),
1282
1311
  variant: "card",
1283
1312
  className: "border border-ods-border"
1284
1313
  }
1285
1314
  ),
1286
1315
  priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1287
- _chunkTWKPYZNQcjs.StatusBadge,
1316
+ _chunkWI76ZUBEcjs.StatusBadge,
1288
1317
  {
1289
1318
  text: priority,
1290
1319
  colorScheme: mapPriorityScheme(priority),
@@ -1296,6 +1325,8 @@ function HelpCenterCard({
1296
1325
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1297
1326
  "div",
1298
1327
  {
1328
+ ref: rowRef,
1329
+ style: { scrollMarginTop: STICKY_HEADER_OFFSET_PX },
1299
1330
  className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
1300
1331
  "aria-busy": optimistic || void 0,
1301
1332
  children: [
@@ -1303,13 +1334,13 @@ function HelpCenterCard({
1303
1334
  "button",
1304
1335
  {
1305
1336
  type: "button",
1306
- onClick: isExpandable ? () => onToggle(ticket.id) : void 0,
1337
+ onClick: isExpandable ? handleClick : void 0,
1307
1338
  disabled: !isExpandable,
1308
1339
  "aria-expanded": isExpandable ? isExpanded : void 0,
1309
1340
  "aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
1310
1341
  className: "w-full text-left p-[12px] md:p-[16px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-inset disabled:cursor-default",
1311
1342
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1312
- _chunkVBFOCTMDcjs.DevCardRowContent,
1343
+ _chunkZFBLC5GVcjs.DevCardRowContent,
1313
1344
  {
1314
1345
  title,
1315
1346
  subtitle,
@@ -1382,7 +1413,7 @@ function HelpCenterCreateForm({
1382
1413
  const [subject, setSubject] = _react.useState.call(void 0, "");
1383
1414
  const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
1384
1415
  const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
1385
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkTWKPYZNQcjs.Label, { htmlFor: "help-center-subject", children: [
1416
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWI76ZUBEcjs.Label, { htmlFor: "help-center-subject", children: [
1386
1417
  "Subject",
1387
1418
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
1388
1419
  ] }),
@@ -1414,7 +1445,7 @@ function HelpCenterCreateForm({
1414
1445
  )
1415
1446
  ] });
1416
1447
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1417
- _chunkMDTIOPVScjs.ContactForm,
1448
+ _chunkVTUIMMHOcjs.ContactForm,
1418
1449
  {
1419
1450
  title: "Open a new ticket",
1420
1451
  footerText: "The support team typically responds within one business day.",
@@ -1452,7 +1483,7 @@ function HelpCenterCreateForm({
1452
1483
  // src/components/tickets/help-center-list.tsx
1453
1484
 
1454
1485
  function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1455
- const identity = _chunkTWKPYZNQcjs.useChatIdentity.call(void 0, );
1486
+ const identity = _chunkWI76ZUBEcjs.useChatIdentity.call(void 0, );
1456
1487
  const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
1457
1488
  const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
1458
1489
  const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
@@ -1461,11 +1492,11 @@ function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1461
1492
  const rawPage = Number(searchParams.get("page"));
1462
1493
  const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
1463
1494
  if (identity.isLoading) {
1464
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, {}) });
1495
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevCardRowSkeletonList, {}) });
1465
1496
  }
1466
- if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _52 => _52.user, 'optionalAccess', _53 => _53.email])) {
1467
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1468
- _chunkVBFOCTMDcjs.EmptyState,
1497
+ if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _49 => _49.user, 'optionalAccess', _50 => _50.email])) {
1498
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1499
+ _chunkZFBLC5GVcjs.EmptyState,
1469
1500
  {
1470
1501
  type: "generic",
1471
1502
  title: "Sign in to manage tickets",
@@ -1474,7 +1505,7 @@ function HelpCenterList({ toast: toast2 = _chunkEH3RWVF3cjs.toast } = {}) {
1474
1505
  }
1475
1506
  ) });
1476
1507
  }
1477
- const sessionName = [_optionalChain([identity, 'access', _54 => _54.user, 'optionalAccess', _55 => _55.firstName]), _optionalChain([identity, 'access', _56 => _56.user, 'optionalAccess', _57 => _57.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email, 'optionalAccess', _60 => _60.split, 'call', _61 => _61("@"), 'access', _62 => _62[0]]) || "Customer";
1508
+ const sessionName = [_optionalChain([identity, 'access', _51 => _51.user, 'optionalAccess', _52 => _52.firstName]), _optionalChain([identity, 'access', _53 => _53.user, 'optionalAccess', _54 => _54.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _55 => _55.user, 'optionalAccess', _56 => _56.email, 'optionalAccess', _57 => _57.split, 'call', _58 => _58("@"), 'access', _59 => _59[0]]) || "Customer";
1478
1509
  const sessionEmail = identity.user.email;
1479
1510
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1480
1511
  HelpCenterListAuthed,
@@ -1565,15 +1596,15 @@ function HelpCenterListAuthed({
1565
1596
  ] }),
1566
1597
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
1567
1598
  ] }),
1568
- !error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
1599
+ !error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
1569
1600
  // Bridge state — background refetch in flight and the
1570
1601
  // optimistic placeholder was just removed by the mutation
1571
1602
  // callback. Without this branch "No tickets yet" would flash
1572
1603
  // for ~50ms between `removeOptimistic` and the server
1573
1604
  // response landing.
1574
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevCardRowSkeletonList, { rows: 1 })
1605
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevCardRowSkeletonList, { rows: 1 })
1575
1606
  ) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1576
- _chunkVBFOCTMDcjs.EmptyState,
1607
+ _chunkZFBLC5GVcjs.EmptyState,
1577
1608
  {
1578
1609
  type: "search",
1579
1610
  title: "No tickets found",
@@ -1588,31 +1619,41 @@ function HelpCenterListAuthed({
1588
1619
  }
1589
1620
  }
1590
1621
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1591
- _chunkVBFOCTMDcjs.EmptyState,
1622
+ _chunkZFBLC5GVcjs.EmptyState,
1592
1623
  {
1593
1624
  type: "generic",
1594
1625
  title: "No tickets yet",
1595
1626
  description: "Open one above to start the conversation with the support team.",
1596
1627
  showCTA: false
1597
1628
  }
1598
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-hidden w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1599
- HelpCenterCard,
1600
- {
1601
- ticket,
1602
- expanded: expandedTicketId === ticket.id,
1603
- onToggle: toggleRow,
1604
- busy: isOptimistic(ticket) ? false : actions.isRowBusy(ticket.id),
1605
- supportSystemDown,
1606
- onSendMessage: actions.sendMessage,
1607
- onClose: actions.closeTicket,
1608
- onReopen: actions.reopenTicket,
1609
- onActionCollapsed: () => setExpandedTicketId(null)
1610
- },
1611
- ticket.id
1612
- )) }) }),
1613
- !error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.UnifiedPagination, { currentPage: page, totalPages })
1629
+ ) : (
1630
+ // `overflow-clip` (NOT `overflow-hidden`) — both visually
1631
+ // clip the rounded corners, but `hidden` makes the element
1632
+ // a "scroll container" per CSSOM spec, which causes
1633
+ // `scrollIntoView` calls inside (`<HelpCenterCard>` click
1634
+ // handlers) to try scrolling THIS div (can't, overflow
1635
+ // hidden) instead of bubbling up to the window. `clip`
1636
+ // keeps the visual clip but NOT the scroll-container
1637
+ // status, so click-to-scroll actually moves the page.
1638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-clip w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1639
+ HelpCenterCard,
1640
+ {
1641
+ ticket,
1642
+ expanded: expandedTicketId === ticket.id,
1643
+ onToggle: toggleRow,
1644
+ busy: isOptimistic(ticket) ? false : actions.isRowBusy(ticket.id),
1645
+ supportSystemDown,
1646
+ onSendMessage: actions.sendMessage,
1647
+ onClose: actions.closeTicket,
1648
+ onReopen: actions.reopenTicket,
1649
+ onActionCollapsed: () => setExpandedTicketId(null)
1650
+ },
1651
+ ticket.id
1652
+ )) })
1653
+ ) }),
1654
+ !error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.UnifiedPagination, { currentPage: page, totalPages })
1614
1655
  ] });
1615
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVBFOCTMDcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
1656
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFBLC5GVcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
1616
1657
  }
1617
1658
 
1618
1659