Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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: 6 additions & 3 deletions .github/workflows/dashboard-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
jobs:
frontend-checks:
name: frontend-checks
if: ${{ !startsWith(github.event.pull_request.head.ref, 'mira/greenfield-rewrite-') }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:

backend-checks:
name: backend-checks
if: ${{ !startsWith(github.event.pull_request.head.ref, 'mira/greenfield-rewrite-') }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand Down Expand Up @@ -166,11 +168,12 @@ jobs:
- name: Prefix isolated LCOV paths for the coexistence checkout
run: |
lcov_path="${RUNNER_TEMP}/mira-dashboard-greenfield/coverage/lcov.info"
perl -0pi -e 's{^SF:(?:\./)?src/}{SF:greenfield/src/}mg' "${lcov_path}"
if grep '^SF:' "${lcov_path}" | grep --quiet --invert-match '^SF:greenfield/src/'; then
echo "LCOV contains a source path outside greenfield/src" >&2
perl -0pi -e 's{^SF:(?:\./)?(scripts|src)/}{SF:greenfield/$1/}mg' "${lcov_path}"
if grep '^SF:' "${lcov_path}" | grep --quiet --invert-match --extended-regexp '^SF:greenfield/(scripts|src)/'; then
echo "LCOV contains a source path outside greenfield/scripts or greenfield/src" >&2
exit 1
fi
grep --quiet '^SF:greenfield/scripts/' "${lcov_path}"
grep --quiet '^SF:greenfield/src/' "${lcov_path}"

- name: Upload isolated coverage artifact
Expand Down
5 changes: 1 addition & 4 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
"**/coverage/**",
"**/data/**",
"**/dist/**",
"docs/generated/**",
"migrations/**",
"**/node_modules/**",
"**/*.min.css",
"**/*.min.js",
"greenfield/**"
"**/*.min.js"
],
"printWidth": 90,
"semi": true,
Expand Down
3 changes: 1 addition & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"**/*.tsbuildinfo",
".git/**",
".vscode/**",
"build/**",
"greenfield/**"
"build/**"
],
"options": {
"denyWarnings": true,
Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,16 @@ dist/ Bun production frontend build output

## Local development

The repository selects Bun Canary through `.bun-version`. Install or update that channel before
installing dependencies:

```bash
bun upgrade --canary
```

Then install all frontend, backend, and tooling dependencies from the repo root:
Install all frontend, backend, and tooling dependencies from the repo root:

```bash
bun install --frozen-lockfile
```

The application targets the Bun 1.4 runtime API. Immutable release manifests still record the
exact Bun revision used for each build. The committed Bun config keeps the runtime-only
`bun-plugin-tailwind` peer from installing a second, stale Bun executable into `node_modules`.
The repository tracks Bun's moving Canary channel in `.bun-version`. Install or
upgrade that runtime before working in the repository; the committed Bun config
keeps the runtime-only `bun-plugin-tailwind` peer from installing a second,
stale Bun executable into `node_modules`.

Run the complete local dev stack:

Expand Down
14 changes: 7 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bunfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ coveragePathIgnorePatterns = [
]

[serve.static]
plugins = ["./scripts/reactCompilerPlugin.ts", "bun-plugin-tailwind"]
plugins = ["bun-plugin-tailwind", "./scripts/reactCompilerPlugin.ts"]
environment = "PUBLIC_*"
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ coverage:
flags:
- dashboard
paths:
- greenfield/scripts/
- greenfield/src/
backend:
target: 85%
Expand Down Expand Up @@ -42,6 +43,7 @@ coverage:
flags:
- dashboard
paths:
- greenfield/scripts/
- greenfield/src/
backend:
target: 85%
Expand Down Expand Up @@ -70,6 +72,7 @@ comment:
flags:
dashboard:
paths:
- greenfield/scripts/
- greenfield/src/
frontend:
paths:
Expand Down
59 changes: 21 additions & 38 deletions docs/api/endpoints.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Endpoint Reference

> **Current-production parity input — not the greenfield API contract.** This route inventory
> describes the legacy backend and exists so the rewrite does not lose operator-visible behavior.
> Greenfield contracts are defined by their explicit tRPC/raw-HTTP registries and current generated
> references; legacy route names and payloads are not compatibility requirements.

This page lists the backend route table. It is intentionally concise: use the
route files under `backend/src/routes/` for exact validation details.

Expand All @@ -13,9 +8,7 @@ route files under `backend/src/routes/` for exact validation details.
| Method | Path | Purpose |
| ------ | ------------------------- | ------------------------------------------------------ |
| `GET` | `/api/health/live` | Public web-process liveness. |
| `HEAD` | `/api/health/live` | Bodyless public web-process liveness probe. |
| `GET` | `/api/health/ready` | Public activation readiness; `503` when not ready. |
| `HEAD` | `/api/health/ready` | Bodyless readiness probe with the same status as GET. |
| `GET` | `/api/health/diagnostics` | Authenticated readiness details and dependency status. |
| `GET` | `/api/sessions` | Normalized session snapshot from Gateway. |

Expand Down Expand Up @@ -202,13 +195,6 @@ already-running execution finishes cooperatively.
| `POST` | `/api/backup` | Creates config backup. |
| `POST` | `/api/restart` | Queues an OpenClaw Gateway restart and waits for its persisted result. |

## Dashboard Settings

| Method | Path | Purpose |
| ------ | --------------- | ------------------------------------------------------------- |
| `GET` | `/api/settings` | Reads Dashboard preferences plus current Gateway connection. |
| `PUT` | `/api/settings` | Updates the validated Dashboard preference subset atomically. |

## Files, Config Files, Logs, Media

| Method | Path | Purpose |
Expand All @@ -219,9 +205,8 @@ already-running execution finishes cooperatively.
| `GET` | `/api/config-files` | Lists OpenClaw config files. |
| `GET` | `/api/config-files/*` | Reads a config file under OpenClaw root. |
| `PUT` | `/api/config-files/*` | Writes a config file under OpenClaw root. |
| `GET` | `/api/logs/dashboard` | Reads the bounded Dashboard service log tail. |
| `GET` | `/api/logs/openclaw/files` | Lists readable OpenClaw log files and metadata. |
| `GET` | `/api/logs/openclaw/content` | Reads a bounded tail from one allowlisted OpenClaw log file. |
| `GET` | `/api/logs/info` | Lists log files/metadata. |
| `GET` | `/api/logs/content` | Reads log content. |
| `GET` | `/api/media` | Serves or safely previews media bytes from OpenClaw media roots. |
| `GET` | `/api/chat/media/outgoing/*` | Proxies an exact managed Gateway media path with backend-held auth. |

Expand All @@ -242,33 +227,31 @@ upstream download metadata.

## Docker

| Method | Path | Purpose |
| -------- | ------------------------------------------------ | ------------------------------------------- |
| `GET` | `/api/docker/containers` | Lists containers. |
| `GET` | `/api/docker/containers/stats` | Reads the current container stats snapshot. |
| `GET` | `/api/docker/containers/:containerId` | Reads container details. |
| `POST` | `/api/docker/containers/:containerId/action` | Queues a container start/stop/restart. |
| `GET` | `/api/docker/containers/:containerId/logs` | Reads container logs. |
| `POST` | `/api/docker/exec/start` | Queues a worker-owned container exec job. |
| `GET` | `/api/docker/exec/:jobId` | Reads persisted exec output/state. |
| `POST` | `/api/docker/exec/:jobId/stop` | Requests exec cancellation. |
| `GET` | `/api/docker/images` | Lists images. |
| `DELETE` | `/api/docker/images/:imageId` | Queues image deletion. |
| `GET` | `/api/docker/volumes` | Lists volumes. |
| `DELETE` | `/api/docker/volumes/:volumeName` | Queues volume deletion. |
| `POST` | `/api/docker/prune` | Queues a Docker prune target. |
| `POST` | `/api/docker/stack/action` | Queues a Compose stack action. |
| `GET` | `/api/docker/updater/services` | Lists managed update services. |
| `GET` | `/api/docker/updater/events` | Lists update events. |
| `POST` | `/api/docker/updater/run` | Queues an updater scan. |
| `POST` | `/api/docker/updater/services/:serviceId/update` | Queues one managed service update. |
| Method | Path | Purpose |
| -------- | ------------------------------------------------ | ----------------------------------------- |
| `GET` | `/api/docker/containers` | Lists containers. |
| `GET` | `/api/docker/containers/:containerId` | Reads container details. |
| `POST` | `/api/docker/containers/:containerId/action` | Queues a container start/stop/restart. |
| `GET` | `/api/docker/containers/:containerId/logs` | Reads container logs. |
| `POST` | `/api/docker/exec/start` | Queues a worker-owned container exec job. |
| `GET` | `/api/docker/exec/:jobId` | Reads persisted exec output/state. |
| `POST` | `/api/docker/exec/:jobId/stop` | Requests exec cancellation. |
| `GET` | `/api/docker/images` | Lists images. |
| `DELETE` | `/api/docker/images/:imageId` | Queues image deletion. |
| `GET` | `/api/docker/volumes` | Lists volumes. |
| `DELETE` | `/api/docker/volumes/:volumeName` | Queues volume deletion. |
| `POST` | `/api/docker/prune` | Queues a Docker prune target. |
| `POST` | `/api/docker/stack/action` | Queues a Compose stack action. |
| `GET` | `/api/docker/updater/services` | Lists managed update services. |
| `GET` | `/api/docker/updater/events` | Lists update events. |
| `POST` | `/api/docker/updater/run` | Queues an updater scan. |
| `POST` | `/api/docker/updater/services/:serviceId/update` | Queues one managed service update. |

## Pull Requests And Deployments

| Method | Path | Purpose |
| ------ | -------------------------------------------- | ---------------------------------------------------------- |
| `GET` | `/api/pull-requests` | Lists Dashboard PRs. |
| `POST` | `/api/pull-requests/stacks` | Creates one reviewed native GitHub PR stack. |
| `POST` | `/api/pull-requests/:number/approve` | Queues merge, optionally followed by deploy. |
| `POST` | `/api/pull-requests/:number/reject` | Queues reject/close. |
| `POST` | `/api/pull-requests/:number/review-approval` | Queues review approval. |
Expand Down
7 changes: 0 additions & 7 deletions docs/architecture/gateway-and-chat.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Gateway And Chat Runtime

> **Current-production parity input — not the greenfield protocol specification.** This document
> describes the legacy Dashboard implementation that must be accounted for during parity work.
> Before any greenfield OpenClaw integration, inspect the source and protocol of the OpenClaw
> version currently installed; that installed behavior is authoritative and this implementation
> may be replaced. The Phase 2 greenfield slice qualifies only a one-shot bootstrap credential
> verifier, not the persistent Gateway/chat runtime described below.

Dashboard has two WebSocket layers:

```text
Expand Down
17 changes: 6 additions & 11 deletions docs/development/local-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@ and chat all run through the same application paths.

## Install

`.bun-version` selects Bun Canary. Install or update that channel before dependencies:

```bash
bun upgrade --canary
```

Then install from the repository or PR worktree:
From the repository or PR worktree:

```bash
bun install --frozen-lockfile
```

Dashboard targets Bun 1.4 and accepts newer Canary revisions within that runtime version. The
root Bun config deliberately does not auto-install peer dependencies: required library peers are
direct dependencies, while the `bun-plugin-tailwind` Bun peer is supplied by the selected
runtime. This prevents a stable npm Bun executable from shadowing Canary in repository scripts.
`.bun-version` selects Bun Canary. The root Bun config deliberately does not
auto-install peer dependencies: required library peers are direct dependencies,
while the `bun-plugin-tailwind` Bun peer is supplied by the selected runtime.
This prevents a stable npm Bun executable from shadowing Canary in repository
scripts.

When Bun 1.4 is stable, re-test installs with peer auto-installation enabled.
Remove `[install] peer = false` once `bun-plugin-tailwind` no longer installs a
Expand Down
5 changes: 1 addition & 4 deletions docs/setup/new-vps.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ git clone https://github.com/rajohan/Mira-Dashboard.git \
cd /home/ubuntu/projects/mira-dashboard/production/checkout
```

Select the repository runtime channel before bootstrapping a release:
Select the repository runtime channel:

```bash
bun upgrade --canary
bun --revision
```

The repository targets Bun 1.4 while `.bun-version` remains on Canary. Each immutable Dashboard
release records and reuses the exact Bun revision that built it.

## Configure Secrets

Dashboard reads production secrets through Doppler project/config
Expand Down
Loading