Skip to content

Commit 489f08c

Browse files
committed
Fix CLI and dashboard wrapper source discovery for nested workspaces
CLI wrapper now searches multiple candidate paths for monorepo source. Dashboard wrapper gains dev-mode source discovery and correctly execs the bash entrypoint instead of running it through bun. Bumps container to v2.1.1.
1 parent cad367e commit 489f08c

File tree

4 files changed

+48
-4
lines changed

4 files changed

+48
-4
lines changed

container/.devcontainer/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# CodeForge Devcontainer Changelog
22

3+
## v2.1.1 — 2026-03-27
4+
5+
### CLI
6+
7+
- Fix wrapper source discovery — search both `/workspaces/cli` and `/workspaces/projects/CodeForge/cli` so the CLI works in nested workspace layouts
8+
9+
### Dashboard
10+
11+
- Fix wrapper to add dev-mode source discovery — dashboard now finds and runs from monorepo source when available, matching CLI behavior
12+
- Fix wrapper to exec the bash entrypoint directly instead of through bun (which tried to parse it as JavaScript)
13+
14+
### Install Scripts
15+
16+
- Improve bun detection in CLI and dashboard install scripts — add explicit `/root/.bun/bin/bun` and `/home/vscode/.bun/bin/bun` candidate paths, detailed error output, and `PATH` export for downstream commands
17+
318
## v2.1.0 — 2026-03-25
419

520
### Package Rename

container/.devcontainer/features/codeforge-cli/install.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,20 @@ cat > /usr/local/bin/codeforge <<'WRAPPER'
7777
#!/bin/bash
7878
set -euo pipefail
7979
80-
CLI_DIR="${WORKSPACE_ROOT:-/workspaces}/cli"
8180
BUN="${BUN:-$(command -v bun 2>/dev/null || echo "$HOME/.bun/bin/bun")}"
8281
83-
# Dev mode: if workspace cli/ source exists, use it
84-
if [ -d "$CLI_DIR/src" ]; then
82+
# Dev mode: find CLI source in workspace
83+
CLI_DIR=""
84+
for candidate in \
85+
"${WORKSPACE_ROOT:-/workspaces}/cli" \
86+
"${WORKSPACE_ROOT:-/workspaces}/projects/CodeForge/cli"; do
87+
if [ -d "$candidate/src" ]; then
88+
CLI_DIR="$candidate"
89+
break
90+
fi
91+
done
92+
93+
if [ -n "$CLI_DIR" ]; then
8594
if [ ! -d "$CLI_DIR/node_modules" ]; then
8695
echo "codeforge: bootstrapping dev dependencies..." >&2
8796
"$BUN" install --cwd "$CLI_DIR" --frozen-lockfile >/dev/null 2>&1 || \

container/.devcontainer/features/codeforge-dashboard/install.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,26 @@ set -euo pipefail
9696
9797
BUN="${BUN:-$(command -v bun 2>/dev/null || echo "$HOME/.bun/bin/bun")}"
9898
99+
# Dev mode: find dashboard source in workspace
100+
DASH_DIR=""
101+
for candidate in \
102+
"${WORKSPACE_ROOT:-/workspaces}/dashboard" \
103+
"${WORKSPACE_ROOT:-/workspaces}/projects/CodeForge/dashboard"; do
104+
if [ -d "$candidate/src" ]; then
105+
DASH_DIR="$candidate"
106+
break
107+
fi
108+
done
109+
110+
if [ -n "$DASH_DIR" ]; then
111+
if [ ! -d "$DASH_DIR/node_modules" ]; then
112+
echo "codeforge-dashboard: bootstrapping dev dependencies..." >&2
113+
"$BUN" install --cwd "$DASH_DIR" --frozen-lockfile >/dev/null 2>&1 || \
114+
"$BUN" install --cwd "$DASH_DIR" >/dev/null 2>&1
115+
fi
116+
exec "$DASH_DIR/bin/codeforge-dashboard" "$@"
117+
fi
118+
99119
# Check runtime user's global bin first
100120
GLOBAL_BIN="$("$BUN" pm bin -g 2>/dev/null || echo "$HOME/.bun/bin")"
101121
if [ -x "$GLOBAL_BIN/codeforge-dashboard" ] && [ "$GLOBAL_BIN/codeforge-dashboard" != "$0" ]; then

container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "2.1.0",
6+
"version": "2.1.1",
77
"description": "Complete development container that sets up Claude Code with modular devcontainer features, modern dev tools, and persistent configurations. Drop it into any project and get a production-ready AI development environment in minutes.",
88
"main": "setup.js",
99
"bin": {

0 commit comments

Comments
 (0)