Pet Peeve: Why does the GUI always say "starting backup" even when running another command

There’s this:

So at least once, although I can’t find the exact issue in a short search. You could open one…
If you open one, you might consider being specific. Some commands only suffer some delays.

To topic title “Why does the GUI always say”, my theory is that an uninitialized variable does it.

Enumeration types (C# reference) shows how integer zero corresponds to the first name seen:

To actually show that in the web browser, JavaScript converts the phases to a text string in

8.3.3 Default constructors says that the default value of an int is 0, which would give the above string.

UpdatePhase seems to be the way to set phase. Repair seems to not call that at all. Others call after other work, for reasons not immediately clear. Using the Verify files button delays a few seconds.

Starting and ending are always a little unclear. Sometimes there are things, e.g. run-script-before and run-script-after that specifically say that they mean before and after the operation, so because I run a fairly slow script after backup itself (to check the results), I’m staring at “Backup complete!” for awhile, waiting for things after to end. There might be preparations at start. Ideally they would be announced, however I’m not sure if the phase infrastructure is tied to the operation or can move to broader scope.

There’s definitely some of the code that knows more quickly. I see the following Information in the log:

2023-03-26 20:06:01 -04 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Test has started

and a Repair also shows this sort of message in spite of its phase information seemingly not updating:

2023-03-26 20:30:01 -04 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Repair has started

If nothing else, perhaps a new phase called Preparing could be the initial phase, until better is known.
Of course that begs the question “Preparing what?”, but possibly less so than “Starting” did, leading to:

“Starting …” message could be clearer: starting what? #3141
GUI - Added detail to the status messages #3147 which changed a vague term to a precise-but-wrong, however the vague term was probably only accidentally correct because it landed on “Starting …” by a fortunate accident of it being 0. I sure hope the original code wasn’t done intentionally to land that way.

Deleting never used configuration appears to trigger backup #3513 is the 2020 version of enum theory.
There’s a little bit more (and a link there) in a 2021 forum post here.

Build progress display into all operations [incl. “Starting backup …”] #4121 was thought to be database upgrade on a 24 GB database, which could take awhile, and might be before the operation itself starts, depending on what one considers the start. It’s the usual issue of how much detail status bar deserves.

If you file an issue, please link back here and preferably help out by being specific, e.g. does it persist? Repair seems persistent. Verify seems temporary. You can help identify cases by testing and watching.

Maybe someday someone will volunteer to do at least some type of improvement after studying further. Duplicati only exists and improves thanks to people who volunteer in some way (and it’s not only code).

Oh good! I see a volunteer showed up while I was putting this big post together. Hopefully it will help…