Skip to content

fix(tui): highlight Containerfile, Dockerfile.*, and shell dotfiles - #433

Open
amandeavor wants to merge 1 commit into
Observal:mainfrom
amandeavor:fix/highlight-containerfile-shell-dotfiles
Open

amandeavor wants to merge 1 commit into
Observal:mainfrom
amandeavor:fix/highlight-containerfile-shell-dotfiles

Conversation

@amandeavor

@amandeavor amandeavor commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

languageForPath now recognizes:

  • Containerfile / Containerfile.* (dockerfile)
  • Dockerfile.* variants such as Dockerfile.dev
  • GNUmakefile, Vagrantfile
  • .bashrc, .zshrc, .bash_profile, .profile

Adds packages/tui/test/highlight.test.ts covering new names, existing extensions, mixed case, Windows paths, and unknown names.

Closes #427

Test plan

  • pnpm --filter @axl/tui exec node --test test/highlight.test.ts (5 pass)

Summary by CodeRabbit

  • Bug Fixes
    • Improved syntax highlighting for Containerfiles, GNU Makefiles, Vagrantfiles, Bash startup files, and Dockerfile or Containerfile names with environment suffixes. Matching works with Windows paths and case variations.

languageForPath missed Podman Containerfiles, Dockerfile.dev-style
variants, GNUmakefile, Vagrantfile, and common shell rc files. Add
exact-name mappings, a Dockerfile.*/Containerfile.* prefix rule, and
dedicated highlight tests.

Closes Observal#427
Copilot AI lite review requested due to automatic review settings September 25, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e90137b2-1a3b-4150-a770-0361ab9b72cc

📥 Commits

Reviewing files that changed from the base of the PR and between c9b6481 and 0e97a4c.

📒 Files selected for processing (2)
  • packages/tui/src/highlight.ts
  • packages/tui/test/highlight.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds syntax-highlighting mappings for Containerfile, GNUmakefile, Vagrantfile, and common shell startup files. It also recognizes Dockerfile and Containerfile names with suffixes. Tests cover the new mappings and existing path-resolution behavior.

Changes

Syntax highlighting filename recognition

Layer / File(s) Summary
Filename mappings and path resolution
packages/tui/src/highlight.ts, packages/tui/test/highlight.test.ts
Added mappings for additional filenames and prefix handling for Dockerfile variants. Tests cover the new mappings, existing extensions, mixed-case names, Windows-style paths, and unknown names.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 0e97a

The filename-highlighting change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description summarizes the change, links issue #427, and reports a targeted test. It does not follow the required template because it omits the Purpose, Approach, How was this tested?, Learning, C… Update the description to use the required headings. Add the purpose, implementation approach and compatibility or security impact, complete testing details including all relevant checks and unverifiable checks, complete the checklist, and …
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: syntax highlighting for Containerfile, Dockerfile variants, and shell dotfiles.
Linked Issues check ✅ Passed Issue [#427] requires mappings for Containerfile, Dockerfile.* variants, shell dotfiles, GNUmakefile, and Vagrantfile. highlight.ts adds these mappings and handles both Dockerfile.* and `Container…
Out of Scope Changes check ✅ Passed The reviewed changes are limited to languageForPath mappings and focused automated tests. These changes directly implement the objectives in issue [#427]. No unrelated change is shown.
Full details: Description check

Explanation

The description summarizes the change, links issue #427, and reports a targeted test. It does not follow the required template because it omits the Purpose, Approach, How was this tested?, Learning, Checklist, and AI assistance sections.

Resolution

Update the description to use the required headings. Add the purpose, implementation approach and compatibility or security impact, complete testing details including all relevant checks and unverifiable checks, complete the checklist, and provide the AI assistance information.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recognize Containerfile, Dockerfile.* and shell dotfiles for syntax highlighting

2 participants