Skip to content

feat: RSVP #6039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1,460 commits into from
Closed

feat: RSVP #6039

wants to merge 1,460 commits into from

Conversation

bigint
Copy link
Member

@bigint bigint commented Jul 28, 2025

No description provided.

bigint added 30 commits June 20, 2025 13:10
Copy link

cloudflare-workers-and-pages bot commented Jul 28, 2025

Deploying hey-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3828243
Status: ✅  Deploy successful!
Preview URL: https://cff20409.hey-testnet.pages.dev
Branch Preview URL: https://rsvp.hey-testnet.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jul 28, 2025

Deploying hey-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3828243
Status: ✅  Deploy successful!
Preview URL: https://53a6659e.hey-staging.pages.dev
Branch Preview URL: https://rsvp.hey-staging.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jul 28, 2025

Deploying hey-mainnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3828243
Status: ✅  Deploy successful!
Preview URL: https://89cedf47.hey-mainnet.pages.dev
Branch Preview URL: https://rsvp.hey-mainnet.pages.dev

View logs

@bigint bigint marked this pull request as draft July 28, 2025 16:54
@bigint bigint requested a review from Copilot July 28, 2025 16:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements RSVP functionality for events by adding event creation capabilities and a new RSVP data model. The changes enable users to create event posts with metadata like title, location, and timestamps, while establishing the foundation for RSVP tracking.

Key changes:

  • Added comprehensive event metadata support with GraphQL fragments and TypeScript interfaces
  • Implemented event creation UI components including editor and settings
  • Created RSVP database schema with status tracking (GOING, NOT_GOING, MAYBE)

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
EventMetadata.graphql Extends event metadata fragment with title, address, location, and timing fields
usePostEventStore.ts Creates new store for managing event post state and editor visibility
usePostMetadata.tsx Integrates event metadata handling into post creation workflow
Event.tsx Implements event display component with date formatting and location links
PostBody.tsx Adds event rendering support to post body component
NewPublication.tsx Integrates event editor and settings into post composer
EventSettings/index.tsx Creates event settings toggle button with calendar icon
EventEditor.tsx Implements comprehensive event creation form with validation
schema.prisma Defines RSVP database model with composite primary key and status enum
.env.example & README.md Removes unused OPENROUTER_API_KEY environment variable

content: string;
startsAt: string;
endsAt: string;
location: string;
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

The location field type doesn't match the GraphQL schema which expects an object with 'physical' and 'virtual' properties. This inconsistency could cause type errors when mapping between the store and metadata.

Suggested change
location: string;
location: {
physical: string;
virtual: string;
};

Copilot uses AI. Check for mistakes.

@@ -104,12 +108,17 @@ const usePostMetadata = () => {
});
}

if (isEvent) {
return event(eventPost);
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

The eventPost object structure doesn't match the expected event metadata schema. The location field is a string in the store but should be an object with physical/virtual properties according to the GraphQL fragment.

Suggested change
return event(eventPost);
const transformedEventPost = {
...eventPost,
location: typeof eventPost.location === "string"
? { physical: eventPost.location, virtual: null }
: eventPost.location
};
return event(transformedEventPost);

Copilot uses AI. Check for mistakes.

const ValidationSchema = z.object({
content: z.string().optional(),
endsAt: z.string().min(1, { message: "End time is required" }),
location: z.string().optional(),
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

The validation schema defines location as a string, but the GraphQL metadata expects a complex object with physical and virtual properties. This mismatch will cause issues when creating event metadata.

Suggested change
location: z.string().optional(),
location: z
.object({
physical: z.string().optional(),
virtual: z.string().optional(),
})
.optional(),

Copilot uses AI. Check for mistakes.

status RSVPStatus
createdAt DateTime @default(now())

@@id([eventId, accountAddress])
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

[nitpick] The composite primary key order should typically place the more selective field first. Consider using [accountAddress, eventId] instead, as account addresses are likely more selective than event IDs for query performance.

Suggested change
@@id([eventId, accountAddress])
@@id([accountAddress, eventId])

Copilot uses AI. Check for mistakes.

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.

2 participants