Conversation
…into ip/ical-and-outlook
There was a problem hiding this comment.
3 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/lib/ical.ts">
<violation number="1" location="src/lib/ical.ts:115">
P1: Generate the iCal timestamps in `meetingData.timezone`, not the server's local timezone. As written, `.ics` downloads shift meeting times whenever the meeting timezone and server timezone differ.</violation>
</file>
<file name="src/components/availability/header/availability-header.tsx">
<violation number="1" location="src/components/availability/header/availability-header.tsx:288">
P1: Pass the meeting timezone into the Outlook link generation. The current link uses timezone-less `startdt`/`enddt`, so Outlook will interpret the event in the opener's local timezone and shift meetings for users outside `meetingData.timezone`.</violation>
<violation number="2" location="src/components/availability/header/availability-header.tsx:330">
P2: Wrap the iCal download action in `try/catch` so server-action failures surface a toast instead of becoming an unhandled rejected promise.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| onClick={async () => { | ||
| try { | ||
| const { success, link, totalDays } = | ||
| await getOutlookCalendarLink({ |
There was a problem hiding this comment.
P1: Pass the meeting timezone into the Outlook link generation. The current link uses timezone-less startdt/enddt, so Outlook will interpret the event in the opener's local timezone and shift meetings for users outside meetingData.timezone.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/availability/header/availability-header.tsx, line 288:
<comment>Pass the meeting timezone into the Outlook link generation. The current link uses timezone-less `startdt`/`enddt`, so Outlook will interpret the event in the opener's local timezone and shift meetings for users outside `meetingData.timezone`.</comment>
<file context>
@@ -273,6 +277,72 @@ export function AvailabilityHeader({
+ onClick={async () => {
+ try {
+ const { success, link, totalDays } =
+ await getOutlookCalendarLink({
+ meetingId: meetingData.id,
+ meetingTitle: meetingData.title,
</file context>
There was a problem hiding this comment.
Thanks for the update!
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/server/actions/availability/outlook/action.ts">
<violation number="1" location="src/server/actions/availability/outlook/action.ts:20">
P1: Using UTC date parts here can shift the event to the wrong calendar day; use local date getters when composing the date string.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/lib/ical.ts">
<violation number="1" location="src/lib/ical.ts:78">
P1: Using local date getters here can shift the calendar day by timezone, causing exported iCal/Outlook events to land on the wrong date. Keep UTC getters when deriving the Y-M-D used for timezone conversion.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Description
This PR adds two features
These features are only accessible if a meeting is scheduled, similarly to how the Google Calendar button works.
Works for both days of the week meeting as well as normal meetings
Note: Similarly to Google Calendar, we can only add a contiguous time block for 1 day. Therefore, when meetings on multiple days are scheduled, adding to Outlook only adds the first day, with a popup that lets the user know that if they want multiple days, they should export through the iCal feature
Recording/Screenshots
Before
After
Test Plan
Issues