Remove stale theme entries in CSSTheme#4291
Conversation
When updating theme resources from CSS, if a property is removed from the CSS, it should be removed from the generated resource file. Previously, removed properties would persist as stale entries. This change introduces a cleanup step in `updateResources` that iterates over modified UIIDs and removes all existing theme properties associated with them before applying the new properties from the CSS. A helper method `isOwnedBy` ensures that only properties strictly belonging to the UIID (and its states) are removed, preventing accidental deletion of unrelated properties even if UIIDs contain dots.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Implemented logic to remove stale theme entries in
CSSTheme.updateResourcesas per issue #2698.Added
isOwnedByhelper method to robustly identify keys belonging to a UIID.Updated
updateResourcesto clear existing entries for modified elements before regenerating them.PR created automatically by Jules for task 17836756270532197073 started by @shai-almog