@flamingo-stack/openframe-frontend-core 0.0.193 → 0.0.194-snapshot.20260518210734

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 (30) hide show
  1. package/dist/{chunk-GMC5VU7X.cjs → chunk-IQM3G2I6.cjs} +480 -369
  2. package/dist/chunk-IQM3G2I6.cjs.map +1 -0
  3. package/dist/{chunk-E6VCRL42.js → chunk-U6AJSRJP.js} +140 -29
  4. package/dist/chunk-U6AJSRJP.js.map +1 -0
  5. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  6. package/dist/components/chat/types/message.types.d.ts +19 -0
  7. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  8. package/dist/components/chat/utils/message-segment-accumulator.d.ts +16 -0
  9. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  10. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  11. package/dist/components/features/index.cjs +2 -2
  12. package/dist/components/features/index.js +1 -1
  13. package/dist/components/index.cjs +4 -2
  14. package/dist/components/index.cjs.map +1 -1
  15. package/dist/components/index.js +3 -1
  16. package/dist/components/navigation/index.cjs +2 -2
  17. package/dist/components/navigation/index.js +1 -1
  18. package/dist/components/ui/index.cjs +4 -2
  19. package/dist/components/ui/index.cjs.map +1 -1
  20. package/dist/components/ui/index.js +3 -1
  21. package/dist/index.cjs +4 -2
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +3 -1
  24. package/package.json +1 -1
  25. package/src/components/chat/chat-message-list.tsx +138 -1
  26. package/src/components/chat/types/message.types.ts +20 -0
  27. package/src/components/chat/utils/message-segment-accumulator.ts +28 -0
  28. package/src/components/chat/utils/process-historical-messages.ts +23 -5
  29. package/dist/chunk-E6VCRL42.js.map +0 -1
  30. package/dist/chunk-GMC5VU7X.cjs.map +0 -1
@@ -284,11 +284,29 @@ function processMessageData(
284
284
  }
285
285
  }
286
286
  } else {
287
- accumulator.trackApprovalRequest(data.approvalRequestId, {
288
- command: data.command || '',
289
- explanation: data.explanation,
290
- approvalType,
291
- })
287
+ // The resolution may already be known to the consumer (realtime
288
+ // flipped it and fed it back via `approvalStatuses`) while the
289
+ // matching APPROVAL_RESULT row is absent from the fetched history
290
+ // pages. Without this, the single-approval path tracks it as
291
+ // pending and `flushPendingApprovals()` resurrects it as a stale
292
+ // sticky card on every history re-process. Mirror the batch path
293
+ // and honor `approvalStatuses`.
294
+ const resolvedStatus = approvalStatuses[data.approvalRequestId] as ChatApprovalStatus | undefined
295
+ if (resolvedStatus === 'approved' || resolvedStatus === 'rejected') {
296
+ accumulator.addApprovalRequest(
297
+ data.approvalRequestId,
298
+ data.command || '',
299
+ data.explanation,
300
+ approvalType,
301
+ resolvedStatus,
302
+ )
303
+ } else {
304
+ accumulator.trackApprovalRequest(data.approvalRequestId, {
305
+ command: data.command || '',
306
+ explanation: data.explanation,
307
+ approvalType,
308
+ })
309
+ }
292
310
  }
293
311
  } else {
294
312
  escalatedApprovals?.set(data.approvalRequestId, {