Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): keep the reaction popover of an own message in the pane
Yudhi Armyndharis9e3bb75a6e11
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 762a29ec9..c958084f6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Bound each webhook and ingress queue command at 2 s once Redis has connected, so a Redis that stops answering falls back to direct delivery and inline dispatch instead of holding every dispatch and ingress request.- Keep the dashboard chat's scroll-to-bottom button in view while the reader is scrolled up, where it moved with the thread and was off screen.- Land the dashboard chat's scroll-to-bottom button at the bottom when an older page arrives meanwhile, where the animated jump could end far above it.+- Keep the dashboard's reaction popover of an own message inside the thread, where its last emoji was clipped and could not be picked.- Refuse to save a local `storage.localPath` the app cannot create or write, where the next start refused to boot and the dashboard that could undo the save was down.- Answer `400` for a send route's or a product send's `chatId`, or a bulk `batchId`, over 255 characters, where PostgreSQL answered `500` once the value passed its index entry limit.- Answer `400` for a `chatId` over 255 characters in the request body of a chat action, as the send routes do, instead of handing it to the engine.diff --git a/dashboard/src/components/chats/ChatThread.test.ts b/dashboard/src/components/chats/ChatThread.test.tsindex fe74288a3..d613b2c7f 100644--- a/dashboard/src/components/chats/ChatThread.test.ts+++ b/dashboard/src/components/chats/ChatThread.test.ts@@ -757,6 +757,17 @@ test('the scroll-to-bottom button is sticky inside the scroller, not absolute, aassert.ok(level(rule) < level(menu), 'the jump button paints over the actions menu');});+// An own bubble is at the end of the pane, and the react icon of its pill is a few pixels from that end: a+// popover centred on it runs past the pane, so the last emoji is clipped and the thread scrolls sideways.+test('the reaction popover of an own message grows from the end of its icon, not from its centre', () => {+ const css = readFileSync(new URL('../../pages/Chats.css', import.meta.url), 'utf8');+ const rule =+ /\.chats-page \.message-bubble-wrapper\.outgoing \.reaction-quick-popover \{([^}]*)\}/.exec(css)?.[1] ?? '';+ assert.match(rule, /inset-inline-end:\s*0;/);+ assert.match(rule, /left:\s*auto;/);+ assert.doesNotMatch(rule, /translateX/);+});+test('the scroll-to-bottom button is the last child of the scroller and jumps without animating', async () => {const messages: ChatMessageView[] = ['1', '2'].map(n => ({...PROMPT,diff --git a/dashboard/src/pages/Chats.css b/dashboard/src/pages/Chats.cssindex 73e9f4ce6..9985c37e9 100644--- a/dashboard/src/pages/Chats.css+++ b/dashboard/src/pages/Chats.css@@ -1176,6 +1176,15 @@white-space: nowrap;}+/* The pill sits at the end of its bubble and an own bubble is at the end of the pane, so a popover centred+ on the react icon runs past the pane and clips the last emoji, which cannot then be picked. Anchored to+ the end of the icon it grows toward the middle of the pane, in either text direction. */+.chats-page .message-bubble-wrapper.outgoing .reaction-quick-popover {+ left: auto;+ inset-inline-end: 0;+ transform: translateY(-6px);+}+.chats-page .reaction-quick-popover::after {content: '';position: absolute;