Skip to content

fix(web): accept case-insensitive VS Code color functions - #7660

Open
jonbaldie wants to merge 1 commit into
pingdotgg:mainfrom
jonbaldie:fix/web-case-insensitive-vscode-color-functions
Open

fix(web): accept case-insensitive VS Code color functions#7660
jonbaldie wants to merge 1 commit into
pingdotgg:mainfrom
jonbaldie:fix/web-case-insensitive-vscode-color-functions

Conversation

@jonbaldie

@jonbaldie jonbaldie commented Aug 20, 2026

Copy link
Copy Markdown

What Changed

Accept uppercase and mixed-case CSS color() function names when importing VS Code themes, with a focused regression test.

Why

The importer’s dispatch guard was case-sensitive even though its color() parser accepts case-insensitive syntax. A valid theme using COLOR(SRGB …) was rejected as missing an editor background.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model and harness: GPT-5 Codex.

Note

Fix case-insensitive color() parsing in parseVsCodeColor

Updates parseVsCodeColor in vscodeThemeImport.ts to use a case-insensitive regex for CSS color() notation instead of startsWith("color("). This fixes parsing of theme values using uppercase variations like `COLOR(SRGB ...)", and adds a corresponding test case.

Macroscope summarized cbfa0f2.

VS Code theme imports rejected uppercase CSS color() function names because the dispatch guard was case-sensitive while the parser accepted case-insensitive syntax. Match the guard to the parser and cover the uppercase form with a regression test.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f38116c0-b96d-42d9-96d2-a4c0ec2b69a6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@jonbaldie
jonbaldie marked this pull request as ready for review August 20, 2026 10:24
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 20, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 20, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at de6184f

Macroscope's review found this PR approvable — This PR adds stricter validation for CSS color() function parsing in VS Code theme imports - rejecting malformed notation and supporting case-insensitive function names. The changes are self-contained with corresponding tests and don't affect behavior for valid inputs.

You can add or adjust custom eligibility rules. Learn more.

@macroscopeapp
macroscopeapp Bot dismissed their stale review August 20, 2026 10:36

Dismissing prior approval to re-evaluate de6184f

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 20, 2026
@jonbaldie jonbaldie changed the title fix(web): accept case-insensitive VS Code color functions fix(web): validate VS Code color functions Aug 20, 2026
@jonbaldie jonbaldie changed the title fix(web): validate VS Code color functions fix(web): accept case-insensitive VS Code color functions Aug 20, 2026
@jonbaldie
jonbaldie force-pushed the fix/web-case-insensitive-vscode-color-functions branch from de6184f to cbfa0f2 Compare August 20, 2026 10:39
@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant