Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

### Bug Fixes

- fix: |Frontend| 修复邮件预览长链接溢出,优化摘要间距与文字层级;新用户默认预览一行,保留已有预览行数设置
- fix: |收件| 黑名单同时检查 SMTP 信封发件人与邮件头 From 的全部邮箱地址,任意一个命中即拒收;独立解析地址,避免正文解析失败或多个发件地址导致漏拦截;地址解析异常时保留原有信封检查
- fix: |AI 识别| `ai` 模式下地址未命中 AI 提取白名单时只跳过 Workers AI 调用,仍回退到本地规则提取验证码
- fix: |Telegram| 当邮件没有纯文本正文(如纯 HTML 邮件)时回退到 HTML 转纯文本,避免 Telegram 通知显示“解析失败”
Expand Down
1 change: 0 additions & 1 deletion CHANGELOG_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

### Bug Fixes

- fix: |Frontend| Constrain long links in mail previews and refine summary spacing and text hierarchy; default to one preview line while preserving saved preferences
- fix: |Mail| Check the SMTP envelope sender and every From email address against sender blacklists; parse addresses independently so body parsing failures or multiple From addresses cannot skip matching; preserve envelope checks on address parsing errors
- fix: |AI Extract| In `ai` mode, an address allowlist miss now skips only the Workers AI call and still falls back to local verification-code extraction
- fix: |Telegram| Fall back to HTML-to-text conversion when plain text body is empty, preventing "parse failed" messages in Telegram notifications
Expand Down
8 changes: 8 additions & 0 deletions e2e/tests/browser/inbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,14 @@ for (const width of [1360, 320]) {
const item = page.getByRole('listitem').filter({ hasText: subject });
await expect(item.locator('.mail-summary-sender')).toHaveText(`${labels.from}: ${from}`);
await expect(item.locator('.mail-summary-recipient')).toHaveText(`${labels.to}: ${mailbox.address}`);
await expect(item.locator('.mail-summary-recipient')).toHaveCSS('margin-top', '4px');
expect(await item.evaluate(element => {
const sender = element.querySelector('.mail-summary-sender')!;
const recipient = element.querySelector('.mail-summary-recipient')!;
const subject = element.querySelector('.mail-summary-subject')!;
return Boolean(sender.compareDocumentPosition(recipient) & Node.DOCUMENT_POSITION_FOLLOWING)
&& Boolean(recipient.compareDocumentPosition(subject) & Node.DOCUMENT_POSITION_FOLLOWING);
})).toBe(true);
expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);
}
} finally {
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/components/MailSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ const receivedAt = computed(() => new Date(`${props.mail.created_at} UTC`));
<template v-else>{{ utcToLocalDate(mail.created_at, useUTCDate) }}</template>
</n-text>
</n-flex>
<div v-if="showEMailTo" class="mail-summary-recipient">
<n-ellipsis>
<n-text depth="3" class="mail-summary-muted">{{ t('to') }}: </n-text><n-text depth="2">{{ mail.address }}</n-text>
</n-ellipsis>
</div>
<div class="mail-summary-subject" :title="`ID: ${mail.id}\n${mail.subject || ''}`">
<n-ellipsis><n-text strong depth="1">{{ mail.subject || '—' }}</n-text></n-ellipsis>
</div>
<div v-if="mail.text && previewLineClamp > 0" class="mail-summary-preview">
<n-ellipsis :line-clamp="previewLineClamp" :tooltip="false"><n-text depth="3" class="mail-summary-muted">{{ mail.text }}</n-text></n-ellipsis>
</div>
<div v-if="showEMailTo" class="mail-summary-recipient">
<n-ellipsis>
<n-text depth="3" class="mail-summary-muted">{{ t('to') }}: </n-text><n-text depth="2">{{ mail.address }}</n-text>
</n-ellipsis>
</div>
<AiExtractInfo :metadata="mail.metadata" compact />
</div>
</template>
Expand Down Expand Up @@ -77,6 +77,10 @@ const receivedAt = computed(() => new Date(`${props.mail.created_at} UTC`));
flex: 1;
}

.mail-summary-recipient {
margin-top: 4px;
}

.mail-summary-recipient :deep(.n-ellipsis) {
display: block;
}
Expand Down
Loading