mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 14:40:52 +00:00
fix(coach): lock the reasoning select while a change saves
The provider and model selects in the Coach's settings already lock while a write is in flight; the reasoning select did not, so a second PATCH could race the first and one change could be lost.
This commit is contained in:
1 parent
d0b680c277
commit
35edc33871
3 files changed
+16
No files matched your search
@@ -14,10 +14,13 @@ import type { ReasoningEffort } from "./shared";
|
||||
|
||||
export function ReasoningEffortField({
|
||||
id,
|
||||
disabled = false,
|
||||
value,
|
||||
onChange,
|
||||
}: {
|
||||
id: string;
|
||||
/** Locks the select while a write is in flight. */
|
||||
disabled?: boolean;
|
||||
value: ReasoningEffort | null;
|
||||
onChange: (next: ReasoningEffort | null) => void;
|
||||
}) {
|
||||
@@ -28,6 +31,7 @@ export function ReasoningEffortField({
|
||||
<NativeSelect
|
||||
id={id}
|
||||
value={value ?? ""}
|
||||
disabled={disabled}
|
||||
onChange={(e) =>
|
||||
onChange(
|
||||
e.target.value === "" ? null : (e.target.value as ReasoningEffort),
|
||||
|
||||
Reference in new issue
Block a user