From 307d24766032a0fd19418c8ad80d777920617a14 Mon Sep 17 00:00:00 2001 From: Nanin <7017924+nanin@users.noreply.github.com> Date: Thu, 6 Aug 2026 00:23:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=B3=BB=E7=BB=9F=E6=B6=88=E6=81=AF=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 系统消息气泡按内容自然展开,减少短消息不必要换行 - 保留容器最大宽度约束,避免窄屏横向溢出 - 增加撤回消息桌面端单行显示回归测试 --- src/main/export-html-template.ts | 4 +++- tests/e2e/export-archive.spec.ts | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/export-html-template.ts b/src/main/export-html-template.ts index 82e957a..7666dfd 100644 --- a/src/main/export-html-template.ts +++ b/src/main/export-html-template.ts @@ -427,9 +427,11 @@ body { } .message.system .avatar { display: none; } .message.system .message-stack { - max-width: 92%; + width: max-content; + max-width: 100%; } .message.system .bubble { + width: max-content; max-width: 100%; padding: 5px 10px; border: 0; diff --git a/tests/e2e/export-archive.spec.ts b/tests/e2e/export-archive.spec.ts index 1500268..ac2321a 100644 --- a/tests/e2e/export-archive.spec.ts +++ b/tests/e2e/export-archive.spec.ts @@ -805,6 +805,17 @@ test('EXPORT-ARCHIVE-03 renders shares and locations, and groups payments under await expect(recallNotices).toHaveCount(2) await expect(recallNotices.locator('.avatar')).toHaveCount(0) await expect(recallNotices.locator('.sender').first()).toBeHidden() + const recallLineMetrics = await recallNotices + .first() + .locator('.content') + .evaluate((element) => { + const styles = window.getComputedStyle(element) + return { + height: element.getBoundingClientRect().height, + lineHeight: Number.parseFloat(styles.lineHeight) + } + }) + expect(recallLineMetrics.height).toBeLessThanOrEqual(recallLineMetrics.lineHeight + 1) const locationNotice = systemNotices.filter({ hasText: '位置共享已经结束' }) await expect(locationNotice).toHaveCount(1) await expect(locationNotice.locator('.avatar')).toHaveCount(0)