Conversation
There was a problem hiding this comment.
2 issues found across 9 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/components/availability/header/availability-header.tsx">
<violation number="1" location="src/components/availability/header/availability-header.tsx:301">
P2: The new "Invite Members" button is visually empty on small screens because its text is hidden and no icon is provided.</violation>
</file>
<file name="src/server/actions/meeting/invite/action.ts">
<violation number="1" location="src/server/actions/meeting/invite/action.ts:46">
P2: The create-or-reuse logic is race-prone and can create multiple `meeting_invites` rows for the same meeting under concurrent requests.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| try { | ||
| let invite = await getExistingMeetingInvite(meetingId); | ||
|
|
||
| if (!invite) { |
There was a problem hiding this comment.
P2: The create-or-reuse logic is race-prone and can create multiple meeting_invites rows for the same meeting under concurrent requests.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/server/actions/meeting/invite/action.ts, line 46:
<comment>The create-or-reuse logic is race-prone and can create multiple `meeting_invites` rows for the same meeting under concurrent requests.</comment>
<file context>
@@ -0,0 +1,81 @@
+ try {
+ let invite = await getExistingMeetingInvite(meetingId);
+
+ if (!invite) {
+ const [newInvite] = await db
+ .insert(meetingInvites)
</file context>
There was a problem hiding this comment.
This is ok for now. The following PR will introduce customizable and single-use invite links
There was a problem hiding this comment.
Got it—thanks for the context. Understood this will be addressed in the next PR.
ethancha0
left a comment
There was a problem hiding this comment.
Great job Isaac, sending invites, notifications, and joining a meeting all works properly. Since you won't be in town for the next few days I can take over.
Here are a few cleanups I did in the InviteMembersDialog.tsx file:
- getInitials moved outside of component
- debounce raised to 300ms
- cleanup useEffect for both timeouts
- added copiedTimeoutRef to cleanup setCopied safely
- removed typeof window !== "undefined" since we're in a client component
- excess useCallback removed
I will also be polishing up the user flow by
- triggering the dialog upon freshly created meeting
- recipients will auto-join a meeting
- add an "invited" tab on the meetings page
Overall, this a great base implementation for inviting users to a meeting ◡̈
There was a problem hiding this comment.
1 issue found across 1 file (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/components/availability/invite-members-dialog.tsx">
<violation number="1" location="src/components/availability/invite-members-dialog.tsx:122">
P2: Clear any existing copy-reset timeout before creating a new one, otherwise repeated clicks can reset the “Copied” state too early.</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.
8 issues found across 19 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/components/availability/group-availability.tsx">
<violation number="1" location="src/components/availability/group-availability.tsx:89">
P1: Passing `timeZone` into `getTimestampFromBlockIndex` can produce wrong timestamps for overnight ranges because the timezone path does not roll over days when block hours exceed 23.</violation>
</file>
<file name="src/lib/rooms/utils.ts">
<violation number="1" location="src/lib/rooms/utils.ts:9">
P1: `formatISOToLocalTime` should not hard-code `America/Los_Angeles`; this breaks local-time display for non-PT users.</violation>
</file>
<file name="src/components/nav/personal-availability-sidebar.tsx">
<violation number="1" location="src/components/nav/personal-availability-sidebar.tsx:101">
P2: Guard this async effect against stale responses and clear `importableMeetings` on failure; otherwise old meeting results can be rendered for the current meeting.</violation>
<violation number="2" location="src/components/nav/personal-availability-sidebar.tsx:213">
P2: Use unique `id`/`aria-controls` values for this new accordion; duplicated IDs create invalid ARIA wiring.</violation>
</file>
<file name="src/components/studyrooms/heatmap/rooms-heatmap.tsx">
<violation number="1" location="src/components/studyrooms/heatmap/rooms-heatmap.tsx:69">
P2: Availability sorting includes slots after the selected end time, so room order can disagree with the visible heatmap window.</violation>
</file>
<file name="src/components/studyrooms/room-results.tsx">
<violation number="1" location="src/components/studyrooms/room-results.tsx:31">
P1: Parsing `toLocaleTimeString(..., { hour12: false })` can produce `24:xx` in `en-US`, which misclassifies midnight slots and filters out valid availability.</violation>
</file>
<file name="src/lib/availability/utils.ts">
<violation number="1" location="src/lib/availability/utils.ts:228">
P1: Timezone conversion builds invalid local times when slot minutes pass midnight (e.g. 24:15), which can break ISO generation for overnight availability windows.</violation>
<violation number="2" location="src/lib/availability/utils.ts:254">
P2: Using first/last `availabilityTimeBlocks` entries assumes sorted bounds and breaks overnight/wrapped block ranges.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
97f6e49 to
0e5e4fc
Compare
0e5e4fc to
7e29534
Compare
There was a problem hiding this comment.
1 issue found across 5 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/components/availability/invite-members-dialog.tsx">
<violation number="1" location="src/components/availability/invite-members-dialog.tsx:214">
P3: `Typography` with `variant="caption"` is inline by default, so `mb-4` won’t apply bottom spacing. Make this caption block-level so the intended spacing is preserved.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
* feat: ✨ meeting invites frontend * feat: ✨ db and server action for meeting invites * chore: 🔧 cleanup useeffects, debounce raised, cleanup functions * feat: ✨ recipients autoadd to meeting, pending responders on sidebar * fix: 🐛 clear copy timeout before scheduling * fix: 🐛 migration conflicts * fix: 🐛 typography, rm dead table * fix: 🐛 restore table --------- Co-authored-by: ethancha0 <ethanchao2005@gmail.com>
Description
4/17 - Updates (Ethan)
Recording/Screenshots
Test Plan
Issues