Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: show placeholder when dashboard not built (#156)

Datab752732f5d51
diff --git a/.gitignore b/.gitignore
index 94736050..21481994 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,8 +15,9 @@ dist/
!dashboard/vite.config.ts
!npm/bin/pinchtab
# React dashboard build output (generated by scripts/build-dashboard.sh)
+# The placeholder dashboard.html IS tracked (shows "not built" message).
+# The built version and assets are ignored — build-dashboard.sh overwrites them.
internal/dashboard/dashboard/assets/
-internal/dashboard/dashboard/dashboard.html
# npm package
npm/node_modules/
diff --git a/docs/architecture/building.md b/docs/architecture/building.md
index 852fda98..a2d19121 100644
--- a/docs/architecture/building.md
+++ b/docs/architecture/building.md
@@ -163,6 +163,12 @@ go build -o pinchtab ./cmd/pinchtab
- Produces binary: `./pinchtab`
- Takes ~30-60 seconds
+> **Note:** This builds the Go server only. The dashboard will show a
+> "not built" placeholder. To include the full React dashboard, use
+> `./pdev build` instead — it builds the dashboard, compiles Go, and
+> runs the server in one step. Or run `./scripts/build-dashboard.sh`
+> before `go build`.
+
**Verify:**
```bash
ls -la pinchtab
diff --git a/internal/dashboard/dashboard/dashboard.html b/internal/dashboard/dashboard/dashboard.html
new file mode 100644
index 00000000..3519153e
--- /dev/null
+++ b/internal/dashboard/dashboard/dashboard.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>PinchTab Dashboard</title>
+ <style>
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 100vh;
+ margin: 0;
+ background: #0a0a0a;
+ color: #e0e0e0;
+ }
+ .container {
+ text-align: center;
+ max-width: 480px;
+ padding: 2rem;
+ }
+ h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
+ p { color: #888; line-height: 1.6; }
+ code {
+ background: #1a1a2e;
+ padding: 2px 8px;
+ border-radius: 4px;
+ font-size: 0.9em;
+ }
+ </style>
+</head>
+<body>
+ <div class="container">
+ <h1>🦀 Dashboard not built</h1>
+ <p>
+ The React dashboard needs to be compiled before use.<br/>
+ Run <code>./pdev build</code> or <code>./scripts/build-dashboard.sh</code> then rebuild the Go binary.
+ </p>
+ </div>
+</body>
+</html>
diff --git a/scripts/build-dashboard.sh b/scripts/build-dashboard.sh
index e9ad3405..b0d00a2a 100755
--- a/scripts/build-dashboard.sh
+++ b/scripts/build-dashboard.sh
@@ -34,8 +34,9 @@ bun run build
echo "📋 Copying build to internal/dashboard/dashboard/..."
cd ..
-# Clear old dashboard (keep directory)
-rm -rf internal/dashboard/dashboard/*
+# Clear old dashboard assets (keep favicon.png)
+rm -rf internal/dashboard/dashboard/assets/
+rm -f internal/dashboard/dashboard/dashboard.html
# Copy React build
cp -r dashboard/dist/* internal/dashboard/dashboard/