refactor(agentflow): use design tokens for validation colors#5934
refactor(agentflow): use design tokens for validation colors#5934jocelynlin-wd merged 2 commits intomainfrom
Conversation
Replace hardcoded '#FFB938' validation color with tokens.colors.border.validation across AgentFlowNode and ValidationFeedback components for consistency with the design token system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the application's UI to utilize a design token for validation colors. By moving from a hardcoded color value to a centralized design token, the change enhances the consistency and maintainability of the user interface, particularly for validation feedback elements across different components. This update directly addresses previous review feedback, promoting a more robust and scalable design system. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors hardcoded validation colors to use a new design token, tokens.colors.border.validation. The changes in AgentFlowNode and ValidationFeedback correctly replace the magic string #FFB938 with the new token, improving maintainability and consistency. I have one suggestion in ValidationFeedback.tsx to move a constant declaration out of the component body for a minor performance improvement and better code clarity. Overall, this is a good refactoring.
packages/agentflow/src/features/canvas/components/ValidationFeedback.tsx
Outdated
Show resolved
Hide resolved
Hoist the validationColor constant outside the component body since it's a static value that doesn't need to be redeclared on every render. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| default: { light: baseColors.gray300, dark: baseColors.darkGray500 }, | ||
| hover: { light: baseColors.gray400, dark: baseColors.darkGray600 } | ||
| hover: { light: baseColors.gray400, dark: baseColors.darkGray600 }, | ||
| validation: baseColors.nodeCondition |

Summary
tokens.colors.border.validationto the design token system#FFB938with the new token inAgentFlowNodeandValidationFeedbackcomponentsAddresses review feedback from #5915 (#5915 (review)).
Test plan
🤖 Generated with Claude Code