quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Restart and other hotkey in devui

Open maxandersen opened this issue 2 years ago • 16 comments

Description

If you write a cli app and it uses standard input I can’t use devmode hot keys.

And there are no natural ways for restart to happen so hotreload is not really available.

That made me realize devui doesn’t seem To have a way to trigger hotreload.

I was wondering if we couldn’t make it so that when focus is in the logviewer that we hooked in the same hot keys as available in the terminal ?

allowing to trigger restart and other operations from Devui.

Implementation ideas

No response

maxandersen avatar Dec 21 '23 05:12 maxandersen

/cc @cescoffier (devui), @phillip-kruger (devui)

quarkus-bot[bot] avatar Dec 21 '23 05:12 quarkus-bot[bot]

Clicking on the logo in the top left should initialize a hot reload. But I'll also add the keys as in the cli and the old Dev UI

phillip-kruger avatar Dec 21 '23 05:12 phillip-kruger

It would be great to have a way to disable livereload in Dev UI. Toggling livereload per cli does not always seem to work, e.g. if you launch quarkus together with other processes with mono repo tooling

ls-bit avatar Feb 13 '24 09:02 ls-bit

@stuartwdouglas ^^^ w.d.y.t ?

phillip-kruger avatar Feb 13 '24 22:02 phillip-kruger

I like the hotkey in dev ui idea. There is also supposed to be code that allows you to use the hotkeys when the app is not actively asking for input: https://github.com/stuartwdouglas/quarkus/blob/aeb8c67c117f3308dd8add7d2faf35dbe5520ff0/core/devmode-spi/src/main/java/io/quarkus/dev/console/QuarkusConsole.java#L213 .

It is not really possible to write tests for it though so it might have broken.

stuartwdouglas avatar Feb 13 '24 23:02 stuartwdouglas

@stuartwdouglas what do you think of the ability to disable hot-reload ?

phillip-kruger avatar Feb 14 '24 00:02 phillip-kruger

You mean don't restart if you are just visiting the dev ui instead of your app? I actually like the idea, it is kinda annoying that you can't visit dev ui in the middle of making changes without forcing a reload.

stuartwdouglas avatar Feb 14 '24 00:02 stuartwdouglas

No I mean this: "Toggling livereload per cli does not always seem to work, e.g. if you launch quarkus together with other processes with mono repo tooling"

phillip-kruger avatar Feb 14 '24 00:02 phillip-kruger

I'm not sure what you mean?

stuartwdouglas avatar Feb 14 '24 01:02 stuartwdouglas

Do you mean disabling the console input? You can already do that via config.

stuartwdouglas avatar Feb 14 '24 01:02 stuartwdouglas

Let me try to clarify my comment:

We have a mono repo with many services and to ease development we allow to start multiple quarkus apps together with their frontends with a single command. Maybe it is due to our tooling, but in those cases disabling hot reload via cli does not work reliably for us. Thus having a another way to disable live reload e.g. via Dev UI or a property would be a welcome feature for us.

ls-bit avatar Feb 14 '24 08:02 ls-bit

What about quarkus.console.disable-input ?

stuartwdouglas avatar Feb 14 '24 08:02 stuartwdouglas

If I understand correctly using quarkus.console.disable-input=true just removes the ability to toggle livereload (or anything else) via cli, which is not what we need.

We would like to have the ability to toggle livereload e.g. via Dev UI or a property, because sometimes toggling livereload via cli does not seem to work in our case.

ls-bit avatar Feb 14 '24 08:02 ls-bit

If you click on the logo (top left) in Dev UI, it should trigger hot reload

phillip-kruger avatar Feb 14 '24 08:02 phillip-kruger

That is also not what we need, i suppose there is still a misunderstanding 😄 . We would like the ability to toggle hot reload on or off e.g. via the Dev UI or a property. I think right now it is only possible to toggle hot reload on or off via cli.

ls-bit avatar Feb 14 '24 09:02 ls-bit

Ok, I see. I think if it's in cli we should be able to add this to Dev UI. I'll have a look a.s.a.p

phillip-kruger avatar Feb 14 '24 09:02 phillip-kruger