Skip to content

Commenting#364

Merged
fretchen merged 20 commits intomainfrom
commenting
Mar 23, 2026
Merged

Commenting#364
fretchen merged 20 commits intomainfrom
commenting

Conversation

@fretchen
Copy link
Owner

No description provided.

Copy link
Contributor

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

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 CommentsSection UI 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 Webmentions rendering (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 on lines +197 to +201
const { name, text, page } = body;
if (!text || !page) {
return {
statusCode: 400,
headers: corsHeaders,
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@fretchen fretchen merged commit 666714c into main Mar 23, 2026
5 checks passed
@fretchen fretchen deleted the commenting branch March 23, 2026 00:55
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