Skip to content

unintentional vibe coding stuff which I now regret#1910

Closed
snairjsq wants to merge 1 commit into
CapSoftware:mainfrom
snairjsq:claude/remove-free-recording-cap
Closed

unintentional vibe coding stuff which I now regret#1910
snairjsq wants to merge 1 commit into
CapSoftware:mainfrom
snairjsq:claude/remove-free-recording-cap

Conversation

@snairjsq

@snairjsq snairjsq commented Jun 11, 2026

Copy link
Copy Markdown

Eliminate the free-plan 5-minute recording limit across all enforcement layers so free users get unlimited recording length:

  • Web browser recorder: drop the auto-stop timer and show elapsed time
  • Desktop Instant Mode: drop the auto-stop and remaining-time countdown
  • Desktop studio share/export: remove the 300s upgrade gates
  • Web server actions and desktop video API: remove duration upload gates
  • Desktop Rust upload: remove the duration UpgradeRequired check
  • Update related UI/FAQ/assistant copy that referenced the limit

Greptile Summary

This PR removes the 5-minute free-plan recording cap at every enforcement layer — desktop Rust client check, desktop TypeScript pre-upload gates, Instant Mode auto-stop timer, web server actions, and the desktop API /create endpoint — and updates all related UI copy (FAQ, assistant constants, warning components).

  • Desktop (Rust/TypeScript): Local duration check removed from upload_exported_video; TypeScript pre-upload gates removed from ShareButton, ExportPage, and recordings-overlay; ShowCapFreeWarning component and Instant Mode auto-stop effect deleted from in-progress-recording and target-select-overlay.
  • Web server: userIsPro duration guards removed from actions/video/upload.ts, actions/video/create-for-processing.ts, and the api/desktop/.../video.ts GET /create route.
  • UI/Copy: Timer now shows elapsed time for all users; FAQ and AI-assistant copy updated to remove the 5-minute limit mention.

Confidence Score: 4/5

Safe to merge. All enforcement layers are consistently removed and the changes are internally coherent across Rust, TypeScript, and server actions.

The only residual concern is that the UpgradeRequired result branches in ShareButton.tsx, ExportPage.tsx, and recordings-overlay.tsx are now dead code for the video upload flow — the server no longer returns a 403 for any duration reason on the endpoint those calls reach. This is harmless but is a minor cleanup left undone in the same PR that removed the trigger.

apps/desktop/src/routes/editor/ShareButton.tsx and ExportPage.tsx — both retain an UpgradeRequired result handler that is now unreachable for video uploads.

Important Files Changed

Filename Overview
apps/desktop/src-tauri/src/lib.rs Removes local duration check before upload; auth renamed to _auth to suppress unused-variable warning cleanly. UploadResult::UpgradeRequired enum variant and its match arms survive for other callers (e.g., upload_screenshot still gate-keeps on is_upgraded()).
apps/desktop/src/routes/editor/ShareButton.tsx Removes the pre-upload duration gate. The remaining UpgradeRequired result branch in the upload response handler is now unreachable for the video upload flow since the server no longer returns a 403 for duration reasons.
apps/desktop/src/routes/editor/ExportPage.tsx Same as ShareButton: pre-upload duration gate removed; UpgradeRequired branch in the result handler is now dead for video uploads.
apps/desktop/src/routes/in-progress-recording.tsx Removes Instant Mode 5-min auto-stop for free users and converts the timer display from countdown (remaining) to elapsed time for all users.
apps/desktop/src/routes/recordings-overlay.tsx Removes pre-upload duration gate; residual UpgradeRequired result handler (not in diff) is now dead for video uploads but harmless.
apps/desktop/src/routes/target-select-overlay.tsx Removes three call sites of ShowCapFreeWarning and deletes the component itself, which displayed the Instant Mode 5-min warning for free users.
apps/web/actions/video/create-for-processing.ts Removes server-side duration gate (userIsPro check) from video-for-processing creation path; userIsPro import removed as no longer needed here.
apps/web/actions/video/upload.ts Removes server-side duration gate from the web upload action; userIsPro import removed.
apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/useWebRecorder.ts Removes isProUser option, isFreePlan derived flag, freePlanAutoStopTriggeredRef, and the useEffect that auto-stopped recording at the free-plan limit.
apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/web-recorder-dialog.tsx Drops user from the useDashboardContext() destructure (it was only used for isProUser and the countdown display); timer now always shows elapsed time.
apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/web-recorder-constants.ts Deletes the FREE_PLAN_MAX_RECORDING_MS constant (5 × 60 × 1000).
apps/web/app/(org)/dashboard/caps/record/RecordVideoPage.tsx Updates FAQ copy to remove the 5-minute free-plan limit reference; drops unused FREE_PLAN_MAX_RECORDING_MS import.
apps/web/app/api/desktop/[...route]/video.ts Removes the 403 upgrade_required gate on the /create endpoint for the desktop API; userIsPro import removed.
apps/web/lib/messenger/constants.ts Updates AI-assistant copy for Instant Mode to remove 'Free users limited to 5 minutes' language.

Comments Outside Diff (1)

  1. apps/desktop/src/routes/editor/ShareButton.tsx, line 103-104 (link)

    P2 Dead UpgradeRequired result branch

    With the server-side duration check removed from video.ts (the only endpoint hit by the desktop's create_or_get_video call), the Rust path that maps a 403 upgrade_required response into UploadResult::UpgradeRequired can no longer be reached from this upload flow. The same dead branch exists at the equivalent lines in ExportPage.tsx and recordings-overlay.tsx. These can be safely removed alongside the pre-check that was already deleted in this PR.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/routes/editor/ShareButton.tsx
    Line: 103-104
    
    Comment:
    **Dead `UpgradeRequired` result branch**
    
    With the server-side duration check removed from `video.ts` (the only endpoint hit by the desktop's `create_or_get_video` call), the Rust path that maps a 403 `upgrade_required` response into `UploadResult::UpgradeRequired` can no longer be reached from this upload flow. The same dead branch exists at the equivalent lines in `ExportPage.tsx` and `recordings-overlay.tsx`. These can be safely removed alongside the pre-check that was already deleted in this PR.
    
    How can I resolve this? If you propose a fix, please make it concise.

    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!

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/desktop/src/routes/editor/ShareButton.tsx:103-104
**Dead `UpgradeRequired` result branch**

With the server-side duration check removed from `video.ts` (the only endpoint hit by the desktop's `create_or_get_video` call), the Rust path that maps a 403 `upgrade_required` response into `UploadResult::UpgradeRequired` can no longer be reached from this upload flow. The same dead branch exists at the equivalent lines in `ExportPage.tsx` and `recordings-overlay.tsx`. These can be safely removed alongside the pre-check that was already deleted in this PR.

Reviews (1): Last reviewed commit: "feat: remove 5-minute recording cap for ..." | Re-trigger Greptile

Eliminate the free-plan 5-minute recording limit across all enforcement
layers so free users get unlimited recording length:

- Web browser recorder: drop the auto-stop timer and show elapsed time
- Desktop Instant Mode: drop the auto-stop and remaining-time countdown
- Desktop studio share/export: remove the 300s upgrade gates
- Web server actions and desktop video API: remove duration upload gates
- Desktop Rust upload: remove the duration UpgradeRequired check
- Update related UI/FAQ/assistant copy that referenced the limit
@snairjsq snairjsq marked this pull request as draft June 11, 2026 09:53
@richiemcilroy

Copy link
Copy Markdown
Member

😂😂

@snairjsq snairjsq deleted the claude/remove-free-recording-cap branch June 11, 2026 09:53
@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@snairjsq

Copy link
Copy Markdown
Author

😂😂

Sorry about that! Wasn't intentional! Appreciate all the good work you folks do.

@snairjsq snairjsq restored the claude/remove-free-recording-cap branch June 11, 2026 09:56
@snairjsq snairjsq changed the title feat: remove 5-minute recording cap for free users unintentional vibe coding stuff which I now regret Jun 11, 2026
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.

3 participants