From ea730d018432fc2f3246ed7974b3d89f00d5d032 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Wed, 14 Jan 2026 11:28:09 -0800 Subject: [PATCH] Fix clicking URL placeholder params not focusing value input The PairEditor ref callback used strict equality to determine when all rows were ready, but placeholder params (like :id) regenerate fresh IDs on every keystroke, causing rowsRef to accumulate entries. Using >= allows the ref to be set even when there are more registered rows than current pairs. Co-Authored-By: Claude Opus 4.5 --- src-web/components/core/PairEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-web/components/core/PairEditor.tsx b/src-web/components/core/PairEditor.tsx index e56de8c2..64ebd749 100644 --- a/src-web/components/core/PairEditor.tsx +++ b/src-web/components/core/PairEditor.tsx @@ -136,8 +136,8 @@ export function PairEditor({ rowsRef.current[id] = n; const validHandles = Object.values(rowsRef.current).filter((v) => v != null); - // NOTE: Ignore the last placeholder pair - const ready = validHandles.length === pairs.length - 1; + // Use >= because more might be added if an ID of one changes (eg. editing placeholder in URL regenerates fresh pairs every keystroke) + const ready = validHandles.length >= pairs.length - 1; if (ready) { setRef?.(handle); }