@flamingo-stack/openframe-frontend-core 0.0.825 → 0.0.826

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 (317) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-IZBMHA6R.cjs → case-study-card-O4IQCJAX.cjs} +5 -5
  3. package/dist/{chunk-QOAA7ZHB.cjs → chunk-2HQNXX2K.cjs} +2 -2
  4. package/dist/{chunk-2U7GXE3T.cjs → chunk-2TQJSB62.cjs} +2157 -811
  5. package/dist/{chunk-NONMZ5WJ.cjs → chunk-2VLPXUQK.cjs} +14 -83
  6. package/dist/{chunk-7DJWIVQC.cjs → chunk-37OYBX7W.cjs} +36 -36
  7. package/dist/{chunk-OBQ5WUNG.cjs → chunk-3B6ZE4EZ.cjs} +29 -29
  8. package/dist/{chunk-AO6YVNAH.cjs → chunk-5AQKXEMI.cjs} +979 -1357
  9. package/dist/{chunk-25HBH4J6.cjs → chunk-5BM7X4GA.cjs} +2 -2
  10. package/dist/{chunk-47SHKOCY.cjs → chunk-63T2KKDZ.cjs} +86 -86
  11. package/dist/{chunk-MHR4C465.cjs → chunk-6G4WRMEM.cjs} +3 -3
  12. package/dist/{chunk-AUBR3FGY.cjs → chunk-74GWFGH2.cjs} +28 -28
  13. package/dist/{chunk-467T3LCG.cjs → chunk-7PZQ7SHB.cjs} +49 -32
  14. package/dist/{chunk-6LVJKPR3.cjs → chunk-AJM4YZTW.cjs} +8 -8
  15. package/dist/{chunk-2XLPRW7V.cjs → chunk-BIG3O33P.cjs} +6 -2
  16. package/dist/chunk-BMQLM2NU.cjs +40 -0
  17. package/dist/{chunk-DVHSYPDB.cjs → chunk-DAKGX2WF.cjs} +2 -2
  18. package/dist/{chunk-2IWAHBCC.cjs → chunk-DRSFR5AC.cjs} +159 -159
  19. package/dist/{chunk-IJCSQFLD.cjs → chunk-DU6AF77X.cjs} +83 -121
  20. package/dist/{chunk-NL34HKLS.cjs → chunk-EJNDTSKY.cjs} +91 -91
  21. package/dist/{chunk-SBFBNOKU.cjs → chunk-ENMPSEEQ.cjs} +4 -4
  22. package/dist/{chunk-ZECG6GU5.cjs → chunk-F2J5WN6U.cjs} +2 -2
  23. package/dist/{chunk-BOS7OIC4.cjs → chunk-GRHF5SWL.cjs} +5 -2
  24. package/dist/{chunk-Z7BLMJEI.cjs → chunk-GZAPOCKS.cjs} +54 -54
  25. package/dist/{chunk-5S2GW6YG.cjs → chunk-HJAPXKWK.cjs} +17 -17
  26. package/dist/{chunk-P25RVNGX.cjs → chunk-HQ4FKHOO.cjs} +249 -108
  27. package/dist/{chunk-ZRDVFADQ.cjs → chunk-IBD2FPSX.cjs} +75 -9
  28. package/dist/{chunk-T266OITJ.cjs → chunk-IKWQW3YJ.cjs} +45 -45
  29. package/dist/{chunk-B7NSH7IK.cjs → chunk-IWQ2LJGW.cjs} +5 -5
  30. package/dist/{chunk-MALCUN2G.cjs → chunk-JDR72QFU.cjs} +12 -14
  31. package/dist/{chunk-EHANO6UE.cjs → chunk-K34TTZAE.cjs} +9 -129
  32. package/dist/{chunk-QDDBOCG3.cjs → chunk-KPGKTEEB.cjs} +2 -2
  33. package/dist/{chunk-4IY5FKYL.cjs → chunk-MDEOCOIE.cjs} +23 -23
  34. package/dist/chunk-OEP5KAT6.cjs +56 -0
  35. package/dist/chunk-OT6P57ZS.cjs +94 -0
  36. package/dist/{chunk-QQT23JJ7.cjs → chunk-PBHP3FHO.cjs} +4 -4
  37. package/dist/{chunk-IMMTH3F3.cjs → chunk-PJY3SYCS.cjs} +29 -27
  38. package/dist/{chunk-N7IDLF2G.cjs → chunk-PWAKRRRO.cjs} +1283 -268
  39. package/dist/{chunk-UEULXVW2.cjs → chunk-QS6AKUUL.cjs} +22 -22
  40. package/dist/{chunk-BN7QENV7.cjs → chunk-QYJZDEG7.cjs} +6 -6
  41. package/dist/{chunk-NPNZAAOB.cjs → chunk-S6UJEW4G.cjs} +2 -2
  42. package/dist/{chunk-XJMLZ63Y.cjs → chunk-TJG2BJ5J.cjs} +4 -4
  43. package/dist/{chunk-QOOMUGF2.cjs → chunk-TYJ73DHW.cjs} +15 -15
  44. package/dist/{chunk-A34UNP5V.cjs → chunk-W4VEDSAX.cjs} +80 -11
  45. package/dist/{chunk-DNZCSPMU.cjs → chunk-WGMU45NV.cjs} +20 -20
  46. package/dist/{chunk-APTFXX2C.cjs → chunk-XDHQC4XH.cjs} +46 -46
  47. package/dist/{cloud-tenants-M4VFFN33.cjs → cloud-tenants-F67KQ5GC.cjs} +108 -106
  48. package/dist/components/case-studies/index.cjs +124 -122
  49. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  50. package/dist/components/chat/approval-batch-message.js +2 -2
  51. package/dist/components/chat/chat-archive-page.d.ts +7 -0
  52. package/dist/components/chat/chat-archive-page.d.ts.map +1 -1
  53. package/dist/components/chat/chat-archive-page.js +9 -0
  54. package/dist/components/chat/chat-composer.d.ts +24 -4
  55. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  56. package/dist/components/chat/chat-composer.js +90 -48
  57. package/dist/components/chat/chat-context-memory-bar.d.ts +4 -1
  58. package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -1
  59. package/dist/components/chat/chat-context-memory-bar.js +8 -5
  60. package/dist/components/chat/chat-context-picker.d.ts +8 -1
  61. package/dist/components/chat/chat-context-picker.d.ts.map +1 -1
  62. package/dist/components/chat/chat-context-picker.js +32 -9
  63. package/dist/components/chat/chat-header-rename-field.d.ts +18 -0
  64. package/dist/components/chat/chat-header-rename-field.d.ts.map +1 -0
  65. package/dist/components/chat/chat-header-rename-field.js +49 -0
  66. package/dist/components/chat/chat-input.d.ts.map +1 -1
  67. package/dist/components/chat/chat-input.js +5 -0
  68. package/dist/components/chat/composer-sheet.d.ts +44 -0
  69. package/dist/components/chat/composer-sheet.d.ts.map +1 -0
  70. package/dist/components/chat/composer-sheet.js +140 -0
  71. package/dist/components/chat/embeddable-chat.d.ts +114 -1
  72. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  73. package/dist/components/chat/embeddable-chat.js +328 -215
  74. package/dist/components/chat/index.cjs +118 -103
  75. package/dist/components/chat/index.d.ts +6 -0
  76. package/dist/components/chat/index.d.ts.map +1 -1
  77. package/dist/components/chat/index.js +9 -0
  78. package/dist/components/chat/mingo-chat-day-groups.d.ts +18 -0
  79. package/dist/components/chat/mingo-chat-day-groups.d.ts.map +1 -0
  80. package/dist/components/chat/mingo-chat-day-groups.js +45 -0
  81. package/dist/components/chat/mingo-chat-header.d.ts +34 -6
  82. package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
  83. package/dist/components/chat/mingo-chat-header.js +44 -7
  84. package/dist/components/chat/mingo-chat-history-section.d.ts +30 -0
  85. package/dist/components/chat/mingo-chat-history-section.d.ts.map +1 -0
  86. package/dist/components/chat/mingo-chat-history-section.js +500 -0
  87. package/dist/components/chat/mingo-chat-history.d.ts +5 -2
  88. package/dist/components/chat/mingo-chat-history.d.ts.map +1 -1
  89. package/dist/components/chat/mingo-chat-history.js +26 -30
  90. package/dist/components/chat/mingo-chat-list-shared.d.ts +136 -0
  91. package/dist/components/chat/mingo-chat-list-shared.d.ts.map +1 -0
  92. package/dist/components/chat/mingo-chat-list-shared.js +76 -0
  93. package/dist/components/chat/mingo-chat-rail.d.ts +19 -51
  94. package/dist/components/chat/mingo-chat-rail.d.ts.map +1 -1
  95. package/dist/components/chat/mingo-chat-rail.js +23 -45
  96. package/dist/components/chat/mingo-edge-light.d.ts +13 -0
  97. package/dist/components/chat/mingo-edge-light.d.ts.map +1 -0
  98. package/dist/components/chat/mingo-edge-light.js +17 -0
  99. package/dist/components/chat/mingo-history-rail.d.ts +5 -4
  100. package/dist/components/chat/mingo-history-rail.d.ts.map +1 -1
  101. package/dist/components/chat/mingo-history-rail.js +5 -10
  102. package/dist/components/chat/mingo-quick-action-wall.d.ts +27 -0
  103. package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -0
  104. package/dist/components/chat/mingo-quick-action-wall.js +41 -0
  105. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  106. package/dist/components/chat/mingo-welcome.js +6 -20
  107. package/dist/components/chat/model-display.d.ts.map +1 -1
  108. package/dist/components/chat/model-display.js +38 -9
  109. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  110. package/dist/components/chat/tool-execution-display.js +15 -1
  111. package/dist/components/chat/types/component.types.d.ts +13 -1
  112. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  113. package/dist/components/chat/utils/chat-day-label.d.ts +8 -0
  114. package/dist/components/chat/utils/chat-day-label.d.ts.map +1 -0
  115. package/dist/components/chat/utils/chat-day-label.js +21 -0
  116. package/dist/components/contact/index.cjs +109 -107
  117. package/dist/components/docs/index.cjs +112 -110
  118. package/dist/components/embeds/index.cjs +109 -107
  119. package/dist/components/faq/index.cjs +110 -108
  120. package/dist/components/features/board/board-column.d.ts +3 -1
  121. package/dist/components/features/board/board-column.d.ts.map +1 -1
  122. package/dist/components/features/board/board-column.js +6 -2
  123. package/dist/components/features/board/board.d.ts +6 -0
  124. package/dist/components/features/board/board.d.ts.map +1 -1
  125. package/dist/components/features/board/board.js +14 -3
  126. package/dist/components/features/board/touch-board.d.ts +1 -1
  127. package/dist/components/features/board/touch-board.d.ts.map +1 -1
  128. package/dist/components/features/board/touch-board.js +3 -1
  129. package/dist/components/features/index.cjs +108 -106
  130. package/dist/components/features/notifications/approval-request-notification-tile.d.ts +7 -1
  131. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  132. package/dist/components/features/notifications/approval-request-notification-tile.js +1 -1
  133. package/dist/components/features/notifications/notification-drawer.d.ts +6 -1
  134. package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
  135. package/dist/components/features/notifications/notification-drawer.js +3 -2
  136. package/dist/components/features/notifications/notification-tile.d.ts +4 -1
  137. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  138. package/dist/components/features/notifications/notification-tile.js +9 -7
  139. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +18 -1
  140. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
  141. package/dist/components/features/time-tracker/time-tracker-header-button.js +31 -7
  142. package/dist/components/help-center-pages/index.cjs +217 -215
  143. package/dist/components/icons-v2-generated/icon-loaders.d.ts.map +1 -1
  144. package/dist/components/icons-v2-generated/icon-loaders.js +1 -0
  145. package/dist/components/icons-v2-generated/icon-names.js +1 -1
  146. package/dist/components/icons-v2-generated/index.cjs +90 -86
  147. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.d.ts.map +1 -1
  148. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.js +21 -24
  149. package/dist/components/icons-v2-generated/logos/index.d.ts +1 -0
  150. package/dist/components/icons-v2-generated/logos/index.d.ts.map +1 -1
  151. package/dist/components/icons-v2-generated/logos/index.js +2 -0
  152. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts +9 -0
  153. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts.map +1 -0
  154. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.js +36 -0
  155. package/dist/components/index.cjs +215 -182
  156. package/dist/components/meeting-scheduler/index.cjs +182 -180
  157. package/dist/components/navigation/account-popover.d.ts +62 -0
  158. package/dist/components/navigation/account-popover.d.ts.map +1 -0
  159. package/dist/components/navigation/account-popover.js +138 -0
  160. package/dist/components/navigation/app-header.d.ts +36 -2
  161. package/dist/components/navigation/app-header.d.ts.map +1 -1
  162. package/dist/components/navigation/app-header.js +28 -24
  163. package/dist/components/navigation/app-layout-context.d.ts +17 -0
  164. package/dist/components/navigation/app-layout-context.d.ts.map +1 -1
  165. package/dist/components/navigation/app-layout-context.js +9 -1
  166. package/dist/components/navigation/app-layout.d.ts +93 -1
  167. package/dist/components/navigation/app-layout.d.ts.map +1 -1
  168. package/dist/components/navigation/app-layout.js +149 -30
  169. package/dist/components/navigation/header-button.d.ts +11 -1
  170. package/dist/components/navigation/header-button.d.ts.map +1 -1
  171. package/dist/components/navigation/header-button.js +16 -5
  172. package/dist/components/navigation/header-mingo-button.d.ts.map +1 -1
  173. package/dist/components/navigation/header-mingo-button.js +6 -5
  174. package/dist/components/navigation/index.cjs +120 -109
  175. package/dist/components/navigation/index.d.ts +10 -1
  176. package/dist/components/navigation/index.d.ts.map +1 -1
  177. package/dist/components/navigation/index.js +8 -0
  178. package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
  179. package/dist/components/navigation/mingo-ai-button.js +2 -1
  180. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  181. package/dist/components/navigation/mobile-burger-menu.js +155 -39
  182. package/dist/components/navigation/navigation-sidebar-grouped.d.ts +57 -0
  183. package/dist/components/navigation/navigation-sidebar-grouped.d.ts.map +1 -0
  184. package/dist/components/navigation/navigation-sidebar-grouped.js +365 -0
  185. package/dist/components/navigation/navigation-sidebar-match.d.ts +37 -0
  186. package/dist/components/navigation/navigation-sidebar-match.d.ts.map +1 -0
  187. package/dist/components/navigation/navigation-sidebar-match.js +85 -0
  188. package/dist/components/navigation/navigation-sidebar-slot.d.ts +7 -0
  189. package/dist/components/navigation/navigation-sidebar-slot.d.ts.map +1 -0
  190. package/dist/components/navigation/navigation-sidebar-slot.js +11 -0
  191. package/dist/components/navigation/navigation-sidebar-toggle.d.ts +7 -1
  192. package/dist/components/navigation/navigation-sidebar-toggle.d.ts.map +1 -1
  193. package/dist/components/navigation/navigation-sidebar-toggle.js +52 -23
  194. package/dist/components/navigation/navigation-sidebar.d.ts +13 -1
  195. package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
  196. package/dist/components/navigation/navigation-sidebar.js +188 -52
  197. package/dist/components/navigation/notifications-bell-button.d.ts +28 -0
  198. package/dist/components/navigation/notifications-bell-button.d.ts.map +1 -0
  199. package/dist/components/navigation/notifications-bell-button.js +44 -0
  200. package/dist/components/navigation/ticket-alerts-button.d.ts +7 -1
  201. package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -1
  202. package/dist/components/navigation/ticket-alerts-button.js +3 -2
  203. package/dist/components/onboarding-guides/index.cjs +111 -109
  204. package/dist/components/product-demo/index.cjs +119 -117
  205. package/dist/components/related-content/index.cjs +13 -13
  206. package/dist/components/tickets/index.cjs +115 -113
  207. package/dist/components/ui/actions-menu.d.ts +6 -1
  208. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  209. package/dist/components/ui/actions-menu.js +6 -2
  210. package/dist/components/ui/fade-preview.d.ts +8 -0
  211. package/dist/components/ui/fade-preview.d.ts.map +1 -1
  212. package/dist/components/ui/fade-preview.js +7 -5
  213. package/dist/components/ui/index.cjs +136 -111
  214. package/dist/components/ui/index.d.ts +1 -0
  215. package/dist/components/ui/index.d.ts.map +1 -1
  216. package/dist/components/ui/index.js +1 -0
  217. package/dist/components/ui/mobile-action-bar.d.ts +14 -0
  218. package/dist/components/ui/mobile-action-bar.d.ts.map +1 -0
  219. package/dist/components/ui/mobile-action-bar.js +68 -0
  220. package/dist/components/ui/no-data/no-data-styles.d.ts +1 -1
  221. package/dist/components/ui/no-data/no-data-styles.d.ts.map +1 -1
  222. package/dist/components/ui/no-data/no-data-styles.js +1 -1
  223. package/dist/components/ui/page-actions.d.ts.map +1 -1
  224. package/dist/components/ui/page-actions.js +24 -8
  225. package/dist/components/ui/panel-resize-handle.d.ts +6 -2
  226. package/dist/components/ui/panel-resize-handle.d.ts.map +1 -1
  227. package/dist/components/ui/panel-resize-handle.js +6 -3
  228. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  229. package/dist/components/ui/square-avatar.js +5 -2
  230. package/dist/{devices-DW5NDXMD.cjs → devices-SJORCARH.cjs} +109 -107
  231. package/dist/dots-loader-icon-5JXWD6FB.cjs +7 -0
  232. package/dist/{embeddable-chat-NBJMXEXB.cjs → embeddable-chat-7Z4CEZJL.cjs} +513 -398
  233. package/dist/hooks/index.cjs +15 -16
  234. package/dist/hooks/ui/use-content-breakpoint.d.ts +4 -2
  235. package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
  236. package/dist/{icon-loaders-OLGJZGRP.cjs → icon-loaders-SUPEKMBJ.cjs} +2 -1
  237. package/dist/index.cjs +154 -121
  238. package/dist/{knowledge-EYJG2TNW.cjs → knowledge-QXILUVEM.cjs} +109 -107
  239. package/dist/{logs-2LV7DTSL.cjs → logs-E3KQQQD6.cjs} +118 -115
  240. package/dist/mingo-logo-icon-WGPBSDTF.cjs +7 -0
  241. package/dist/{policies-HSDYIQBX.cjs → policies-IOYQY6TF.cjs} +112 -110
  242. package/dist/{remote-session-BQMTIQTU.cjs → remote-session-QGFG5WAL.cjs} +99 -97
  243. package/dist/{scripts-UI6V7ANQ.cjs → scripts-E5TWWUNP.cjs} +115 -113
  244. package/dist/{software-update-WMLY7VHH.cjs → software-update-QZGYG4TD.cjs} +112 -110
  245. package/dist/{tickets-board-TRXOX77R.cjs → tickets-board-KCH6ITUV.cjs} +95 -94
  246. package/dist/types/navigation.d.ts +131 -0
  247. package/dist/types/navigation.d.ts.map +1 -1
  248. package/dist/utils/index.cjs +65 -25
  249. package/package.json +1 -1
  250. package/src/components/chat/approval-batch-message.tsx +3 -2
  251. package/src/components/chat/chat-archive-page.tsx +16 -0
  252. package/src/components/chat/chat-composer.tsx +131 -61
  253. package/src/components/chat/chat-context-memory-bar.tsx +27 -17
  254. package/src/components/chat/chat-context-picker.tsx +45 -11
  255. package/src/components/chat/chat-header-rename-field.tsx +68 -0
  256. package/src/components/chat/chat-input.tsx +9 -1
  257. package/src/components/chat/composer-sheet.tsx +196 -0
  258. package/src/components/chat/embeddable-chat.tsx +636 -319
  259. package/src/components/chat/index.ts +6 -0
  260. package/src/components/chat/mingo-chat-day-groups.ts +62 -0
  261. package/src/components/chat/mingo-chat-header.tsx +99 -23
  262. package/src/components/chat/mingo-chat-history-section.tsx +670 -0
  263. package/src/components/chat/mingo-chat-history.tsx +31 -45
  264. package/src/components/chat/mingo-chat-list-shared.tsx +244 -0
  265. package/src/components/chat/mingo-chat-rail.tsx +45 -97
  266. package/src/components/chat/mingo-edge-light.tsx +25 -0
  267. package/src/components/chat/mingo-history-rail.tsx +7 -17
  268. package/src/components/chat/mingo-quick-action-wall.tsx +64 -0
  269. package/src/components/chat/mingo-welcome.tsx +5 -19
  270. package/src/components/chat/model-display.tsx +66 -14
  271. package/src/components/chat/tool-execution-display.tsx +9 -1
  272. package/src/components/chat/types/component.types.ts +13 -1
  273. package/src/components/chat/utils/chat-day-label.ts +24 -0
  274. package/src/components/features/board/board-column.tsx +8 -0
  275. package/src/components/features/board/board.tsx +16 -2
  276. package/src/components/features/board/touch-board.tsx +2 -0
  277. package/src/components/features/notifications/approval-request-notification-tile.tsx +8 -2
  278. package/src/components/features/notifications/notification-drawer.tsx +7 -1
  279. package/src/components/features/notifications/notification-tile.tsx +17 -9
  280. package/src/components/features/time-tracker/time-tracker-header-button.tsx +53 -6
  281. package/src/components/icons-v2/icon-colors.json +4 -0
  282. package/src/components/icons-v2-generated/icon-loaders.ts +1 -0
  283. package/src/components/icons-v2-generated/icon-names.ts +1 -1
  284. package/src/components/icons-v2-generated/loaders/dots-loader-icon.tsx +18 -27
  285. package/src/components/icons-v2-generated/logos/index.ts +1 -0
  286. package/src/components/icons-v2-generated/logos/mingo-logo-icon.tsx +35 -0
  287. package/src/components/navigation/account-popover.tsx +198 -0
  288. package/src/components/navigation/app-header.tsx +74 -33
  289. package/src/components/navigation/app-layout-context.ts +22 -0
  290. package/src/components/navigation/app-layout.tsx +290 -24
  291. package/src/components/navigation/header-button.tsx +27 -5
  292. package/src/components/navigation/header-mingo-button.tsx +6 -5
  293. package/src/components/navigation/index.ts +19 -0
  294. package/src/components/navigation/mingo-ai-button.tsx +2 -3
  295. package/src/components/navigation/mobile-burger-menu.tsx +219 -53
  296. package/src/components/navigation/navigation-sidebar-grouped.tsx +554 -0
  297. package/src/components/navigation/navigation-sidebar-match.ts +152 -0
  298. package/src/components/navigation/navigation-sidebar-slot.ts +12 -0
  299. package/src/components/navigation/navigation-sidebar-toggle.tsx +39 -6
  300. package/src/components/navigation/navigation-sidebar.tsx +278 -61
  301. package/src/components/navigation/notifications-bell-button.tsx +70 -0
  302. package/src/components/navigation/ticket-alerts-button.tsx +9 -2
  303. package/src/components/ui/actions-menu.tsx +19 -3
  304. package/src/components/ui/fade-preview.tsx +13 -6
  305. package/src/components/ui/index.ts +1 -0
  306. package/src/components/ui/mobile-action-bar.ts +87 -0
  307. package/src/components/ui/no-data/no-data-styles.ts +5 -2
  308. package/src/components/ui/page-actions.tsx +38 -11
  309. package/src/components/ui/panel-resize-handle.tsx +14 -5
  310. package/src/components/ui/square-avatar.tsx +5 -2
  311. package/src/hooks/ui/use-content-breakpoint.ts +4 -2
  312. package/src/styles/ods-interaction-states.css +68 -0
  313. package/src/types/navigation.ts +140 -0
  314. package/dist/chunk-C7GIHB3V.cjs +0 -59
  315. package/dist/dots-loader-icon-RBLX46X7.cjs +0 -7
  316. package/dist/{chunk-ZOZR3QI2.cjs → chunk-46547WQW.cjs} +0 -0
  317. package/dist/{video-file-player-IAMWBKEQ.cjs → video-file-player-IHO66P2Q.cjs} +1 -1
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { useState, useMemo, useRef, useEffect } from 'react';
3
+ import { useState, useMemo } from 'react';
4
4
  import { cn } from '../../utils/cn';
5
5
  import { Ellipsis01Icon, SearchXmarkIcon } from '../icons-v2-generated';
6
6
  import { LoadingRegion } from '../loading/loading-region';
@@ -13,6 +13,8 @@ import { SquareAvatar } from '../ui/square-avatar';
13
13
  import { chatDialogMenuItems } from './chat-dialog-menu-items';
14
14
  import { ChatListEmptyState } from './chat-list-empty-state';
15
15
  import { SKELETON_TITLE_WIDTHS } from './chat-nav-sidebar';
16
+ import { dialogTimestamp } from './mingo-chat-day-groups';
17
+ import { useLoadMoreSentinel } from './mingo-chat-list-shared';
16
18
  import type { DialogItem } from './types/component.types';
17
19
 
18
20
  /**
@@ -64,8 +66,11 @@ export interface MingoChatHistoryProps {
64
66
  hasMore?: boolean;
65
67
  /** True while the next page is loading. */
66
68
  isLoadingMore?: boolean;
67
- /** Fetch the next page — fired when the bottom sentinel scrolls into view. */
69
+ /** Fetch the next page — fired when the bottom sentinel scrolls into view, or on "Show more" (`loadMore`). */
68
70
  onLoadMore?: () => void;
71
+ /** How the next page loads: as the list's end scrolls into view (`'scroll'`, the default), or on a
72
+ * "Show more" under it (`'button'`, a page at a time; it spins while the page loads). */
73
+ loadMore?: 'scroll' | 'button';
69
74
  /** The first page is still loading: the list draws its own loading state (one page of rows). Inside a
70
75
  * `LoadingScope` it does so whatever this says. */
71
76
  loading?: boolean;
@@ -85,12 +90,6 @@ interface DialogGroup {
85
90
  // Date grouping — Today / Yesterday / Older
86
91
  // =============================================================================
87
92
 
88
- function dialogTime(d: DialogItem): number | null {
89
- if (!d.timestamp) return null;
90
- const t = typeof d.timestamp === 'string' ? Date.parse(d.timestamp) : d.timestamp.getTime();
91
- return Number.isNaN(t) ? null : t;
92
- }
93
-
94
93
  function groupDialogs(dialogs: ReadonlyArray<DialogItem>): DialogGroup[] {
95
94
  const now = new Date();
96
95
  const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
@@ -100,7 +99,7 @@ function groupDialogs(dialogs: ReadonlyArray<DialogItem>): DialogGroup[] {
100
99
  const yesterday: DialogItem[] = [];
101
100
  const older: DialogItem[] = [];
102
101
  for (const d of dialogs) {
103
- const t = dialogTime(d);
102
+ const t = dialogTimestamp(d);
104
103
  if (t !== null && t >= startOfToday) today.push(d);
105
104
  else if (t !== null && t >= startOfYesterday) yesterday.push(d);
106
105
  else older.push(d); // includes timestamp-less dialogs
@@ -363,6 +362,7 @@ export function MingoChatHistory({
363
362
  hasMore = false,
364
363
  isLoadingMore = false,
365
364
  onLoadMore,
365
+ loadMore = 'scroll',
366
366
  loading = false,
367
367
  pageSize = CHAT_HISTORY_PAGE_SIZE,
368
368
  className,
@@ -377,42 +377,15 @@ export function MingoChatHistory({
377
377
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade<HTMLDivElement>();
378
378
 
379
379
  // Infinite scroll — load the next page when the sentinel enters the
380
- // scroll viewport.
381
- const sentinelRef = useRef<HTMLDivElement>(null);
382
- // Refreshed in an unconditional effect, declared before the observer effect
383
- // so it wins the same flush. Not in the render body: the only reader is the
384
- // IntersectionObserver callback, which cannot fire before a commit, and a
385
- // discarded render attempt must not install a loading flag that never was.
386
- const onLoadMoreRef = useRef(onLoadMore);
387
- const isLoadingMoreRef = useRef(isLoadingMore);
388
- useEffect(() => {
389
- onLoadMoreRef.current = onLoadMore;
390
- isLoadingMoreRef.current = isLoadingMore;
380
+ // scroll viewport. Not with "Show more": the list then grows on a click only.
381
+ const onScroll = loadMore === 'scroll';
382
+ const sentinelRef = useLoadMoreSentinel({
383
+ hasMore: hasMore && onScroll,
384
+ isLoadingMore,
385
+ onLoadMore,
386
+ itemCount: dialogs.length,
387
+ rootRef: scrollRef,
391
388
  });
392
- const dialogCount = dialogs.length;
393
- useEffect(() => {
394
- const root = scrollRef.current;
395
- const sentinel = sentinelRef.current;
396
- if (!root || !sentinel || !hasMore || typeof IntersectionObserver === 'undefined') return undefined;
397
- const io = new IntersectionObserver(
398
- ([entry]) => {
399
- if (entry.isIntersecting && !isLoadingMoreRef.current) {
400
- onLoadMoreRef.current?.();
401
- }
402
- },
403
- { root, rootMargin: '120px', threshold: 0.1 },
404
- );
405
- io.observe(sentinel);
406
- return () => io.disconnect();
407
- // `dialogCount`/`isLoadingMore` deps re-arm the observer after every page
408
- // lands: `observe()` re-reports the CURRENT intersection, so a sentinel
409
- // that stays in view (short host-filtered list — e.g. the "My Chats"
410
- // scope keeps a handful of rows out of a 20-row page) keeps chaining
411
- // loads until the viewport fills or `hasMore` flips. A continuously
412
- // visible sentinel never re-crosses the threshold, so the previous
413
- // [hasMore]-only observer fired exactly once per mount and the list
414
- // grew by a single page per drawer open.
415
- }, [hasMore, isLoadingMore, dialogCount, scrollRef]);
416
389
 
417
390
  if (isLoading) return <MingoChatHistorySkeleton rows={pageSize} className={className} />;
418
391
 
@@ -456,7 +429,20 @@ export function MingoChatHistory({
456
429
  </div>
457
430
  ))
458
431
  )}
459
- {hasMore ? <div ref={sentinelRef} className="h-px shrink-0" /> : null}
432
+ {hasMore && onScroll ? <div ref={sentinelRef} className="h-px shrink-0" /> : null}
433
+ {hasMore && !onScroll && onLoadMore ? (
434
+ <Button
435
+ variant="link"
436
+ size="compact"
437
+ type="button"
438
+ data-tone="neutral"
439
+ loading={isLoadingMore}
440
+ onClick={onLoadMore}
441
+ className="self-start px-[var(--spacing-system-xs)]"
442
+ >
443
+ Show more
444
+ </Button>
445
+ ) : null}
460
446
  </div>
461
447
 
462
448
  {/* Scroll-fade — only while content is hidden in that direction. */}
@@ -0,0 +1,244 @@
1
+ 'use client';
2
+
3
+ import { type ReactNode, type RefObject, useEffect, useRef } from 'react';
4
+ import { cn } from '../../utils/cn';
5
+ import { AlertCircleIcon, MessageIndicatorIcon, Refresh01RightIcon, ShieldCheckIcon } from '../icons-v2-generated';
6
+ import type { ActionsMenuItem } from '../ui/actions-menu';
7
+ import { Button } from '../ui/button';
8
+ import type { DialogItem } from './types/component.types';
9
+
10
+ /** Ownership scope of a Mingo chat list: the current user's chats only, or
11
+ * every admin's chats in the tenant. */
12
+ export type MingoHistoryScope = 'my' | 'all';
13
+
14
+ /**
15
+ * What a chat is doing, shown at the end of its row:
16
+ * - `working`: Mingo is answering in it
17
+ * - `unread`: a reply the user has not seen
18
+ * - `approval`: Mingo waits for an approval there
19
+ */
20
+ export type MingoDialogStatus = 'working' | 'unread' | 'approval';
21
+
22
+ /**
23
+ * `DotsLoaderIcon` drawn as HTML boxes (`ods-dots-loader` in the ODS styles): same box,
24
+ * dots and motion. A chat row shows it for as long as a reply streams, on every page,
25
+ * and WebKit animates an SVG child on the main thread every frame — one row's icon kept
26
+ * ~12% of a core busy; HTML boxes ~3% (2026-10-21).
27
+ */
28
+ function WorkingDots({ className }: { className?: string }) {
29
+ return (
30
+ <span className={cn('ods-dots-loader', className)}>
31
+ <span />
32
+ <span />
33
+ <span />
34
+ </span>
35
+ );
36
+ }
37
+
38
+ /** One glyph per status, for every Mingo chat list (the v2 rail, the sidebar section). */
39
+ export const MINGO_DIALOG_STATUS_GLYPHS: Record<MingoDialogStatus, { icon: ReactNode; label: string }> = {
40
+ working: { icon: <WorkingDots className="text-ods-text-secondary" />, label: 'Mingo is working' },
41
+ unread: { icon: <MessageIndicatorIcon className="text-ods-accent" />, label: 'New reply' },
42
+ approval: { icon: <ShieldCheckIcon className="text-ods-accent" />, label: 'Waiting for approval' },
43
+ };
44
+
45
+ /**
46
+ * The list both Mingo chat lists render — the v2 panel's rail and the main
47
+ * sidebar's chat-history section (`MingoChatRail` `variant`). The host owns the
48
+ * data, the scope, the search term and the paging; the list only shows them.
49
+ */
50
+ export interface MingoChatListProps {
51
+ /** Dialogs to list, newest first. */
52
+ dialogs: ReadonlyArray<DialogItem>;
53
+ activeDialogId?: string;
54
+ onSelectDialog?: (id: string) => void;
55
+ /** A chat being started and not saved yet: a selected row at the top
56
+ * (e.g. "New Chat"), so the list says what the chat beside it is. */
57
+ draftTitle?: string;
58
+ /** Open the archive. The rail lists it as an action; the section puts
59
+ * "Chat archive" in its ⋯ menu. */
60
+ onOpenArchive?: () => void;
61
+ /**
62
+ * "What to ask Mingo?": the suggestions a chat starts from. The rail draws it as an
63
+ * action under the logo, the section as an item of its ⋯ menu.
64
+ */
65
+ onWhatToAsk?: () => void;
66
+ /**
67
+ * The host's own actions at the end of the section's ⋯ menu, after "Chat archive" and
68
+ * "What to ask Mingo?" (e.g. "Reset Onboarding"). The section only: the rail has no ⋯ of its own.
69
+ */
70
+ moreMenuItems?: ActionsMenuItem[];
71
+ /** A row's status glyph. Unread replies are shown without it. */
72
+ statusOf?: (dialog: DialogItem) => MingoDialogStatus | undefined;
73
+ /** Row ⋯ menu actions — each item appears only when its handler is set. */
74
+ onRequestRename?: (dialog: DialogItem) => void;
75
+ onRequestArchive?: (dialog: DialogItem) => void;
76
+ onRequestCopyLink?: (dialog: DialogItem) => void;
77
+ onRequestCompact?: (dialog: DialogItem) => void;
78
+ /** My Chats / All Chats; both or neither. The rail offers it in its ⋯
79
+ * menu, the section as a `TabSelector`. */
80
+ scope?: MingoHistoryScope;
81
+ onScopeChange?: (scope: MingoHistoryScope) => void;
82
+ /** Server-side search: `searchQuery` is the host's term, `onSearchChange`
83
+ * receives the debounced input. Without a handler there is no search. */
84
+ searchQuery?: string;
85
+ onSearchChange?: (query: string) => void;
86
+ /** Whether the search is open. Controlled with `onSearchOpenChange` (e.g. a
87
+ * host that opens it on ⌘K); without it the list keeps its own state, open
88
+ * from the start while `searchQuery` holds a term (the rail). The rail's is a
89
+ * field in its header; the section's is a modal — `MingoChatSearchModal`,
90
+ * which a host controlling this renders once itself. The section's Search
91
+ * tooltip names ⌘K / Ctrl K: binding that key is the host's (it may have to
92
+ * open a collapsed sidebar first), the list listens for none. */
93
+ searchOpen?: boolean;
94
+ onSearchOpenChange?: (open: boolean) => void;
95
+ hasMore?: boolean;
96
+ isLoadingMore?: boolean;
97
+ onLoadMore?: () => void;
98
+ /**
99
+ * How the section's list loads its next page: as its end scrolls into view
100
+ * (`'scroll'`, the default), or on a "Show more" under it (`'button'`). The
101
+ * search results and the rail always scroll.
102
+ */
103
+ loadMore?: 'scroll' | 'button';
104
+ /** The first page is still loading: the list draws one page of loading rows. */
105
+ isLoadingHistory?: boolean;
106
+ /** The host's page size: how many rows the loading state draws. Default `CHAT_HISTORY_PAGE_SIZE`. */
107
+ pageSize?: number;
108
+ /** The list failed to load with nothing cached. */
109
+ loadError?: boolean;
110
+ onRetry?: () => void;
111
+ /** Section only: the chat belongs to someone other than the viewer, so its
112
+ * row shows the owner's (`dialog.owner`) initials. The row cannot tell on
113
+ * its own: hosts set `owner` on the viewer's chats too. Wins over
114
+ * `currentUserId`. */
115
+ ownedByOther?: (dialog: DialogItem) => boolean;
116
+ /** Section only: the viewer's user id. Without `ownedByOther`, a chat whose
117
+ * `owner.id` is set and differs from it is someone else's; a chat with no
118
+ * `owner.id` is taken as the viewer's. */
119
+ currentUserId?: string | null;
120
+ className?: string;
121
+ }
122
+
123
+ /**
124
+ * Whether a row is someone else's chat: the host's answer when it gives one
125
+ * (`ownedByOther`), else `owner.id` against the viewer's id. Unknown = the
126
+ * viewer's own, so no row shows a stranger's initials on a guess.
127
+ */
128
+ export function dialogOwnedByOther(
129
+ dialog: DialogItem,
130
+ ownedByOther: ((dialog: DialogItem) => boolean) | undefined,
131
+ currentUserId: string | null | undefined,
132
+ ): boolean {
133
+ if (ownedByOther) return ownedByOther(dialog);
134
+ const ownerId = dialog.owner?.id;
135
+ return !!currentUserId && !!ownerId && ownerId !== currentUserId;
136
+ }
137
+
138
+ /** The host's status for the row, else an unread reply when the row counts one. */
139
+ export function mingoDialogStatusOf(
140
+ dialog: DialogItem,
141
+ statusOf: ((dialog: DialogItem) => MingoDialogStatus | undefined) | undefined,
142
+ ): MingoDialogStatus | undefined {
143
+ return statusOf?.(dialog) ?? ((dialog.unreadMessagesCount ?? 0) > 0 ? 'unread' : undefined);
144
+ }
145
+
146
+ /**
147
+ * "Couldn't load your chats" + Try again: what a Mingo chat list shows when its
148
+ * first page failed with nothing cached. One block for every list, so the
149
+ * wording cannot drift between them.
150
+ */
151
+ export function ChatListLoadError({ onRetry, className }: { onRetry?: () => void; className?: string }) {
152
+ return (
153
+ <div className={cn('flex flex-col items-center gap-[var(--spacing-system-m)] text-center', className)}>
154
+ <AlertCircleIcon className="size-8 shrink-0 text-ods-text-secondary" />
155
+ <div className="flex flex-col gap-[var(--spacing-system-xxs)]">
156
+ <p className="text-ods-text-primary text-h4">Couldn’t load your chats</p>
157
+ <p className="text-ods-text-secondary text-h6">Something went wrong reaching the server. Try again.</p>
158
+ </div>
159
+ {onRetry && (
160
+ <Button variant="outline" size="small" leftIcon={<Refresh01RightIcon />} onClick={onRetry}>
161
+ Try again
162
+ </Button>
163
+ )}
164
+ </div>
165
+ );
166
+ }
167
+
168
+ export interface LoadMoreSentinelOptions {
169
+ /** Whether more rows remain (cursor pagination). */
170
+ hasMore: boolean;
171
+ /** True while the next page is loading: no second request meanwhile. */
172
+ isLoadingMore: boolean;
173
+ /** Fetch the next page. */
174
+ onLoadMore?: () => void;
175
+ /** Rows rendered so far: a landed page re-arms the observer. */
176
+ itemCount: number;
177
+ /**
178
+ * The scrolling element the sentinel is clipped by. Omitted: the viewport —
179
+ * which still clips by every scroll box between it and the sentinel, so a
180
+ * list works whichever ancestor scrolls it (the sidebar's history section:
181
+ * the sidebar body).
182
+ */
183
+ rootRef?: RefObject<HTMLElement | null>;
184
+ }
185
+
186
+ /**
187
+ * How far ahead of the end of the list the next page starts loading: about a
188
+ * screen of rows, so a reader scrolling at a normal pace never reaches the end
189
+ * and never sees the placeholder. Below only — a list off to the side (the
190
+ * closed phone drawer, translated out of view) must not count as near.
191
+ */
192
+ const LOAD_AHEAD = '0px 0px 600px 0px';
193
+
194
+ /**
195
+ * Infinite scroll for a chat list: put the returned ref on a 1px sentinel after
196
+ * the last row (rendered only while `hasMore`), and `onLoadMore` fires when it
197
+ * comes into view.
198
+ */
199
+ export function useLoadMoreSentinel({
200
+ hasMore,
201
+ isLoadingMore,
202
+ onLoadMore,
203
+ itemCount,
204
+ rootRef,
205
+ }: LoadMoreSentinelOptions) {
206
+ const sentinelRef = useRef<HTMLDivElement>(null);
207
+ // Refreshed in an unconditional effect, declared before the observer effect
208
+ // so it wins the same flush. Not in the render body: the only reader is the
209
+ // IntersectionObserver callback, which cannot fire before a commit, and a
210
+ // discarded render attempt must not install a loading flag that never was.
211
+ const onLoadMoreRef = useRef(onLoadMore);
212
+ const isLoadingMoreRef = useRef(isLoadingMore);
213
+ useEffect(() => {
214
+ onLoadMoreRef.current = onLoadMore;
215
+ isLoadingMoreRef.current = isLoadingMore;
216
+ });
217
+ useEffect(() => {
218
+ const sentinel = sentinelRef.current;
219
+ const root = rootRef ? rootRef.current : null;
220
+ if (!sentinel || (rootRef && !root) || !hasMore || typeof IntersectionObserver === 'undefined') return undefined;
221
+ // `rootMargin` grows the root only. `scrollMargin` grows every scroll box
222
+ // between the sentinel and the root as well, so the page also loads ahead
223
+ // inside a nested list; an engine without it ignores the key and loads
224
+ // once the sentinel shows.
225
+ const options: IntersectionObserverInit & { scrollMargin?: string } = {
226
+ root,
227
+ rootMargin: LOAD_AHEAD,
228
+ scrollMargin: LOAD_AHEAD,
229
+ threshold: 0.1,
230
+ };
231
+ const observer = new IntersectionObserver(([entry]) => {
232
+ if (entry?.isIntersecting && !isLoadingMoreRef.current) onLoadMoreRef.current?.();
233
+ }, options);
234
+ observer.observe(sentinel);
235
+ return () => observer.disconnect();
236
+ // `itemCount`/`isLoadingMore` re-arm the observer after every page lands:
237
+ // `observe()` re-reports the CURRENT intersection, so a sentinel that stays
238
+ // in view (a short page, e.g. the "My Chats" scope) keeps chaining loads
239
+ // until the list fills its box or `hasMore` flips. A sentinel that never
240
+ // leaves the view never re-crosses the threshold, so an observer armed once
241
+ // would load a single page per mount.
242
+ }, [hasMore, isLoadingMore, itemCount, rootRef]);
243
+ return sentinelRef;
244
+ }
@@ -1,21 +1,17 @@
1
1
  'use client';
2
2
 
3
- import { type ReactNode, useEffect, useRef, useState } from 'react';
3
+ import { useControllableState } from '@radix-ui/react-use-controllable-state';
4
+ import { type ReactNode, useState } from 'react';
4
5
  import { cn } from '../../utils/cn';
5
6
  import { AgentMark } from '../agent-mark';
6
7
  import {
7
- AlertCircleIcon,
8
8
  Arrow02LeftIcon,
9
9
  ChatPlusIcon,
10
10
  ChatQuestionIcon,
11
11
  ChatsIcon,
12
12
  ClockHistoryIcon,
13
- DotsLoaderIcon,
14
13
  Ellipsis01Icon,
15
- MessageIndicatorIcon,
16
- Refresh01RightIcon,
17
14
  SearchIcon,
18
- ShieldCheckIcon,
19
15
  UserIcon,
20
16
  UsersIcon,
21
17
  } from '../icons-v2-generated';
@@ -27,66 +23,43 @@ import { ChatHeaderSearchField } from './chat-header-search-field';
27
23
  import { ChatListEmptyState } from './chat-list-empty-state';
28
24
  import { ChatListItem, ChatListItemLoadingPage, ChatNavSidebar, type ChatNavSidebarItem } from './chat-nav-sidebar';
29
25
  import { CHAT_HISTORY_PAGE_SIZE } from './mingo-chat-history';
30
- import type { MingoHistoryScope } from './mingo-history-rail';
26
+ import { MingoChatHistorySection } from './mingo-chat-history-section';
27
+ import {
28
+ ChatListLoadError,
29
+ MINGO_DIALOG_STATUS_GLYPHS,
30
+ type MingoChatListProps,
31
+ type MingoDialogStatus,
32
+ mingoDialogStatusOf,
33
+ useLoadMoreSentinel,
34
+ } from './mingo-chat-list-shared';
31
35
  import type { DialogItem } from './types/component.types';
32
36
 
33
- /**
34
- * What a chat is doing, shown at the end of its row:
35
- * - `working`: Mingo is answering in it
36
- * - `unread`: a reply the user has not seen
37
- * - `approval`: Mingo waits for an approval there
38
- */
39
- export type MingoDialogStatus = 'working' | 'unread' | 'approval';
40
-
41
- export interface MingoChatRailProps {
42
- /** Dialogs to list, newest first. */
43
- dialogs: ReadonlyArray<DialogItem>;
44
- activeDialogId?: string;
45
- onSelectDialog?: (id: string) => void;
46
- /** A chat being started and not saved yet: a selected row at the top
47
- * (e.g. "New Chat"), so the list says what the chat beside it is. */
48
- draftTitle?: string;
37
+ export interface MingoChatRailProps extends MingoChatListProps {
38
+ /**
39
+ * `'rail'` (default): the v2 chat panel's own column — the Mingo mark, the
40
+ * actions below (start a chat, the archive, "What to ask Mingo?") and the
41
+ * list, at a fixed 296 px.
42
+ * `'section'`: the chat history block of a host's main navigation sidebar
43
+ * (`MingoChatHistorySection`) — caption, Search, ⋯ (Chat archive, What to ask Mingo?), the scope,
44
+ * the chats grouped by day. No outer chrome or width of its own; it fills the
45
+ * height it is given and scrolls inside. The rail-only props below are
46
+ * ignored there.
47
+ */
48
+ variant?: 'rail' | 'section';
49
+ /** Rail only. */
49
50
  onNewChat?: () => void;
50
- /** Open the archive. `archiveActive` marks it as the view on screen. */
51
- onOpenArchive?: () => void;
51
+ /** Rail only: the archive is the view on screen. */
52
52
  archiveActive?: boolean;
53
- /** "What to ask Mingo?": the suggestions a new chat starts from. */
54
- onWhatToAsk?: () => void;
55
- /** A row's status glyph. Unread replies are shown without it. */
56
- statusOf?: (dialog: DialogItem) => MingoDialogStatus | undefined;
57
- onRequestRename?: (dialog: DialogItem) => void;
58
- onRequestArchive?: (dialog: DialogItem) => void;
59
- onRequestCopyLink?: (dialog: DialogItem) => void;
60
- onRequestCompact?: (dialog: DialogItem) => void;
61
- /** "Show My Chats" / "Show All Chats" in the list's ⋯ menu; both or neither. */
62
- scope?: MingoHistoryScope;
63
- onScopeChange?: (scope: MingoHistoryScope) => void;
64
- /** Server-side search. With a handler the ⋯ menu offers "Search for Chat". */
65
- searchQuery?: string;
66
- onSearchChange?: (query: string) => void;
67
- hasMore?: boolean;
68
- isLoadingMore?: boolean;
69
- onLoadMore?: () => void;
70
- /** The first page is still loading: the list draws one page of loading rows. */
71
- isLoadingHistory?: boolean;
72
- /** The host's page size: how many rows the loading state draws. Default `CHAT_HISTORY_PAGE_SIZE`. */
73
- pageSize?: number;
74
- /** The list failed to load with nothing cached. */
75
- loadError?: boolean;
76
- onRetry?: () => void;
77
- /** The |← control beside the logo: widen the panel to the list and the chat. */
53
+ /** Rail only — the |← control beside the logo: widen the panel to the list and the chat. */
78
54
  onExpand?: () => void;
79
- className?: string;
80
55
  }
81
56
 
82
- const STATUS_GLYPHS: Record<MingoDialogStatus, { icon: ReactNode; label: string }> = {
83
- working: { icon: <DotsLoaderIcon className="text-ods-text-secondary" />, label: 'Mingo is working' },
84
- unread: { icon: <MessageIndicatorIcon className="text-ods-accent" />, label: 'New reply' },
85
- approval: { icon: <ShieldCheckIcon className="text-ods-accent" />, label: 'Waiting for approval' },
86
- };
87
-
88
- function statusFor(dialog: DialogItem, statusOf: MingoChatRailProps['statusOf']): MingoDialogStatus | undefined {
89
- return statusOf?.(dialog) ?? ((dialog.unreadMessagesCount ?? 0) > 0 ? 'unread' : undefined);
57
+ /**
58
+ * The Mingo chat list. The default rail is the v2 panel's column; the section
59
+ * is the same list placed in the main sidebar (see `variant`).
60
+ */
61
+ export function MingoChatRail({ variant = 'rail', ...props }: MingoChatRailProps) {
62
+ return variant === 'section' ? <MingoChatHistorySection {...props} /> : <MingoChatRailPanel {...props} />;
90
63
  }
91
64
 
92
65
  /**
@@ -96,7 +69,7 @@ function statusFor(dialog: DialogItem, statusOf: MingoChatRailProps['statusOf'])
96
69
  * status at the end. Row actions (rename, archive, ...) sit behind a ⋯ that
97
70
  * replaces the status on hover.
98
71
  */
99
- export function MingoChatRail({
72
+ function MingoChatRailPanel({
100
73
  dialogs,
101
74
  activeDialogId,
102
75
  onSelectDialog,
@@ -114,6 +87,8 @@ export function MingoChatRail({
114
87
  onScopeChange,
115
88
  searchQuery,
116
89
  onSearchChange,
90
+ searchOpen: searchOpenProp,
91
+ onSearchOpenChange,
117
92
  hasMore = false,
118
93
  isLoadingMore = false,
119
94
  onLoadMore,
@@ -123,10 +98,14 @@ export function MingoChatRail({
123
98
  onRetry,
124
99
  onExpand,
125
100
  className,
126
- }: MingoChatRailProps) {
101
+ }: Omit<MingoChatRailProps, 'variant'>) {
127
102
  // ONE switch: the first page loading (or the page's loading state) draws one page of the rows' own skeleton.
128
103
  const loading = useLoadingScope() || isLoadingHistory;
129
- const [searchOpen, setSearchOpen] = useState(!!searchQuery?.trim());
104
+ const [searchOpen, setSearchOpen] = useControllableState({
105
+ prop: searchOpenProp,
106
+ defaultProp: !!searchQuery?.trim(),
107
+ onChange: onSearchOpenChange,
108
+ });
130
109
  const hasSearch = !!searchQuery?.trim();
131
110
 
132
111
  const items: ChatNavSidebarItem[] = [];
@@ -176,43 +155,12 @@ export function MingoChatRail({
176
155
 
177
156
  // Infinite scroll: the next page when the sentinel at the list's end shows.
178
157
  // The observer clips against the scrolling list, so the viewport root works.
179
- const sentinelRef = useRef<HTMLDivElement>(null);
180
- const onLoadMoreRef = useRef(onLoadMore);
181
- const isLoadingMoreRef = useRef(isLoadingMore);
182
- useEffect(() => {
183
- onLoadMoreRef.current = onLoadMore;
184
- isLoadingMoreRef.current = isLoadingMore;
185
- });
186
- const dialogCount = dialogs.length;
187
- useEffect(() => {
188
- const sentinel = sentinelRef.current;
189
- if (!sentinel || !hasMore || typeof IntersectionObserver === 'undefined') return undefined;
190
- const observer = new IntersectionObserver(
191
- ([entry]) => {
192
- if (entry?.isIntersecting && !isLoadingMoreRef.current) onLoadMoreRef.current?.();
193
- },
194
- { rootMargin: '120px', threshold: 0.1 },
195
- );
196
- observer.observe(sentinel);
197
- return () => observer.disconnect();
198
- // Re-armed per page: a sentinel still in view after a short page keeps loading.
199
- }, [hasMore, dialogCount, isLoadingMore]);
158
+ const sentinelRef = useLoadMoreSentinel({ hasMore, isLoadingMore, onLoadMore, itemCount: dialogs.length });
200
159
 
201
160
  let list: ReactNode;
202
161
  if (loadError) {
203
162
  list = (
204
- <div className="flex flex-col items-center gap-[var(--spacing-system-m)] px-[var(--spacing-system-xs)] py-[var(--spacing-system-l)] text-center">
205
- <AlertCircleIcon className="size-8 shrink-0 text-ods-text-secondary" />
206
- <div className="flex flex-col gap-[var(--spacing-system-xxs)]">
207
- <p className="text-ods-text-primary text-h4">Couldn’t load your chats</p>
208
- <p className="text-ods-text-secondary text-h6">Something went wrong reaching the server. Try again.</p>
209
- </div>
210
- {onRetry && (
211
- <Button variant="outline" size="small" leftIcon={<Refresh01RightIcon />} onClick={onRetry}>
212
- Try again
213
- </Button>
214
- )}
215
- </div>
163
+ <ChatListLoadError onRetry={onRetry} className="px-[var(--spacing-system-xs)] py-[var(--spacing-system-l)]" />
216
164
  );
217
165
  } else if (loading) {
218
166
  list = <ChatListItemLoadingPage count={pageSize} />;
@@ -238,7 +186,7 @@ export function MingoChatRail({
238
186
  data-loading-item
239
187
  dialog={dialog}
240
188
  active={dialog.id === activeDialogId}
241
- status={statusFor(dialog, statusOf)}
189
+ status={mingoDialogStatusOf(dialog, statusOf)}
242
190
  onSelect={onSelectDialog}
243
191
  menuItems={chatDialogMenuItems({
244
192
  onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
@@ -326,7 +274,7 @@ interface MingoChatRailRowProps {
326
274
  function MingoChatRailRow({ dialog, active, status, onSelect, menuItems, ...props }: MingoChatRailRowProps) {
327
275
  const [menuOpen, setMenuOpen] = useState(false);
328
276
  const hasMenu = menuItems.length > 0;
329
- const glyph = status ? STATUS_GLYPHS[status] : undefined;
277
+ const glyph = status ? MINGO_DIALOG_STATUS_GLYPHS[status] : undefined;
330
278
  const title = dialog.title || 'Untitled Chat';
331
279
 
332
280
  return (
@@ -0,0 +1,25 @@
1
+ import { cn } from '../../utils/cn';
2
+
3
+ export interface MingoEdgeLightProps {
4
+ /** The host's corner radius (e.g. `rounded-md`), so the ring follows its outline. */
5
+ className?: string;
6
+ }
7
+
8
+ /**
9
+ * Mingo's AI edge light (`.mingo-edge-frame` / `.mingo-edge` in
10
+ * `styles/chat-animations.css`): an accent arc travelling around the host's
11
+ * outline, clipped to a 1px ring by a CSS mask, so the host's own background
12
+ * shows through. Static under reduced motion. Absolutely positioned over a
13
+ * `relative` host, on its border box; it takes no pointer events.
14
+ */
15
+ export function MingoEdgeLight({ className }: MingoEdgeLightProps) {
16
+ return (
17
+ <span
18
+ aria-hidden="true"
19
+ data-testid="mingo-edge-light"
20
+ className={cn('mingo-edge-frame pointer-events-none absolute inset-0', className)}
21
+ >
22
+ <span className="mingo-edge" />
23
+ </span>
24
+ );
25
+ }