Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an anonymous per-post commenting system to the website, backed by a new Scaleway serverless comment API, and tweaks the existing Webmentions UI to focus on share/discussion actions.
Changes:
- Introduce
CommentsSectionUI in blog posts (including styles and frontend tests). - Add new
comment_service/serverless backend (S3 persistence + honeypot flagging + rate limiting + email notifications) with Vitest + ESLint + CI workflow. - Refactor
Webmentionsrendering (compact counts + share links) and adjust related styles.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| website/components/CommentsSection.tsx | New comments UI (fetch + submit + honeypot field) |
| website/test/CommentsSection.test.tsx | New test suite for comments UI |
| website/layouts/styles.ts | Adds commentSection styles; adjusts webmentions styles |
| website/components/Post.tsx | Renders CommentsSection under Webmentions; removes EndOfArticleSupport CTA |
| website/components/Webmentions.tsx | Adds share links + compact reactions bar |
| website/components/CompactSupport.tsx | Adds a new compact support CTA component |
| comment_service/comments.ts | New Scaleway function handler for GET/POST comments with S3 + TEM email |
| comment_service/test/comments.test.ts | Comprehensive backend tests (CORS/GET/POST/rate limit/honeypot/email) |
| comment_service/config + package.json + serverless.yml | Build/test/lint/deploy config for the new service |
| comment_service/README.md | Service documentation |
| .github/workflows/test-comment-service.yml | CI job to lint/format/test comment_service with coverage |
comment_service/comments.ts
Outdated
Comment on lines
+197
to
+201
| const { name, text, page } = body; | ||
| if (!text || !page) { | ||
| return { | ||
| statusCode: 400, | ||
| headers: corsHeaders, |
There was a problem hiding this comment.
page is accepted as-is and later stored/emailed without sanitization or length limits. A client can send an extremely long or control-character-containing page value causing oversized S3 objects/emails or log injection. Validate/sanitize page (e.g., require it to start with /, strip control chars, and enforce a reasonable max length).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.