Skip to content

Comments

chore: add content type to ics file#24069

Merged
anikdhabal merged 4 commits intomainfrom
ics-file
Sep 25, 2025
Merged

chore: add content type to ics file#24069
anikdhabal merged 4 commits intomainfrom
ics-file

Conversation

@anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented Sep 25, 2025

What does this PR do?

Users reported that event is not showing in some mail clients
image(18)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Walkthrough

In packages/emails/lib/generateIcsFile.ts, the returned object’s "method" field is removed and replaced with two fields: "type" set to "text/calendar; charset=UTF-8; method=REQUEST" and "disposition" set to "attachment". Filename and content fields are unchanged. Function signature, early return behavior, and control flow remain the same.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and concisely describes the primary change of this PR, which is adding the appropriate content type header to the ICS file. It directly reflects the main code modification without extraneous details.
Description Check ✅ Passed The pull request description explains that users reported events not displaying in certain mail clients and includes an illustrative screenshot, which directly relates to the addition of a content type in the ICS file to resolve that issue. It therefore provides context for the changes rather than being off-topic or entirely generic.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ics-file

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.

@graphite-app graphite-app bot requested a review from a team September 25, 2025 09:03
@keithwillcode keithwillcode added the core area: core, team members only label Sep 25, 2025
@dosubot dosubot bot added the 🧹 Improvements Improvements to existing features. Mostly UX/UI label Sep 25, 2025
@anikdhabal anikdhabal changed the title chore: add content type into ics file chore: add content type to ics file Sep 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/emails/lib/generateIcsFile.ts (1)

39-40: Include charset in Content-Type header.

Without an explicit charset, mail agents fall back to US-ASCII per RFC 2046, which can corrupt non-ASCII characters (names, locations, notes) in the generated invite. Extending the MIME type to advertise UTF-8 keeps multilingual content intact.

-    type: "text/calendar; method=REQUEST",
+    type: "text/calendar; charset=UTF-8; method=REQUEST",
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8d7cdf9 and 795d880.

📒 Files selected for processing (1)
  • packages/emails/lib/generateIcsFile.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/emails/lib/generateIcsFile.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • packages/emails/lib/generateIcsFile.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/emails/lib/generateIcsFile.ts

@vercel
Copy link

vercel bot commented Sep 25, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 25, 2025 5:47pm
cal-eu Ignored Ignored Sep 25, 2025 5:47pm

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

E2E results are ready!

@anikdhabal anikdhabal merged commit 97f1f7b into main Sep 25, 2025
59 of 61 checks passed
@anikdhabal anikdhabal deleted the ics-file branch September 25, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only 🧹 Improvements Improvements to existing features. Mostly UX/UI ready-for-e2e size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants