feat(assistant): chat, note and poll cards drawn like the Collab tab

This commit is contained in:
Maurice
2026-10-22 15:50:51 +02:00
parent b4e188fbfc
commit 6e92c2777c
63 changed files with 5147 additions and 251 deletions
@@ -4,6 +4,7 @@ import {
OTHER_BUBBLE_RADIUS,
OWN_BUBBLE_RADIUS,
QUICK_REACTIONS,
bubbleRadius,
buildCategoryColorMap,
formatChatClockTime,
formatChatDateSeparator,
@@ -165,6 +166,17 @@ describe('collabModel — chat', () => {
expect(shouldShowChatDateSeparator(c, b)).toBe(true);
});
it('FE-MOB-CLBM-024: bubbleRadius rounds a bubble and puts the tail on the sender side of the last one', () => {
expect(bubbleRadius(true, false)).toEqual({
borderStartStartRadius: 18,
borderStartEndRadius: 18,
borderEndEndRadius: 18,
borderEndStartRadius: 18,
});
expect(bubbleRadius(true, true)).toMatchObject({ borderEndEndRadius: 4, borderEndStartRadius: 18 });
expect(bubbleRadius(false, true)).toMatchObject({ borderEndEndRadius: 18, borderEndStartRadius: 4 });
});
it('FE-MOB-CLBM-010: isSameSender compares user ids loosely and needs both messages', () => {
const a = msg({ user_id: 7 });
const b = msg({ id: 2, user_id: 7 });