Fix terminal color support: default TERM=xterm-256color and COLORTERM=truecolor#6
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds TERM and COLORTERM environment forwarding/defaults to the devcontainer configuration and setup script to enable 256-color/truecolor in container sessions, and documents the changes in the CHANGELOG, kitty-terminfo README, and CLAUDE.md. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.devcontainer/devcontainer.json:
- Around line 13-14: Add documentation for the new remoteEnv terminal defaults:
update .devcontainer/CLAUDE.md (either the "Key Configuration" table or the
"Environment" section) to include entries for TERM (default "xterm-256color")
and COLORTERM (default "truecolor"), mention these are set via the remoteEnv
block in devcontainer.json, and include a short note about why these defaults
are chosen (terminal color support/compatibility).
- Line 13: The devcontainer remoteEnv entry hardcodes "TERM": "xterm-256color",
which overrides a host-forwarded TERM (e.g., xterm-kitty); update the remoteEnv
TERM value to use the VS Code variable substitution
${localEnv:TERM:xterm-256color} so the host TERM is preserved when present and
falls back to xterm-256color otherwise—locate the "TERM" key in the remoteEnv
object in .devcontainer/devcontainer.json and replace its value accordingly.
In @.devcontainer/features/kitty-terminfo/README.md:
- Line 19: Update the README guidance to reflect that VS Code sessions override
TERM via the devcontainer.json remoteEnv setting: either (preferred) change the
devcontainer.json remoteEnv entry for "TERM" to use the variable form
${localEnv:TERM:xterm-256color} so forwarded TERM (e.g., xterm-kitty) is
preserved for VS Code connections, or (if you won't change devcontainer.json)
clarify the README sentence to state that the Kitty forwarding behavior only
applies to non-VS Code entry points because VS Code currently forces "TERM":
"xterm-256color" via remoteEnv.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.devcontainer/CHANGELOG.md.devcontainer/devcontainer.json.devcontainer/features/kitty-terminfo/README.md.devcontainer/scripts/setup-aliases.sh
- 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
0a11296 to
2173291
Compare
Summary
TERM=xterm-256colorandCOLORTERM=truecolortoremoteEnvindevcontainer.json— Docker defaults toTERM=xterm(8 colors) which caused Claude Code and other CLI tools to downgrade renderingsetup-aliases.shso tmux panes,docker exec, and SSH sessions also get 256-color and truecolor supportkitty-terminfo/README.mdto reflect container terminal color defaultsTest plan
echo $TERMreturnsxterm-256colorecho $COLORTERMreturnstruecolortput colorsreturns256Summary by CodeRabbit
Bug Fixes
Documentation