Skip to content

fix(workflows): preserve contrast on gradient tiles - #7332

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/gradient-foreground-contrast
Sep 1, 2026
Merged

fix(workflows): preserve contrast on gradient tiles#7332
waleedlatif1 merged 2 commits into
stagingfrom
codex/gradient-foreground-contrast

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • detect brightness from supported CSS gradient color stops for tile foreground contrast
  • share the gradient-specific heuristic between app and workflow renderer tile detectors

Type of Change

  • Bug fix

Testing

  • 21 focused Vitest tests
  • app, workflow renderer, and utility type checks
  • repo lint, block registry audit, and all 40 repo audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 1, 2026 2:32am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR extends the shared tile-contrast heuristic to derive foreground contrast from supported CSS gradient stops.

  • Adds solid-color and gradient background brightness parsing to @sim/utils/color.
  • Uses the shared gradient-aware heuristic in the application and workflow renderer.
  • Adds focused tests for light, dark, mixed, and unsupported gradients.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/utils/src/color.ts Adds validated parsing and average brightness calculation for supported static CSS gradients.
apps/sim/blocks/icon-color.ts Replaces the app-specific solid-color check with the shared gradient-aware brightness helper.
packages/workflow-renderer/src/lib/tile-icon-color.ts Updates workflow tiles to use the same gradient-aware foreground contrast heuristic.

Reviews (2): Last reviewed commit: "fix(workflows): validate gradient color ..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 6 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Fix all with cubic | Re-trigger cubic

Comment thread packages/utils/src/color.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@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