From d1290ba777febaa44bd5cb35dc7ab9b286f75d57 Mon Sep 17 00:00:00 2001 From: centdix Date: Sat, 21 Feb 2026 20:03:40 +0000 Subject: [PATCH] feat: add dev.sh script and document keyboard shortcuts Single script to start both backend and frontend with prefixed logs. Updated README with dev.sh usage and keyboard shortcut reference. Co-Authored-By: Claude Opus 4.6 --- dev-dashboard/README.md | 21 ++++++++++++++++++--- dev-dashboard/dev.sh | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100755 dev-dashboard/dev.sh diff --git a/dev-dashboard/README.md b/dev-dashboard/README.md index 310a4f9979..a2db8b7dcd 100644 --- a/dev-dashboard/README.md +++ b/dev-dashboard/README.md @@ -30,8 +30,7 @@ docker build -f Dockerfile.sandbox -t windmill-sandbox . cd dev-dashboard/frontend && bun install && cd .. # 5. Start the dashboard -cd backend && bun run dev & # API on :5111 -cd frontend && bun run dev & # UI on :5112 +./dev.sh # API on :5111, UI on :5112 # 6. Open http://localhost:5112 ``` @@ -119,7 +118,15 @@ The repo-level `.workmux.yaml` at the Windmill root configures how worktrees are ## Running -Start both backend and frontend (from the `dev-dashboard/` directory): +From the `dev-dashboard/` directory: + +```bash +./dev.sh +``` + +This starts both backend and frontend, with logs prefixed `[BE]` / `[FE]`. `Ctrl+C` stops both. + +You can also start them separately: ```bash # Terminal 1: backend (auto-reloads on save) @@ -131,6 +138,14 @@ cd frontend && bun run dev Open http://localhost:5112 in your browser. +### Keyboard shortcuts + +| Shortcut | Action | +|----------|--------| +| `Cmd+Up/Down` | Navigate between worktrees | +| `Cmd+K` | Create new worktree | +| `Cmd+D` | Remove selected worktree | + ### Environment variables | Variable | Default | Description | diff --git a/dev-dashboard/dev.sh b/dev-dashboard/dev.sh new file mode 100755 index 0000000000..8f22f62c93 --- /dev/null +++ b/dev-dashboard/dev.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")" + +cleanup() { + kill $BE_PID $FE_PID 2>/dev/null || true +} +trap cleanup EXIT + +# Backend (bun --watch) +cd backend +bun run dev 2>&1 | sed 's/^/[BE] /' & +BE_PID=$! +cd .. + +# Frontend (vite dev) +cd frontend +bun run dev 2>&1 | sed 's/^/[FE] /' & +FE_PID=$! +cd .. + +wait