diff --git a/.workmux.yaml b/.workmux.yaml index 2e78c524f9..1193e9595d 100644 --- a/.workmux.yaml +++ b/.workmux.yaml @@ -42,7 +42,7 @@ panes: focus: true - command: "[ -f .env.local ] && source .env.local; cd backend && PORT=${BACKEND_PORT:-8000} cargo watch -x run" split: horizontal - - command: "[ -f .env.local ] && source .env.local; cd frontend && npm install && npm run generate-backend-client && REMOTE=${REMOTE:-http://localhost:${BACKEND_PORT:-8000}} npm run dev -- --port ${FRONTEND_PORT:-3000}" + - command: "[ -f .env.local ] && source .env.local; cd frontend && npm install && npm run generate-backend-client && REMOTE=${REMOTE:-http://localhost:${BACKEND_PORT:-8000}} npm run dev -- --port ${FRONTEND_PORT:-3000} --host 0.0.0.0" split: vertical files: diff --git a/dev-dashboard/backend/src/terminal.ts b/dev-dashboard/backend/src/terminal.ts index 37ee668469..f4fb3ccfb8 100644 --- a/dev-dashboard/backend/src/terminal.ts +++ b/dev-dashboard/backend/src/terminal.ts @@ -1,3 +1,4 @@ +import { FileSink } from "bun"; import { getTmuxSession } from "./workmux"; interface TerminalSession { @@ -127,8 +128,8 @@ export async function detach(worktreeName: string): Promise { export function write(worktreeName: string, data: string): void { const session = sessions.get(worktreeName); - if (session) { - session.proc.stdin.write(new TextEncoder().encode(data)); + if (session && session.proc.stdin) { + (session.proc.stdin as FileSink).write(new TextEncoder().encode(data)); } } diff --git a/dev-dashboard/backend/src/workmux.ts b/dev-dashboard/backend/src/workmux.ts index 386135e530..3ae4d33599 100644 --- a/dev-dashboard/backend/src/workmux.ts +++ b/dev-dashboard/backend/src/workmux.ts @@ -93,7 +93,7 @@ function buildSandboxSystemPrompt(env: Record): string { "You are running inside a sandboxed container with full permissions.", `This worktree is configured with the following ports:`, `- Backend: port ${backendPort}. Start with: cd backend && PORT=${backendPort} DATABASE_URL=postgres://postgres:changeme@localhost:5432/windmill cargo watch -x run`, - `- Frontend: port ${frontendPort}. Start with: cd frontend && REMOTE=http://localhost:${backendPort} npm run dev -- --port ${frontendPort} --host 0.0.0.0`, + `- Frontend: port ${frontendPort}. Start with: cd frontend && REMOTE=http://localhost:${backendPort} npm run dev -- --port ${frontendPort}`, ]; if (hasR2) { lines.push( diff --git a/dev-dashboard/frontend/package.json b/dev-dashboard/frontend/package.json index 45b7f44388..f5b4a233b4 100644 --- a/dev-dashboard/frontend/package.json +++ b/dev-dashboard/frontend/package.json @@ -3,9 +3,9 @@ "private": true, "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host 0.0.0.0", "build": "vite build", - "preview": "vite preview", + "preview": "vite preview --host 0.0.0.0", "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { @@ -20,4 +20,4 @@ "typescript": "^5.0.0", "vite": "^6.0.0" } -} +} \ No newline at end of file