Skip to content

Commit 49ee039

Browse files
centdixclaude
andcommitted
improve dialog UX, show network address on startup, use PORT env var
- Move prompt field first and autofocus it in create worktree dialog - Show LAN network address alongside localhost on backend startup - Frontend uses PORT env var (default 5112) instead of DASHBOARD_PORT+1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 14903a5 commit 49ee039

3 files changed

Lines changed: 24 additions & 13 deletions

File tree

backend/src/server.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { join, resolve } from "node:path";
2+
import { networkInterfaces } from "node:os";
23
import { ts } from "./lib/utils";
34
import {
45
listWorktrees,
@@ -461,3 +462,11 @@ cleanupStaleSessions();
461462
startPrMonitor(getWorktreePaths, config.linkedRepos, PROJECT_DIR);
462463

463464
console.log(`Dev Dashboard API running at http://localhost:${PORT}`);
465+
const nets = networkInterfaces();
466+
for (const addrs of Object.values(nets)) {
467+
for (const a of addrs ?? []) {
468+
if (a.family === "IPv4" && !a.internal) {
469+
console.log(` Network: http://${a.address}:${PORT}`);
470+
}
471+
}
472+
}

frontend/src/lib/CreateWorktreeDialog.svelte

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,32 @@
5454
}}
5555
>
5656
<h2 class="text-base mb-4">New Worktree</h2>
57-
<div class="mb-4">
58-
<label class="block text-xs text-muted mb-1.5" for="wt-name"
59-
>Name <span class="opacity-60">(optional)</span></label
60-
>
61-
<input
62-
id="wt-name"
63-
type="text"
64-
class="w-full px-2.5 py-1.5 rounded-md border border-edge bg-surface text-primary text-[13px] placeholder:text-muted/50 outline-none focus:border-accent"
65-
placeholder="auto-generated if empty"
66-
bind:value={name}
67-
/>
68-
</div>
6957
<div class="mb-4">
7058
<label class="block text-xs text-muted mb-1.5" for="wt-prompt"
7159
>Prompt <span class="opacity-60">(optional)</span></label
7260
>
7361
<textarea
7462
id="wt-prompt"
7563
rows="3"
64+
autofocus
7665
class="w-full px-2.5 py-1.5 rounded-md border border-edge bg-surface text-primary text-[13px] placeholder:text-muted/50 outline-none focus:border-accent resize-y"
7766
placeholder="Describe the task for the agent..."
7867
bind:value={prompt}
7968
onkeydown={(e) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); e.currentTarget.form?.requestSubmit(); } }}
8069
></textarea>
8170
</div>
71+
<div class="mb-4">
72+
<label class="block text-xs text-muted mb-1.5" for="wt-name"
73+
>Name <span class="opacity-60">(optional)</span></label
74+
>
75+
<input
76+
id="wt-name"
77+
type="text"
78+
class="w-full px-2.5 py-1.5 rounded-md border border-edge bg-surface text-primary text-[13px] placeholder:text-muted/50 outline-none focus:border-accent"
79+
placeholder="auto-generated if empty"
80+
bind:value={name}
81+
/>
82+
</div>
8283
<div class="flex gap-2 mb-4">
8384
{#each AGENTS as a}
8485
<label

frontend/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import tailwindcss from "@tailwindcss/vite";
55
const backendPort = process.env.DASHBOARD_PORT || "5111";
66
const backendUrl = `http://localhost:${backendPort}`;
77
const backendWs = `ws://localhost:${backendPort}`;
8+
const port = parseInt(process.env.PORT || "5112");
89

910
export default defineConfig({
1011
plugins: [svelte(), tailwindcss()],
1112
server: {
12-
port: parseInt(backendPort) + 1,
13+
port,
1314
proxy: {
1415
"/api": backendUrl,
1516
"/ws": {

0 commit comments

Comments
 (0)