feat: add limits to recordings on destop #291
Reference in New Issue
Block a user
Delete Branch "limit-recordings-desktop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary by CodeRabbit
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Free
Run ID:
f3c202f0-de3b-433e-ae23-f9bc1bd72b7f📥 Commits
Reviewing files that changed from the base of the PR and between
543b5ffa60andf23eae00c0.📒 Files selected for processing (1)
js/desktop/src/features/compose/recording-overlay.tsx🚧 Files skipped from review as they are similar to previous changes (1)
📝 Walkthrough
Walkthrough
Adds
RECORDING_MAX_DURATION_SECONDS(60s) andRECORDING_WARNING_SECONDS(10s) constants, introduces auseRecordingCountdownhook that tracks elapsed time via wall-clock and auto-dispatches stop at max duration, refactorsRecordingTimerinto a prop-driven component, adds CSS progress/warning-glow animations, and wires everything intoRecordingOverlay.Changes
Recording Countdown and Warning UI
js/desktop/src/lib/constants.tsRECORDING_MAX_DURATION_SECONDS(60) andRECORDING_WARNING_SECONDS(10) with JSDoc describing their warning threshold roles.useRecordingCountdownhook andRecordingTimercomponentjs/desktop/src/features/compose/recording-overlay.tsxelapsed/isWarning; hook auto-dispatchesrequestIntent('stop')at max duration.RecordingTimerbecomes a prop-driven presentational component applying warning color whenisWarningis true.js/desktop/src/styles/globals.css@keyframes record-progress(scaleX 0→1, linear, forwards) and@keyframes record-warning-glow(pulsing red destructive box-shadow, infinite ease-in-out) with corresponding utility classes.RecordingOverlaywiring and progress barjs/desktop/src/features/compose/recording-overlay.tsxuseRecordingCountdown, conditionally appliesrecord-warning-glowto the overlay container, renders the top progress bar withRECORDING_MAX_DURATION_SECONDSasanimationDurationand red fill whenisWarning, and passeselapsed/isWarningtoRecordingTimer.Sequence Diagram(s)
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Comment
@coderabbitai helpto get the list of available commands and usage tips.