vaadin / copilot

1 stars 0 forks source link

Prompt field is not focused when re-enabling copilot #1

Closed Legioth closed 9 months ago

Legioth commented 9 months ago

Steps to reproduce

  1. Press shift + shift to open copilot. Notice that the prompt field is focused.
  2. Press shift + shift again to close copilot so that you can interact with the application.
  3. Press shift + shift again to open copilot again. Notice that the prompt field is not focused

I expect the field to be focused the second time just like it was the first time.

czp13 commented 9 months ago

I am not sure what version is this, but the recent main is working for me like this:

  1. SHIFT+SHIFT copilot activated, editor mode is live (Spotlight prompt is not shown)
  2. SHIFT+SPACE copilot spotlight, which has prompt text field, is shown
  3. SHIFT+SPACE spotlight hidden, editor mode is active again,
  4. SHIFT+SHIFT copilot is deactivated.

So TLDR SHIFT+SHIFT does not activate the spotlight prompt for me, so could not reproduce this issue:

Video about it:

https://github.com/vaadin/copilot/assets/61667986/2fc5bc71-d6e8-48bf-80a8-6cc9bc0136d3

Legioth commented 9 months ago

I suspect my Hilla 2.5.1 application is somehow using a different version of copilot since my prompt popup looks like this.

Screenshot 2023-12-15 at 14 52 06
czp13 commented 9 months ago

Ah, it is my theming on MacOs -I guess- causing the different background plus I think I accepted the Terms of Services and other things so it is not showing again. But I will double-check what is happening here, why I have totally different Copilot Window.

Legioth commented 9 months ago

The difference is that you have accepted the terms. If the terms are not accepted, then the dialog pops up with shift + shift and then the focus is missing after the initial reveal.

After accepting the terms, my setup works as you describe.

czp13 commented 9 months ago

Nice, thank you for clarifying it! 🙇 👍

p.s.: Now I can test the fix made by Artur!

p.s.2: should the copilot work always be the same, no matter if the terms were accepted or not? 🤔