Summary
React Aria NumberField emits NaN (not null) when cleared; NaN ?? 0 is NaN; JSON.stringify serializes it as null; Pydantic output_width: int rejects with 422; the effect's rejection handler sets setPreview("gamescope --").
Location
electron/renderer/src/components/gamescope-builder.tsx:768-777 (error fallback at 227)
Failure scenario
User clears "Out W" to type a new width -> preview, Copy, and Insert all yield the useless gamescope -- prefix; pressing Insert at that moment prepends a broken prefix to the launch options.
Fix
Treat NaN/empty as "unset" (omit the field) rather than coercing to 0; guard Insert against a degraded preview.
Summary
React Aria
NumberFieldemitsNaN(notnull) when cleared;NaN ?? 0isNaN;JSON.stringifyserializes it asnull; Pydanticoutput_width: intrejects with 422; the effect's rejection handler setssetPreview("gamescope --").Location
electron/renderer/src/components/gamescope-builder.tsx:768-777(error fallback at 227)Failure scenario
User clears "Out W" to type a new width -> preview, Copy, and Insert all yield the useless
gamescope --prefix; pressing Insert at that moment prepends a broken prefix to the launch options.Fix
Treat
NaN/empty as "unset" (omit the field) rather than coercing to 0; guard Insert against a degraded preview.