From 5747c7180040303f04cd4d98470105dd8f3d952d Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Mon, 24 Aug 2026 15:42:10 +0100 Subject: [PATCH] fix(maestro): distinct labels for the worktree branch field (#94) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new-branch name input and the existing-branch picker both had a literal , on top of "New branch"/"Existing branch" mode radios — reading the form gave no clue what the field wanted. Kept the mode radios (they name the choice, not the field) and gave each field its own label: "New branch name" for the text input, "Pick a branch" for the select. --- web/src/spawnForm.ts | 4 ++-- web/src/spawnFormWorktree.test.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/web/src/spawnForm.ts b/web/src/spawnForm.ts index 42a0ca1..d5d01ab 100644 --- a/web/src/spawnForm.ts +++ b/web/src/spawnForm.ts @@ -176,11 +176,11 @@ export function createSpawnForm(opts: SpawnFormOptions): SpawnFormHandle { diff --git a/web/src/spawnFormWorktree.test.ts b/web/src/spawnFormWorktree.test.ts index 87be6d3..6a39479 100644 --- a/web/src/spawnFormWorktree.test.ts +++ b/web/src/spawnFormWorktree.test.ts @@ -180,6 +180,21 @@ describe("spawnForm worktree defaults and branch picker (#61)", () => { expect(modes.at(-1)).toBe("existing"); }); + it("labels the new-branch input and existing-branch picker distinctly (#94)", async () => { + const form = await mount(); + pickProject(form); + await drain(); + + const newLabel = form.querySelector(".wt-new-wrap")!.textContent!.trim(); + const existLabel = form.querySelector(".wt-exist-wrap")!.textContent!.trim(); + + expect(newLabel).not.toBe("Branch"); + expect(existLabel).not.toBe("Branch"); + expect(newLabel).not.toBe(existLabel); + expect(newLabel).toMatch(/name/i); + expect(existLabel).toMatch(/pick|choose|select/i); + }); + it("collapses the advanced (worktree) section by default (#93)", async () => { const form = await mount(); const toggle = form.querySelector(".wt-toggle")!;