Why renamed Konsole tabs lost their title

3 min read opensource #opensuse #hackweek #kde

TL;DR: Since Konsole 26.04, a renamed tab loses its title while it shows background activity. Run top in it, switch to another tab, and the title is gone. The bug, 518666, was reported on openSUSE in April, and I hit it on Tumbleweed. During Hack Week 26 I traced it to the "None" entry of the tab colour menus: a transparent placeholder that leaked into sessions and profiles. konsole!1381 fixes it, repairs profiles and sessions that already store the bad value, and is in review.

What was wrong

Open two tabs, rename the first to "top", run top in it and switch to the second tab. A second later the first tab has no title. It comes back when the tab is selected again. Vadym Krevs reported it on openSUSE and found that it depends on the TabActivityColor and TabColor entries of the saved session. Lapo Luchini saw it on NixOS and noticed what renaming a tab writes into the profile:

[Appearance]
TabActivityColor=20,22,24,0
TabColor=20,22,24,0

The fourth number is the alpha. The title was painted in a fully transparent colour.

Where the colour came from

The Tab Properties dialog uses KColorCombo for both colours, and KColorCombo cannot hold "no colour". Since 2020 the "None" entry has been the window's base colour with the alpha set to 0, so its label stays readable in the menu. The dialog returned that placeholder as if the user had picked it. Every OK in Tab Properties stored it and marked the colours as set by the user, so the profile's own colours stopped applying.

For five years this went unseen, because the tab bar skips transparent tab colours. Konsole 26.04 added a tab activity colour, and that path has no such check. The placeholder reached the title.

The fix

Lapo's earlier merge request, !1360, was called a workaround in review by Akseli Lahtinen. !1381 goes after the cause and adds no check where the tabs are painted:

  • the dialog returns an invalid QColor, Qt's "no colour", for "None";
  • Session treats a fully transparent tab colour as unset, so profiles and sessions saved by 26.04 to 26.08 recover without editing.

Two new ViewManagerTest cases fail without the fix, and the full ctest run passes. !1381 supersedes !1360 and an older attempt, !1316, and credits Vadym and Lapo.

Testing

In a Tumbleweed container, the stock Konsole 26.08.3 package lost the title in three cases: a renamed tab, a profile that already contains 20,22,24,0 without any renaming, and a renamed tab switched to a profile with a red activity colour. The patched build kept the title in all three, and the last one now turns red. The patched package also fixes it on my own Tumbleweed desktop.

Comment 8 on the bug reports a title vanishing without a rename. The second case is one way that happens, but I could not confirm that it is the reporter's.

Until the fix is released, picking any colour instead of "None" in Tab Properties avoids the bug. On Tumbleweed, a patched Konsole is in my OBS project home:polslinux:tools.


How this was made
AI help: an AI agent built the patched Konsole in a Tumbleweed container, ran the tests, and took screenshots of the stock and patched builds under Xvfb.
Code: reviewed line by line by me, like any other patch, and checked in the container runs.