@flamingo-stack/openframe-frontend-core 0.0.605-2103.5840.1 → 0.0.605

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 (112) hide show
  1. package/dist/{chunk-AL27OAQB.cjs → chunk-25XSOCZK.cjs} +33 -33
  2. package/dist/{chunk-AL27OAQB.cjs.map → chunk-25XSOCZK.cjs.map} +1 -1
  3. package/dist/{chunk-QJJKDNYS.js → chunk-2V3PJ5X5.js} +5 -5
  4. package/dist/{chunk-F2IZWJET.js → chunk-3FC4DPRX.js} +4 -4
  5. package/dist/{chunk-XPHYCFQ6.js → chunk-3J73ZG3V.js} +2 -2
  6. package/dist/{chunk-FH6O54PG.js → chunk-4IWMX4AJ.js} +5 -5
  7. package/dist/{chunk-JQ52EWRC.js → chunk-63AGD45L.js} +2 -2
  8. package/dist/{chunk-TLXYYGZW.js → chunk-7CQA7DAB.js} +3 -3
  9. package/dist/{chunk-SJS2AWIB.cjs → chunk-7ZAPPBFT.cjs} +3 -3
  10. package/dist/{chunk-SJS2AWIB.cjs.map → chunk-7ZAPPBFT.cjs.map} +1 -1
  11. package/dist/{chunk-TOUHYL4T.js → chunk-ANHHTB32.js} +5 -5
  12. package/dist/{chunk-CEA6WLSC.cjs → chunk-BEDMOEAM.cjs} +3 -3
  13. package/dist/{chunk-CEA6WLSC.cjs.map → chunk-BEDMOEAM.cjs.map} +1 -1
  14. package/dist/{chunk-Z5H3ITOB.js → chunk-CCY47QKL.js} +2 -2
  15. package/dist/{chunk-64BE3OFE.cjs → chunk-G7ZK3Q5B.cjs} +22 -22
  16. package/dist/{chunk-64BE3OFE.cjs.map → chunk-G7ZK3Q5B.cjs.map} +1 -1
  17. package/dist/{chunk-A73ORC6C.js → chunk-GPIPJOOV.js} +3 -3
  18. package/dist/{chunk-B2NXQOAK.cjs → chunk-IXXMNATN.cjs} +70 -70
  19. package/dist/{chunk-B2NXQOAK.cjs.map → chunk-IXXMNATN.cjs.map} +1 -1
  20. package/dist/{chunk-SWVHCWLG.js → chunk-JGSEBZYO.js} +28 -4
  21. package/dist/chunk-JGSEBZYO.js.map +1 -0
  22. package/dist/{chunk-WGQKIMMJ.cjs → chunk-JLVIGGUF.cjs} +25 -25
  23. package/dist/{chunk-WGQKIMMJ.cjs.map → chunk-JLVIGGUF.cjs.map} +1 -1
  24. package/dist/{chunk-7BYMMJK3.cjs → chunk-PS4WZ7YL.cjs} +9 -9
  25. package/dist/{chunk-7BYMMJK3.cjs.map → chunk-PS4WZ7YL.cjs.map} +1 -1
  26. package/dist/{chunk-SPLEOBOR.js → chunk-PSGHIQXU.js} +3 -3
  27. package/dist/{chunk-BOTY4JJT.cjs → chunk-Q6ZFTDRR.cjs} +4 -4
  28. package/dist/{chunk-BOTY4JJT.cjs.map → chunk-Q6ZFTDRR.cjs.map} +1 -1
  29. package/dist/{chunk-INPMLFLK.js → chunk-TF6FCNKU.js} +2 -2
  30. package/dist/{chunk-HO24BJ5K.cjs → chunk-UJ64PL7A.cjs} +10 -10
  31. package/dist/{chunk-HO24BJ5K.cjs.map → chunk-UJ64PL7A.cjs.map} +1 -1
  32. package/dist/{chunk-KESRJY6J.cjs → chunk-VK743MVL.cjs} +28 -4
  33. package/dist/chunk-VK743MVL.cjs.map +1 -0
  34. package/dist/{chunk-AYVJRZO3.cjs → chunk-WA3EEFDT.cjs} +43 -43
  35. package/dist/{chunk-AYVJRZO3.cjs.map → chunk-WA3EEFDT.cjs.map} +1 -1
  36. package/dist/{chunk-7RAKZ6TW.cjs → chunk-WR23DZLT.cjs} +10 -10
  37. package/dist/{chunk-7RAKZ6TW.cjs.map → chunk-WR23DZLT.cjs.map} +1 -1
  38. package/dist/{chunk-2SYV7HSV.js → chunk-XJKNJJYO.js} +6 -26
  39. package/dist/{chunk-2SYV7HSV.js.map → chunk-XJKNJJYO.js.map} +1 -1
  40. package/dist/{chunk-RJJPL2K5.cjs → chunk-XOQI3AH7.cjs} +22 -22
  41. package/dist/{chunk-RJJPL2K5.cjs.map → chunk-XOQI3AH7.cjs.map} +1 -1
  42. package/dist/{chunk-RJU7L4EC.cjs → chunk-XRNILWKL.cjs} +5 -5
  43. package/dist/{chunk-RJU7L4EC.cjs.map → chunk-XRNILWKL.cjs.map} +1 -1
  44. package/dist/{chunk-ZEAV4HB5.cjs → chunk-Y6MYIJTK.cjs} +15 -15
  45. package/dist/{chunk-ZEAV4HB5.cjs.map → chunk-Y6MYIJTK.cjs.map} +1 -1
  46. package/dist/{chunk-7UY6JYVX.js → chunk-YCOXI5CH.js} +6 -6
  47. package/dist/{chunk-AR3JII22.cjs → chunk-YUDYFA6H.cjs} +163 -183
  48. package/dist/chunk-YUDYFA6H.cjs.map +1 -0
  49. package/dist/{chunk-4SUYR7UP.js → chunk-Z2NXXA27.js} +3 -3
  50. package/dist/{chunk-PFG7TJFZ.js → chunk-ZYEAIBWA.js} +3 -3
  51. package/dist/components/case-studies/index.cjs +9 -9
  52. package/dist/components/case-studies/index.js +3 -3
  53. package/dist/components/chat/entity-cards/chat-ticket-item.d.ts +12 -0
  54. package/dist/components/chat/entity-cards/chat-ticket-item.d.ts.map +1 -1
  55. package/dist/components/chat/index.cjs +2 -2
  56. package/dist/components/chat/index.js +1 -1
  57. package/dist/components/contact/index.cjs +4 -4
  58. package/dist/components/contact/index.js +3 -3
  59. package/dist/components/docs/index.cjs +7 -7
  60. package/dist/components/docs/index.js +6 -6
  61. package/dist/components/embeds/index.cjs +4 -4
  62. package/dist/components/embeds/index.js +3 -3
  63. package/dist/components/faq/index.cjs +4 -4
  64. package/dist/components/faq/index.js +3 -3
  65. package/dist/components/features/board/index.d.ts +1 -1
  66. package/dist/components/features/board/index.d.ts.map +1 -1
  67. package/dist/components/features/board/ticket-card.d.ts.map +1 -1
  68. package/dist/components/features/board/types.d.ts +0 -18
  69. package/dist/components/features/board/types.d.ts.map +1 -1
  70. package/dist/components/features/index.cjs +3 -3
  71. package/dist/components/features/index.js +2 -2
  72. package/dist/components/help-center-pages/index.cjs +23 -23
  73. package/dist/components/help-center-pages/index.js +14 -14
  74. package/dist/components/index.cjs +38 -38
  75. package/dist/components/index.js +13 -13
  76. package/dist/components/meeting-scheduler/index.cjs +24 -24
  77. package/dist/components/meeting-scheduler/index.js +2 -2
  78. package/dist/components/navigation/index.cjs +6 -6
  79. package/dist/components/navigation/index.js +5 -5
  80. package/dist/components/onboarding-guides/index.cjs +6 -6
  81. package/dist/components/onboarding-guides/index.js +5 -5
  82. package/dist/components/tickets/index.cjs +7 -7
  83. package/dist/components/tickets/index.js +6 -6
  84. package/dist/components/ui/index.cjs +3 -3
  85. package/dist/components/ui/index.js +2 -2
  86. package/dist/index.cjs +7 -7
  87. package/dist/index.js +6 -6
  88. package/package.json +1 -1
  89. package/src/components/chat/__tests__/chat-ticket-item.test.tsx +79 -0
  90. package/src/components/chat/entity-cards/chat-ticket-item.tsx +30 -4
  91. package/src/components/features/board/index.ts +0 -2
  92. package/src/components/features/board/ticket-card.tsx +2 -31
  93. package/src/components/features/board/types.ts +0 -20
  94. package/src/stories/ChatTicketList.stories.tsx +25 -0
  95. package/src/stories/TicketCard.stories.tsx +1 -40
  96. package/dist/chunk-AR3JII22.cjs.map +0 -1
  97. package/dist/chunk-KESRJY6J.cjs.map +0 -1
  98. package/dist/chunk-SWVHCWLG.js.map +0 -1
  99. /package/dist/{chunk-QJJKDNYS.js.map → chunk-2V3PJ5X5.js.map} +0 -0
  100. /package/dist/{chunk-F2IZWJET.js.map → chunk-3FC4DPRX.js.map} +0 -0
  101. /package/dist/{chunk-XPHYCFQ6.js.map → chunk-3J73ZG3V.js.map} +0 -0
  102. /package/dist/{chunk-FH6O54PG.js.map → chunk-4IWMX4AJ.js.map} +0 -0
  103. /package/dist/{chunk-JQ52EWRC.js.map → chunk-63AGD45L.js.map} +0 -0
  104. /package/dist/{chunk-TLXYYGZW.js.map → chunk-7CQA7DAB.js.map} +0 -0
  105. /package/dist/{chunk-TOUHYL4T.js.map → chunk-ANHHTB32.js.map} +0 -0
  106. /package/dist/{chunk-Z5H3ITOB.js.map → chunk-CCY47QKL.js.map} +0 -0
  107. /package/dist/{chunk-A73ORC6C.js.map → chunk-GPIPJOOV.js.map} +0 -0
  108. /package/dist/{chunk-SPLEOBOR.js.map → chunk-PSGHIQXU.js.map} +0 -0
  109. /package/dist/{chunk-INPMLFLK.js.map → chunk-TF6FCNKU.js.map} +0 -0
  110. /package/dist/{chunk-7UY6JYVX.js.map → chunk-YCOXI5CH.js.map} +0 -0
  111. /package/dist/{chunk-4SUYR7UP.js.map → chunk-Z2NXXA27.js.map} +0 -0
  112. /package/dist/{chunk-PFG7TJFZ.js.map → chunk-ZYEAIBWA.js.map} +0 -0
@@ -27,6 +27,18 @@ export interface ChatTicketItemData {
27
27
  statusColor?: string;
28
28
  category?: string;
29
29
  timeAgo?: string;
30
+ /** Explicit secondary line under the title. When set, it replaces the
31
+ * default `ticketNumber • category • timeAgo` composition verbatim, so
32
+ * the host decides how the reference reads - the Fae client passes
33
+ * `Ticket Number: 165 • 6m ago` (reference labelled but visually
34
+ * secondary). An empty string hides the line. */
35
+ subtitle?: string;
36
+ /** The ticket has activity the customer has not opened yet
37
+ * (Figma fae-chat 1-5592): the secondary line and the chevron switch to
38
+ * the brand yellow, and the line reads the unread notice unless
39
+ * `subtitle` overrides it. The host clears it once the ticket is
40
+ * opened, and the reference line comes back. */
41
+ unread?: boolean;
30
42
  /** When set, renders a "Linked work" chip with a wrench icon next to
31
43
  * the status tag — tells the customer at a glance that an internal
32
44
  * delivery task is in flight for this ticket, even before they
@@ -44,6 +56,8 @@ export interface ChatTicketItemProps extends Omit<ButtonHTMLAttributes<HTMLButto
44
56
  isLoading?: boolean;
45
57
  }
46
58
 
59
+ const UNREAD_NOTICE = 'You have a new unread message';
60
+
47
61
  const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
48
62
  ({ className, ticket, onClick, isLoading = false, ...props }, ref) => {
49
63
  if (isLoading) {
@@ -80,7 +94,8 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
80
94
  });
81
95
  const isResolved = ticket.statusKind === 'RESOLVED' || resolveTicketStatus(ticket.status) === 'RESOLVED';
82
96
 
83
- const subtitle = [ticket.ticketNumber, ticket.category, ticket.timeAgo].filter(Boolean).join(' \u2022 ');
97
+ const composedSubtitle = [ticket.ticketNumber, ticket.category, ticket.timeAgo].filter(Boolean).join(' \u2022 ');
98
+ const subtitle = ticket.subtitle ?? (ticket.unread ? UNREAD_NOTICE : composedSubtitle);
84
99
 
85
100
  return (
86
101
  <button
@@ -110,7 +125,10 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
110
125
  {ticket.title}
111
126
  </p>
112
127
  {subtitle && (
113
- <p className="truncate text-ods-text-secondary text-h6" title={subtitle}>
128
+ <p
129
+ className={cn('truncate text-h6', ticket.unread ? 'text-ods-open-yellow' : 'text-ods-text-secondary')}
130
+ title={subtitle}
131
+ >
114
132
  {subtitle}
115
133
  </p>
116
134
  )}
@@ -132,8 +150,16 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
132
150
  )}
133
151
  {(statusTagProps.status || statusTagProps.label) && <TicketStatusTag {...statusTagProps} />}
134
152
 
135
- <div className="flex size-12 shrink-0 items-center justify-center rounded-md border border-ods-border bg-ods-card">
136
- <ChevronRight className="size-6 text-ods-text-secondary" />
153
+ <div
154
+ data-testid="chat-ticket-item-chevron"
155
+ className={cn(
156
+ 'flex size-12 shrink-0 items-center justify-center rounded-md border',
157
+ ticket.unread ? 'border-ods-open-yellow bg-ods-open-yellow' : 'border-ods-border bg-ods-card',
158
+ )}
159
+ >
160
+ <ChevronRight
161
+ className={cn('size-6', ticket.unread ? 'text-ods-text-on-accent' : 'text-ods-text-secondary')}
162
+ />
137
163
  </div>
138
164
  </button>
139
165
  );
@@ -21,8 +21,6 @@ export type {
21
21
  BoardColumnDef,
22
22
  BoardPriority,
23
23
  BoardTicket,
24
- BoardTicketActivity,
25
- BoardTicketActivityKind,
26
24
  BoardTicketAssignee,
27
25
  BoardTicketPendingApproval,
28
26
  } from './types';
@@ -21,14 +21,7 @@ import { cn } from '../../../utils/cn';
21
21
  import { formatTicketRelativeTime, formatTicketFullTimestamp } from '../../../utils/date-utils';
22
22
  import { holdMoveDragEffect } from '../../../utils/drag-effect';
23
23
  import { getReadableTextColor } from '../../../utils/ods-color-utils';
24
- import {
25
- ClockIcon,
26
- DotsLoaderIcon,
27
- LaptopIcon,
28
- Flag02Icon,
29
- MessagesIcon,
30
- UserCheckIcon,
31
- } from '../../icons-v2-generated';
24
+ import { LaptopIcon, Flag02Icon, MessagesIcon, UserCheckIcon } from '../../icons-v2-generated';
32
25
  import { DeletedUserAvatar } from '../../ui/deleted-user-avatar';
33
26
  import { SquareAvatar } from '../../ui/square-avatar';
34
27
  import { Tag } from '../../ui/tag';
@@ -37,7 +30,7 @@ import { BoardTicketApproval } from './board-ticket-approval';
37
30
  import { useBoardLift, useDropAim } from './drop-aim';
38
31
  import { DROP_LINE_ATTRIBUTE } from './lane-geometry';
39
32
  import { useIsLanding } from './pending-move';
40
- import type { BoardPriority, BoardTicket, BoardTicketActivityKind } from './types';
33
+ import type { BoardPriority, BoardTicket } from './types';
41
34
  import { TICKET_ID_ATTRIBUTE } from './use-lane-scroll-anchor';
42
35
 
43
36
  const PRIORITY_COLOR_CLASS: Record<BoardPriority, string> = {
@@ -57,13 +50,6 @@ export const DRAG_PREVIEW_OPACITY = 0.9;
57
50
  const MAX_VISIBLE_TAGS = 2;
58
51
  const MAX_VISIBLE_ASSIGNEES = 3;
59
52
 
60
- const ACTIVITY_DEFAULT_LABEL: Record<BoardTicketActivityKind, string> = {
61
- 'ai-working': 'AI assistant is working',
62
- 'user-typing': 'User typing',
63
- 'waiting-external': 'Waiting for client response',
64
- stale: 'No activity',
65
- };
66
-
67
53
  /** Shared card shell (border / padding / bg). Same footprint for the draggable
68
54
  * board card and the static {@link TicketCardView}. */
69
55
  const TICKET_CARD_SHELL =
@@ -172,21 +158,6 @@ export function TicketCardBody({ ticket, columnColor, renderAssignSlot, onApprov
172
158
  <span className="truncate">Escalated by User</span>
173
159
  </div>
174
160
  )}
175
- {ticket.activity && (
176
- <div
177
- className={cn(
178
- 'flex items-center gap-[var(--spacing-system-xxs)] text-h6',
179
- ticket.activity.kind === 'stale' ? 'text-ods-open-yellow' : 'text-ods-text-secondary',
180
- )}
181
- >
182
- {ticket.activity.kind === 'stale' ? (
183
- <ClockIcon className="size-4 shrink-0" />
184
- ) : (
185
- <DotsLoaderIcon className="size-4 shrink-0" />
186
- )}
187
- <span className="truncate">{ticket.activity.label ?? ACTIVITY_DEFAULT_LABEL[ticket.activity.kind]}</span>
188
- </div>
189
- )}
190
161
  {showNewMessage && (
191
162
  <Tag
192
163
  label="New Message"
@@ -22,24 +22,6 @@ export interface BoardTicketAssignee {
22
22
  deleted?: boolean;
23
23
  }
24
24
 
25
- /**
26
- * Live-activity footer indicator on a board card. Indicators are mutually
27
- * exclusive by design — the consumer decides which single one a ticket shows
28
- * (staleness has the lowest priority and must be suppressed when any other
29
- * signal — new message, approval, escalation — is present).
30
- */
31
- export type BoardTicketActivityKind = 'ai-working' | 'user-typing' | 'waiting-external' | 'stale';
32
-
33
- export interface BoardTicketActivity {
34
- kind: BoardTicketActivityKind;
35
- /**
36
- * Overrides the built-in label for the kind. Required in practice for
37
- * 'stale', whose label carries the computed duration ("No activity for
38
- * 2 hours") that only the consumer can know — and tick over time.
39
- */
40
- label?: string;
41
- }
42
-
43
25
  export interface BoardTicket {
44
26
  id: string;
45
27
  title: string;
@@ -61,8 +43,6 @@ export interface BoardTicket {
61
43
  * technician should pick it up.
62
44
  */
63
45
  escalatedByUser?: boolean;
64
- /** Single live-activity indicator rendered as the card's footer row. */
65
- activity?: BoardTicketActivity;
66
46
  }
67
47
 
68
48
  export interface BoardColumnDef {
@@ -199,6 +199,31 @@ export const ScrollFadingCompact: Story = {
199
199
  decorators: [constrainedDecorator(280)],
200
200
  };
201
201
 
202
+ const withReference = (ticket: ChatTicketItemData): ChatTicketItemData => ({
203
+ ...ticket,
204
+ subtitle: `Ticket Number: ${ticket.ticketNumber} \u2022 ${ticket.timeAgo}`,
205
+ });
206
+
207
+ /** `subtitle` override: the host owns the secondary line. The Fae client
208
+ * labels the reference so it stays quotable but visually secondary
209
+ * (`Ticket Number: N • time`). */
210
+ export const SubtitleOverride: Story = {
211
+ args: {
212
+ tickets: mockTickets.slice(0, 4).map(withReference),
213
+ },
214
+ decorators: [constrainedDecorator()],
215
+ };
216
+
217
+ /** Unread row (Figma fae-chat 1-5592): the notice replaces the reference
218
+ * line and both the line and the chevron turn brand yellow until the
219
+ * customer opens the ticket. */
220
+ export const Unread: Story = {
221
+ args: {
222
+ tickets: [{ ...mockTickets[0], unread: true }, ...mockTickets.slice(1, 4).map(withReference)],
223
+ },
224
+ decorators: [constrainedDecorator()],
225
+ };
226
+
202
227
  /** Loading state — skeleton placeholder rows shown while tickets load. */
203
228
  export const Loading: Story = {
204
229
  args: {
@@ -1,11 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
2
  import type { PendingToolCallData } from '../components/chat/types';
3
- import {
4
- TicketCard,
5
- type TicketCardProps,
6
- type BoardTicket,
7
- type BoardTicketActivityKind,
8
- } from '../components/features/board';
3
+ import { TicketCard, type TicketCardProps, type BoardTicket } from '../components/features/board';
9
4
 
10
5
  // =============================================================================
11
6
  // Harness — the card registers its own drag behaviour against the DOM and needs
@@ -154,40 +149,6 @@ export const EscalatedByUser: Story = {
154
149
  },
155
150
  };
156
151
 
157
- /**
158
- * The `activity` footer row, one card per kind. The three live kinds (animated
159
- * dots loader + grey text) fall back to their built-in labels; `stale` (clock +
160
- * amber text) carries a consumer-computed duration label, since only the
161
- * consumer knows the ticket's idle time — and keeps it ticking.
162
- */
163
- export const ActivityIndicators: Story = {
164
- render: () => {
165
- const activities: { kind: BoardTicketActivityKind; label?: string }[] = [
166
- { kind: 'ai-working' },
167
- { kind: 'user-typing' },
168
- { kind: 'waiting-external' },
169
- { kind: 'stale', label: 'No activity for 2 hours' },
170
- ];
171
- return (
172
- <div className="flex w-[320px] flex-col gap-[var(--spacing-system-sf)] rounded-lg bg-ods-card p-[var(--spacing-system-sf)]">
173
- {activities.map(activity => (
174
- <TicketCard
175
- key={activity.kind}
176
- columnId="ACTIVE"
177
- ticket={{
178
- ...BASE_TICKET,
179
- id: `ticket-activity-${activity.kind}`,
180
- priority: undefined,
181
- tags: undefined,
182
- activity,
183
- }}
184
- />
185
- ))}
186
- </div>
187
- );
188
- },
189
- };
190
-
191
152
  /**
192
153
  * Pending CLIENT approval — collapsed grey "Pending client approval" row with a
193
154
  * loader glyph. Expand it to reach the shared approve/reject affordance.