Recording behavior updated: instead of automatically stopping at the maximum duration limit, a warning message now displays when the limit is reached.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Recording behavior updated: instead of automatically stopping at the maximum duration limit, a warning message now displays when the limit is reached.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
useRecordingCountdown is refactored to remove the auto-stop dispatch that fired when the recording duration cap was reached. The hook now only updates elapsed on a 1-second interval and, at the cap, sets isWarning and emits a one-time toast.warning. The RECORDING_WARNING_SECONDS constant is deleted from constants.ts.
Removes RECORDING_WARNING_SECONDS from constants, drops the requestIntent auto-stop dispatch and warning threshold from useRecordingCountdown, and replaces cap-reached behavior with 1-second polling that sets isWarning and fires a one-time toast.warning from sonner.
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🐰 Tick, tick, tick goes the clock on the wall,
No more stopping the stream when I reach the hall!
A toast pops up bright with a warning so fair, isWarning is set, and the timer's still there.
No requestIntent, no threshold to seek —
Just a bunny who hops til the timer goes squeak! 🎙️
Note
🎁 Summarized by CodeRabbit Free
Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.
Comment @coderabbitai help to get the list of available commands and usage tips.
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/flowy-live/llink/pull/297?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<details>
<summary>ℹ️ Recent review info</summary>
<details>
<summary>⚙️ Run configuration</summary>
**Configuration used**: defaults
**Review profile**: CHILL
**Plan**: Free
**Run ID**: `74a061bb-40c5-485a-b5d9-5869c2fd4711`
</details>
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between bfe53b46cf5f113e232e71bfa92ec657632714ce and 2963098e4becad62e1325dd5bde323baf3124e04.
</details>
<details>
<summary>📒 Files selected for processing (2)</summary>
* `js/desktop/src/features/compose/recording-overlay.tsx`
* `js/desktop/src/lib/constants.ts`
</details>
</details>
---
<!-- walkthrough_start -->
<details>
<summary>📝 Walkthrough</summary>
## Walkthrough
`useRecordingCountdown` is refactored to remove the auto-stop dispatch that fired when the recording duration cap was reached. The hook now only updates `elapsed` on a 1-second interval and, at the cap, sets `isWarning` and emits a one-time `toast.warning`. The `RECORDING_WARNING_SECONDS` constant is deleted from `constants.ts`.
## Changes
**Recording Cap Behavior**
| Layer / File(s) | Summary |
|---|---|
| **Recording cap: remove auto-stop, add warning toast** <br> `js/desktop/src/lib/constants.ts`, `js/desktop/src/features/compose/recording-overlay.tsx` | Removes `RECORDING_WARNING_SECONDS` from constants, drops the `requestIntent` auto-stop dispatch and warning threshold from `useRecordingCountdown`, and replaces cap-reached behavior with 1-second polling that sets `isWarning` and fires a one-time `toast.warning` from `sonner`. |
## Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
## Poem
> 🐰 Tick, tick, tick goes the clock on the wall,
> No more stopping the stream when I reach the hall!
> A toast pops up bright with a warning so fair,
> `isWarning` is set, and the timer's still there.
> No `requestIntent`, no threshold to seek —
> Just a bunny who hops til the timer goes *squeak*! 🎙️
</details>
<!-- walkthrough_end -->
<!-- tips_start -->
---
> [!NOTE]
> <details>
> <summary>🎁 Summarized by CodeRabbit Free</summary>
>
> Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting <https://app.coderabbit.ai/login>.
>
> </details>
<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>
<!-- tips_end -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary by CodeRabbit
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Free
Run ID:
74a061bb-40c5-485a-b5d9-5869c2fd4711📥 Commits
Reviewing files that changed from the base of the PR and between
bfe53b46cfand2963098e4b.📒 Files selected for processing (2)
js/desktop/src/features/compose/recording-overlay.tsxjs/desktop/src/lib/constants.ts📝 Walkthrough
Walkthrough
useRecordingCountdownis refactored to remove the auto-stop dispatch that fired when the recording duration cap was reached. The hook now only updateselapsedon a 1-second interval and, at the cap, setsisWarningand emits a one-timetoast.warning. TheRECORDING_WARNING_SECONDSconstant is deleted fromconstants.ts.Changes
Recording Cap Behavior
js/desktop/src/lib/constants.ts,js/desktop/src/features/compose/recording-overlay.tsxRECORDING_WARNING_SECONDSfrom constants, drops therequestIntentauto-stop dispatch and warning threshold fromuseRecordingCountdown, and replaces cap-reached behavior with 1-second polling that setsisWarningand fires a one-timetoast.warningfromsonner.Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Comment
@coderabbitai helpto get the list of available commands and usage tips.