Repository navigation
Agentic UI: Lint feature code that reaches into the UI primitives - #5396
Open
youknowriad wants to merge 20 commits into
Open
youknowriad wants to merge 20 commits into
youknowriad wants to merge 20 commits into
Conversation
…er tokens, and use them instead of literals Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-css-design-tokens
… global svg rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lors to their scene Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pe-css-surfaces-and-schemes
…re-css-recipes # Conflicts: # apps/ui/README.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-css-design-tokens # Conflicts: # apps/ui/src/features/chats/session-view/conversation/style.module.css # apps/ui/src/features/composer/style.module.css # apps/ui/src/features/sidebar/site-list/style.module.css # apps/ui/src/features/sites/site-preview/style.module.css
…re-css-recipes # Conflicts: # apps/ui/src/features/chats/session-view/conversation/style.module.css # apps/ui/src/features/composer/style.module.css # apps/ui/src/features/sites/site-preview/style.module.css
…pe-css-surfaces-and-schemes # Conflicts: # apps/ui/src/features/chats/session-view/conversation/style.module.css
… for colors, type, radii, shadows and layers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/ui/src/features/composer/attachment-chips/style.module.css # apps/ui/src/features/composer/style.module.css # apps/ui/src/features/notifications/notice-history/style.module.css # apps/ui/src/features/sidebar/sidebar-header/style.module.css # apps/ui/src/features/sidebar/site-list/style.module.css
# Conflicts: # apps/ui/src/features/chats/session-view/conversation/agent-question/style.module.css # apps/ui/src/lib/theme/tokens.css # apps/ui/src/lib/ui/dialog/style.module.css # apps/ui/src/lib/ui/input-group/style.module.css # apps/ui/src/lib/ui/popover/style.module.css # apps/ui/src/lib/ui/switch/style.module.css
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-design-system
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
Claude Code picked the rules from the drift the fidelity passes kept fixing, and from the rebuild's design-system lint rules. It wrote the rule and its tests, and added an exception with a reason for each existing case. It also broke a feature file on purpose to confirm that each guard fires.
Proposed Changes
The fidelity passes kept fixing the same drift: feature CSS bending a primitive to match one screen instead of fixing the primitive for every caller. The rebuild blocks this with
shadcn/no-restyle. With CSS Modules aclassNamecan't be told apart from layout, so these guards catch what we can see in the CSS and the imports:[data-slot=…]outsidelib/fails lint.--button-size,--button-padding-inline,--button-active-*,--alert-toneor--command-radius. The list comes from the primitives' own CSS, minus the theme tokens and the documented hooks (--button-background,--button-hover-background,--button-hover-color), so new primitives are covered without editing the config.!importantinapps/uiCSS, with ESLint's owncss/no-important. The reduced-transparency reset and Shiki's inline colors are the two exceptions.The ten existing cases each carry an inline exception with its reason. Each one is a candidate for a primitive prop later, for example a Progress intent for the credits meter. The Publish trigger's exception goes away with #5394.
Not ported from the rebuild: the field-spacing and Settings Save-button rules. Field spacing has no override to catch here, and our Save buttons differ by context (form row, API key, dialog footer), so they don't share one component. Raw values are covered by #5390's token rule.
Testing Instructions
npx eslint apps/ui/srcpasses..x { --button-size: 1px; }or.x [data-slot='field-label'] {}to a feature CSS module, orimport { Menu } from '@base-ui/react/menu'in a feature: lint fails with a message pointing to the primitive.npm test -- tools/eslint-plugin-studioPre-merge Checklist
🤖 Generated with Claude Code