Deeplink duration + validation fixes (recording warning states, upload disable, trim-sync refresh)#313
Deeplink duration + validation fixes (recording warning states, upload disable, trim-sync refresh)#313adithya1012 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>
|
TY for the PR, on the review |
… allowRecordingPastTotalDuration prop
|
This feature is good, but it needs to be part of the Fastify plugin contract see https://github.com/morepriyam/pulsevault |
|
I have re-opened the PR. We will connect and discuss what needs to be done. Would love to see this feature in production. |
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).