Deeplink duration + validation fixes (recording warning states, upload disable, trim-sync refresh)#313
Open
adithya1012 wants to merge 5 commits intomieweb:mainfrom
Open
Deeplink duration + validation fixes (recording warning states, upload disable, trim-sync refresh)#313adithya1012 wants to merge 5 commits intomieweb:mainfrom
adithya1012 wants to merge 5 commits intomieweb:mainfrom
Conversation
Parse an optional `duration` query param from deeplinks and carry it through upload routing, then persist it in per-draft upload config. In the shorts camera flow, load the locked duration from deeplink/config, track total used recording time, and enforce the duration cap during recording. Add blinking locked-duration and warning indicators when users hit the limit so upload recordings reliably match server-configured limits.feat(shorts): enforce deeplink duration limits in uploads Parse an optional `duration` query param from deeplinks and carry it through upload routing, then persist it in per-draft upload config. In the shorts camera flow, load the locked duration from deeplink/config, track total used recording time, and enforce the duration cap during recording. Add blinking locked-duration and warning indicators when users hit the limit so upload recordings reliably match server-configured limits.
There was a problem hiding this comment.
Pull request overview
Improves deeplink “locked duration” handling across Shorts recording and the merged upload screen by persisting a per-draft duration lock, enhancing over-limit warning UX, and preventing uploads when the effective (trim-aware) duration exceeds the lock.
Changes:
- Persist and load a per-draft
durationSecondsin upload config (deeplink/QR-driven). - Update Shorts recording UI to show over-limit warning states and allow recording past the total limit in locked mode.
- Add trim-aware duration validation on the merged upload screen, with inline warning + disabled Upload button.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/uploadConfig.ts | Adds optional durationSeconds persistence and parsing for per-draft upload config. |
| components/RecordButton.tsx | Allows starting a session at/over total duration (locked mode) and avoids auto-stop when configured. |
| app/(camera)/shorts.tsx | Loads/derives locked duration, adds warning/blink UI, and refreshes drafts by active mode on focus. |
| app/merged-video.tsx | Computes effective (trim-aware) draft duration and disables upload when over locked duration with inline warning. |
| app/index.tsx | Parses duration deeplink param and forwards/stores it with upload config. |
| app/_layout.tsx | Parses duration from runtime deeplinks and forwards/stores it with upload config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Collaborator
|
TY for the PR, on the review |
… allowRecordingPastTotalDuration prop
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.
Summary
This PR improves deeplink-duration handling across recording and upload flows.
It introduces clearer warning behavior when users hit/exceed a locked duration, ensures uploads are blocked via disabled state (with inline explanation), and fixes a trim-sync bug where Shorts screen could still show stale over-limit warnings after trimming below the limit.
Demo
https://youtube.com/shorts/zvwQoqCpy_M
What changed
1) Recording behavior in Shorts (
app/(camera)/shorts.tsx,components/RecordButton.tsx)2) Upload gating in merged screen (
app/merged-video.tsx)3) Trim-sync bug fix in Shorts (
app/(camera)/shorts.tsx)camera/upload) with fallback to the other mode.Files changed
components/RecordButton.tsxapp/(camera)/shorts.tsxapp/merged-video.tsxHow to test
Notes
trimStartTimeMs/trimEndTimeMs).npx tsc --noEmit).