Skip to content

fix(web): require reply parents on the same video for web comment actions - #2918

Merged
richiemcilroy merged 1 commit into
mainfrom
fix/web-comment-reply-parent
Oct 23, 2026
Merged

richiemcilroy merged 1 commit into
mainfrom
fix/web-comment-reply-parent

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

the web comment actions took the reply parent id as given. someone allowed to comment on one video could reply to a comment from a different video, which linked comments across videos and notified that other comment's author. same issue #2892 fixes for the mobile endpoint.

newComment and newMediaComment now check, after the existing video access check and before any insert or notification, that a reply's parent exists on the same video. a bad parent throws Comment not found. top level comments ("" parent) skip the lookup. the existing auth, upload token, media key and plan checks are unchanged.

one deliberate difference from #2892: the web check doesn't require the parent to be a text comment. the share page activity tab shows a reply button on every root card, including emoji reactions and video/audio comments, so replies to those are legitimate on web today and still work. the check lives in apps/web/lib/comment-reply-parent.ts. #2892's check is inline in the mobile route, so nothing could be reused, and this PR doesn't touch that route. the two merge cleanly in either order.

tests: apps/web/__tests__/unit/comment-reply-parent.test.ts runs both actions against a fake db that evaluates the real drizzle where clause. it covers parents on another video, missing parents, replies to text/emoji/video/audio parents on the same video, and top level comments. the rejection cases fail on main. the test is added to the recording-reliability vitest allowlist.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; both web actions reject parents from other videos before saving replies or sending notifications.

Summary

Adds a shared same-video parent check to newComment and newMediaComment.

  • Web replies now stay within the video they belong to.

No actionable issues found. Tests were reviewed but not run.

Acknowledged intent: richiemcilroy explicitly states that replies to non-text parents remain allowed because the web activity tab supports them.

Reviews (1) · Last reviewed commit: "fix(web): require reply parents on the s..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 22, 2026 12:30pm UTC

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

@richiemcilroy
richiemcilroy merged commit 78d72a7 into main Oct 23, 2026
39 checks passed

This branch was successfully deployed

2 active deployments
Preview – cap-web — 8a26736f Deployed Oct 22, 2026 by vercel[bot]
Preview – cap-status — 8a26736f Deployed Oct 22, 2026 by vercel[bot]
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.

1 participant