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
+19 -4
View File
@@ -11,9 +11,24 @@
let hotkeyWarnings: string[] = $state([])
let showAdvanced: boolean = $state(false)
let activeTab: string = $state("capture")
let initialCfg: string = $state("")
let initialCfg: Config | null = $state(null)
let dirty = $derived(cfg ? JSON.stringify(cfg) !== initialCfg : false)
let dirty = $derived.by(() => {
if (!cfg || !initialCfg) return false
return cfg.theme !== initialCfg.theme
|| cfg.capture.default_fps !== initialCfg.capture.default_fps
|| cfg.capture.capture_cursor !== initialCfg.capture.capture_cursor
|| cfg.capture.capture_audio !== initialCfg.capture.capture_audio
|| cfg.export.default_format !== initialCfg.export.default_format
|| cfg.export.gif_dither !== initialCfg.export.gif_dither
|| cfg.export.webm_codec !== initialCfg.export.webm_codec
|| cfg.export.mp4_codec !== initialCfg.export.mp4_codec
|| cfg.hotkeys.start !== initialCfg.hotkeys.start
|| cfg.hotkeys.stop !== initialCfg.hotkeys.stop
|| cfg.hotkeys.pause !== initialCfg.hotkeys.pause
|| cfg.updates.check_on_launch !== initialCfg.updates.check_on_launch
|| cfg.output_dir !== initialCfg.output_dir
})
const TABS = [
{ id: "capture", label: "Capture" },
@@ -23,7 +38,7 @@
{ id: "system", label: "System" },
]
onMount(async () => { cfg = await api.getConfig(); initialCfg = JSON.stringify(cfg) })
onMount(async () => { cfg = await api.getConfig(); initialCfg = structuredClone(cfg) })
async function save() {
if (!cfg) return
@@ -47,7 +62,7 @@
if (failed.length > 0) {
hotkeyWarnings = [`${failed.join(", ")} - hotkey may be in use by another app`]
} else {
initialCfg = JSON.stringify(cfg)
initialCfg = structuredClone(cfg)
onClose()
}
} finally { saving = false }