fix(qsolist): let the Max box be lowered

The input was bound straight to the number and committed on every keystroke, so
it could not be EMPTIED: clearing it yields "", Number("") is 0, 0 fails the
"> 0" guard, the state never moved, and value={qsoLimit} snapped the old figure
straight back. Going from 200000 down to 100 was a fight against the field — and
read as the setting refusing to persist, which it was not: writeUiPref stores it
and syncPortablePrefs makes the database authoritative at boot. It also wrote
the preference once per keystroke (1, then 10, then 100).

Raw text in local state, committed on blur or Enter, per the controlled-input
note in CLAUDE.md.
This commit is contained in:
2026-08-09 17:00:46 +02:00
parent 57e98139ab
commit 31f9bdfc98
2 changed files with 20 additions and 5 deletions
+2
View File
@@ -3,12 +3,14 @@
"version": "0.24.1", "version": "0.24.1",
"date": "", "date": "",
"en": [ "en": [
"Recent QSOs: the Max box can be lowered again. It could not be emptied — clearing it put the old number straight back — so going from a large figure down to a small one was a fight against the field, and looked like the setting refusing to stick. Type freely now and press Enter (or click away) to apply. The value was already saved and travels with your data folder; only the box was in the way.",
"Memory: the awards cache is given back once you stop using it. Opening the Awards panel loads the whole logbook into memory and kept it there for the rest of the session — a few tens of megabytes on a small log, but several hundred on a large one, and it was never released because the cache only expired when the logbook changed. It is now dropped after fifteen minutes without use, and the memory returned to Windows. Fifteen minutes on purpose: working through your awards keeps it warm, since reloading a large log takes seconds. The log also records the heap size each time the cache is built or released, so a memory report can be answered with a figure instead of a guess.", "Memory: the awards cache is given back once you stop using it. Opening the Awards panel loads the whole logbook into memory and kept it there for the rest of the session — a few tens of megabytes on a small log, but several hundred on a large one, and it was never released because the cache only expired when the logbook changed. It is now dropped after fifteen minutes without use, and the memory returned to Windows. Fifteen minutes on purpose: working through your awards keeps it warm, since reloading a large log takes seconds. The log also records the heap size each time the cache is built or released, so a memory report can be answered with a figure instead of a guess.",
"Performance: the DX-cluster console no longer drags the whole interface down. Every line of traffic — spots, MOTD, everything — was applied to the screen one at a time, and an RBN feed alone sends hundreds a second: that meant two copies of a 2000-line buffer and a redraw for each one, whether the console was open or not. Lines are now grouped and applied five times a second. The difference is most visible on an older PC, where this alone could make the app crawl.", "Performance: the DX-cluster console no longer drags the whole interface down. Every line of traffic — spots, MOTD, everything — was applied to the screen one at a time, and an RBN feed alone sends hundreds a second: that meant two copies of a 2000-line buffer and a redraw for each one, whether the console was open or not. Lines are now grouped and applied five times a second. The difference is most visible on an older PC, where this alone could make the app crawl.",
"Update: \"stage current exe: … Accès refusé\" is fixed. Two causes, both handled. The previous build was always staged under the same name, so one leftover that could not be deleted — an antivirus holding it open is the usual reason — blocked every later update, permanently, with no way out but deleting the file by hand; the staging name is now unique. And when the running program cannot be renamed at all, which some endpoint protection deliberately prevents, OpsLog no longer gives up: it leaves the new build beside the old one and swaps them after closing, when its own file is an ordinary file again. If even that fails, OpsLog restarts on the current version rather than leaving you with nothing, and the download is kept for the next attempt.", "Update: \"stage current exe: … Accès refusé\" is fixed. Two causes, both handled. The previous build was always staged under the same name, so one leftover that could not be deleted — an antivirus holding it open is the usual reason — blocked every later update, permanently, with no way out but deleting the file by hand; the staging name is now unique. And when the running program cannot be renamed at all, which some endpoint protection deliberately prevents, OpsLog no longer gives up: it leaves the new build beside the old one and swaps them after closing, when its own file is an ordinary file again. If even that fails, OpsLog restarts on the current version rather than leaving you with nothing, and the download is kept for the next attempt.",
"Band map: the width can be dragged. Both the map docked beside the tables and the per-band cards in the Band map tab were locked at a fixed width, so an operator watching a busy band could not give the map more room — nor take it back for the log. Grab the edge to resize, double-click it to go back to the default. The width is remembered and travels with your data folder, like the other layout settings. In the tab, one width applies to every card: they sit side by side, and columns of different widths read as a mistake." "Band map: the width can be dragged. Both the map docked beside the tables and the per-band cards in the Band map tab were locked at a fixed width, so an operator watching a busy band could not give the map more room — nor take it back for the log. Grab the edge to resize, double-click it to go back to the default. The width is remembered and travels with your data folder, like the other layout settings. In the tab, one width applies to every card: they sit side by side, and columns of different widths read as a mistake."
], ],
"fr": [ "fr": [
"QSO récents : la case Max se laisse enfin baisser. Impossible de la vider — l'effacer y remettait aussitôt l'ancien nombre — donc passer d'un grand chiffre à un petit était un combat contre le champ, et donnait l'impression que le réglage ne tenait pas. Tape librement puis Entrée (ou clique ailleurs) pour appliquer. La valeur était déjà enregistrée et voyage avec ton dossier de données ; c'était la case qui bloquait.",
"Mémoire : le cache des diplômes est rendu quand tu ne t'en sers plus. Ouvrir le panneau Diplômes charge tout le journal en mémoire et l'y gardait jusqu'à la fermeture — quelques dizaines de Mo sur un petit journal, plusieurs centaines sur un gros, et jamais libérés puisque le cache n'expirait qu'au changement du journal. Il est désormais abandonné après quinze minutes sans usage, et la mémoire rendue à Windows. Quinze minutes volontairement : parcourir tes diplômes le garde chaud, recharger un gros journal coûtant plusieurs secondes. Le journal technique note aussi la taille du tas à chaque construction ou libération, pour qu'un signalement de mémoire se réponde avec un chiffre plutôt qu'une supposition.", "Mémoire : le cache des diplômes est rendu quand tu ne t'en sers plus. Ouvrir le panneau Diplômes charge tout le journal en mémoire et l'y gardait jusqu'à la fermeture — quelques dizaines de Mo sur un petit journal, plusieurs centaines sur un gros, et jamais libérés puisque le cache n'expirait qu'au changement du journal. Il est désormais abandonné après quinze minutes sans usage, et la mémoire rendue à Windows. Quinze minutes volontairement : parcourir tes diplômes le garde chaud, recharger un gros journal coûtant plusieurs secondes. Le journal technique note aussi la taille du tas à chaque construction ou libération, pour qu'un signalement de mémoire se réponde avec un chiffre plutôt qu'une supposition.",
"Performance : la console du cluster DX ne plombe plus toute l'interface. Chaque ligne de trafic — spots, MOTD, tout — était appliquée à l'écran une par une, et un flux RBN en envoie à lui seul des centaines par seconde : cela faisait deux copies d'un tampon de 2000 lignes et un redessin pour chacune, que la console soit ouverte ou non. Les lignes sont désormais groupées et appliquées cinq fois par seconde. La différence se voit surtout sur un PC ancien, où cela suffisait à faire ramer l'application.", "Performance : la console du cluster DX ne plombe plus toute l'interface. Chaque ligne de trafic — spots, MOTD, tout — était appliquée à l'écran une par une, et un flux RBN en envoie à lui seul des centaines par seconde : cela faisait deux copies d'un tampon de 2000 lignes et un redessin pour chacune, que la console soit ouverte ou non. Les lignes sont désormais groupées et appliquées cinq fois par seconde. La différence se voit surtout sur un PC ancien, où cela suffisait à faire ramer l'application.",
"Mise à jour : le « stage current exe : … Accès refusé » est corrigé. Deux causes, traitées toutes les deux. L'ancienne version était toujours mise de côté sous le même nom : un seul reliquat impossible à supprimer — un antivirus qui le garde ouvert, le plus souvent — bloquait définitivement toutes les mises à jour suivantes, sans autre issue que d'effacer le fichier à la main ; ce nom est désormais unique. Et quand le programme en cours d'exécution ne peut pas être renommé du tout, ce que certaines protections empêchent volontairement, OpsLog n'abandonne plus : il laisse la nouvelle version à côté de l'ancienne et les échange après sa fermeture, quand son propre fichier redevient un fichier ordinaire. Si même cela échoue, OpsLog redémarre sur la version actuelle plutôt que de te laisser sans rien, et le téléchargement est conservé pour la prochaine tentative.", "Mise à jour : le « stage current exe : … Accès refusé » est corrigé. Deux causes, traitées toutes les deux. L'ancienne version était toujours mise de côté sous le même nom : un seul reliquat impossible à supprimer — un antivirus qui le garde ouvert, le plus souvent — bloquait définitivement toutes les mises à jour suivantes, sans autre issue que d'effacer le fichier à la main ; ce nom est désormais unique. Et quand le programme en cours d'exécution ne peut pas être renommé du tout, ce que certaines protections empêchent volontairement, OpsLog n'abandonne plus : il laisse la nouvelle version à côté de l'ancienne et les échange après sa fermeture, quand son propre fichier redevient un fichier ordinaire. Si même cela échoue, OpsLog redémarre sur la version actuelle plutôt que de te laisser sans rien, et le téléchargement est conservé pour la prochaine tentative.",
+18 -5
View File
@@ -1000,6 +1000,19 @@ export default function App() {
return Number.isFinite(raw) && raw > 0 ? raw : 500; return Number.isFinite(raw) && raw > 0 ? raw : 500;
}); });
useEffect(() => { writeUiPref('hamlog.qsoLimit', String(qsoLimit)); }, [qsoLimit]); useEffect(() => { writeUiPref('hamlog.qsoLimit', String(qsoLimit)); }, [qsoLimit]);
// Raw text for the Max box, committed on blur/Enter — never per keystroke.
// Bound straight to the number, the field could not be EMPTIED: clearing it
// gives "", Number("") is 0, 0 fails the "> 0" test, so the state never moved
// and value={qsoLimit} snapped the old number straight back. Going from 200000
// to 100 was a fight against the input, and looked like the setting refusing
// to stick. It also wrote the preference once per keystroke (1, 10, 100).
const [qsoLimitText, setQsoLimitText] = useState(String(qsoLimit));
useEffect(() => { setQsoLimitText(String(qsoLimit)); }, [qsoLimit]);
const commitQsoLimit = () => {
const n = Math.floor(Number(qsoLimitText));
if (Number.isFinite(n) && n > 0) setQsoLimit(n);
else setQsoLimitText(String(qsoLimit)); // nonsense typed → put the live value back
};
// Contest session: load once, then persist on every change (merge + save). // Contest session: load once, then persist on every change (merge + save).
useEffect(() => { useEffect(() => {
@@ -6286,11 +6299,11 @@ export default function App() {
min={1} min={1}
step={100} step={100}
className="w-24 h-7 font-mono text-xs" className="w-24 h-7 font-mono text-xs"
value={qsoLimit} value={qsoLimitText}
onChange={(e) => { onChange={(e) => setQsoLimitText(e.target.value)}
const n = Number(e.target.value); onBlur={commitQsoLimit}
if (Number.isFinite(n) && n > 0) setQsoLimit(Math.floor(n)); onKeyDown={(e) => { if (e.key === 'Enter') (e.target as HTMLInputElement).blur(); }}
}} title="Rows loaded into the list — press Enter to apply"
/> />
<Button <Button
variant="ghost" variant="ghost"