fix(desktop): spread dev dock-icon colors across full hue range#3622
Conversation
Replace the fixed Tailwind `-500` palette (22 entries, ~5 grey families, several near-duplicate hue families) with a golden-angle hue generator over fixed-L/C OKLCH. Successive workspace names land far apart on the color wheel, eliminating the frequent collisions between concurrent dev workspaces.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workspace name color selection logic in dock-icon.ts was refactored from a Tailwind color palette lookup to a deterministic algorithmic approach using hash-based hue calculation via the golden angle and OKLCH-to-sRGB color space conversion. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Greptile encountered an error while reviewing this PR. Please reach out to support@greptile.com for assistance. |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
-500palette used to tint the dev dock-icon corner fold with a golden-angle hue generator in OKLCH (fixed L=0.68, C=0.18).hue = (hash * 137.508) % 360spreads successive names evenly around the color wheel with effectively unlimited distinct hues, at roughly Tailwind-500 vibrancy.Test plan
bun devfor the desktop app with a couple of workspace names (e.g. via worktrees) and confirm each dock icon gets a distinct, vibrant corner fold.bun run typecheckinapps/desktop.Summary by cubic
Make dev dock icon colors unique and vibrant for each workspace by replacing the limited Tailwind
-500palette with a golden-angle OKLCH hue generator. This eliminates frequent color collisions across multiple dev workspaces.tailwindcss/colorspalette usage and parsing.(hash(name) * 137.508) % 360and convert fixedL=0.68,C=0.18OKLCH to sRGB.Written for commit 63ceae4. Summary will update on new commits.
Summary by CodeRabbit