Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions .devcontainer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
#### ChromaTerm
- **Regex lookbehinds** — replaced alternation inside lookbehinds (`(?<=[\s(]|^)` and `(?<=commit |merge |...)`) with non-capturing groups containing individual lookbehinds (`(?:(?<=[\s(])|^)` and `(?:(?<=commit )|(?<=merge )|...)`) for PCRE2 compatibility

#### Terminal Color Support
- **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
- **devcontainer.json** — `TERM` uses `${localEnv:TERM:xterm-256color}` to forward the host terminal type (e.g., `xterm-kitty`) instead of unconditionally overriding it
- **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
- **kitty-terminfo/README.md** — updated documentation to reflect `localEnv` forwarding and clarify behavior across VS Code vs non-VS Code entry points
- **CLAUDE.md** — documented `TERM` and `COLORTERM` environment variables in the Environment section

### Removed

#### VS Code Extensions
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Rules in `config/defaults/rules/` deploy to `.claude/rules/` on every container
| `CLAUDE_CONFIG_DIR` | `/workspaces/.claude` |
| `ANTHROPIC_MODEL` | `claude-opus-4-6` |
| `WORKSPACE_ROOT` | `/workspaces` |
| `TERM` | `${localEnv:TERM:xterm-256color}` (via `remoteEnv` — forwards host TERM, falls back to 256-color) |
| `COLORTERM` | `truecolor` (via `remoteEnv` — enables 24-bit color support) |

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

Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"CLAUDE_CONFIG_DIR": "/workspaces/.claude",
"GH_CONFIG_DIR": "/workspaces/.gh",
"TMPDIR": "/workspaces/.tmp",
"TERM": "${localEnv:TERM:xterm-256color}",
"COLORTERM": "truecolor",
"CLAUDECODE": null
},

Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/features/kitty-terminfo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Downloads and compiles the official kitty terminfo entry from the [Kitty termina

## Usage

No configuration needed. Once installed, containers automatically recognize `TERM=xterm-kitty` and provide full capability support.
The container defaults to `TERM=xterm-256color` with `COLORTERM=truecolor`, which provides full 256-color and 24-bit truecolor support for all terminals.

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.

```bash
# Verify installation
Expand Down
6 changes: 6 additions & 0 deletions .devcontainer/scripts/setup-aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export GH_CONFIG_DIR="${GH_CONFIG_DIR:-/workspaces/.gh}"
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# Terminal color defaults — Docker sets TERM=xterm (8 colors); upgrade to 256-color
if [ "\$TERM" = "xterm" ] || [ -z "\$TERM" ]; then
export TERM=xterm-256color
fi
export COLORTERM="\${COLORTERM:-truecolor}"

# Prefer native binary over npm-installed version
if [ -x "\$HOME/.local/bin/claude" ]; then
_CLAUDE_BIN="\$HOME/.local/bin/claude"
Expand Down