fix(agent): make CSS edits replaceable and priority-aware#208
Merged
Conversation
DavidBabinec
force-pushed
the
fix/agent-css-editing
branch
from
July 11, 2026 15:02
86b72c3 to
a6e7aab
Compare
DavidBabinec
marked this pull request as ready for review
July 11, 2026 15:05
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.
Summary
site_apply_csswith exact-selector, atomic store semantics!importantthrough CSS import, persistence, canvas preview, responsive sizing, and published outputWhy
A later
backgroundshorthand could reset an earlierbackground-clip: text, leaving transparent text over a solid gradient rectangle. The previous merge-only tool could not reliably remove or replace stale declarations, and CSS priority metadata was discarded.Anthropic also requires tool inputs to be object-rooted with no root-level
anyOf,oneOf, orallOf. The provider schema now follows that contract without weakening operation-specific validation in the editor.User/developer impact
Agents can repair overlapping CSS without accumulating more rules, destructive edits are explicit and atomic, class identity and assignments survive replacement, and snapshots expose the computed evidence needed to debug gradient text. The same tool now works across Anthropic and the other supported providers.
Verification
bun test— 6,206 pass, 0 failbun run lintbunx tsc --noEmitbun run build