Skip to content

fix: 优化邮件摘要间距与预览截断 - #1163

Merged
dreamhunter2333 merged 1 commit into
mainfrom
fix/mail-summary-preview
Oct 15, 2026
Merged

dreamhunter2333 merged 1 commit into
mainfrom
fix/mail-summary-preview

Conversation

@dreamhunter2333

@dreamhunter2333 dreamhunter2333 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

改动

  • 从最新 main(74f84b64)创建分支,单独优化邮件列表摘要,不包含其他开发分支改动。
  • 新用户默认预览 1 行,已有的 0–5 行设置保持不变。
  • 继续使用 Naive UI 的 NEllipsis;约束多行预览宽度,允许长链接断行后正确省略,避免被列表边缘硬裁。
  • 列表内边距调整为上下 12px、左右 14px;发件人 13px,主题保持 15px 加粗;发件人到主题间隔 4px,主题到正文预览间隔 8px。
  • 不修改邮件正文、解析逻辑、API、权限、数据库、依赖、整体配色或真实 TOML。同步更新中英文 changelog。

验证

  • 前端 99 项单元测试及生产构建通过,仅有既有的大 chunk 提示。
  • 更新四种布局的字号断言;复用同一组 E2E,覆盖 320px 手机与 1360px 桌面(20% 窄分栏)的默认一行、600 字符长链接、0/1/2/5 行、已有设置保留及防横向溢出;桌面额外确认分栏宽度小于 320px、阅读区可见。
  • E2E 语法检查和测试发现通过;完整 E2E 交给 CI,本地不运行 Docker 或 Playwright 浏览器。
  • 按用户授权,仅用本地真实 Vite + Wrangler dev 页面验证和截图;使用独立本地 D1 中的测试邮件,不访问线上或 GitHub 网页。

注意

原来已经保存为两行的浏览器仍显示两行,可在「外观」里手动改为一行;不会强制覆盖用户偏好。

Summary by CodeRabbit

  • Bug 修复
    • 优化邮件列表预览的间距与文字层级,并改善长链接的换行显示,减少页面溢出。
    • 新用户的邮件预览默认显示一行;已保存的预览行数设置保持不变。

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca462e66-6ab0-4917-bddf-6de3cb626f73
📥 Commits

Reviewing files that changed from the base of the PR and between 9ce3471 and 321447a.

📒 Files selected for processing: 1
  • e2e/tests/browser/inbox.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

邮件摘要样式和预览行数默认值已调整。长链接预览支持换行,默认显示一行。新增窄屏端到端测试,覆盖不同预览行数和已保存的偏好设置。

Changes: 邮件预览调整

Layer / File(s) Summary
调整预览布局并验证行数设置
frontend/src/components/MailSummary.vue, frontend/src/components/MailBox.vue, frontend/src/store/index.js, e2e/tests/browser/inbox.spec.ts, CHANGELOG.md, CHANGELOG_EN.md
调整发件人字号、主题与预览间距、紧凑列表项内边距及长文本换行方式。预览行数默认值改为一行;已保存的值仍由 useStorage 读取。端到端测试覆盖窄屏布局、行数设置、长链接和本地存储偏好。

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 32144

No actionable issue is established for the preview-layout change; it is ready for normal merge checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题明确概括了邮件摘要间距和预览截断优化,符合本次变更的主要内容。
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

我是小兔,捧来一封信
长长链接,折进预览里
一行初见,间距也清晰
旧的偏好,仍安放原地
窄屏测试,逐项来验证
轻轻合上,邮件整齐了

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@dreamhunter2333
dreamhunter2333 force-pushed the fix/mail-summary-preview branch from 3aa48fa to 9ce3471 Compare October 15, 2026 18:11
@dreamhunter2333
dreamhunter2333 force-pushed the fix/mail-summary-preview branch from 9ce3471 to 321447a Compare October 15, 2026 18:17
@dreamhunter2333
dreamhunter2333 merged commit b863441 into main Oct 15, 2026
2 checks passed
@dreamhunter2333
dreamhunter2333 deleted the fix/mail-summary-preview branch October 15, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant