Skip to content

Commit 2173291

Browse files
committed
Fix CodeRabbit review issues: localEnv forwarding, docs, README accuracy
- Use ${localEnv:TERM:xterm-256color} in remoteEnv to preserve host TERM (e.g., xterm-kitty) instead of unconditionally overriding it - Document TERM and COLORTERM in CLAUDE.md Environment section - Update kitty-terminfo README to clarify VS Code vs non-VS Code behavior - Update CHANGELOG to reflect all fixes
1 parent 65552bd commit 2173291

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
- **Regex lookbehinds** — replaced alternation inside lookbehinds (`(?<=[\s(]|^)` and `(?<=commit |merge |...)`) with non-capturing groups containing individual lookbehinds (`(?:(?<=[\s(])|^)` and `(?:(?<=commit )|(?<=merge )|...)`) for PCRE2 compatibility
1212

1313
#### Terminal Color Support
14-
- **devcontainer.json** — added `TERM=xterm-256color` and `COLORTERM=truecolor` to `remoteEnv`; Docker defaults to `TERM=xterm` (8 colors) which caused Claude Code and other CLI tools to downgrade rendering
14+
- **devcontainer.json** — added `TERM` and `COLORTERM=truecolor` to `remoteEnv`; Docker defaults to `TERM=xterm` (8 colors) which caused Claude Code and other CLI tools to downgrade rendering
15+
- **devcontainer.json**`TERM` uses `${localEnv:TERM:xterm-256color}` to forward the host terminal type (e.g., `xterm-kitty`) instead of unconditionally overriding it
1516
- **setup-aliases.sh** — added terminal color defaults to managed shell block so tmux panes, `docker exec`, and SSH sessions also get 256-color and truecolor support
16-
- **kitty-terminfo/README.md** — updated documentation to reflect container terminal color defaults
17+
- **kitty-terminfo/README.md** — updated documentation to reflect `localEnv` forwarding and clarify behavior across VS Code vs non-VS Code entry points
18+
- **CLAUDE.md** — documented `TERM` and `COLORTERM` environment variables in the Environment section
1719

1820
### Removed
1921

.devcontainer/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ Rules in `config/defaults/rules/` deploy to `.claude/rules/` on every container
7979
| `CLAUDE_CONFIG_DIR` | `/workspaces/.claude` |
8080
| `ANTHROPIC_MODEL` | `claude-opus-4-6` |
8181
| `WORKSPACE_ROOT` | `/workspaces` |
82+
| `TERM` | `${localEnv:TERM:xterm-256color}` (via `remoteEnv` — forwards host TERM, falls back to 256-color) |
83+
| `COLORTERM` | `truecolor` (via `remoteEnv` — enables 24-bit color support) |
8284

8385
All experimental feature flags are in `settings.json` under `env`. Setup steps controlled by boolean flags in `.env`.
8486

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"CLAUDE_CONFIG_DIR": "/workspaces/.claude",
1111
"GH_CONFIG_DIR": "/workspaces/.gh",
1212
"TMPDIR": "/workspaces/.tmp",
13-
"TERM": "xterm-256color",
13+
"TERM": "${localEnv:TERM:xterm-256color}",
1414
"COLORTERM": "truecolor",
1515
"CLAUDECODE": null
1616
},

.devcontainer/features/kitty-terminfo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Downloads and compiles the official kitty terminfo entry from the [Kitty termina
1616

1717
The container defaults to `TERM=xterm-256color` with `COLORTERM=truecolor`, which provides full 256-color and 24-bit truecolor support for all terminals.
1818

19-
For Kitty users: if your host terminal forwards `TERM=xterm-kitty` into the container, the installed terminfo ensures full Kitty-specific capability support (correct `bce` behavior, status line, etc.). If not forwarded, `xterm-256color` provides equivalent color rendering.
19+
For Kitty users: the `devcontainer.json` `remoteEnv` uses `${localEnv:TERM:xterm-256color}`, which forwards your host `TERM` into VS Code sessions. If your host sets `TERM=xterm-kitty`, the installed terminfo ensures full Kitty-specific capability support (correct `bce` behavior, status line, etc.). For non-VS Code entry points (tmux, `docker exec`, SSH), `setup-aliases.sh` upgrades `TERM=xterm` to `xterm-256color` but preserves any other value. If no Kitty TERM is forwarded, `xterm-256color` provides equivalent color rendering.
2020

2121
```bash
2222
# Verify installation

0 commit comments

Comments
 (0)