Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build-p2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
go-version-file: go.mod
cache: true

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web/package-lock.json

- name: Build web bundle
run: cd web && npm ci && npm run build

- name: Build
env:
BUILD_TAG: ${{ matrix.tag }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data/
# Web UI
web/node_modules/
web/dist/
internal/web/dist/

# IDE
.idea/
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ cd web && npm run build
```

Include a clear summary, verification notes, and screenshots for user-facing dashboard changes.
The generated dashboard bundle under `internal/web/dist` is ignored; do not
commit anything from that directory.

## Project Rules

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ secret:
./bin/mcplexer secret put $(SCOPE) $(KEY) $(VALUE)

clean:
rm -rf bin/ web/dist/
rm -rf bin/ web/dist/ internal/web/dist/

uninstall:
-./bin/mcplexer daemon stop 2>/dev/null
Expand All @@ -162,7 +162,7 @@ worktrees-gc-yes:
@bash scripts/worktrees-gc.sh --yes

# Cross-compile Go for all platforms
go-build-platforms:
go-build-platforms: web-build
GOOS=darwin GOARCH=arm64 go build -tags p2p -ldflags "$(GO_LDFLAGS)" -o bin/darwin/arm64/mcplexer ./cmd/mcplexer
GOOS=darwin GOARCH=amd64 go build -tags p2p -ldflags "$(GO_LDFLAGS)" -o bin/darwin/amd64/mcplexer ./cmd/mcplexer
GOOS=linux GOARCH=amd64 go build -tags p2p -ldflags "$(GO_LDFLAGS)" -o bin/linux/amd64/mcplexer ./cmd/mcplexer
Expand Down
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ tasks:
clean:
desc: Remove build artifacts
cmds:
- rm -rf bin/ web/dist/
- rm -rf bin/ web/dist/ internal/web/dist/

uninstall:
desc: Stop the daemon and remove installed binaries
Expand Down Expand Up @@ -253,6 +253,7 @@ tasks:
go-build-platforms:
desc: Cross-compile Go binaries for common platforms
cmds:
- task: web-build
- GOOS=darwin GOARCH=arm64 go build -o bin/darwin/arm64/mcplexer ./cmd/mcplexer
- GOOS=darwin GOARCH=amd64 go build -o bin/darwin/amd64/mcplexer ./cmd/mcplexer
- GOOS=linux GOARCH=amd64 go build -o bin/linux/amd64/mcplexer ./cmd/mcplexer
Expand Down
3 changes: 3 additions & 0 deletions internal/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,9 @@ func NewRouter(deps RouterDeps) http.Handler {
// session cookie when an HTML document is served so that subsequent API
// fetches from the SPA carry authentication automatically.
distFS, err := fs.Sub(web.StaticFiles, "dist")
if err == nil {
_, err = fs.Stat(distFS, "index.html")
}
if err == nil {
spaHandler := spaFallback(distFS, http.FileServerFS(distFS), deps.APIToken)
mux.Handle("/", spaHandler)
Expand Down
1 change: 0 additions & 1 deletion internal/web/dist/assets/ApprovalsPage-Diz3qyC2.js

This file was deleted.

2 changes: 0 additions & 2 deletions internal/web/dist/assets/AuditDetailDialog-CIIIkhsj.js

This file was deleted.

1 change: 0 additions & 1 deletion internal/web/dist/assets/AuditPage-kXFcF4K1.js

This file was deleted.

1 change: 0 additions & 1 deletion internal/web/dist/assets/BackupsPage-C7FQ2DLV.js

This file was deleted.

2 changes: 0 additions & 2 deletions internal/web/dist/assets/BrainBrowserPage-DWmDha4V.js

This file was deleted.

1 change: 0 additions & 1 deletion internal/web/dist/assets/BrainStatusPage-IIn0Ufcf.js

This file was deleted.

1 change: 0 additions & 1 deletion internal/web/dist/assets/ConfigPage-BWoHdHHz.js

This file was deleted.

2 changes: 0 additions & 2 deletions internal/web/dist/assets/ConnectionsPage-BWNiOJ8h.js

This file was deleted.

Loading
Loading