fix(app): keep new worktree below local option

This commit is contained in:
usrnk1
2026-10-20 12:27:58 +02:00
Unverified
parent 310f50495d
commit c748648064
2 changed files with 2 additions and 2 deletions
@@ -472,7 +472,7 @@ test("the location dialog lists every ready server's projects in one list and ta
await page.keyboard.press("ArrowRight")
await expect(chip).toContainText("opencode")
await expect(chip.locator('[data-component="tag"]')).toHaveText("apollo")
await expect(options.locator(".command-palette-title")).toHaveText(["opencode", "opencode-beta", "New worktree"])
await expect(options.locator(".command-palette-title")).toHaveText(["opencode", "New worktree", "opencode-beta"])
await expect(options.nth(0)).toHaveAttribute("aria-selected", "true")
await page.keyboard.press("Backspace")
await expect(search).toHaveValue("opencode")
@@ -141,13 +141,13 @@ function NewSessionLocationDialog(props: {
return [
{ id: "main", type: "workspace" as const, value: "main", directory: project.worktree },
{ id: "create", type: "workspace" as const, value: "create", directory: project.worktree },
...directories.map((directory) => ({
id: `worktree:${directory}`,
type: "workspace" as const,
value: directory,
directory,
})),
{ id: "create", type: "workspace" as const, value: "create", directory: project.worktree },
].filter((entry) => matches(workspaceTitle(project, entry.value), entry.directory))
})