From a5ef56b0524b7f505409ac26f5cc8ac993c11f60 Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 20:46:06 +0000 Subject: [PATCH] Fix input focus loss in NewTaskTab form fields Move Field component out of NewTaskTab to prevent React from remounting input wrappers on every keystroke. Same root cause as the ProjectsTab DetailView fix. --- .../harness/src/components/harness-dashboard.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/harness/src/components/harness-dashboard.tsx b/apps/harness/src/components/harness-dashboard.tsx index ad1be1f..4cdab6a 100644 --- a/apps/harness/src/components/harness-dashboard.tsx +++ b/apps/harness/src/components/harness-dashboard.tsx @@ -465,6 +465,15 @@ function AgentSelector({ value, onChange }: { value: string; onChange: (id: stri ); } +function Field({ label, children }: { label: string; children: React.ReactNode }) { + return ( +
+ + {children} +
+ ); +} + function NewTaskTab({ onSubmit, mobile, projects, knowledgeDocs }: { onSubmit: (form: TaskForm) => void; mobile: boolean; @@ -492,13 +501,6 @@ function NewTaskTab({ onSubmit, mobile, projects, knowledgeDocs }: { detail: d.path, })); - const Field = ({ label, children }: { label: string; children: React.ReactNode }) => ( -
- - {children} -
- ); - return (