From 9fe1dd8d7b93f5341fe69b95e5c8f86de17a097f Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Fri, 20 Nov 2026 13:49:43 +0800 Subject: [PATCH] feat(run): expand multi-line run configuration fields into a larger editor (#4704) VM options and the other multi-line run configuration fields get an Expand button (Shift+Enter) opening a resizable editor where each line stays on one visual line and scrolls sideways, so a long JVM argument isn't wrapped into what looks like several. OK applies; Cancel or OK without edits leaves the field unchanged. --- src/features/run/ConfigForm.tsx | 15 ++- src/features/run/ExpandableTextarea.test.tsx | 37 +++++++ src/features/run/ExpandableTextarea.tsx | 100 +++++++++++++++++++ src/features/run/Run.module.css | 23 +++++ 4 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 src/features/run/ExpandableTextarea.test.tsx create mode 100644 src/features/run/ExpandableTextarea.tsx diff --git a/src/features/run/ConfigForm.tsx b/src/features/run/ConfigForm.tsx index 4be80e75e..26b73be7c 100644 --- a/src/features/run/ConfigForm.tsx +++ b/src/features/run/ConfigForm.tsx @@ -33,6 +33,7 @@ import { } from "@/ui"; import { useContributions, type RunConfigTypeContribution } from "@/workbench/contributions"; import { TASK_LABELS, taskLabel, type BeforeLaunchKind } from "./beforeLaunch"; +import { ExpandableTextarea } from "./ExpandableTextarea"; import { commandLine, compoundCycle, @@ -817,7 +818,6 @@ function TypeField({ invalid: boolean; onChange: (value: string) => void; }) { - const tx = useTx(); const root = useProject((s) => s.project?.root ?? null); const listId = `run-field-${field.key}`; const [loaded, setLoaded] = useState>([]); @@ -848,14 +848,13 @@ function TypeField({ return onChange(on ? "true" : "")} label={field.label} />; if (field.control === "textarea") return ( -