@flamingo-stack/openframe-frontend-core 0.0.201 → 0.0.202-snapshot.20260521221224

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 (130) hide show
  1. package/dist/{chunk-OII2IERE.cjs → chunk-25LVV26X.cjs} +4 -4
  2. package/dist/chunk-25LVV26X.cjs.map +1 -0
  3. package/dist/{chunk-UCY537V4.cjs → chunk-3YH2M76N.cjs} +1565 -1146
  4. package/dist/chunk-3YH2M76N.cjs.map +1 -0
  5. package/dist/{chunk-55HF462A.js → chunk-CPXLQ57U.js} +6 -7
  6. package/dist/chunk-CPXLQ57U.js.map +1 -0
  7. package/dist/{chunk-CSW5GYBU.js → chunk-E6Q6UGDK.js} +4603 -4184
  8. package/dist/chunk-E6Q6UGDK.js.map +1 -0
  9. package/dist/{chunk-3B43AHYE.cjs → chunk-RMB5DVED.cjs} +6 -7
  10. package/dist/chunk-RMB5DVED.cjs.map +1 -0
  11. package/dist/{chunk-4ML3NA2L.js → chunk-XGL5FKIK.js} +4 -4
  12. package/dist/chunk-XGL5FKIK.js.map +1 -0
  13. package/dist/components/chat/approval-request-message.d.ts.map +1 -1
  14. package/dist/components/chat/chat-container.d.ts.map +1 -1
  15. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  16. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  17. package/dist/components/chat/chat-ticket-item.d.ts.map +1 -1
  18. package/dist/components/chat/types/message.types.d.ts +34 -0
  19. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  20. package/dist/components/features/index.cjs +16 -4
  21. package/dist/components/features/index.cjs.map +1 -1
  22. package/dist/components/features/index.d.ts +1 -0
  23. package/dist/components/features/index.d.ts.map +1 -1
  24. package/dist/components/features/index.js +17 -5
  25. package/dist/components/features/select-button.d.ts.map +1 -1
  26. package/dist/components/index.cjs +18 -4
  27. package/dist/components/index.cjs.map +1 -1
  28. package/dist/components/index.js +17 -3
  29. package/dist/components/navigation/index.cjs +4 -4
  30. package/dist/components/navigation/index.js +3 -3
  31. package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
  32. package/dist/components/providers/theme-provider.d.ts +69 -0
  33. package/dist/components/providers/theme-provider.d.ts.map +1 -0
  34. package/dist/components/resizable.d.ts +1 -1
  35. package/dist/components/ui/button/split-button.d.ts.map +1 -1
  36. package/dist/components/ui/data-table/data-table-row.d.ts +16 -4
  37. package/dist/components/ui/data-table/data-table-row.d.ts.map +1 -1
  38. package/dist/components/ui/file-manager/index.cjs +52 -52
  39. package/dist/components/ui/file-manager/index.cjs.map +1 -1
  40. package/dist/components/ui/file-manager/index.js +3 -3
  41. package/dist/components/ui/file-manager/index.js.map +1 -1
  42. package/dist/components/ui/floating-tooltip.d.ts +3 -1
  43. package/dist/components/ui/floating-tooltip.d.ts.map +1 -1
  44. package/dist/components/ui/index.cjs +6 -4
  45. package/dist/components/ui/index.cjs.map +1 -1
  46. package/dist/components/ui/index.d.ts +1 -0
  47. package/dist/components/ui/index.d.ts.map +1 -1
  48. package/dist/components/ui/index.js +5 -3
  49. package/dist/components/ui/input-trigger.d.ts.map +1 -1
  50. package/dist/components/ui/radio-group.d.ts.map +1 -1
  51. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  52. package/dist/components/ui/ticket-info-section.d.ts.map +1 -1
  53. package/dist/components/ui/ticket-note-card.d.ts.map +1 -1
  54. package/dist/components/ui/truncate-text.d.ts +33 -0
  55. package/dist/components/ui/truncate-text.d.ts.map +1 -0
  56. package/dist/components/user-summary-stub.d.ts.map +1 -1
  57. package/dist/hooks/index.cjs +2 -2
  58. package/dist/hooks/index.js +1 -1
  59. package/dist/index.cjs +18 -4
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.js +17 -3
  62. package/package.json +2 -1
  63. package/src/components/chat/approval-request-message.tsx +106 -92
  64. package/src/components/chat/chat-container.tsx +10 -6
  65. package/src/components/chat/chat-message-enhanced.tsx +51 -9
  66. package/src/components/chat/chat-message-list.tsx +27 -19
  67. package/src/components/chat/chat-ticket-item.tsx +2 -3
  68. package/src/components/chat/types/message.types.ts +35 -0
  69. package/src/components/features/board/ticket-card.tsx +2 -2
  70. package/src/components/features/filters-dropdown.tsx +1 -1
  71. package/src/components/features/index.ts +15 -0
  72. package/src/components/features/notifications/notification-tile.tsx +2 -2
  73. package/src/components/features/policy-configuration-panel.tsx +1 -1
  74. package/src/components/features/push-button-selector.tsx +1 -1
  75. package/src/components/features/select-button.tsx +2 -3
  76. package/src/components/features/video-bites-display.tsx +1 -1
  77. package/src/components/features/waitlist-form.tsx +1 -1
  78. package/src/components/filter-chip.tsx +1 -1
  79. package/src/components/layout/title-block.tsx +2 -2
  80. package/src/components/navigation/header-organization-filter.tsx +1 -1
  81. package/src/components/navigation/navigation-sidebar.tsx +107 -54
  82. package/src/components/platform/ScriptInfoSection.tsx +1 -1
  83. package/src/components/providers/theme-provider.tsx +130 -0
  84. package/src/components/shared/onboarding/onboarding-step-card.tsx +2 -2
  85. package/src/components/shared/product-release/product-release-card.tsx +6 -6
  86. package/src/components/shared/product-release/release-detail-page.tsx +1 -1
  87. package/src/components/ui/assignee-dropdown.tsx +3 -3
  88. package/src/components/ui/autocomplete.tsx +2 -2
  89. package/src/components/ui/button/split-button.tsx +3 -5
  90. package/src/components/ui/checkbox-block.tsx +1 -1
  91. package/src/components/ui/data-table/data-table-row.tsx +82 -48
  92. package/src/components/ui/device-card-compact.tsx +2 -2
  93. package/src/components/ui/device-card.tsx +2 -2
  94. package/src/components/ui/entity-image.tsx +1 -1
  95. package/src/components/ui/field-wrapper.tsx +1 -1
  96. package/src/components/ui/file-manager/file-manager-table-row.tsx +2 -2
  97. package/src/components/ui/file-upload.tsx +2 -2
  98. package/src/components/ui/filter-list.tsx +1 -1
  99. package/src/components/ui/floating-tooltip.tsx +9 -5
  100. package/src/components/ui/hidden-tags-popup.tsx +1 -1
  101. package/src/components/ui/index.ts +1 -0
  102. package/src/components/ui/info-card.tsx +2 -2
  103. package/src/components/ui/input-trigger.tsx +1 -2
  104. package/src/components/ui/organization-card.tsx +3 -3
  105. package/src/components/ui/radio-group.tsx +2 -3
  106. package/src/components/ui/search-input.tsx +2 -2
  107. package/src/components/ui/service-card.tsx +3 -3
  108. package/src/components/ui/simple-markdown-renderer.tsx +248 -2
  109. package/src/components/ui/tag.tsx +1 -1
  110. package/src/components/ui/tags-manager.tsx +2 -2
  111. package/src/components/ui/ticket-attachments-list.tsx +1 -1
  112. package/src/components/ui/ticket-info-section.tsx +2 -3
  113. package/src/components/ui/ticket-note-card.tsx +4 -1
  114. package/src/components/ui/toaster.tsx +3 -3
  115. package/src/components/ui/truncate-text.tsx +116 -0
  116. package/src/components/user-summary-stub.tsx +32 -26
  117. package/src/components/vendor-display-button.tsx +1 -1
  118. package/src/stories/SplitButton.stories.tsx +7 -1
  119. package/src/stories/Theme.stories.tsx +350 -0
  120. package/src/styles/README.md +271 -174
  121. package/src/styles/dark_theme.tokens.json +982 -0
  122. package/src/styles/light_theme.tokens.json +982 -0
  123. package/src/styles/ods-colors.css +225 -146
  124. package/src/styles/ods_color_tokens.json +1 -300
  125. package/dist/chunk-3B43AHYE.cjs.map +0 -1
  126. package/dist/chunk-4ML3NA2L.js.map +0 -1
  127. package/dist/chunk-55HF462A.js.map +0 -1
  128. package/dist/chunk-CSW5GYBU.js.map +0 -1
  129. package/dist/chunk-OII2IERE.cjs.map +0 -1
  130. package/dist/chunk-UCY537V4.cjs.map +0 -1
@@ -6,11 +6,77 @@ import { Button } from "../ui/button"
6
6
  import { Tag } from "../ui/tag"
7
7
  import { CheckCircle, XCircle } from "lucide-react"
8
8
  import type { ApprovalRequestMessageProps } from "./types"
9
+ import type { ApprovalRequestField } from "./types/message.types"
10
+
11
+ /**
12
+ * Stacked label/value rows for the approval card's structured field
13
+ * list. Labels are tiny uppercase muted text; values render as primary
14
+ * text with `whitespace-pre-wrap` so multi-line descriptions
15
+ * (`content`, `resolution`, etc.) keep their structure. Mirrored across
16
+ * the pending + resolved branches so an approved ticket reads the same
17
+ * way it did at decision time.
18
+ */
19
+ function ApprovalFieldList({ fields }: { fields: ApprovalRequestField[] }) {
20
+ return (
21
+ <dl className="flex flex-col gap-2.5 mt-1">
22
+ {fields.map((f, i) => (
23
+ <div key={i} className="flex flex-col gap-0.5">
24
+ <dt className="font-['DM_Sans'] font-semibold text-[11px] uppercase tracking-wide text-ods-text-tertiary leading-4">
25
+ {f.label}
26
+ </dt>
27
+ <dd className="font-['DM_Sans'] text-sm text-ods-text-primary leading-5 whitespace-pre-wrap break-words">
28
+ {f.value}
29
+ </dd>
30
+ </div>
31
+ ))}
32
+ </dl>
33
+ )
34
+ }
35
+
36
+ /**
37
+ * Shared body for both pending and resolved branches of
38
+ * `<ApprovalRequestMessage>`. The pending card adds Approve/Reject
39
+ * buttons below; the resolved card adds an Approved/Rejected `<Tag>`.
40
+ * Everything ABOVE the footer — command bar, icon, structured-fields
41
+ * stack, explanation paragraph — is identical, so the body lives here
42
+ * to prevent silent drift between the two render paths (a prior
43
+ * version already had a `break-words` vs `break-all` mismatch on the
44
+ * `<code>` element from an out-of-sync copy-paste edit).
45
+ */
46
+ function ApprovalCardBody({
47
+ data,
48
+ }: {
49
+ data: ApprovalRequestMessageProps['data']
50
+ }) {
51
+ return (
52
+ <div className="flex flex-col gap-1">
53
+ <div className="bg-ods-bg border border-ods-border rounded-md p-3 flex gap-2 items-start max-h-32 overflow-y-auto">
54
+ <code className="font-['DM_Sans'] font-medium text-sm text-ods-text-primary flex-1 leading-5 whitespace-pre-wrap break-words">
55
+ {data.command}
56
+ </code>
57
+ {data.icon && (
58
+ <div className="w-4 h-4 shrink-0 text-ods-text-tertiary">
59
+ {data.icon}
60
+ </div>
61
+ )}
62
+ </div>
63
+ {data.fields && data.fields.length > 0 ? (
64
+ <ApprovalFieldList fields={data.fields} />
65
+ ) : (
66
+ data.explanation && (
67
+ <p className="font-['DM_Sans'] font-medium text-sm text-ods-text-secondary leading-5 whitespace-pre-line break-words">
68
+ {data.explanation}
69
+ </p>
70
+ )
71
+ )}
72
+ </div>
73
+ )
74
+ }
9
75
 
10
76
  const ApprovalRequestMessage = forwardRef<HTMLDivElement, ApprovalRequestMessageProps>(
11
77
  ({ className, data, onApprove, onReject, status = 'pending', ...props }, ref) => {
12
78
  const [isProcessing, setIsProcessing] = useState(false)
13
-
79
+
14
80
  const handleApprove = async () => {
15
81
  setIsProcessing(true)
16
82
  try {
@@ -28,49 +94,7 @@ const ApprovalRequestMessage = forwardRef<HTMLDivElement, ApprovalRequestMessage
28
94
  setIsProcessing(false)
29
95
  }
30
96
  }
31
-
32
- if (status !== 'pending') {
33
- return (
34
- <div
35
- ref={ref}
36
- className={cn(
37
- "bg-ods-card border border-ods-border rounded-md p-4 mb-2 flex flex-col gap-4",
38
- className
39
- )}
40
- {...props}
41
- >
42
- {/* Command and icon section */}
43
- <div className="flex flex-col gap-1">
44
- <div className="bg-ods-bg border border-ods-border rounded-md p-3 flex gap-2 items-start max-h-32 overflow-y-auto">
45
- <code className="font-['DM_Sans'] font-medium text-sm text-ods-text-primary flex-1 leading-5 whitespace-pre-wrap break-words">
46
- {data.command}
47
- </code>
48
- {data.icon && (
49
- <div className="w-4 h-4 shrink-0 text-ods-text-tertiary">
50
- {data.icon}
51
- </div>
52
- )}
53
- </div>
54
-
55
- {data.explanation && (
56
- <p className="font-['DM_Sans'] font-medium text-sm text-ods-text-secondary leading-5 whitespace-pre-line break-words">
57
- {data.explanation}
58
- </p>
59
- )}
60
- </div>
61
-
62
- {/* Status indicator */}
63
- <div className="flex">
64
- <Tag
65
- label={status === 'approved' ? 'Approved' : 'Rejected'}
66
- variant={status === 'approved' ? 'success' : 'error'}
67
- icon={status === 'approved' ? <CheckCircle className="w-4 h-4" /> : <XCircle className="w-4 h-4" />}
68
- />
69
- </div>
70
- </div>
71
- )
72
- }
73
-
97
+
74
98
  return (
75
99
  <div
76
100
  ref={ref}
@@ -80,55 +104,45 @@ const ApprovalRequestMessage = forwardRef<HTMLDivElement, ApprovalRequestMessage
80
104
  )}
81
105
  {...props}
82
106
  >
83
- {/* Command and icon section */}
84
- <div className="flex flex-col gap-1">
85
- <div className="bg-ods-bg border border-ods-border rounded-md p-3 flex gap-2 items-start max-h-32 overflow-y-auto">
86
- <code className="font-['DM_Sans'] font-medium text-sm text-ods-text-primary flex-1 leading-5 whitespace-pre-wrap break-all">
87
- {data.command}
88
- </code>
89
- {data.icon && (
90
- <div className="w-4 h-4 shrink-0 text-ods-text-tertiary">
91
- {data.icon}
92
- </div>
93
- )}
107
+ <ApprovalCardBody data={data} />
108
+ {status === 'pending' ? (
109
+ <div className="flex gap-4 items-center">
110
+ <Button
111
+ size="small-legacy"
112
+ variant="accent"
113
+ onClick={handleApprove}
114
+ disabled={isProcessing}
115
+ className={cn(
116
+ "bg-ods-accent hover:bg-ods-accent/90",
117
+ "font-mono font-medium md:!text-sm text-ods-bg uppercase tracking-[-0.28px]",
118
+ "px-2 py-1 h-auto"
119
+ )}
120
+ >
121
+ Approve
122
+ </Button>
123
+ <Button
124
+ size="small-legacy"
125
+ variant="outline"
126
+ onClick={handleReject}
127
+ disabled={isProcessing}
128
+ className={cn(
129
+ "bg-ods-card border-ods-border",
130
+ "font-mono font-medium md:!text-sm text-ods-text-primary uppercase tracking-[-0.28px]",
131
+ "hover:bg-ods-bg px-2 py-1 h-auto"
132
+ )}
133
+ >
134
+ Reject
135
+ </Button>
94
136
  </div>
95
-
96
- {data.explanation && (
97
- <p className="font-['DM_Sans'] font-medium text-sm text-ods-text-secondary leading-5">
98
- {data.explanation}
99
- </p>
100
- )}
101
- </div>
102
-
103
- {/* Approve/Reject buttons */}
104
- <div className="flex gap-4 items-center">
105
- <Button
106
- size="small-legacy"
107
- variant="accent"
108
- onClick={handleApprove}
109
- disabled={isProcessing}
110
- className={cn(
111
- "bg-ods-accent hover:bg-ods-accent/90",
112
- "font-mono font-medium md:!text-sm text-ods-bg uppercase tracking-[-0.28px]",
113
- "px-2 py-1 h-auto"
114
- )}
115
- >
116
- Approve
117
- </Button>
118
- <Button
119
- size="small-legacy"
120
- variant="outline"
121
- onClick={handleReject}
122
- disabled={isProcessing}
123
- className={cn(
124
- "bg-ods-card border-ods-border",
125
- "font-mono font-medium md:!text-sm text-ods-text-primary uppercase tracking-[-0.28px]",
126
- "hover:bg-ods-bg px-2 py-1 h-auto"
127
- )}
128
- >
129
- Reject
130
- </Button>
131
- </div>
137
+ ) : (
138
+ <div className="flex">
139
+ <Tag
140
+ label={status === 'approved' ? 'Approved' : 'Rejected'}
141
+ variant={status === 'approved' ? 'success' : 'error'}
142
+ icon={status === 'approved' ? <CheckCircle className="w-4 h-4" /> : <XCircle className="w-4 h-4" />}
143
+ />
144
+ </div>
145
+ )}
132
146
  </div>
133
147
  )
134
148
  }
@@ -11,14 +11,18 @@ import type { ConnectionIndicatorProps, ChatContainerProps, ChatHeaderProps } fr
11
11
  const ConnectionIndicator: React.FC<ConnectionIndicatorProps> = ({ status }) => {
12
12
  const getStatusStyles = () => {
13
13
  switch (status) {
14
+ // ODS attention tokens — same scheme used by the rest of the chat
15
+ // shell (StatusBadge, error toast, etc.). Hex Tailwind palette
16
+ // (`bg-green-500` / `bg-red-500`) would diverge from the theme and
17
+ // is forbidden by the host's design-token policy.
14
18
  case 'connected':
15
- return 'bg-green-500'
19
+ return 'bg-ods-attention-green-success'
16
20
  case 'connecting':
17
- return 'bg-yellow-500 animate-pulse'
21
+ return 'bg-ods-attention-yellow-warning animate-pulse'
18
22
  case 'disconnected':
19
- return 'bg-red-500'
23
+ return 'bg-ods-attention-red-error'
20
24
  default:
21
- return 'bg-gray-500'
25
+ return 'bg-ods-text-tertiary'
22
26
  }
23
27
  }
24
28
 
@@ -142,9 +146,9 @@ const ChatHeader = React.forwardRef<HTMLDivElement, ChatHeaderProps>(
142
146
  <div className="h-px bg-ods-border" />
143
147
  <div className="flex items-center justify-between gap-4 px-4 py-2">
144
148
  <div className="flex flex-col min-w-0">
145
- <span className="text-heading-3 truncate">{ticketInfo.title}</span>
149
+ <span className="text-heading-3 truncate" title={typeof ticketInfo.title === 'string' ? ticketInfo.title : undefined}>{ticketInfo.title}</span>
146
150
  {ticketInfo.meta && (
147
- <div className="text-h6 text-ods-text-secondary truncate">{ticketInfo.meta}</div>
151
+ <div className="text-h6 text-ods-text-secondary truncate" title={typeof ticketInfo.meta === 'string' ? ticketInfo.meta : undefined}>{ticketInfo.meta}</div>
148
152
  )}
149
153
  </div>
150
154
  {ticketInfo.status && <TicketStatusTag status={ticketInfo.status} />}
@@ -111,8 +111,32 @@ const ChatMessageEnhanced = forwardRef<HTMLDivElement, ChatMessageEnhancedProps>
111
111
  // returns the cached node so React reuses the same instance.
112
112
  let rendered = seenRendered.get(key)
113
113
  if (!seenRendered.has(key)) {
114
+ // Always invoke render() — even when the metadata map has
115
+ // no entry for this marker. Fetch-mode card types
116
+ // (delivery_item, roadmap_item, internal_task, etc.) don't
117
+ // ship metadata in the SSE frame; they self-fetch by `id`
118
+ // via the host's list-API hook, so a minimal {type,id}
119
+ // ChatRef is all the renderer needs to mount the loader.
120
+ // For no-fetch types (hubspot_ticket_self, slack_message,
121
+ // …) without a refMatch the host's render() returns null
122
+ // and we fall through to the bare-cardId fallback in the
123
+ // `<a card://…>` override below.
124
+ //
125
+ // SYNTHETIC REF DEFAULTS: `ChatRef.title` and `ChatRef.url`
126
+ // are non-optional in the type; a bare `{type, id}` cast
127
+ // would lie to consumers that read those fields. Default
128
+ // `title` to the cardId (so any host renderer that prints
129
+ // `ref.title` shows the id rather than `undefined`) and
130
+ // `url` to null (matches the no-link semantics fetch-mode
131
+ // cards rely on — they resolve their own URL after fetch).
114
132
  const refMatch = refs[key]
115
- rendered = refMatch ? render(refMatch) : undefined
133
+ const refForRender: ChatRef = refMatch ?? {
134
+ type: cardType,
135
+ id: cardId,
136
+ title: cardId,
137
+ url: null,
138
+ }
139
+ rendered = render(refForRender)
116
140
  seenRendered.set(key, rendered)
117
141
  }
118
142
  if (React.isValidElement(rendered) && rendered.type === BlockCard) {
@@ -171,15 +195,33 @@ const ChatMessageEnhanced = forwardRef<HTMLDivElement, ChatMessageEnhancedProps>
171
195
  const key = `${cardType}:${cardId}`
172
196
  const inline = inlineByKey?.get(key)
173
197
  if (inline != null) return inline
174
- // No renderer, no ref, OR renderer returned null fall back
175
- // to plain text title-only. Use any same-type ref's title if
176
- // available; otherwise the bare cardId. Never render the
177
- // literal `card://` URL.
198
+ // Three fallback cases keep them DISTINCT, never blur them
199
+ // together. Mixing them up (which the old code did by reaching
200
+ // for "any same-type ref's title") makes LLM hallucinations
201
+ // LOOK like real cards, which the user can't tell apart from
202
+ // genuine references.
203
+ //
204
+ // (1) Exact ref present, renderer returned null:
205
+ // The marker is legit (server confirmed the row exists)
206
+ // but no compact-card type is registered for `cardType`.
207
+ // Render the ref's REAL title as plain text — accurate,
208
+ // just no rich UI.
209
+ //
210
+ // (2) Exact ref absent (refs map has no `${cardType}:${cardId}`):
211
+ // The LLM emitted a marker for an ID the server did NOT
212
+ // surface. Either the LLM hallucinated the id, or the
213
+ // refs map and the snapshot drifted (server-side bug
214
+ // worth fixing — see `MAX_ROWS_PER_ENTITY_GROUP` in
215
+ // `doc-chat-utils.ts:buildSourcesMeta`). Render the raw
216
+ // `cardId` so the breakage is VISIBLE; never borrow a
217
+ // title from an unrelated ref — that hides the bug and
218
+ // deceives the reader into thinking they're looking at
219
+ // a real card.
178
220
  const refMatch: ChatRef | undefined = refs[key]
179
- const fallbackTitle = (refMatch?.title)
180
- ?? Object.values(refs).find((r) => r.type === cardType)?.title
181
- ?? cardId
182
- return <span className="text-ods-text-primary">{fallbackTitle}</span>
221
+ if (refMatch) {
222
+ return <span className="text-ods-text-primary">{refMatch.title}</span>
223
+ }
224
+ return <span className="text-ods-text-secondary opacity-60">{cardId}</span>
183
225
  }
184
226
  }
185
227
  // Unified click rule — delegated to the host's `NavLinkAnchor`
@@ -441,25 +441,33 @@ const ChatMessageList = forwardRef<HTMLDivElement, ChatMessageListProps>(
441
441
  <div ref={sentinelRef} className="h-px" />
442
442
  )}
443
443
  <div className="flex-1" />
444
- {messages.map((message, index) => (
445
- <ChatMessageEnhanced
446
- key={message.id}
447
- ref={getRegisterMessageEl(message.id)}
448
- role={message.role}
449
- name={message.name}
450
- content={message.content}
451
- timestamp={message.timestamp}
452
- isTyping={index === messages.length - 1 && isTyping && message.role === 'assistant'}
453
- avatar={showAvatars ? message.avatar : null}
454
- showAvatar={showAvatars}
455
- assistantType={message.assistantType || assistantType}
456
- authorType={message.authorType}
457
- assistantIcon={message.role !== 'user' ? assistantIcon : undefined}
458
- chatRefs={message.chatRefs}
459
- renderEntityCard={renderEntityCard}
460
- NavLinkAnchor={NavLinkAnchor}
461
- />
462
- ))}
444
+ {messages.map((message, index) => {
445
+ // Hidden messages (synthetic continuation prompts the host
446
+ // injects after an approval card) are part of the API
447
+ // conversation history but never render. Skipping here
448
+ // keeps the visible thread coherent — see
449
+ // `Message.hidden` doc-comment in message.types.ts.
450
+ if (message.hidden) return null
451
+ return (
452
+ <ChatMessageEnhanced
453
+ key={message.id}
454
+ ref={getRegisterMessageEl(message.id)}
455
+ role={message.role}
456
+ name={message.name}
457
+ content={message.content}
458
+ timestamp={message.timestamp}
459
+ isTyping={index === messages.length - 1 && isTyping && message.role === 'assistant'}
460
+ avatar={showAvatars ? message.avatar : null}
461
+ showAvatar={showAvatars}
462
+ assistantType={message.assistantType || assistantType}
463
+ authorType={message.authorType}
464
+ assistantIcon={message.role !== 'user' ? assistantIcon : undefined}
465
+ chatRefs={message.chatRefs}
466
+ renderEntityCard={renderEntityCard}
467
+ NavLinkAnchor={NavLinkAnchor}
468
+ />
469
+ )
470
+ })}
463
471
  </div>
464
472
  </div>
465
473
 
@@ -48,12 +48,11 @@ const ChatTicketItem = React.forwardRef<HTMLButtonElement, ChatTicketItemProps>(
48
48
  className={cn(
49
49
  "text-h3 truncate",
50
50
  isResolved ? "text-ods-text-secondary" : "text-ods-text-primary",
51
- )}
52
- >
51
+ )} title={ticket.title}>
53
52
  {ticket.title}
54
53
  </p>
55
54
  {subtitle && (
56
- <p className="text-h6 text-ods-text-secondary truncate">
55
+ <p className="text-h6 text-ods-text-secondary truncate" title={subtitle}>
57
56
  {subtitle}
58
57
  </p>
59
58
  )}
@@ -78,8 +78,24 @@ export interface ExecutingToolState {
78
78
 
79
79
  // ========== Approval Request Types ==========
80
80
 
81
+ export interface ApprovalRequestField {
82
+ /** Short label — e.g. "Subject", "Priority". Rendered in a muted
83
+ * caps style above the value. */
84
+ label: string
85
+ /** Free-text value. Wraps and line-breaks are preserved
86
+ * (`whitespace-pre-wrap`). */
87
+ value: string
88
+ }
89
+
81
90
  export interface ApprovalRequestData {
82
91
  command: string
92
+ /** Structured field list — preferred over `explanation`. When set,
93
+ * the approval card renders a vertical label/value stack with
94
+ * proper spacing. Falls back to `explanation` (a single paragraph)
95
+ * when omitted. Keep BOTH when you want hosts on older lib
96
+ * versions to still see the prose; new hosts should send only
97
+ * `fields`. */
98
+ fields?: ApprovalRequestField[]
83
99
  explanation?: string
84
100
  icon?: React.ReactNode
85
101
  requestId?: string
@@ -333,4 +349,23 @@ export interface Message {
333
349
  * whose body is a long article). The server is the sole decision-
334
350
  * maker — set on the metadata leading frame. */
335
351
  scrollAnchor?: ScrollAnchor
352
+ /** When true the message is part of the API conversation history (sent
353
+ * to the LLM so it has context) but is NOT rendered in the chat UI.
354
+ *
355
+ * Used for "synthetic continuation" turns: when the user clicks Approve
356
+ * on a tool proposal, the host auto-fires a follow-up `sendMessage`
357
+ * with `hidden: true` carrying a directive like "the user just
358
+ * approved <tool>; ask follow-up questions per protocol". The LLM's
359
+ * response IS rendered (as a normal assistant message); only the
360
+ * trigger prompt is suppressed so the chat reads naturally:
361
+ *
362
+ * user: "open a ticket"
363
+ * assistant: preamble + approval card
364
+ * [user clicks Approve]
365
+ * assistant: "Now to triage faster, can you share..." ← auto-fires
366
+ *
367
+ * Without this flag the trigger prompt would surface as a confusing
368
+ * bubble like "(continue per protocol)" between the approval card
369
+ * and the AI's follow-up. */
370
+ hidden?: boolean
336
371
  }
@@ -99,12 +99,12 @@ export function TicketCard({
99
99
  const body = (
100
100
  <>
101
101
  <div className="flex items-start gap-[var(--spacing-system-sf)]">
102
- <div className="flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-zero)]">
102
+ <div className="flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-zero)]" title={ticket.title}>
103
103
  <p className="text-h3 truncate text-ods-text-primary">{ticket.title}</p>
104
104
  {showDeviceRow && (
105
105
  <div className="flex min-w-0 items-center gap-[var(--spacing-system-xxs)] text-h6 text-ods-text-secondary">
106
106
  <LaptopIcon className="size-4 shrink-0" />
107
- <span className="truncate">{deviceText}</span>
107
+ <span className="truncate" title={deviceText}>{deviceText}</span>
108
108
  </div>
109
109
  )}
110
110
  </div>
@@ -429,7 +429,7 @@ export const FiltersDropdown: React.FC<FiltersDropdownProps> = ({
429
429
  )}
430
430
  >
431
431
  <FilterCheckbox checked={isSelected} />
432
- <span className="flex-1 min-w-0 text-h4 text-ods-text-primary truncate">
432
+ <span className="flex-1 min-w-0 text-h4 text-ods-text-primary truncate" title={option.label}>
433
433
  {option.label}
434
434
  </span>
435
435
  {option.count !== undefined && (
@@ -2,6 +2,21 @@
2
2
 
3
3
  // Feature Components exports
4
4
  export { DynamicThemeProvider, useDynamicTheme } from '../providers/dynamic-theme-provider'
5
+ // Canonical ODS theme system — thin wrapper over `next-themes`
6
+ // (manual light/dark, default dark, no-flash handled by next-themes).
7
+ // Headless by design: apps build their own toggle button via the lib's
8
+ // existing <Button> + `useThemeToggle()`.
9
+ export {
10
+ ThemeProvider,
11
+ useTheme,
12
+ useThemeToggle,
13
+ THEME_STORAGE_KEY,
14
+ THEME_ATTRIBUTE,
15
+ DEFAULT_THEME,
16
+ type Theme,
17
+ type ThemeProviderProps,
18
+ type UseThemeToggleResult,
19
+ } from '../providers/theme-provider'
5
20
  export * from './array-entry-manager'
6
21
  export * from './auth-providers-list'
7
22
  export * from './changelog-manager'
@@ -50,9 +50,9 @@ export function NotificationTile({
50
50
  </div>
51
51
 
52
52
  <div className="flex min-w-0 flex-1 flex-col">
53
- {title ? <p className="truncate text-h4 text-ods-text-primary">{title}</p> : null}
53
+ {title ? <p className="truncate text-h4 text-ods-text-primary" title={typeof title === 'string' ? title : undefined}>{title}</p> : null}
54
54
  {description ? (
55
- <p className="text-h6 line-clamp-2 text-ods-text-secondary">{description}</p>
55
+ <p className="text-h6 line-clamp-2 text-ods-text-secondary" title={typeof description === 'string' ? description : undefined}>{description}</p>
56
56
  ) : null}
57
57
  </div>
58
58
 
@@ -49,7 +49,7 @@ const PolicyRow: React.FC<{
49
49
 
50
50
  {/* Policy Info */}
51
51
  <div className="flex-1 flex flex-col min-w-0">
52
- <p className="text-[16px] font-medium text-ods-text-primary truncate">
52
+ <p className="text-[16px] font-medium text-ods-text-primary truncate" title={policy.name}>
53
53
  {policy.name}
54
54
  </p>
55
55
  <p className="text-[12px] text-ods-text-secondary break-all font-mono">
@@ -177,7 +177,7 @@ export function PushButtonSelector({
177
177
  {option.displayName || option.name}
178
178
  </div>
179
179
  {option.description && (
180
- <div className="font-['DM_Sans'] text-[12px] text-ods-text-secondary line-clamp-2">
180
+ <div className="font-['DM_Sans'] text-[12px] text-ods-text-secondary line-clamp-2" title={option.description}>
181
181
  {option.description}
182
182
  </div>
183
183
  )}
@@ -59,7 +59,7 @@ export const SelectButton = React.forwardRef<HTMLButtonElement, SelectButtonProp
59
59
  )}
60
60
 
61
61
  <span className="flex flex-1 flex-col justify-center min-w-0 overflow-hidden">
62
- <span className="md:text-[18px] text-[14px] font-medium text-ods-text-primary truncate">
62
+ <span className="md:text-[18px] text-[14px] font-medium text-ods-text-primary truncate" title={title}>
63
63
  {title}
64
64
  </span>
65
65
  {description && (
@@ -67,8 +67,7 @@ export const SelectButton = React.forwardRef<HTMLButtonElement, SelectButtonProp
67
67
  className={cn(
68
68
  "text-[14px] font-medium leading-5 truncate hidden md:flex",
69
69
  selected ? "text-ods-accent" : "text-ods-text-secondary",
70
- )}
71
- >
70
+ )} title={description}>
72
71
  {description}
73
72
  </span>
74
73
  )}
@@ -206,7 +206,7 @@ function VideoBiteCard({ url, title, thumbnailUrl }: VideoBiteCardProps) {
206
206
  </div>
207
207
  {title && (
208
208
  <div className="p-4">
209
- <p className="text-h4 text-ods-text-primary line-clamp-2">{title}</p>
209
+ <p className="text-h4 text-ods-text-primary line-clamp-2" title={title}>{title}</p>
210
210
  </div>
211
211
  )}
212
212
  </Card>
@@ -212,7 +212,7 @@ export function WaitlistForm({
212
212
  onKeyDown={handleKeyDown}
213
213
  />
214
214
  {showPhoneWarning && (
215
- <p className="text-h6 absolute bottom-0 left-0 translate-y-full text-[var(--ods-attention-yellow-warning)] truncate">
215
+ <p className="text-h6 absolute bottom-0 left-0 translate-y-full text-[var(--ods-attention-yellow-warning)] truncate" title={invalidPhoneHint}>
216
216
  {invalidPhoneHint}
217
217
  </p>
218
218
  )}
@@ -69,7 +69,7 @@ export function FilterChip({
69
69
  <span className={cn(
70
70
  "truncate font-['DM_Sans'] font-medium leading-none text-center",
71
71
  size === 'sm' ? "max-w-[100px] md:max-w-[120px]" : "max-w-[120px] md:max-w-[140px]"
72
- )}>
72
+ )} title={label}>
73
73
  {label}
74
74
  </span>
75
75
  {removable && onRemove && (
@@ -77,10 +77,10 @@ export function TitleBlock({
77
77
  )}
78
78
  <div className="flex flex-col justify-center min-w-0 flex-1">
79
79
  {title && (
80
- <h1 className="text-h2 text-ods-text-primary truncate">{title}</h1>
80
+ <h1 className="text-h2 text-ods-text-primary truncate" title={title}>{title}</h1>
81
81
  )}
82
82
  {subtitle && (
83
- <p className="text-h6 text-ods-text-secondary truncate">{subtitle}</p>
83
+ <p className="text-h6 text-ods-text-secondary truncate" title={subtitle}>{subtitle}</p>
84
84
  )}
85
85
  </div>
86
86
  </div>
@@ -48,7 +48,7 @@ export function HeaderOrganizationFilter({
48
48
  >
49
49
  <Filter02Icon className="w-4 h-4 shrink-0 text-ods-text-secondary" />
50
50
  <div className="flex flex-col items-start justify-center min-w-0">
51
- <span className="font-mono text-sm font-medium leading-5 text-ods-text-primary uppercase tracking-tight truncate">
51
+ <span className="font-mono text-sm font-medium leading-5 text-ods-text-primary uppercase tracking-tight truncate" title={displayName}>
52
52
  {displayName}
53
53
  </span>
54
54
  {deviceCount !== undefined && (