Shareable link limits - #2138
Conversation
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
| and( | ||
| eq(videos.ownerId, video.ownerId), | ||
| eq(videos.isScreenshot, false), | ||
| gte(videos.createdAt, quotaWindowStart(video.createdAt)), |
There was a problem hiding this comment.
Creation-month quota never resets
When a video exceeds the allowance in its creation month, the quota check continues counting against that original month after later monthly resets, causing the video to remain locked while the dashboard reports a reset allowance.
| gte(videos.createdAt, quotaWindowStart(video.createdAt)), | |
| gte(videos.createdAt, quotaWindowStart(new Date())), |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/lib/shareable-link-quota.ts
Line: 41
Comment:
**Creation-month quota never resets**
When a video exceeds the allowance in its creation month, the quota check continues counting against that original month after later monthly resets, causing the video to remain locked while the dashboard reports a reset allowance.
```suggestion
gte(videos.createdAt, quotaWindowStart(new Date())),
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
This is intentional. The cap is an anti-spam measure, so videos that exceed a month's allowance stay locked rather than unlocking when the month rolls over, otherwise a burst of spam links would all go live on the 1st. The monthly reset applies to newly created videos, and the dashboard copy now says this explicitly.
| @@ -0,0 +1,84 @@ | |||
| "use client"; | |||
There was a problem hiding this comment.
Component filename breaks convention
The new PascalCase filename violates the repository-wide kebab-case convention, making component naming and discovery inconsistent with the required project structure.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/app/s/[videoId]/_components/ShareableLinkLimitOverlay.tsx
Line: 1
Comment:
**Component filename breaks convention**
The new PascalCase filename violates the repository-wide kebab-case convention, making component naming and discovery inconsistent with the required project structure.
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
PascalCase filenames are the working convention for React component files in apps/web, including every component in this directory and recent additions across the app, so keeping this as is.
There was a problem hiding this comment.
Got it, thanks for the correction. PascalCase is the right convention for component files in apps/web — I'll stop flagging that.
|
hey @greptileai, please re-review the PR |
Capped amount of shareable link limits per month to reduce spam.
Greptile Summary
The PR introduces a free-plan monthly shareable-link allowance and consistently gates over-limit videos on both public share and embed surfaces.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "style(web): drop redundant shareableLink..." | Re-trigger Greptile
Context used (3)