Problem
`packages/codev/package.json` has:
```json
"build:dashboard": "cd ../dashboard && pnpm build && cp -r dist ../../packages/codev/dashboard-dist"
```
`cp -r dist ` behaves differently depending on whether `` exists:
- If absent: copy contents → target. Correct.
- If present (a directory): create `/dist`. Wrong.
So the first build is correct, but every subsequent build nests another `dist/` inside `dashboard-dist/`. After many rebuilds you get `dashboard-dist/dist/dist/dist/...`. Discovered while debugging the v3.0.0-rc.12 reinstall on 2026-04-25.
Fix
Either:
```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -r dist ../../packages/codev/dashboard-dist"
```
Or (POSIX-portable):
```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -R dist/ ../../packages/codev/dashboard-dist/"
```
Acceptance
- Running `pnpm build` twice in a row leaves `packages/codev/dashboard-dist/` with the same flat structure both times.
- No nested `dashboard-dist/dist/` directory.
Problem
`packages/codev/package.json` has:
```json
"build:dashboard": "cd ../dashboard && pnpm build && cp -r dist ../../packages/codev/dashboard-dist"
```
`cp -r dist ` behaves differently depending on whether `` exists:
So the first build is correct, but every subsequent build nests another `dist/` inside `dashboard-dist/`. After many rebuilds you get `dashboard-dist/dist/dist/dist/...`. Discovered while debugging the v3.0.0-rc.12 reinstall on 2026-04-25.
Fix
Either:
```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -r dist ../../packages/codev/dashboard-dist"
```
Or (POSIX-portable):
```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -R dist/ ../../packages/codev/dashboard-dist/"
```
Acceptance