Skip to content

Comments

Outlook reply and font#945

Merged
elie222 merged 2 commits intomainfrom
feat/create-outlook-reply
Nov 11, 2025
Merged

Outlook reply and font#945
elie222 merged 2 commits intomainfrom
feat/create-outlook-reply

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Nov 11, 2025

Summary by CodeRabbit

  • New Features

    • Introduced Outlook-optimized email reply formatting with dedicated HTML and plain text support.
    • Added right-to-left content handling for Outlook replies.
    • Enhanced email date formatting for improved clarity in reply headers.
  • Tests

    • Added comprehensive test coverage for Outlook reply generation, including RTL content and date formatting scenarios.

@vercel
Copy link

vercel bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
inbox-zero Ready Ready Preview Nov 11, 2025 10:42am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR introduces Outlook-specific reply content generation functionality. A new module creates formatted reply content with Outlook-style HTML and plain-text representations, including proper date formatting and RTL support. The mail utility is updated to use the new Outlook-specific function instead of the generic variant, and the version is bumped.

Changes

Cohort / File(s) Summary
New Outlook reply module
apps/web/utils/outlook/reply.ts
Introduces createOutlookReplyContent function that generates Outlook-formatted HTML and plain-text reply content with date formatting, RTL text detection, and quoted original message formatting. Exports formatEmailDate for consistent date string generation.
Outlook reply tests
apps/web/utils/outlook/reply.test.ts
New test suite validating createOutlookReplyContent output across three scenarios: HTML formatting with Aptos font styling, RTL content handling with Hebrew text, and plain-text formatting with quoted message blocks. Uses fake timers for consistent date-based assertions.
Mail utility integration
apps/web/utils/outlook/mail.ts
Replaces createReplyContent with createOutlookReplyContent in replyToEmail and draftEmail functions, updating the corresponding import path.
Version bump
version.txt
Version incremented from v2.18.17 to v2.18.18.

Sequence Diagram

sequenceDiagram
    participant Client as Mail Client
    participant Mail as mail.ts
    participant Reply as reply.ts
    participant Format as formatEmailDate

    Client->>Mail: replyToEmail/draftEmail(message, content)
    Mail->>Reply: createOutlookReplyContent({textContent, htmlContent, message})
    
    rect rgb(220, 240, 255)
        Note over Reply: Generate Reply Formatting
        Reply->>Format: formatEmailDate(date)
        Format-->>Reply: "Thu, 6 Feb 2025 at 23:23"
        Reply->>Reply: detectTextDirection(text)
        Reply->>Reply: Build quoted header
        Reply->>Reply: Format HTML with Aptos font
        Reply->>Reply: Format plain-text block
    end
    
    Reply-->>Mail: {html: string, text: string}
    Mail-->>Client: Reply content ready
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • reply.ts logic: Verify HTML formatting structure, RTL detection accuracy, and date formatting consistency
  • reply.test.ts: Ensure all three test cases (HTML standard, HTML RTL, plain-text) adequately cover edge cases and mock setup is correct
  • mail.ts integration: Confirm function swap is complete and no additional refactoring is needed for the Outlook-specific implementation

Possibly related PRs

Suggested reviewers

  • anakarentorosserrano-star
  • mosesjames7271-svg

Poem

🐰 A rabbit's tale of Outlook mail,
With formatted replies that never fail,
Aptos fonts and dates so true,
RTL text in Hebrew hue,
Each quoted thought in perfect form—
Reply with style, the newest norm! ✉️

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/create-outlook-reply

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8514b1 and f9f30c5.

📒 Files selected for processing (4)
  • apps/web/utils/outlook/mail.ts (3 hunks)
  • apps/web/utils/outlook/reply.test.ts (1 hunks)
  • apps/web/utils/outlook/reply.ts (1 hunks)
  • version.txt (1 hunks)

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 and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="apps/web/utils/outlook/reply.ts">

<violation number="1" location="apps/web/utils/outlook/reply.ts:27">
Default `textContent` and `quotedContent` to empty strings so the plain-text reply never renders the literal word &quot;undefined&quot; when those optional values are missing.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@elie222 elie222 changed the base branch from feat/outlook-reply-all to main November 11, 2025 09:57
@elie222 elie222 merged commit eaee916 into main Nov 11, 2025
5 of 7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
@elie222 elie222 deleted the feat/create-outlook-reply branch December 18, 2025 23:02
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