Feat/project page comments#76
Conversation
…l-template Feat/account verification email template
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds authenticated-only commenting on project detail pages, while also introducing shared search/pagination controls for several frontend list pages and upgrading the email verification template to a consistent transactional email layout.
Changes:
- Add project comments UI (authenticated users only) and tighten Comments collection access to enforce parent project visibility on create/read.
- Introduce shared
PortalListControls(search + pagination) and apply it to Projects, Members, and Events list pages. - Replace the verify-email HTML with a reusable transactional email renderer; update E2E expectations and seed session timestamps.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/app.spec.ts | Extends E2E coverage for project comments access and aligns email verification text assertions. |
| src/utilities/transactionalEmail.ts | Adds a reusable HTML email renderer with HTML escaping. |
| src/endpoints/seed/portal.ts | Updates seeded “Cohort Project Spike Sync” timestamps (currently hard-coded far-future). |
| src/endpoints/seed/index.ts | Updates seeded “Cohort Project Spike Sync” timestamps (currently hard-coded far-future). |
| src/collections/Comments.ts | Adds project-visibility-aware read filtering and project-access enforcement on comment creation. |
| src/app/(frontend)/projects/page.tsx | Adds server-side search + pagination for published projects. |
| src/app/(frontend)/projects/[slug]/page.tsx | Adds the Comments section to project detail pages for authenticated users. |
| src/app/(frontend)/members/page.tsx | Adds server-side search + pagination for the member directory. |
| src/app/(frontend)/members/MembersDirectory.tsx | Removes client-side text search to rely on server-side query + keeps taxonomy filters. |
| src/app/(frontend)/events/page.tsx | Adds search + pagination but now computes live/upcoming/past from a paginated slice. |
| src/app/(frontend)/api/users/verify-email/route.ts | Switches verification email HTML to renderTransactionalEmail. |
| src/app/(frontend)/_components/PortalListControls.tsx | Adds shared search form + pagination UI/helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const events = await getEvents(user, { page, query }) | ||
| const now = Date.now() | ||
| const live = events.filter((event) => isLiveEvent(event, now)) | ||
| const upcoming = events.filter( | ||
| const live = events.docs.filter((event) => isLiveEvent(event, now)) | ||
| const upcoming = events.docs.filter( | ||
| (event) => !isLiveEvent(event, now) && new Date(event.startsAt).getTime() >= now, |
| return ( | ||
| <Link aria-current={active ? 'page' : undefined} className={className} href={href}> | ||
| {children} | ||
| </Link> | ||
| ) |
| // Event and project comments inherit parent visibility because those records can be public, | ||
| // authenticated, member-only, or admin-only. | ||
| const visibleEventIDs = await getVisibleEventIDs(req) | ||
| const visibleProjectIDs = await getVisibleProjectIDs(req) | ||
|
|
No description provided.