feat: confirm recordings without a microphone - #2047
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
hey @greptileai, please re-review the PR |
| } | ||
| }; | ||
|
|
||
| const handleRecordingStartSafetyChange = async (value: boolean) => { |
There was a problem hiding this comment.
Minor edge case: if the user toggles this quickly, multiple recordingStartSafetyStore.set(...) calls can overlap and resolve out-of-order (older write finishing last), leaving the persisted value different from the last toggle. Might be worth serializing writes (promise chain) or disabling the toggle while a save is in-flight so the last intent wins deterministically.
| // This webview is hidden by now, so the toast is a | ||
| // best-effort extra — the visible feedback comes from the | ||
| // backend's StartFailed event toasted in the main window. | ||
| if ( |
There was a problem hiding this comment.
The msg.includes(...) checks here are a bit brittle (string-matching on error text). If the backend can return a structured error code, it’d be more resilient to key off that; otherwise, consider centralizing these substrings as constants so the UI + backend stay in sync.
| let _ = sender.send(confirmed); | ||
| }); | ||
|
|
||
| receiver.await.unwrap_or(false) |
There was a problem hiding this comment.
Minor robustness: if the dialog callback never fires (plugin failure, window closes, etc), this await will hang the hotkey task. Consider adding a timeout and treating it as cancel.
| receiver.await.unwrap_or(false) | |
| tokio::time::timeout(std::time::Duration::from_secs(60), receiver) | |
| .await | |
| .ok() | |
| .and_then(Result::ok) | |
| .unwrap_or(false) |
Summary
Validation
pnpm exec biome checkon the five touched TypeScript filescargo fmt --all -- --checkcargo check -p cap-desktopRuntime UI smoke testing was not performed because the shared desktop runtime was owned by another active session.
Greptile Summary
Adds an enabled-by-default recording safety preference for missing microphones.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "fix: show recording start loading state" | Re-trigger Greptile