Bug 407084 - Changed behavior of profile shortcuts in Konsole
Summary: Changed behavior of profile shortcuts in Konsole
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 19.04.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 407121 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-30 10:18 UTC by Michal Ziabkowski
Modified: 2019-08-01 00:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08
Sentry Crash Report:


Attachments
attachment-29960-0.html (2.28 KB, text/html)
2019-04-30 10:51 UTC, tcanabrava
Details
attachment-31109-0.html (1.19 KB, text/html)
2019-04-30 11:37 UTC, tcanabrava
Details
attachment-13842-0.html (1.74 KB, text/html)
2019-05-06 10:29 UTC, tcanabrava
Details
Current not finished patch (15.02 KB, patch)
2019-05-06 10:57 UTC, Mykola Krachkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ziabkowski 2019-04-30 10:18:59 UTC
SUMMARY

Before Konsole 19.04, when you set a keyboard shortcut for a Konsole profile (in Settings/Manage Profiles), that shortcut would open a new tab with that profile. With Konsole 19.04 the shortcut switches the current profile for the currently open tab instead. I'm not sure if this was intentional or a regression that slipped in. In any case, browsing the menu confirms that the shortcuts are assigned to the Switch Profile actions instead of the New Tab ones. The same thing happens with a clean config as well.


STEPS TO REPRODUCE
1. Set keyboard shortcut for profile in Settins/Manage Profiles
2. Use said shortcut

OBSERVED RESULT
The shortcut switches the profile for the currently open tab.

EXPECTED RESULT
A new tab is opened with the given profile.


SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Comment 1 tcanabrava 2019-04-30 10:51:02 UTC
Created attachment 119740 [details]
attachment-29960-0.html

This is intentional.

On Tue, Apr 30, 2019 at 12:19 PM Michal Ziabkowski <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=407084
>
>             Bug ID: 407084
>            Summary: Changed behavior of profile shortcuts in Konsole
>            Product: konsole
>            Version: 19.04.0
>           Platform: Gentoo Packages
>                 OS: Linux
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: general
>           Assignee: konsole-devel@kde.org
>           Reporter: mziab@o2.pl
>   Target Milestone: ---
>
> SUMMARY
>
> Before Konsole 19.04, when you set a keyboard shortcut for a Konsole
> profile
> (in Settings/Manage Profiles), that shortcut would open a new tab with that
> profile. With Konsole 19.04 the shortcut switches the current profile for
> the
> currently open tab instead. I'm not sure if this was intentional or a
> regression that slipped in. In any case, browsing the menu confirms that
> the
> shortcuts are assigned to the Switch Profile actions instead of the New Tab
> ones. The same thing happens with a clean config as well.
>
>
> STEPS TO REPRODUCE
> 1. Set keyboard shortcut for profile in Settins/Manage Profiles
> 2. Use said shortcut
>
> OBSERVED RESULT
> The shortcut switches the profile for the currently open tab.
>
> EXPECTED RESULT
> A new tab is opened with the given profile.
>
>
> SOFTWARE/OS VERSIONS
> Operating System: Gentoo Linux
> KDE Plasma Version: 5.15.4
> KDE Frameworks Version: 5.57.0
> Qt Version: 5.12.3
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 2 Michal Ziabkowski 2019-04-30 11:26:43 UTC
I see. What alternative is there for the old functionality, i.e. if someone wanted to have a shortcut for quickly opening a tab with a given profile? The New Tab actions for profiles aren't listed in the shortcut settings.
Comment 3 tcanabrava 2019-04-30 11:37:46 UTC
Created attachment 119741 [details]
attachment-31109-0.html

There's none. I agree that we should have that somehow, it's easy to
implement, are you willing to try?
If not we need to wait for a good soul to implement as I'm really busy with
other things in konsole right now.

On Tue, Apr 30, 2019 at 1:26 PM Michal Ziabkowski <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=407084
>
> --- Comment #2 from Michal Ziabkowski <mziab@o2.pl> ---
> I see. What alternative is there for the old functionality, i.e. if someone
> wanted to have a shortcut for quickly opening a tab with a given profile?
> The
> New Tab actions for profiles aren't listed in the shortcut settings.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 4 Michal Ziabkowski 2019-04-30 12:02:26 UTC
While it is disputable what the primary action for profile shortcuts should be (IMO switching profiles and starting a new tab are equally valid use-cases), I'm honestly not inconvenienced much by this change, just a bit surprised that my old shortcut suddenly had a different behavior. In my specific case, I haven't actually used the other profiles much recently, so changing my config and/or habits is feasible. If this behavior was changed for the sake of usability, I don't mind it. It's just some people might be confused as to what happened after upgrading, just like I was. In any case, thank you for the clarification.
Comment 5 Nate Graham 2019-04-30 18:55:13 UTC
It was indeed. Thanks for understanding! And as Tomaz mentioned, a patch to make this configurable isn't out of the question.
Comment 6 Nate Graham 2019-04-30 18:56:13 UTC
Another request for making the old behavior still available: Bug: 407076
Comment 7 tcanabrava 2019-05-01 11:29:44 UTC
*** Bug 407121 has been marked as a duplicate of this bug. ***
Comment 8 Mykola Krachkovsky 2019-05-01 15:27:41 UTC
But why this was introduced as replacement of old behaviour? IMHO, this have broken not just my workflow, as profile in Konsole much more powerful than just visual style.

So basically we need to revert/rework https://cgit.kde.org/konsole.git/commit/?id=d689ba5403ceb998013fc99de6758976f8509e98
Right?
Comment 9 tcanabrava 2019-05-01 17:22:53 UTC
not revert, rework. Some people opened bug reports that the workflow was broken for them because when they selected the profile, it opened a new tab, it's hard to make everyone happy. I'd accept patches to make both work. if you are willing to try I can help you setup.
Comment 10 Mykola Krachkovsky 2019-05-06 10:19:43 UTC
So, I'm trying to implement this feature, currently in the middle of solving this problem. But there is one easy for implementing but principal decision should be made — konsolerc file before and currently has one section [Profile Shortcuts], I'm introducing another, but which variant should be accepted:

1. [Profile Shortcuts] is used for new tab (as before 19.04).
[Apply Profile Shortcuts] is introduced to apply profile.
pros: no breakage for people who will update from 18.xx to future 19.xx, just new feature.
cons: double breakage for people with rolling updates.

2. [Profile Shortcuts] is used to apply profile (as in 19.04).
[Profile New Tab Shortcuts] is introduced to create new tab with profile.

I'm personally for the 1st variant, but it's not very important to me as it's easily fixable (just rename group in config file).
Comment 11 tcanabrava 2019-05-06 10:29:21 UTC
Created attachment 119866 [details]
attachment-13842-0.html

Can we take a look at the code to understand the behavioral change you are
testing?

Em seg, 6 de mai de 2019 às 12:19, Mykola Krachkovsky <
bugzilla_noreply@kde.org> escreveu:

> https://bugs.kde.org/show_bug.cgi?id=407084
>
> --- Comment #10 from Mykola Krachkovsky <w01dnick@gmail.com> ---
> So, I'm trying to implement this feature, currently in the middle of
> solving
> this problem. But there is one easy for implementing but principal decision
> should be made — konsolerc file before and currently has one section
> [Profile
> Shortcuts], I'm introducing another, but which variant should be accepted:
>
> 1. [Profile Shortcuts] is used for new tab (as before 19.04).
> [Apply Profile Shortcuts] is introduced to apply profile.
> pros: no breakage for people who will update from 18.xx to future 19.xx,
> just
> new feature.
> cons: double breakage for people with rolling updates.
>
> 2. [Profile Shortcuts] is used to apply profile (as in 19.04).
> [Profile New Tab Shortcuts] is introduced to create new tab with profile.
>
> I'm personally for the 1st variant, but it's not very important to me as
> it's
> easily fixable (just rename group in config file).
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 12 Mykola Krachkovsky 2019-05-06 10:57:00 UTC
Created attachment 119867 [details]
Current not finished patch

Question is about literals in profileShortcutGroupName
Comment 13 Achim Bohnet 2019-07-07 09:38:27 UTC
Intentional does not automatically imply that it's the right thing(tm).  It broke existing work-flow:  Now one is forced to use a submenu (long in mycase) instead of a shortcut to open a new-tab with a predefined command. See e.g.

#407076
#408217

See Darin suggestion at https://bugs.kde.org/show_bug.cgi?id=408217#c3
Good summary.  And an possible solution.
Comment 14 Kamil Dudka 2019-07-29 19:57:57 UTC
I did not even realize this could have been intentional.  I though I hit some window redraw bug in compositor or something.  It took me hours to google this bug report because I did not know what to look for.

I had profiles like "default", "root shell", "Fedora VM", "CentOS VM", "Debian VM" and have been using the profile shortcuts to quickly fire up a new session of the chosen kind.

After the update, the shortcuts only change the title of my konsole window without any other (useful) effect.  Moreover, it is quite dangerous when I have root shell of my bare metal machine in a tab named "Fedora VM".

Could you please restore the original behavior that I used to use for a decade or so?
Comment 15 Wolfgang Bauer 2019-07-30 08:38:57 UTC
(In reply to Kamil Dudka from comment #14)
> Could you please restore the original behavior that I used to use for a
> decade or so?
The change already has been reverted for 19.08:
https://bugs.kde.org/show_bug.cgi?id=407076#c3
https://bugs.kde.org/show_bug.cgi?id=408217#c5
https://cgit.kde.org/konsole.git/commit/?h=Applications/19.08&id=a1b64d7956485c6358bd2cccabde3843c1d314eb
Comment 16 Kamil Dudka 2019-07-30 10:22:18 UTC
(In reply to Wolfgang Bauer from comment #15)
> The change already has been reverted for 19.08:

Perfect.  Thanks for the good news!

> https://cgit.kde.org/konsole.git/commit/?h=Applications/19.08&id=a1b64d7956485c6358bd2cccabde3843c1d314eb

Thanks for the reference!  I applied the patch locally and konsole now works as expected.