From 34ec91684ed87c54d558ba3497348033cdf45e7b Mon Sep 17 00:00:00 2001 From: rouggy Date: Sun, 19 Jul 2026 03:12:12 +0200 Subject: [PATCH] fix: restrict RST fields to valid report values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The RST comboboxes allowed free text, so a report typed by hand that isn't in the mode's list (e.g. "600") was committed. Drop allowFreeText on the four RST fields (QSO entry + edit modal) and make commit-on-type push a value only when it's actually in the list; a leftover invalid entry reverts to the last valid value on blur. Programmatically filled values (FT8 SNR over UDP, presets) are unaffected — only manual typing is constrained. --- frontend/src/App.tsx | 4 ++-- frontend/src/components/QSOEditModal.tsx | 4 ++-- frontend/src/components/ui/combobox.tsx | 12 +++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 251496a..f1b42f2 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2879,12 +2879,12 @@ export default function App() { ); const rstTxBlock = (
- { setRstSent(v); rstUserEditedRef.current = true; }} /> + { setRstSent(v); rstUserEditedRef.current = true; }} />
); const rstRxBlock = (
- { setRstRcvd(v); rstUserEditedRef.current = true; }} /> + { setRstRcvd(v); rstUserEditedRef.current = true; }} />
); // DX country flag, shown large next to RST (moved here from the Country field). diff --git a/frontend/src/components/QSOEditModal.tsx b/frontend/src/components/QSOEditModal.tsx index e0867c5..cfe6196 100644 --- a/frontend/src/components/QSOEditModal.tsx +++ b/frontend/src/components/QSOEditModal.tsx @@ -412,9 +412,9 @@ export function QSOEditModal({ qso, onSave, onDelete, onClose, countries = [], b value={draft.callsign ?? ''} onChange={(e) => set('callsign', e.target.value)} />
- set('rst_sent', v)} />
+ set('rst_sent', v)} />
- set('rst_rcvd', v)} />
+ set('rst_rcvd', v)} />