quality pass 2: cached encoders, cancel in gif retry, overlay CSS split

- debug logging in picker changed to tracing::debug
- show_overlay uses visible_window_bounds helper
- encode_gif retry loop checks cancel flag between attempts
- list_encoders cached via OnceLock (ffmpeg -encoders runs once)
- remove unnecessary GifBudgetMode clone (is Copy)
- config test uses unique temp dir per process
- click highlights use 2px border instead of solid fill
- audio capture_loop polls at 5ms instead of 1ms
- overlay window loads minimal overlay.css instead of full app.css
- remove non-spec 960x540 preset
- Settings dirty detection uses field-by-field comparison
- Overlay startDragging catches errors
- pauseRec only emits recording-state on success
- Picker listener cleanup guards against unmount race
- add sync notes for previewDims and sr-only trim inputs
This commit is contained in:
2026-05-30 00:01:56 +03:00
parent d57e554ece
commit 2cd836b09e
10 changed files with 65 additions and 35 deletions
+7 -3
View File
@@ -7,6 +7,7 @@
let hover: Rect | null = $state(null)
let originX = 0, originY = 0, scale = 1
let mounted = true
onMount(() => {
const win = getCurrentWebviewWindow()
@@ -20,11 +21,14 @@
void (async () => {
await refresh()
unlisten.push(await win.onMoved(refresh))
unlisten.push(await listen<Rect>("picker-hover", (e) => { hover = e.payload }))
win.onMoved(refresh).then(fn => { if (mounted) unlisten.push(fn) })
listen<Rect>("picker-hover", (e) => { hover = e.payload }).then(fn => { if (mounted) unlisten.push(fn) })
})()
return () => unlisten.forEach(fn => fn())
return () => {
mounted = false
unlisten.forEach(fn => fn())
}
})
let rectStyle = $derived.by(() => {