Skip to content

Comments

Add Linguist colours + langmapper#999

Merged
skyfallwastaken merged 3 commits intomainfrom
linguist
Feb 24, 2026
Merged

Add Linguist colours + langmapper#999
skyfallwastaken merged 3 commits intomainfrom
linguist

Conversation

@skyfallwastaken
Copy link
Member

No description provided.

@skyfallwastaken skyfallwastaken changed the title Add Linguist colours Add Linguist colours + langmapper Feb 24, 2026
@skyfallwastaken skyfallwastaken enabled auto-merge (squash) February 24, 2026 12:50
@skyfallwastaken skyfallwastaken merged commit 8b8297f into main Feb 24, 2026
13 checks passed
@skyfallwastaken skyfallwastaken deleted the linguist branch February 24, 2026 12:53
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

Integrated GitHub Linguist color scheme for programming languages across the application. The PR introduces a new LanguageUtils module that centralizes language name normalization and color lookups using GitHub's official languages.yml file (9,277 lines).

Key changes:

  • Centralized language display name logic (previously scattered across helpers and services)
  • Added consistent color coding for languages using Linguist's color palette
  • Updated dashboard, profile views, and API responses to include language colors
  • Refactored duplicate display_language_name logic from multiple locations into a single utility

Technical implementation:

  • LanguageUtils provides alias resolution (e.g., "js" → "JavaScript", "py" → "Python")
  • Colors are applied to pie charts, horizontal bars, and API summaries
  • Backend passes language_colors map to frontend for consistent rendering
  • Falls back to #888888 for unknown languages

The implementation is clean and follows Rails conventions. However, tests are missing for the new LanguageUtils module.

Confidence Score: 4/5

  • Safe to merge with minor test coverage concern
  • The implementation is solid and well-structured, but lacks tests for the new LanguageUtils module. The repository owner requires tests for new functionality. Otherwise, the changes are straightforward refactoring with no breaking changes.
  • No files require special attention, but app/lib/language_utils.rb should have test coverage added

Important Files Changed

Filename Overview
app/lib/language_utils.rb New utility module for language name normalization and color lookup using GitHub Linguist data
config/languages.yml GitHub Linguist language definitions file (9277 lines) with color and alias mappings
app/helpers/application_helper.rb Refactored to use LanguageUtils for language name display and color lookup
lib/wakatime_service.rb Refactored to use LanguageUtils, adds color field to language summary chunks

Last reviewed commit: ad0eb91

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

9 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

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.

1 participant