Skip to content

Commit bc65519

Browse files
committed
DevContainer performance optimizations: comment out Rust/ccms, fix Bun, clean npm cache
- Comment out Rust toolchain (~1.23 GB) and ccms (~301 MB) features — replacement tool for ccms pending; Rust can be re-enabled in devcontainer.json - Fix Bun PATH for non-interactive shells via /etc/profile.d/bun.sh in setup.sh - Update Bun feature to install latest version (was pinned to outdated 1.3.9) - Add npm cache cleanup to 6 features (agent-browser, ast-grep, biome, claude-session-dashboard, lsp-servers, tree-sitter) — saves ~96 MB runtime disk - Update 12 docs pages to reflect Rust/ccms as opt-in/disabled - Update CLAUDE.md commands table and CHANGELOG.md Projected savings: ~1.53 GB image, ~127s build time, ~265 MB runtime disk.
1 parent 59438d4 commit bc65519

File tree

22 files changed

+71
-34
lines changed

22 files changed

+71
-34
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
### Changed
66

7+
#### Performance
8+
- Commented out Rust toolchain feature — saves ~1.23 GB image size; uncomment in `devcontainer.json` if needed
9+
- Commented out ccms feature pending replacement tool (requires Rust)
10+
- Updated Bun feature to install latest version (was pinned to outdated 1.3.9)
11+
- Added npm cache cleanup to 6 features: agent-browser, ast-grep, biome, claude-session-dashboard, lsp-servers, tree-sitter (saves ~96 MB runtime disk)
12+
713
#### Port Forwarding
814
- Dynamic port forwarding for all ports in VS Code — previously only port 7847 was statically forwarded; now all ports auto-forward with notification
915

@@ -23,6 +29,9 @@
2329

2430
### Fixed
2531

32+
#### Bun
33+
- Bun PATH not available in non-interactive shells — added `/etc/profile.d/bun.sh` via postStart hook
34+
2635
#### Session Context Plugin
2736
- **Commit reminder** no longer blocks Claude from stopping — switched from `decision: "block"` to advisory `systemMessage` wrapped in `<system-reminder>` tags
2837
- **Commit reminder** now uses tiered logic: meaningful changes (3+ files, 2+ source files, or test files) get an advisory suggestion; small changes are silent

.devcontainer/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
8080
| `ccraw` | Vanilla Claude Code (bypasses config) |
8181
| `ccw` | Claude Code with writing system prompt |
8282
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
83-
| `ccms` | Search session history (project-scoped) |
83+
| ~~`ccms`~~ | _(commented out — replacement pending)_ |
8484
| `ccusage` / `ccburn` | Token usage analysis / burn rate |
8585
| `agent-browser` | Headless Chromium (Playwright-based) |
8686
| `check-setup` | Verify CodeForge setup health |

.devcontainer/devcontainer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,25 @@
4646
}
4747
},
4848

49-
// Feature install order: external runtimes first (Node, uv, Rust, Bun),
49+
// Feature install order: external runtimes first (Node, uv, Bun),
5050
// then Claude Code native binary (no Node dependency), then custom features.
5151
// npm-dependent features (agent-browser, ccusage, ccburn, claude-session-dashboard,
5252
// biome, lsp-servers) must come after Node. uv-dependent features (ruff, claude-monitor) must
53-
// come after uv. cargo-dependent features (ccms) must come after Rust.
54-
// notify-hook is second-to-last (lightweight, no dependencies).
53+
// come after uv. notify-hook is second-to-last (lightweight, no dependencies).
5554
// dbr (devcontainer-bridge) is last — standalone binary, no dependencies.
5655
"overrideFeatureInstallOrder": [
5756
"ghcr.io/devcontainers/features/node",
5857
"ghcr.io/devcontainers/features/github-cli",
5958
"ghcr.io/devcontainers/features/docker-outside-of-docker",
6059
"ghcr.io/devcontainers-extra/features/uv",
6160
"ghcr.io/rails/devcontainer/features/bun",
62-
"ghcr.io/devcontainers/features/rust",
6361
"./features/claude-code-native",
6462
"./features/tmux",
6563
"./features/agent-browser",
6664
"./features/claude-monitor",
6765
"./features/ccusage",
6866
"./features/ccburn",
6967
"./features/ccstatusline",
70-
"./features/ccms",
7168
"./features/claude-session-dashboard",
7269
"./features/ast-grep",
7370
"./features/tree-sitter",
@@ -94,10 +91,13 @@
9491
"moby": false
9592
},
9693
"ghcr.io/devcontainers-extra/features/uv:1.0": {},
97-
"ghcr.io/rails/devcontainer/features/bun:1.0.2": {},
98-
"ghcr.io/devcontainers/features/rust:1.5.0": {
94+
"ghcr.io/rails/devcontainer/features/bun:1.0.2": {
9995
"version": "latest"
10096
},
97+
// Uncomment to add Rust toolchain:
98+
// "ghcr.io/devcontainers/features/rust:1.5.0": {
99+
// "version": "latest"
100+
// },
101101
// Uncomment to add Go runtime (not installed by default):
102102
// "ghcr.io/devcontainers/features/go:1": {},
103103
"./features/claude-code-native": {},
@@ -120,7 +120,8 @@
120120
"./features/ccstatusline": {
121121
"username": "automatic"
122122
},
123-
"./features/ccms": {},
123+
// Uncomment to add ccms (requires Rust):
124+
// "./features/ccms": {},
124125
"./features/claude-session-dashboard": {
125126
"version": "latest",
126127
"port": "7847",

.devcontainer/features/agent-browser/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
5858
echo "[agent-browser] WARNING: Global install failed, trying user install"
5959
su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
6060
}
61+
npm cache clean --force 2>/dev/null || true
6162

6263
# Download Chromium and install system dependencies
6364
echo "[agent-browser] Installing Chromium and system dependencies..."

.devcontainer/features/ast-grep/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
5555
echo "[ast-grep] WARNING: Global install failed, trying user install"
5656
su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
5757
}
58+
npm cache clean --force 2>/dev/null || true
5859

5960
echo "[ast-grep] Installed: $(ast-grep --version 2>/dev/null || echo 'unknown')"

.devcontainer/features/biome/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ if [ "${VERSION}" = "latest" ]; then
3333
else
3434
npm install -g "@biomejs/biome@${VERSION}"
3535
fi
36+
npm cache clean --force 2>/dev/null || true
3637

3738
# Verify installation
3839
biome --version

.devcontainer/features/claude-session-dashboard/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ echo "[claude-session-dashboard] Installing for user: ${USERNAME}"
7676
# === INSTALL VIA NPM ===
7777
echo "[claude-session-dashboard] Installing claude-session-dashboard@${DASHBOARD_VERSION} globally..."
7878
npm install -g "claude-session-dashboard@${DASHBOARD_VERSION}"
79+
npm cache clean --force 2>/dev/null || true
7980

8081
# === PERSISTENCE SYMLINK (POSTSTART HOOK) ===
8182
# Settings/cache live at ~/.claude-dashboard, which is ephemeral (/home/vscode).

.devcontainer/features/lsp-servers/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ install_npm_package "typescript" "typescript" "${TS_VERSION}"
8484
# Install TypeScript Language Server
8585
install_npm_package "typescript-language-server" "typescript-language-server" "${TSLSP_VERSION}"
8686

87+
npm cache clean --force 2>/dev/null || true
88+
8789
# Install gopls (Go LSP) - uses go install since it's a Go package
8890
echo "[lsp-servers] Installing gopls..."
8991
if command -v go &>/dev/null; then

.devcontainer/features/tree-sitter/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ if [ "${NEED_PYTHON}" = "true" ]; then
170170
echo "[tree-sitter] Python bindings installed"
171171
fi
172172

173+
npm cache clean --force 2>/dev/null || true
174+
173175
# === SUMMARY ===
174176
echo ""
175177
echo "[tree-sitter] Installation complete!"

.devcontainer/scripts/setup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ if [ "$SETUP_POSTSTART" = "true" ]; then
162162
run_poststart_hooks
163163
fi
164164

165+
# Fix Bun PATH — external feature only adds to ~/.bashrc (misses non-interactive shells)
166+
if [ -d "/home/vscode/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then
167+
sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF'
168+
export BUN_INSTALL="/home/vscode/.bun"
169+
if [[ "${PATH}" != *"${BUN_INSTALL}/bin"* ]]; then
170+
export PATH="${BUN_INSTALL}/bin:${PATH}"
171+
fi
172+
BUNEOF
173+
sudo chmod +x /etc/profile.d/bun.sh
174+
fi
175+
165176
echo ""
166177
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
167178
echo " Setup Summary"

0 commit comments

Comments
 (0)