@flamingo-stack/openframe-frontend-core 0.0.274 → 0.0.275-snapshot.20260616145353

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 (179) hide show
  1. package/dist/{chunk-XDGDCO3I.cjs → chunk-2GLHJ7ZY.cjs} +45 -44
  2. package/dist/chunk-2GLHJ7ZY.cjs.map +1 -0
  3. package/dist/{chunk-FLIWL6V4.js → chunk-62U6DFIT.js} +4 -4
  4. package/dist/{chunk-5QJQAFTP.cjs → chunk-6IJWWLC3.cjs} +48 -12
  5. package/dist/chunk-6IJWWLC3.cjs.map +1 -0
  6. package/dist/{chunk-4YKGXZ7W.js → chunk-7AH75KFQ.js} +1 -1
  7. package/dist/chunk-7AH75KFQ.js.map +1 -0
  8. package/dist/{chunk-2KHFSSFZ.cjs → chunk-DPMW5E6Q.cjs} +15 -15
  9. package/dist/{chunk-2KHFSSFZ.cjs.map → chunk-DPMW5E6Q.cjs.map} +1 -1
  10. package/dist/{chunk-T7AJBKZP.cjs → chunk-GVSTRN36.cjs} +5 -2
  11. package/dist/chunk-GVSTRN36.cjs.map +1 -0
  12. package/dist/{chunk-4DYXV3E7.cjs → chunk-IAB7QACX.cjs} +1218 -1227
  13. package/dist/chunk-IAB7QACX.cjs.map +1 -0
  14. package/dist/{chunk-L4LAAA5Q.js → chunk-IMNGGLKL.js} +5 -2
  15. package/dist/chunk-IMNGGLKL.js.map +1 -0
  16. package/dist/{chunk-7NJUPRN6.cjs → chunk-LH7R56RR.cjs} +184 -209
  17. package/dist/chunk-LH7R56RR.cjs.map +1 -0
  18. package/dist/{chunk-WU6PMH5L.cjs → chunk-MYJKC56A.cjs} +41 -43
  19. package/dist/chunk-MYJKC56A.cjs.map +1 -0
  20. package/dist/{chunk-GL5X6VVC.js → chunk-NITJSVUM.js} +4 -4
  21. package/dist/{chunk-CYMMGPPV.js → chunk-NPKMH446.js} +41 -5
  22. package/dist/chunk-NPKMH446.js.map +1 -0
  23. package/dist/{chunk-MEAR2WHS.cjs → chunk-PC7YOZ4I.cjs} +1 -1
  24. package/dist/chunk-PC7YOZ4I.cjs.map +1 -0
  25. package/dist/{chunk-QLWBBCI5.cjs → chunk-Q2ITV3NY.cjs} +5 -4
  26. package/dist/chunk-Q2ITV3NY.cjs.map +1 -0
  27. package/dist/{chunk-VASNLWPZ.js → chunk-QNWFTSAG.js} +5 -7
  28. package/dist/{chunk-VASNLWPZ.js.map → chunk-QNWFTSAG.js.map} +1 -1
  29. package/dist/chunk-RGALV4UX.js +433 -0
  30. package/dist/chunk-RGALV4UX.js.map +1 -0
  31. package/dist/{chunk-W5KBDFCR.cjs → chunk-SITWWJWS.cjs} +30 -30
  32. package/dist/{chunk-W5KBDFCR.cjs.map → chunk-SITWWJWS.cjs.map} +1 -1
  33. package/dist/{chunk-N5MCKGAB.js → chunk-UCX75VEM.js} +34 -33
  34. package/dist/{chunk-N5MCKGAB.js.map → chunk-UCX75VEM.js.map} +1 -1
  35. package/dist/{chunk-ZMFT5XOB.js → chunk-UXJCZOLA.js} +4 -3
  36. package/dist/chunk-UXJCZOLA.js.map +1 -0
  37. package/dist/{chunk-OPSZNW3I.js → chunk-VAIPAZPJ.js} +3071 -3080
  38. package/dist/chunk-VAIPAZPJ.js.map +1 -0
  39. package/dist/{chunk-BSOHVQ7X.js → chunk-ZS4XNIZK.js} +367 -392
  40. package/dist/chunk-ZS4XNIZK.js.map +1 -0
  41. package/dist/chunk-ZSUNQJRO.cjs +433 -0
  42. package/dist/chunk-ZSUNQJRO.cjs.map +1 -0
  43. package/dist/components/chat/chat-message-row.d.ts +1 -1
  44. package/dist/components/chat/chat-message-row.d.ts.map +1 -1
  45. package/dist/components/chat/index.cjs +10 -11
  46. package/dist/components/chat/index.cjs.map +1 -1
  47. package/dist/components/chat/index.js +12 -13
  48. package/dist/components/chat/utils/history-merge.d.ts.map +1 -1
  49. package/dist/components/contact/index.cjs +7 -9
  50. package/dist/components/contact/index.cjs.map +1 -1
  51. package/dist/components/contact/index.js +6 -8
  52. package/dist/components/faq/faq-document-page.d.ts +21 -0
  53. package/dist/components/faq/faq-document-page.d.ts.map +1 -0
  54. package/dist/components/faq/index.cjs +22 -5
  55. package/dist/components/faq/index.cjs.map +1 -1
  56. package/dist/components/faq/index.d.ts +1 -0
  57. package/dist/components/faq/index.d.ts.map +1 -1
  58. package/dist/components/faq/index.js +21 -4
  59. package/dist/components/features/board/board.d.ts.map +1 -1
  60. package/dist/components/features/board/ticket-card.d.ts +2 -1
  61. package/dist/components/features/board/ticket-card.d.ts.map +1 -1
  62. package/dist/components/features/board/types.d.ts +1 -0
  63. package/dist/components/features/board/types.d.ts.map +1 -1
  64. package/dist/components/features/index.cjs +6 -8
  65. package/dist/components/features/index.cjs.map +1 -1
  66. package/dist/components/features/index.js +5 -7
  67. package/dist/components/index.cjs +304 -309
  68. package/dist/components/index.cjs.map +1 -1
  69. package/dist/components/index.js +249 -254
  70. package/dist/components/index.js.map +1 -1
  71. package/dist/components/layout/article-detail-layout.d.ts +21 -9
  72. package/dist/components/layout/article-detail-layout.d.ts.map +1 -1
  73. package/dist/components/navigation/index.cjs +6 -8
  74. package/dist/components/navigation/index.cjs.map +1 -1
  75. package/dist/components/navigation/index.js +5 -7
  76. package/dist/components/onboarding-guides/index.cjs +33 -46
  77. package/dist/components/onboarding-guides/index.cjs.map +1 -1
  78. package/dist/components/onboarding-guides/index.js +11 -24
  79. package/dist/components/onboarding-guides/index.js.map +1 -1
  80. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
  81. package/dist/components/related-content/index.cjs +8 -10
  82. package/dist/components/related-content/index.cjs.map +1 -1
  83. package/dist/components/related-content/index.js +7 -9
  84. package/dist/components/shared/delivery/delivery-lists.d.ts.map +1 -1
  85. package/dist/components/shared/detail-page-skeleton.d.ts +6 -1
  86. package/dist/components/shared/detail-page-skeleton.d.ts.map +1 -1
  87. package/dist/components/shared/legal-document/use-legal-docs.d.ts.map +1 -1
  88. package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
  89. package/dist/components/shared/roadmap/roadmap-grid.d.ts.map +1 -1
  90. package/dist/components/shared/roadmap/use-roadmap-voting.d.ts.map +1 -1
  91. package/dist/components/tickets/help-center-list.d.ts +9 -1
  92. package/dist/components/tickets/help-center-list.d.ts.map +1 -1
  93. package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
  94. package/dist/components/tickets/hooks/use-ticket-engagements.d.ts.map +1 -1
  95. package/dist/components/tickets/hooks/use-tickets-list.d.ts.map +1 -1
  96. package/dist/components/tickets/index.cjs +81 -76
  97. package/dist/components/tickets/index.cjs.map +1 -1
  98. package/dist/components/tickets/index.js +27 -22
  99. package/dist/components/tickets/index.js.map +1 -1
  100. package/dist/components/ui/actions-menu.d.ts +6 -0
  101. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  102. package/dist/components/ui/index.cjs +12 -15
  103. package/dist/components/ui/index.cjs.map +1 -1
  104. package/dist/components/ui/index.js +24 -27
  105. package/dist/contexts/chat-runtime-context.d.ts +9 -0
  106. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  107. package/dist/contexts/index.cjs +2 -2
  108. package/dist/contexts/index.js +1 -1
  109. package/dist/hooks/index.cjs +3 -3
  110. package/dist/hooks/index.js +2 -2
  111. package/dist/hooks/use-contact-submission.d.ts.map +1 -1
  112. package/dist/hooks/use-self-fetch.d.ts.map +1 -1
  113. package/dist/index.cjs +11 -15
  114. package/dist/index.cjs.map +1 -1
  115. package/dist/index.js +32 -36
  116. package/dist/utils/embed-authed-fetch.d.ts +7 -0
  117. package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
  118. package/dist/utils/embed-content-fetch.d.ts +2 -0
  119. package/dist/utils/embed-content-fetch.d.ts.map +1 -0
  120. package/dist/utils/index.cjs.map +1 -1
  121. package/dist/utils/index.js.map +1 -1
  122. package/package.json +1 -1
  123. package/src/components/chat/chat-message-row.tsx +12 -2
  124. package/src/components/chat/utils/history-merge.ts +27 -0
  125. package/src/components/faq/faq-document-page.tsx +69 -0
  126. package/src/components/faq/index.ts +1 -0
  127. package/src/components/features/board/board-column.tsx +1 -0
  128. package/src/components/features/board/board.tsx +6 -1
  129. package/src/components/features/board/ticket-card.tsx +23 -6
  130. package/src/components/features/board/types.ts +1 -0
  131. package/src/components/layout/article-detail-layout.tsx +24 -11
  132. package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +21 -16
  133. package/src/components/shared/delivery/delivery-lists.tsx +3 -2
  134. package/src/components/shared/detail-page-skeleton.tsx +18 -10
  135. package/src/components/shared/legal-document/use-legal-docs.ts +2 -1
  136. package/src/components/shared/product-release/release-detail-page.tsx +27 -17
  137. package/src/components/shared/roadmap/roadmap-grid.tsx +2 -1
  138. package/src/components/shared/roadmap/use-roadmap-voting.ts +3 -2
  139. package/src/components/tickets/help-center-list.tsx +12 -4
  140. package/src/components/tickets/hooks/use-ticket-actions.ts +7 -2
  141. package/src/components/tickets/hooks/use-ticket-engagements.ts +6 -1
  142. package/src/components/tickets/hooks/use-tickets-list.ts +7 -1
  143. package/src/components/tickets/ticket-detail-drawer.tsx +1 -0
  144. package/src/components/ui/actions-menu.tsx +11 -1
  145. package/src/contexts/chat-runtime-context.tsx +9 -0
  146. package/src/hooks/use-contact-submission.ts +2 -1
  147. package/src/hooks/use-self-fetch.ts +2 -1
  148. package/src/styles/index.css +1 -0
  149. package/src/styles/ods-page-shell.css +29 -0
  150. package/src/utils/embed-authed-fetch.ts +10 -0
  151. package/src/utils/embed-content-fetch.ts +30 -0
  152. package/dist/chunk-4DYXV3E7.cjs.map +0 -1
  153. package/dist/chunk-4YKGXZ7W.js.map +0 -1
  154. package/dist/chunk-5QJQAFTP.cjs.map +0 -1
  155. package/dist/chunk-722TTRIJ.cjs +0 -29
  156. package/dist/chunk-722TTRIJ.cjs.map +0 -1
  157. package/dist/chunk-7NJUPRN6.cjs.map +0 -1
  158. package/dist/chunk-BSOHVQ7X.js.map +0 -1
  159. package/dist/chunk-CYMMGPPV.js.map +0 -1
  160. package/dist/chunk-DAAFVOTL.cjs +0 -172
  161. package/dist/chunk-DAAFVOTL.cjs.map +0 -1
  162. package/dist/chunk-L4LAAA5Q.js.map +0 -1
  163. package/dist/chunk-MEAR2WHS.cjs.map +0 -1
  164. package/dist/chunk-OO4ZGDRO.js +0 -29
  165. package/dist/chunk-OO4ZGDRO.js.map +0 -1
  166. package/dist/chunk-OPSZNW3I.js.map +0 -1
  167. package/dist/chunk-QLWBBCI5.cjs.map +0 -1
  168. package/dist/chunk-T2URJAX2.js +0 -169
  169. package/dist/chunk-T2URJAX2.js.map +0 -1
  170. package/dist/chunk-T7AJBKZP.cjs.map +0 -1
  171. package/dist/chunk-WU6PMH5L.cjs.map +0 -1
  172. package/dist/chunk-XDGDCO3I.cjs.map +0 -1
  173. package/dist/chunk-Y2B6WDU6.cjs +0 -169
  174. package/dist/chunk-Y2B6WDU6.cjs.map +0 -1
  175. package/dist/chunk-ZMFT5XOB.js.map +0 -1
  176. package/dist/chunk-ZXZJSTNV.js +0 -172
  177. package/dist/chunk-ZXZJSTNV.js.map +0 -1
  178. /package/dist/{chunk-FLIWL6V4.js.map → chunk-62U6DFIT.js.map} +0 -0
  179. /package/dist/{chunk-GL5X6VVC.js.map → chunk-NITJSVUM.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.274",
3
+ "version": "0.0.275-snapshot.20260616145353",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  import Image from '../../embed-shims/next-image'
23
23
  import { getFirstLastInitials } from '../../utils/format'
24
24
  import { useProxiedImageUrl } from './hooks/use-proxied-image-url'
25
- import type { ReactNode } from 'react'
25
+ import { useState, type ReactNode } from 'react'
26
26
 
27
27
  export interface ChatMessageRowProps {
28
28
  /** Display name (bold, top-left). */
@@ -47,8 +47,17 @@ export function ChatMessageRow({
47
47
  body,
48
48
  footer,
49
49
  }: ChatMessageRowProps) {
50
+ // Avatars load directly from their (https) host — same as the rest of the app,
51
+ // so the browser disk-caches them (Google/etc. send `cache-control: max-age`).
52
+ // `useProxiedImageUrl` only rewrites http/relative URLs; https pass through.
50
53
  const proxiedAvatar = useProxiedImageUrl(avatarUrl ?? '')
51
- const src = proxiedAvatar || avatarUrl || undefined
54
+ const resolvedAvatar = proxiedAvatar || avatarUrl || undefined
55
+ // Fall back to the initials box if the avatar load FAILS (transient CDN 429,
56
+ // ad-blocker, dead URL) instead of showing a broken image. Keyed on the URL
57
+ // (not a bool) so a later render with a DIFFERENT avatar re-attempts the load
58
+ // rather than inheriting a stale failure.
59
+ const [failedSrc, setFailedSrc] = useState<string | null>(null)
60
+ const src = resolvedAvatar && resolvedAvatar !== failedSrc ? resolvedAvatar : undefined
52
61
  const hasBody = body.trim().length > 0
53
62
 
54
63
  return (
@@ -63,6 +72,7 @@ export function ChatMessageRow({
63
72
  className="w-8 h-8 md:w-10 md:h-10 rounded-lg object-cover flex-shrink-0"
64
73
  width={40}
65
74
  height={40}
75
+ onError={() => setFailedSrc(resolvedAvatar ?? null)}
66
76
  />
67
77
  ) : (
68
78
  <div className="w-8 h-8 md:w-10 md:h-10 rounded-lg flex-shrink-0 flex items-center justify-center bg-ods-bg border border-ods-border text-[12px] font-medium text-ods-text-primary font-body">
@@ -41,6 +41,20 @@ function isSyntheticRealtimeId(id: string): boolean {
41
41
  return SYNTHETIC_REALTIME_ID_PREFIXES.some((prefix) => id.startsWith(prefix))
42
42
  }
43
43
 
44
+ /** Rendered answer text of an assistant message (TEXT segments, or a plain string). Used to
45
+ * recognise a replayed synthetic as the twin of an already-persisted turn when the stream-seq
46
+ * signal can't prove it (see the trailing-turn fallback below). Empty for tool/approval-only
47
+ * turns that carry no answer text — callers must treat "" as "no signal", never as a match. */
48
+ function assistantAnswerText(content: MessageContent): string {
49
+ if (typeof content === 'string') return content.trim()
50
+ if (!Array.isArray(content)) return ''
51
+ const parts: string[] = []
52
+ for (const seg of content) {
53
+ if (seg.type === 'text') parts.push(seg.text)
54
+ }
55
+ return parts.join('\n').trim()
56
+ }
57
+
44
58
  /** Flattens DESC-sorted message pages (newest page first, newest message
45
59
  * first within a page) into one chronological list. */
46
60
  export function flattenMessagePagesChronological<T>(pages: readonly { messages: readonly T[] }[] | undefined): T[] {
@@ -170,6 +184,14 @@ export function mergeHistoryWithRealtime<M extends MergeableChatMessage>(input:
170
184
  }
171
185
  }
172
186
 
187
+ // Content-equality fallback for the trailing turn. The backend stamps `lastChunkStreamSeq`
188
+ // asynchronously, so a just-finished assistant can land in history with a seq BELOW the replay's
189
+ // terminal chunk seq; seq coverage then reads "not covered" and the replayed synthetic survives
190
+ // next to its persisted twin. Recognise the twin by its rendered answer text.
191
+ const lastProcessed = processedToUse[processedToUse.length - 1]
192
+ const trailingAssistantText =
193
+ lastProcessed && lastProcessed.role === 'assistant' ? assistantAnswerText(lastProcessed.content) : ''
194
+
173
195
  const realtimeMessages = existingMessages.filter((m) => {
174
196
  // Pin wins over everything: the twin may carry a persisted Mongo id (the
175
197
  // chunk processors ADOPT an in-progress trailing assistant after a prior
@@ -196,6 +218,11 @@ export function mergeHistoryWithRealtime<M extends MergeableChatMessage>(input:
196
218
  // (JetStream resumes after the highest seq this client has consumed).
197
219
  // Decided by seq coverage when known, wall-clock otherwise.
198
220
  if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
221
+ // A non-streaming synthetic that re-renders the trailing persisted assistant verbatim is its
222
+ // twin no matter what the seq signal says — drop it (covers the persistence-lag gap).
223
+ if (m.role === 'assistant' && trailingAssistantText && assistantAnswerText(m.content) === trailingAssistantText) {
224
+ return false
225
+ }
199
226
  const covered =
200
227
  historyCoversRealtime !== null ? historyCoversRealtime : (m.timestamp?.getTime() ?? 0) <= historyFetchedAt
201
228
  if (covered) return false
@@ -0,0 +1,69 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in
5
+ * ONE component instead of hand-assembling `PageShell` + `PageLayout` around the
6
+ * bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the
7
+ * page-level layout lives in the lib, the host passes only config + a back button.
8
+ *
9
+ * `<FaqSection heading={null}>` lets `PageLayout`'s `TitleBlock` own the heading +
10
+ * back button; it self-fetches `${apiBaseUrl}/api/faqs` via the authed
11
+ * `useSelfFetch`, and renders nothing on a fetch error or zero FAQs.
12
+ */
13
+
14
+ import { PageShell, PageLayout } from '../ui';
15
+ import { useRouter } from '../../embed-shims/next-navigation';
16
+ import { FaqSection } from './faq-section';
17
+
18
+ export interface FaqDocumentPageProps {
19
+ /** Page title (PageLayout TitleBlock). Default "FAQs". */
20
+ title?: string;
21
+ /** Subtitle under the title. */
22
+ subtitle?: string;
23
+ /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.
24
+ * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */
25
+ backButton?: { label?: string; href?: string } | false;
26
+ /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */
27
+ apiBaseUrl?: string;
28
+ /** Optional entity scoping forwarded to `FaqSection`. */
29
+ entityType?: string;
30
+ entityId?: number | string;
31
+ /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */
32
+ minResults?: number;
33
+ }
34
+
35
+ export function FaqDocumentPage({
36
+ title = 'FAQs',
37
+ subtitle,
38
+ backButton,
39
+ apiBaseUrl,
40
+ entityType,
41
+ entityId,
42
+ minResults,
43
+ }: FaqDocumentPageProps) {
44
+ const router = useRouter();
45
+
46
+ // Back-button config — mirrors LegalDocumentPage/DevSectionPage. Hide entirely
47
+ // when the caller passes `false` (embed-mode where the host owns nav chrome).
48
+ const backCfg =
49
+ backButton === false
50
+ ? undefined
51
+ : {
52
+ label: backButton?.label ?? 'Back to home',
53
+ onClick: () => router.push(backButton?.href ?? '/'),
54
+ };
55
+
56
+ return (
57
+ <PageShell>
58
+ <PageLayout title={title} subtitle={subtitle} backButton={backCfg}>
59
+ <FaqSection
60
+ heading={null}
61
+ apiBaseUrl={apiBaseUrl}
62
+ entityType={entityType}
63
+ entityId={entityId}
64
+ minResults={minResults}
65
+ />
66
+ </PageLayout>
67
+ </PageShell>
68
+ );
69
+ }
@@ -10,3 +10,4 @@
10
10
  // (Server-safe subpath is wired in tsup.config.ts under the server/universal
11
11
  // block and exposed via "./components/faq/json-ld" in package.json#exports.)
12
12
  export { FaqSection, type FaqSectionProps } from './faq-section'
13
+ export { FaqDocumentPage, type FaqDocumentPageProps } from './faq-document-page'
@@ -147,6 +147,7 @@ function ColumnBody({ column, getTicketHref, renderAssignSlot, onLoadMore, loadM
147
147
  key={t.id}
148
148
  ticket={t}
149
149
  columnId={column.id}
150
+ columnColor={column.color}
150
151
  href={getTicketHref?.(t.id)}
151
152
  renderAssignSlot={renderAssignSlot}
152
153
  dragDisabled={column.dragDisabled}
@@ -302,7 +302,12 @@ export function Board({
302
302
  </div>
303
303
  <DragOverlay dropAnimation={null}>
304
304
  {activeTicket ? (
305
- <TicketCard ticket={activeTicket.ticket} columnId={activeTicket.columnId} isOverlay />
305
+ <TicketCard
306
+ ticket={activeTicket.ticket}
307
+ columnId={activeTicket.columnId}
308
+ columnColor={items.find(c => c.id === activeTicket.columnId)?.color}
309
+ isOverlay
310
+ />
306
311
  ) : null}
307
312
  </DragOverlay>
308
313
  </DndContext>
@@ -4,11 +4,12 @@ import { useSortable } from '@dnd-kit/sortable'
4
4
  import { CSS } from '@dnd-kit/utilities'
5
5
  import Link from '../../../embed-shims/next-link'
6
6
  import * as React from 'react'
7
- import { LaptopIcon, Flag02Icon } from '../../icons-v2-generated'
7
+ import { LaptopIcon, Flag02Icon, MessagesIcon } from '../../icons-v2-generated'
8
8
  import { SquareAvatar } from '../../ui/square-avatar'
9
9
  import { Tag } from '../../ui/tag'
10
10
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip'
11
11
  import { cn } from '../../../utils/cn'
12
+ import { getReadableTextColor } from '../../../utils/ods-color-utils'
12
13
  import { formatTicketRelativeTime, formatTicketFullTimestamp } from '../../../utils/date-utils'
13
14
  import type { BoardPriority, BoardTicket } from './types'
14
15
 
@@ -25,6 +26,7 @@ const MAX_VISIBLE_ASSIGNEES = 3
25
26
  export interface TicketCardProps {
26
27
  ticket: BoardTicket
27
28
  columnId: string
29
+ columnColor?: string
28
30
  href?: string
29
31
  isOverlay?: boolean
30
32
  dragDisabled?: boolean
@@ -34,6 +36,7 @@ export interface TicketCardProps {
34
36
  export function TicketCard({
35
37
  ticket,
36
38
  columnId,
39
+ columnColor,
37
40
  href,
38
41
  isOverlay = false,
39
42
  dragDisabled,
@@ -49,10 +52,16 @@ export function TicketCard({
49
52
  disabled: dragDisabled,
50
53
  })
51
54
 
52
- const style: React.CSSProperties = {
53
- transform: CSS.Transform.toString(sortable.transform),
54
- transition: sortable.transition,
55
- }
55
+ const showNewMessage = !!ticket.hasNewMessage && !!columnColor
56
+ const newMessageTextColor = columnColor ? getReadableTextColor(columnColor) : undefined
57
+
58
+ const style: React.CSSProperties = isOverlay
59
+ ? {}
60
+ : {
61
+ transform: CSS.Transform.toString(sortable.transform),
62
+ transition: sortable.transition,
63
+ }
64
+ if (showNewMessage) style.borderColor = columnColor
56
65
 
57
66
  const showDeviceRow = !!(ticket.deviceHostnames?.length || ticket.organizationName)
58
67
  const deviceText = [
@@ -126,6 +135,14 @@ export function TicketCard({
126
135
  </Tooltip>
127
136
  </TooltipProvider>
128
137
  )}
138
+ {showNewMessage && (
139
+ <Tag
140
+ label="New Message"
141
+ icon={<MessagesIcon size={16} color={newMessageTextColor} />}
142
+ className="w-fit shrink-0"
143
+ style={{ backgroundColor: columnColor, color: newMessageTextColor }}
144
+ />
145
+ )}
129
146
  </>
130
147
  )
131
148
 
@@ -138,7 +155,7 @@ export function TicketCard({
138
155
 
139
156
  const outerProps = {
140
157
  ref: isOverlay ? undefined : sortable.setNodeRef,
141
- style: isOverlay ? undefined : style,
158
+ style,
142
159
  className: cardClasses,
143
160
  ...(isOverlay ? {} : sortable.attributes),
144
161
  ...(isOverlay ? {} : sortable.listeners),
@@ -21,6 +21,7 @@ export interface BoardTicket {
21
21
  assignees?: BoardTicketAssignee[]
22
22
  tags?: string[]
23
23
  createdAt?: string
24
+ hasNewMessage?: boolean
24
25
  }
25
26
 
26
27
  export interface BoardColumnDef {
@@ -1,30 +1,41 @@
1
1
  import React from 'react';
2
+ import { cn } from '../../utils/cn';
2
3
 
3
4
  /**
4
5
  * Unified page layout components.
5
6
  *
6
- * PageShell: Full-width layout for list pages (max-w-[1920px])
7
- * ArticleDetailLayout: Constrained layout for detail pages (max-w-[1280px])
7
+ * PageShell: full-width <main> for list pages, dashboards, and other wide
8
+ * layouts (max-w-[1920px]) — bg + min-height + centered, max-width content box.
9
+ * ArticleDetailLayout: the same shell constrained to a readable article width
10
+ * (max-w-[1280px]) — blog posts, release notes, case studies, etc.
11
+ * Child components render content only; no layout wrappers needed.
8
12
  *
9
- * Both provide: <main> + bg-ods-bg + responsive padding + max-width + centering.
10
- * Child components should render content only — no layout wrappers needed.
13
+ * Outer padding is driven by CSS custom properties (see
14
+ * `styles/ods-page-shell.css`), so an embedder matches its host grid by setting
15
+ * the `--page-shell-*` vars on ANY ancestor — no prop-threading through the lib
16
+ * wrappers (DevSectionPage / LegalDocumentPage / ReleaseDetailPage / …), no
17
+ * imperative global, no context. The cascade scopes each override to its own
18
+ * subtree. Per-instance escape hatch: `contentClassName` (Tailwind padding
19
+ * utilities there win over the class defaults).
11
20
  */
12
21
 
13
22
  interface LayoutProps {
14
23
  children: React.ReactNode;
15
24
  /** JSON-LD schema script elements (breadcrumbs, article schema, etc.) */
16
25
  schemas?: React.ReactNode;
26
+ /** Per-instance class override on the content box (wins over the var defaults). */
27
+ contentClassName?: string;
17
28
  }
18
29
 
19
30
  /**
20
31
  * Full-width page shell for list pages, dashboards, and other wide layouts.
21
32
  * Max width: 1920px.
22
33
  */
23
- export function PageShell({ children, schemas }: LayoutProps) {
34
+ export function PageShell({ children, schemas, contentClassName }: LayoutProps) {
24
35
  return (
25
36
  <main className="bg-ods-bg min-h-screen">
26
37
  {schemas}
27
- <div className="max-w-[1920px] mx-auto px-6 md:px-20 py-6 md:py-10">
38
+ <div className={cn('page-shell-content max-w-[1920px] mx-auto', contentClassName)}>
28
39
  {children}
29
40
  </div>
30
41
  </main>
@@ -32,15 +43,17 @@ export function PageShell({ children, schemas }: LayoutProps) {
32
43
  }
33
44
 
34
45
  /**
35
- * Constrained layout for article/detail pages.
36
- * Max width: 1280px for readable content width.
37
- * Used by: release pages, blog posts, case studies, investor updates, interviews.
46
+ * Constrained layout for article/detail pages (max-w-[1280px]) — readable
47
+ * content width for blog posts, release notes, case studies, investor updates.
48
+ * Fixed hub padding (`px-6 md:px-20 py-6 md:py-10`); pass `contentClassName` to
49
+ * override per instance. (PageShell's `--page-shell-*` var system does NOT apply
50
+ * here — this layout keeps its own fixed spacing.)
38
51
  */
39
- export function ArticleDetailLayout({ children, schemas }: LayoutProps) {
52
+ export function ArticleDetailLayout({ children, schemas, contentClassName }: LayoutProps) {
40
53
  return (
41
54
  <main className="bg-ods-bg min-h-screen">
42
55
  {schemas}
43
- <div className="max-w-[1280px] mx-auto px-6 md:px-20 py-6 md:py-10">
56
+ <div className={cn('max-w-[1280px] mx-auto px-6 md:px-20 py-6 md:py-10', contentClassName)}>
44
57
  {children}
45
58
  </div>
46
59
  </main>
@@ -16,9 +16,9 @@
16
16
  */
17
17
 
18
18
  import { type ComponentType, type ReactNode } from 'react'
19
- import { ArrowLeft } from 'lucide-react'
19
+ import { PageLayout } from '../layout/page-layout'
20
20
 
21
- import { Link } from '../../embed-shims'
21
+ import { useRouter } from '../../embed-shims'
22
22
  // PageShell (max-w-[1920px]) — the guide detail content must share the SAME
23
23
  // container sizing as the related-content/FAQ rail the host page renders
24
24
  // below it (which uses the wide shell). ArticleDetailLayout (1280px) made
@@ -91,6 +91,7 @@ export function OnboardingGuideDetailView({
91
91
  }: OnboardingGuideDetailViewProps) {
92
92
  const resolvedBackHref = backHref ?? basePath
93
93
  const runtime = useChatRuntime()
94
+ const router = useRouter()
94
95
 
95
96
  // Controlled (hub SSR `initialData`) OR self-fetch by slug (config-only embed).
96
97
  const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null
@@ -104,13 +105,26 @@ export function OnboardingGuideDetailView({
104
105
  })
105
106
 
106
107
  if (error || (!guide && !isLoading)) {
107
- return <LoadError message="Guide not found." onRetry={reload} />
108
+ return (
109
+ <PageShell>
110
+ <LoadError message="Guide not found." onRetry={reload} />
111
+ </PageShell>
112
+ )
108
113
  }
109
114
  if (!guide) {
110
115
  // Skeleton (not a bare "Loading…") for parity with every other shared view —
111
116
  // catalog, roadmap, releases all render a skeleton on first load, so the detail
112
- // page shouldn't flash text then content.
113
- return <DetailPageSkeleton showImageGallery={false} />
117
+ // page shouldn't flash text then content. `bare` + `PageShell` so the loading
118
+ // state matches the loaded page's full width / padding / min-height.
119
+ return (
120
+ <PageShell>
121
+ {/* Match the loaded page's top offset (TitleBlock's
122
+ `pt-[var(--spacing-system-l)]`) so content doesn't jump on load. */}
123
+ <div className="pt-[var(--spacing-system-l)]">
124
+ <DetailPageSkeleton bare showImageGallery={false} />
125
+ </div>
126
+ </PageShell>
127
+ )
114
128
  }
115
129
 
116
130
  const captionsUrl = getCaptionsUrl('onboarding_guide', guide.id, guide.srt_content)
@@ -135,16 +149,7 @@ export function OnboardingGuideDetailView({
135
149
 
136
150
  return (
137
151
  <PageShell>
138
- <div className="space-y-6 md:space-y-8">
139
- {/* Back link */}
140
- <Link
141
- href={resolvedBackHref}
142
- className="inline-flex items-center gap-2 text-ods-text-secondary hover:text-ods-accent transition-colors"
143
- >
144
- <ArrowLeft className="h-4 w-4" />
145
- <span className="text-h5">{backLabel}</span>
146
- </Link>
147
-
152
+ <PageLayout backButton={{ label: backLabel, onClick: () => router.push(resolvedBackHref) }}>
148
153
  <h1 className="text-h1 tracking-[-1.12px] text-ods-text-primary">{guide.title}</h1>
149
154
 
150
155
  {/* Tags — flat onboarding_guide_tags[] from entity_tags. */}
@@ -225,7 +230,7 @@ export function OnboardingGuideDetailView({
225
230
  </ul>
226
231
  </div>
227
232
  )}
228
- </div>
233
+ </PageLayout>
229
234
  </PageShell>
230
235
  )
231
236
  }
@@ -35,6 +35,7 @@ import { DeliveryTable } from './delivery-table';
35
35
  import { EmptyState } from '../../empty-state';
36
36
  import { LoadError } from '../../ui/error-state';
37
37
  import { DEV_SECTION_PARAM_KEYS } from '../../../utils/dev-sections/dev-section-param-keys';
38
+ import { contentFetch } from '../../../utils/embed-content-fetch';
38
39
 
39
40
  const DEFAULT_COMPLETED_ENDPOINT = '/api/delivery/completed';
40
41
  const DEFAULT_IN_PROGRESS_ENDPOINT = '/api/delivery/in-progress';
@@ -97,8 +98,8 @@ export function DeliveryLists({
97
98
 
98
99
  // Fetch completed and in-progress tasks separately with filters
99
100
  const [completedResponse, inProgressResponse] = await Promise.all([
100
- fetch(`${completedApiEndpoint}${queryParam}`),
101
- fetch(`${inProgressApiEndpoint}${queryParam}`),
101
+ contentFetch(`${completedApiEndpoint}${queryParam}`),
102
+ contentFetch(`${inProgressApiEndpoint}${queryParam}`),
102
103
  ]);
103
104
 
104
105
  if (!completedResponse.ok || !inProgressResponse.ok) {
@@ -1,23 +1,23 @@
1
1
  "use client";
2
2
 
3
- import { PageContainer } from '../layout/page-container';
3
+ import { PageLayout } from '../layout/page-layout';
4
4
 
5
5
  export interface DetailPageSkeletonProps {
6
6
  metadataColumns?: number; // Number of metadata grid columns (default 4)
7
7
  showImageGallery?: boolean; // Show horizontal image gallery (default true)
8
+ /** Render only the skeleton blocks, WITHOUT the self-contained page wrapper
9
+ * — the caller supplies its own (e.g. `<PageShell>`) so the loading state
10
+ * matches the loaded page's width, padding, and min-height. Default false
11
+ * (self-contained `<PageLayout>` at the hub article width). */
12
+ bare?: boolean;
8
13
  }
9
14
 
10
15
  export function DetailPageSkeleton({
11
16
  metadataColumns = 4,
12
- showImageGallery = true
17
+ showImageGallery = true,
18
+ bare = false
13
19
  }: DetailPageSkeletonProps = {}) {
14
- return (
15
- <PageContainer
16
- as="article"
17
- backgroundClassName="bg-ods-bg"
18
- contentPadding="py-6 md:py-10 px-6 md:px-20"
19
- maxWidth="max-w-[1280px]"
20
- >
20
+ const content = (
21
21
  <div className="space-y-6 md:space-y-10 animate-pulse">
22
22
  {/* Title Block */}
23
23
  <div className="flex flex-col gap-6 w-full">
@@ -67,6 +67,14 @@ export function DetailPageSkeleton({
67
67
  </div>
68
68
  ))}
69
69
  </div>
70
- </PageContainer>
70
+ );
71
+ if (bare) return content;
72
+ return (
73
+ <PageLayout
74
+ showHeader={false}
75
+ className="bg-ods-bg max-w-[1280px] mx-auto py-6 md:py-10 px-6 md:px-20"
76
+ >
77
+ {content}
78
+ </PageLayout>
71
79
  );
72
80
  }
@@ -14,6 +14,7 @@
14
14
  */
15
15
 
16
16
  import { useState, useEffect, useCallback } from 'react';
17
+ import { contentFetch } from '../../../utils/embed-content-fetch';
17
18
 
18
19
  export interface LegalDocument {
19
20
  title: string;
@@ -68,7 +69,7 @@ export function useLegalDocs(
68
69
  setIsLoading(true);
69
70
  setError(null);
70
71
 
71
- const response = await fetch(effectiveEndpoint);
72
+ const response = await contentFetch(effectiveEndpoint);
72
73
 
73
74
  if (!response.ok) {
74
75
  throw new Error(
@@ -8,7 +8,7 @@ import { Card, CardContent } from '../../ui/card';
8
8
  // renders below this view (was ArticleDetailLayout, 1280px — narrower than
9
9
  // the rail, see hub detail-container alignment decision 2026-06-10).
10
10
  import { PageShell } from '../../layout/article-detail-layout';
11
- import { BackButton } from '../../layout/back-button';
11
+ import { PageLayout } from '../../layout/page-layout';
12
12
  import { ReleaseChangelogSection } from '../../ui/release-changelog-section';
13
13
  import { EntityTagBadges } from '../../features/entity-tag-badges';
14
14
  import { EntityMetadataAuthorCell } from '../../chat/entity-cards/entity-author-card';
@@ -17,6 +17,7 @@ import { MediaGalleryStrip } from '../media-gallery-strip';
17
17
  import { GitHubIcon } from '../../icons/github-icon';
18
18
  import { AlertTriangle, ExternalLink, BookMarked, Sparkles, TrendingUp, Wrench } from 'lucide-react';
19
19
  import { formatReleaseDate } from '../../../utils/date-formatters';
20
+ import { contentFetch } from '../../../utils/embed-content-fetch';
20
21
  import { Video } from '../../features/video';
21
22
  import { DetailPageSkeleton } from '../detail-page-skeleton';
22
23
  import type { ChangelogEntry } from '../../../types/product-release';
@@ -158,7 +159,7 @@ export function ReleaseDetailPage({
158
159
  if (roadmapTasksData && roadmapTasksData.length > 0 && RoadmapSection) {
159
160
  setRoadmapLoading(true);
160
161
  const roadmapIds = roadmapTasksData.map(t => t.clickup_task_id).join(',');
161
- const roadmapResponse = await fetch(`${roadmapApiEndpoint}?task_ids=${roadmapIds}`);
162
+ const roadmapResponse = await contentFetch(`${roadmapApiEndpoint}?task_ids=${roadmapIds}`);
162
163
  const roadmapData = await roadmapResponse.json();
163
164
  setRoadmapTasks(roadmapData.items || []);
164
165
  setRoadmapLoading(false);
@@ -169,7 +170,7 @@ export function ReleaseDetailPage({
169
170
  if (deliveryTasksData && deliveryTasksData.length > 0 && DeliverySection) {
170
171
  setDeliveryLoading(true);
171
172
  const deliveryIds = deliveryTasksData.map(t => t.clickup_task_id).join(',');
172
- const deliveryResponse = await fetch(`${deliveryApiEndpoint}?task_ids=${deliveryIds}`);
173
+ const deliveryResponse = await contentFetch(`${deliveryApiEndpoint}?task_ids=${deliveryIds}`);
173
174
  const deliveryResponseData = await deliveryResponse.json();
174
175
  setDeliveryData(deliveryResponseData);
175
176
  setDeliveryLoading(false);
@@ -186,15 +187,27 @@ export function ReleaseDetailPage({
186
187
 
187
188
  // Don't show loading skeleton if we have initialData
188
189
  if (!initialData && isLoading) {
189
- return <DetailPageSkeleton metadataColumns={4} showImageGallery={true} />;
190
+ // `bare` + `PageShell` so the loading state matches the loaded page's full
191
+ // width / padding / min-height (the wrapper supplies the page chrome).
192
+ return (
193
+ <PageShell>
194
+ {/* Match the loaded page's top offset (TitleBlock's
195
+ `pt-[var(--spacing-system-l)]`) so content doesn't jump on load. */}
196
+ <div className="pt-[var(--spacing-system-l)]">
197
+ <DetailPageSkeleton bare metadataColumns={4} showImageGallery={true} />
198
+ </div>
199
+ </PageShell>
200
+ );
190
201
  }
191
202
 
192
203
  if (error || !release) {
193
204
  return (
194
- <div className="text-center py-16">
195
- <h1 className="text-4xl font-bold text-ods-text-primary mb-4">Release Not Found</h1>
196
- <p className="text-xl text-ods-text-secondary">The release you&apos;re looking for doesn&apos;t exist.</p>
197
- </div>
205
+ <PageShell>
206
+ <div className="text-center py-16">
207
+ <h1 className="text-4xl font-bold text-ods-text-primary mb-4">Release Not Found</h1>
208
+ <p className="text-xl text-ods-text-secondary">The release you&apos;re looking for doesn&apos;t exist.</p>
209
+ </div>
210
+ </PageShell>
198
211
  );
199
212
  }
200
213
 
@@ -228,15 +241,11 @@ export function ReleaseDetailPage({
228
241
 
229
242
  return (
230
243
  <PageShell>
231
- {/* Back button — desktop-only, matches DevSectionPage / LegalDocumentPage
232
- (TitleBlock renders the same `hidden md:inline-flex` BackButton). */}
233
- {showBackButton && (
234
- <BackButton
235
- label={backLabel}
236
- onClick={() => router.push(backHref)}
237
- className="hidden md:inline-flex mb-4"
238
- />
239
- )}
244
+ <PageLayout
245
+ backButton={
246
+ showBackButton ? { label: backLabel, onClick: () => router.push(backHref) } : undefined
247
+ }
248
+ >
240
249
  <div className="space-y-6 md:space-y-8">
241
250
  {/* Title Block */}
242
251
  <div className="flex flex-col md:flex-row md:items-end gap-4 w-full">
@@ -557,6 +566,7 @@ export function ReleaseDetailPage({
557
566
  </div>
558
567
  )}
559
568
  </div>
569
+ </PageLayout>
560
570
  </PageShell>
561
571
  );
562
572
  }
@@ -33,6 +33,7 @@ import {
33
33
  AccordionContent,
34
34
  } from '../../ui';
35
35
  import { cn } from '../../../utils/cn';
36
+ import { contentFetch } from '../../../utils/embed-content-fetch';
36
37
  import type { RoadmapItem } from '../../chat/types/entities/roadmap-item';
37
38
 
38
39
  const DEFAULT_BUILD_REFRESH_URL = (taskId: string) => `/api/roadmap/${taskId}`;
@@ -165,7 +166,7 @@ export function RoadmapGrid({
165
166
  try {
166
167
  const result = await toggleVote(taskId, voteType);
167
168
  if (result.success) {
168
- const response = await fetch(buildRefreshUrl(taskId));
169
+ const response = await contentFetch(buildRefreshUrl(taskId));
169
170
  if (response.ok) {
170
171
  const data = await response.json();
171
172
  if (data.item && onItemUpdate) onItemUpdate(data.item);
@@ -16,6 +16,7 @@
16
16
  */
17
17
 
18
18
  import { useState, useEffect, useCallback } from 'react';
19
+ import { contentFetch } from '../../../utils/embed-content-fetch';
19
20
 
20
21
  export type VoteType = 'up' | 'down' | null;
21
22
 
@@ -100,7 +101,7 @@ export function useRoadmapVoting(options: UseRoadmapVotingOptions = {}) {
100
101
  // User clicked different vote - set it. If they had an opposite
101
102
  // vote, remove that first so the server totals stay consistent.
102
103
  if (currentVote) {
103
- await fetch(voteApiEndpoint, {
104
+ await contentFetch(voteApiEndpoint, {
104
105
  method: 'POST',
105
106
  headers: { 'Content-Type': 'application/json' },
106
107
  body: JSON.stringify({
@@ -122,7 +123,7 @@ export function useRoadmapVoting(options: UseRoadmapVotingOptions = {}) {
122
123
  }));
123
124
 
124
125
  try {
125
- const response = await fetch(voteApiEndpoint, {
126
+ const response = await contentFetch(voteApiEndpoint, {
126
127
  method: 'POST',
127
128
  headers: { 'Content-Type': 'application/json' },
128
129
  body: JSON.stringify({ taskId, voteType, action }),