From 8eebee460eadd60929536e10204cbdce9581a59a Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 1 Sep 2026 08:58:55 -0700 Subject: [PATCH] fix(pair-editor): remount the editor when its stateKey changes (#617) Co-authored-by: Claude Fable 5 --- apps/yaak-client/components/core/PairEditor.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/yaak-client/components/core/PairEditor.tsx b/apps/yaak-client/components/core/PairEditor.tsx index 0f834aab..58a6e746 100644 --- a/apps/yaak-client/components/core/PairEditor.tsx +++ b/apps/yaak-client/components/core/PairEditor.tsx @@ -113,7 +113,15 @@ function toPairData({ commitName: _commitName, ...pair }: EditablePairWithId): P /** Max number of pairs to show before prompting the user to reveal the rest */ const MAX_INITIAL_PAIRS = 30; -export function PairEditor({ +// Keyed on `stateKey` so no state survives a change of owner. Row ids alone can't tell owners +// apart — two pair sets can share ids (eg. one duplicated from the other), and the same-rows +// fast path below would swap in the new data without rebuilding the row editors, leaving any +// still-focused input showing the old owner's text. +export function PairEditor(props: PairEditorProps) { + return ; +} + +function PairEditorInner({ allowFileValues, allowMultilineValues, className,