Ai gf#315
Conversation
…ommon terms in English, Spanish, and Chinese.
feat: add fullscreen video player
- Add useCameraDevices hook to enumerate video input devices - Update useScreenRecorder to support webcamDeviceId selection - Add device selector UI above HUD bar (mic + webcam, hover-to-expand) - All selectors and HUD bar are absolute-positioned to prevent layout shifts - Increase HUD window to 600x200px to accommodate device panels - Add unit tests for useCameraDevices hook
- useCameraDevices: remove selectedDeviceId from useEffect deps (use ref instead) - useCameraDevices: fall back to first available device when selected device is unplugged - i18n: add missing keys (audio.defaultMicrophone, webcam.defaultCamera, webcam.searching) to en/es/zh-CN - LaunchWindow: replace hardcoded strings with t() i18n calls - tests: add afterEach(vi.resetAllMocks()), improve permission test assertions, add stale device fallback test
- LaunchWindow: expose isLoading/error from useCameraDevices; show 'Searching...' only while enumeration is in flight, 'Camera unavailable' on error, 'No camera found' when list is empty (fixes perpetual loading state) - LaunchWindow: keep <select> always mounted (sr-only when collapsed) and expand panel on focus as well as hover; fixes keyboard inaccessibility for both mic and webcam selectors - i18n: add webcam.noneFound and webcam.unavailable to en/es/zh-CN locales
…nified select, test quality) - useCameraDevices: remove getUserMedia label probe to avoid conflict with useScreenRecorder acquiring the real stream; use enumerateDevices only and fall back to 'Camera <id>' for unlabeled devices; gate effect on enabled flag - LaunchWindow: fix selectedCameraLabel to reflect loading/error/empty states in the collapsed view (was always showing 'Default Camera') - LaunchWindow: unify webcam <select> to a single always-mounted element (sr-only when unavailable); mirrors the mic selector pattern - useCameraDevices.test.ts: re-seed mockGetUserMedia in beforeEach after vi.resetAllMocks(); update permission test to assert fallback label behavior
…r test - LaunchWindow: render sr-only <select> when webcamExpanded but cameraDevices.length === 0 (loading/error/empty), so keyboard users always have a focusable element even in no-camera states - useCameraDevices.test: add error-branch test asserting error message, empty devices array and isLoading=false when enumerateDevices rejects
…-selector-optimization feat: added webcam source selector and optimized horizontal UI
…ding-windows fix: prevent double-finalize race condition in restartRecording on Windos
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b101820ab8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ipcMain.handle("set-locale", (_, locale: string) => { | ||
| setMainLocale(locale); | ||
| setupApplicationMenu(); | ||
| updateTrayMenu(); |
There was a problem hiding this comment.
Preserve tray recording mode when locale changes
The set-locale IPC handler rebuilds the tray menu with updateTrayMenu() but does not pass the current recording state, so it falls back to recording = false. If a user changes language while actively recording (the launch HUD allows this), the tray menu is reset to the idle actions and loses the Stop Recording entry until another recording-state update arrives.
Useful? React with 👍 / 👎.
| useEffect(() => { | ||
| document.documentElement.lang = locale; | ||
| }, [locale]); |
There was a problem hiding this comment.
Sync initial locale with Electron main process
The provider reads a persisted locale on startup, but this effect only updates document.documentElement.lang; it never notifies the main process unless the user manually changes language via setLocale. That means a saved non-English preference can render the React UI localized while app menu/tray/dialog strings in the main process remain English for the session start.
Useful? React with 👍 / 👎.
|
can we add a better pr description of goal and objective and proof of it workingand tested |
Pull Request Template
Description
Motivation
Type of Change
Related Issue(s)
Screenshots / Video
Screenshot (if applicable):
Video (if applicable):
Testing
Checklist
Thank you for contributing!