You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: TUI syntax highlighting fails on uppercase extensions and extensionless files #39601
filetype() in packages/tui/src/util/filetype.ts looks up LANGUAGE_EXTENSIONS[path.extname(input)]. That lookup is exact and case-sensitive, so it misses in three ways:
1. Uppercase extensions get no highlighting.path.extname("COMPONENT.TSX") is ".TSX", which is not a key:
3. Five map keys are dead entries.path.extname() only ever returns the final .xxx, so compound keys can never be hit. These are present in the map but unreachable:
makefile, .html.erb, .js.erb, .css.erb, .json.erb
filetype("index.html.erb") does resolve to "erb", but only via the plain .erb key — the more specific entries are never consulted.
The value feeds tree-sitter highlighting (see packages/tui/src/parsers-config.ts), so a miss means the file renders unhighlighted in the diff viewer and permission prompts.
Separately, packages/tui/src/feature-plugins/system/diff-viewer.tsx:73 contains a byte-identical private copy of filetype(), so the diff viewer carries the same bug independently.
Activity
github-actions commentedon Sep 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.