Skip to content

6 8 25 dev#74

Closed
PabloJVelez wants to merge 56 commits intolambda-curry:mainfrom
PabloJVelez:6-8-25-dev
Closed

6 8 25 dev#74
PabloJVelez wants to merge 56 commits intolambda-curry:mainfrom
PabloJVelez:6-8-25-dev

Conversation

@PabloJVelez
Copy link
Copy Markdown

@PabloJVelez PabloJVelez commented Aug 20, 2025

Summary by CodeRabbit

  • New Features

    • Admin: Chef Events management (calendar, details, accept/reject, email resend) and Menus CRUD with media.
    • Storefront: Chef-focused homepage, menu browse/carousel and detail pages, multi-step Event Request with success page, Event Product details and ticket purchase UX.
    • Notifications: Acceptance/rejection and details-resend emails, provider integration.
    • APIs/SDKs: Store/Admin endpoints and SDK resources for menus and chef events.
  • Bug Fixes

    • More robust price formatting, checkout safeguards, and loading/error handling.
  • Documentation

    • Added implementation plans and menu seeding guide.
  • Chores

    • Config/environments, worker mode, seeding and shipping scripts, dependency updates.

…uccessfully. Need to send correct email with link to the product to purchase
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces “menus” and “chef-event” modules end-to-end: models, migrations, services, links, workflows, admin/store APIs, SDKs, admin UI (calendar, forms, email management), storefront UI/routes (menus, request flow, event products), notification provider (Resend) with templates/subscribers, seeding scripts, configuration updates, and supporting utilities.

Changes

Cohort / File(s) Summary
Configuration & Setup
apps/medusa/medusa-config.ts, apps/medusa/package.json, apps/medusa/src/admin/tsconfig.json, apps/storefront/vite.config.ts
Registers custom modules (menu, chef-event) and notification module (Resend), adds worker/admin flags, scripts (seeds, email), deps for email; updates TS config and SSR externals.
Modules: Menu
apps/medusa/src/modules/menu/index.ts, .../models/menu.ts, .../models/course.ts, .../models/dish.ts, .../models/ingredient.ts, .../models/menu-image.ts, .../service.ts, .../migrations/*, .../migrations/.snapshot-menu-module.json
Adds Menu domain: models (menu, course, dish, ingredient, image), service (CRUD + images utilities), migrations (tables, images, thumbnail).
Modules: Chef Event
apps/medusa/src/modules/chef-event/index.ts, .../models/chef-event.ts, .../service.ts, .../migrations/*, .../migrations/.snapshot-chef-event-module.json
Adds ChefEvent domain with full schema (status, scheduling, contact, pricing, acceptance, email metadata), service, migrations.
Modules: Resend Notification
apps/medusa/src/modules/resend/index.ts, .../service.ts, .../emails/*
Adds Resend-based notification provider and email templates (order placed, event requested/accepted/rejected, event details resend).
Module Links
apps/medusa/src/links/product-menu.ts, apps/medusa/src/links/product-chefEvent.ts
Defines linkable associations: Product↔Menu, Product↔ChefEvent.
Workflows: Menus
apps/medusa/src/workflows/create-menu.ts, .../update-menu.ts, .../delete-menu.ts
Implements create/update/delete flows with nested entities and image management.
Workflows: Chef Events
apps/medusa/src/workflows/create-chef-event.ts, .../update-chef-event.ts, .../delete-chef-event.ts, .../accept-chef-event.ts, .../reject-chef-event.ts, .../resend-event-email.ts
Implements event lifecycle: create (emit requested), update, delete, accept (ensure profiles/channels/location, create product/inventory, link, optional email), reject (emit), resend email (update history, emit).
Admin API: Menus
apps/medusa/src/api/admin/menus/route.ts, .../menus/[id]/route.ts
Adds list/create and retrieve/update/delete endpoints with Zod validation and workflow integration; includes relations and images handling.
Admin API: Chef Events
apps/medusa/src/api/admin/chef-events/route.ts, .../chef-events/[id]/route.ts, .../chef-events/[id]/accept/route.ts, .../chef-events/[id]/reject/route.ts, .../chef-events/[id]/resend-email/route.ts
Adds list/create, retrieve/update/delete, and actions (accept, reject, resend email) with validation and workflow calls.
Store API: Menus & Chef Events
apps/medusa/src/api/store/menus/route.ts, .../menus/[id]/route.ts, .../chef-events/route.ts, .../chef-events/[id]/route.ts, apps/medusa/src/api/health/route.ts
Adds store endpoints to list/retrieve menus, create event requests, and retrieve confirmed event; health check.
Admin SDK & Hooks
apps/medusa/src/sdk/admin/*, apps/medusa/src/admin/hooks/menus.ts, .../hooks/chef-events.ts, apps/medusa/src/admin/providers.tsx, .../root.tsx
Adds Admin SDK resources (menus, chef-events, uploads) and React Query hooks; provides QueryClient context and root wrapper.
Admin UI: Menus
apps/medusa/src/admin/routes/menus/_index & components/*, .../menus/[id]/page.tsx, .../menus/page.tsx, .../menus/schemas.ts
Adds menus list (table with actions), create/edit pages, form with nested courses/dishes/ingredients, media manager, validation schemas.
Admin UI: Chef Events
apps/medusa/src/admin/routes/chef-events/page.tsx, .../[id]/page.tsx, .../components/*, .../schemas.ts
Adds calendar view, detail page with form, accept/reject modals, email management section; validation and status transitions.
Subscribers (Emails)
apps/medusa/src/subscribers/chef-event-requested.ts, .../chef-event-accepted.ts, .../chef-event-rejected.ts, .../chef-event-email-resend.ts
Handles emitted events to assemble payloads and send notifications via Resend provider.
Seeding & Scripts
apps/medusa/src/scripts/seed.ts, .../seed/menus.ts, .../seed/README-menus.md, .../seed-menus.ts, .../create-digital-shipping.ts
Seeds menus and menu products, links to products, sets up digital shipping; documentation; standalone seed entry points.
Storefront: Core Pages
apps/storefront/app/routes/_index.tsx, .../about.ts, .../about-us.tsx, .../how-it-works.tsx
Rebrands homepage and about pages to chef-focused content; adds How It Works route; loads featured menus.
Storefront: Menus
apps/storefront/app/routes/menus._index.tsx, .../menus.$menuId.tsx, .../templates/MenuTemplate.tsx, .../components/menu/*, apps/storefront/types/menus.ts, .../libs/util/server/data/menus.server.ts
Adds menus index/detail routes, template and components (grid/carousel/skeleton), types, and data fetchers with caching.
Storefront: Event Request Flow
apps/storefront/app/routes/request._index.tsx, .../request.success.tsx, .../components/event-request/*, apps/storefront/types/chef-events.ts, .../libs/util/server/data/chef-events.server.ts
Implements multi-step event request form with validation, server action to create store chef-event, success page, types, and server utilities.
Storefront: Event Products
apps/storefront/app/routes/products.$productHandle.tsx, .../components/product/EventProductDetails.tsx, .../libs/util/server/data/event-products.server.ts, .../libs/util/products.ts
Detects event products, fetches related chef-event/menu data, renders event details; adds SKU helpers (note: duplicated exports).
Storefront: Checkout Adjustments
apps/storefront/app/components/checkout/*, .../libs/util/checkout/amountToStripeExpressCheckoutAmount.ts, .../routes/api.cart.line-items.create.ts, .../libs/util/prices.ts, .../libs/util/server/data/cart.server.ts
Adds defensive pricing defaults, logging, variant resolution fallback, Stripe cents rounding, and diagnostics.
Storefront: Chef Marketing Components
apps/storefront/app/components/chef/*, apps/storefront/libs/config/site/*, apps/storefront/app/styles/global.css, apps/storefront/app/providers/root-providers.tsx, apps/storefront/app/root.tsx, apps/storefront/package.json
Adds chef hero/experiences/featured menus components; updates navigation, site settings, meta; adds tooltip provider; hides scrollbars; bumps React 19.1.0.
Misc
apps/medusa/src/api/admin/link-sales-channel-api-key/route.ts, docs/*, apps/storefront/libs/util/server/client.server.ts, apps/storefront/app/components/reviews/ProductReviewList.tsx
Adds admin route to link sales channel to API key; implementation plans docs; client config logging; minor copy update.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Storefront as Storefront UI
  participant StoreAPI as Store API (/store/chef-events)
  participant Workflow as create-chef-event-workflow
  participant Module as ChefEventModuleService
  participant Notif as Notification Service

  User->>Storefront: Submit Event Request Form
  Storefront->>StoreAPI: POST /store/chef-events (validated)
  StoreAPI->>Workflow: Run create-chef-event-workflow
  Workflow->>Module: createChefEvents(...)
  Module-->>Workflow: chefEvent
  Workflow->>Notif: emit "chef-event.requested"
  Workflow-->>StoreAPI: { chefEvent }
  StoreAPI-->>Storefront: 201 Created + chefEvent
  Storefront-->>User: Redirect to /request/success
Loading
sequenceDiagram
  autonumber
  actor Admin
  participant AdminUI as Admin UI
  participant AdminAPI as Admin API (/admin/chef-events/:id/accept)
  participant AcceptWF as accept-chef-event-workflow
  participant ChefModule as ChefEventModuleService
  participant Core as Core Flows (products, inventory, channels, profiles)
  participant Product as Product Module
  participant Notif as Notification Service

  Admin->>AdminUI: Click "Accept" (with sendAcceptanceEmail?)
  AdminUI->>AdminAPI: POST /admin/chef-events/:id/accept
  AdminAPI->>AcceptWF: Run accept-chef-event-workflow
  AcceptWF->>ChefModule: Update status=confirmed, notes, acceptedBy
  AcceptWF->>Core: Ensure digital shipping profile/channel/location
  AcceptWF->>Core: Create product + variant (+ inventory)
  Core-->>AcceptWF: productId
  AcceptWF->>ChefModule: Link productId to chefEvent
  alt sendAcceptanceEmail == true
    AcceptWF->>Notif: emit "chef-event.accepted"
  end
  AcceptWF-->>AdminAPI: { success, chefEventId, productId, emailSent }
  AdminAPI-->>AdminUI: 200 OK
Loading
sequenceDiagram
  autonumber
  actor Admin
  participant AdminUI as Admin UI (EmailManagementSection)
  participant AdminAPI as Admin API (/admin/chef-events/:id/resend-email)
  participant ResendWF as resend-event-email-workflow
  participant ChefModule as ChefEventModuleService
  participant Notif as Notification Service

  Admin->>AdminUI: Open Resend Modal, choose recipients
  AdminUI->>AdminAPI: POST /admin/chef-events/:id/resend-email
  AdminAPI->>ResendWF: Run resend-event-email-workflow
  ResendWF->>ChefModule: Update emailHistory, lastEmailSentAt
  ResendWF->>Notif: emit "chef-event.email-resend"
  ResendWF-->>AdminAPI: { chefEvent, emailSent: true }
  AdminAPI-->>AdminUI: 200 OK
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Possibly related PRs

Suggested reviewers

  • jaruesink

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@PabloJVelez PabloJVelez deleted the 6-8-25-dev branch August 20, 2025 02:43
@coderabbitai coderabbitai Bot requested a review from jaruesink August 20, 2025 02:45
@lambda-curry lambda-curry locked and limited conversation to collaborators Aug 20, 2025
@lambda-curry lambda-curry unlocked this conversation Aug 20, 2025
@PabloJVelez PabloJVelez restored the 6-8-25-dev branch August 20, 2025 13:40
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