From 4ab08cb6a1c6050bf95558377638b22fc587f790 Mon Sep 17 00:00:00 2001 From: centdix Date: Sat, 21 Feb 2026 01:40:51 +0000 Subject: [PATCH] feat: add agent-yolo profile and hide worktrees without tmux window Add "Agent (skip permissions)" profile that runs claude with --dangerously-skip-permissions. Filter worktrees without a tmux window from the sidebar list instead of showing a disabled entry. Co-Authored-By: Claude Opus 4.6 --- dev-dashboard/backend/src/server.ts | 4 +++- dev-dashboard/backend/src/workmux.ts | 3 ++- dev-dashboard/frontend/src/App.svelte | 13 +++++++------ dev-dashboard/frontend/src/lib/api.ts | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dev-dashboard/backend/src/server.ts b/dev-dashboard/backend/src/server.ts index b106bdd6b0..7e2fae903d 100644 --- a/dev-dashboard/backend/src/server.ts +++ b/dev-dashboard/backend/src/server.ts @@ -6,6 +6,7 @@ import { openWorktree, closeWorktree, sendPrompt, + type Profile, } from "./workmux"; import { attach, @@ -143,7 +144,8 @@ async function handleApi(req: Request, url: URL): Promise { if (!body.branch) { return errorResponse("branch is required", 400); } - const profile = (body.profile === "full" || body.profile === "agent-only") ? body.profile : "agent-only"; + const validProfiles = ["full", "agent-only", "agent-yolo"] as const; + const profile = validProfiles.includes(body.profile as any) ? body.profile as Profile : "agent-only"; const result = await addWorktree(body.branch, { prompt: body.prompt, profile }); return jsonResponse({ message: result }, 201); } diff --git a/dev-dashboard/backend/src/workmux.ts b/dev-dashboard/backend/src/workmux.ts index 636d52a68e..0515d9a1a4 100644 --- a/dev-dashboard/backend/src/workmux.ts +++ b/dev-dashboard/backend/src/workmux.ts @@ -75,11 +75,12 @@ async function runChecked(args: string[]): Promise { return stdout.trim(); } -export type Profile = "full" | "agent-only"; +export type Profile = "full" | "agent-only" | "agent-yolo"; const PROFILE_PANE_CMDS: Record = { "full": [], // Use default workmux pane commands from .workmux.yaml "agent-only": ["claude"], // Only start agent in pane 0 + "agent-yolo": ["claude --dangerously-skip-permissions"], }; export async function addWorktree( diff --git a/dev-dashboard/frontend/src/App.svelte b/dev-dashboard/frontend/src/App.svelte index 8479d1a393..7ad0108e28 100644 --- a/dev-dashboard/frontend/src/App.svelte +++ b/dev-dashboard/frontend/src/App.svelte @@ -10,6 +10,7 @@ const PROFILES: { value: Profile; label: string }[] = [ { value: "agent-only", label: "Agent only" }, + { value: "agent-yolo", label: "Agent (skip permissions)" }, { value: "full", label: "Full (agent + backend + frontend)" }, ]; @@ -21,10 +22,12 @@ let removing = $state(false); let createProfile = $state("agent-only"); - let selectedWorktree = $derived(worktrees.find((w) => w.branch === selectedBranch)); - let hasMux = $derived(selectedWorktree?.mux === "✓"); + let visibleWorktrees = $derived( + worktrees.filter((w) => w.path === "(here)" || w.branch === "main" || w.mux === "✓") + ); + let selectedWorktree = $derived(visibleWorktrees.find((w) => w.branch === selectedBranch)); let isMain = $derived(selectedWorktree?.path === "(here)" || selectedBranch === "main"); - let canConnect = $derived(!!selectedBranch && !isMain && hasMux); + let canConnect = $derived(!!selectedBranch && !isMain); async function refresh() { try { @@ -92,7 +95,7 @@ title="New Worktree" >+ New - (selectedBranch = b)} /> + (selectedBranch = b)} />
@@ -111,8 +114,6 @@

{#if isMain} Main worktree — use workmux to manage - {:else if selectedBranch && !hasMux} - No tmux window for this worktree {:else} Select a worktree from the sidebar to connect {/if} diff --git a/dev-dashboard/frontend/src/lib/api.ts b/dev-dashboard/frontend/src/lib/api.ts index 636c7579e7..6575a08c15 100644 --- a/dev-dashboard/frontend/src/lib/api.ts +++ b/dev-dashboard/frontend/src/lib/api.ts @@ -14,7 +14,7 @@ export function fetchWorktrees(): Promise { return api("worktrees"); } -export type Profile = "full" | "agent-only"; +export type Profile = "full" | "agent-only" | "agent-yolo"; export function createWorktree( branch: string,