Copilot reloads after each change i made

Hi everyone,

when making a change in copilot to a component, for example changing a border color. The website immediately reloads the page. I think its because a file gets updated, but it feels odd. After that i need to select the compontent again, search where i was and then i can style the next part. Does anyone has an idea what the reason could be?

Its a spring boot project, vaadin plugin is installed, following intelliJ setting is disabled, i cant find any other setting which could be the reason.

image

First things first: No, it is not supposed to work that way.

When you change border color or anything else in the theme editor, it updates the CSS file. This is supposed to perform a hot reload (HMR) of only the CSS, regardless of whether you are using a dev bundle or Vite. The file is inside src/main/frontend so IntelliJ is not supposed to do anything when that file changes.

There does seem to be something strange going on though with the latest version, let me have a closer look

1 Like

I switched to a brand new pc and used 24.5 on the old pc i am on 24.3.x and there this behaviour is not

Could you find anything? Yesterday i have tried some other settings but i cant get this behaviour disabled

We identified a couple of problems related to the theme editor that we are going to fix:

  1. Selection is lost if theme editor causes a refresh of the view: [BUG] Flow selection is lost if theme editor causes a refresh · Issue #42 · vaadin/copilot · GitHub
  2. While the theme editor is supposed to only edit CSS if the component has a class name, it also modifies the Java file in some cases when it should not. This causes the refresh and then selection is lost because of the other issue: [BUG] Theme editor keeps adding class names in some cases · Issue #43 · vaadin/copilot · GitHub

Ah okay, thank you then we will wait for the next version