-
Notifications
You must be signed in to change notification settings - Fork 75
perf(test): run Vitest in node by default, and fix the workflow guidance around it #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
556918a
54f46c0
2e7d361
a205d59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -465,7 +465,13 @@ export function NewEditorShell() { | |
| const togglePlay = useCallback(() => { | ||
| if (!videoElement) return; | ||
| if (videoElement.paused) { | ||
| void videoElement.play(); | ||
| // Same catch as VirtualPreview's: `play()` rejects on the autoplay policy | ||
| // or when a new load interrupts it, and the store's `playing` flag is | ||
| // driven by the element's own play/pause listeners above — so a rejection | ||
| // leaves nothing to reconcile, it just must not escape unhandled. | ||
| void videoElement.play().catch(() => { | ||
| // swallow: rejection just means playback never started | ||
| }); | ||
| } else { | ||
| videoElement.pause(); | ||
| } | ||
|
|
@@ -677,7 +683,9 @@ export function NewEditorShell() { | |
| } | ||
| } | ||
| if (action === "record") { | ||
| void window.electronAPI?.startNewRecording?.(); | ||
| void window.electronAPI?.startNewRecording?.().catch((err) => { | ||
| console.warn("[editor] failed to start a new recording:", err); | ||
| }); | ||
|
Comment on lines
+686
to
+688
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Avoid starting the same recording twice after confirmation. When the project is dirty, Let Suggested fix- const { action, resolve } = unsavedPrompt;
+ const { resolve } = unsavedPrompt;
...
- if (action === "record") {
- void window.electronAPI?.startNewRecording?.().catch((err) => {
- console.warn("[editor] failed to start a new recording:", err);
- });
- }
resolve(choice);🤖 Prompt for AI Agents |
||
| } | ||
| resolve(choice); | ||
| })(); | ||
|
|
@@ -688,7 +696,9 @@ export function NewEditorShell() { | |
| const handleNewRecording = useCallback(async () => { | ||
| const choice = await promptUnsaved("record"); | ||
| if (choice !== "cancel") { | ||
| void window.electronAPI?.startNewRecording?.(); | ||
| void window.electronAPI?.startNewRecording?.().catch((err) => { | ||
| console.warn("[editor] failed to start a new recording:", err); | ||
| }); | ||
| } | ||
| }, [promptUnsaved]); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use the repository's native-helper paths.
Line 33 names
electron/*-helper/, but the documented helpers live underelectron/native/screencapturekit/andelectron/native/wgc-capture/. The current glob does not cover those paths. A native change can therefore bypass the manual smoke-test instruction.Proposed wording
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Coding guidelines