fix(jetbrains): use regular title weight in active lists

ActiveList titles were rendered bold for every row, which made Agent Manager, history, and settings lists read heavier than standard IDE lists and trees. Use the platform plain text style for the primary row title while keeping the explicit foreground so selected and deleting rows retain their color behavior.
This commit is contained in:
kirillk
2026-08-21 16:52:03 -04:00
parent 0879741e99
commit 64c14abc77
3 changed files with 28 additions and 1 deletions
@@ -0,0 +1,5 @@
---
"@kilocode/kilo-jetbrains": patch
---
Render list row titles in the regular weight so Agent Manager, history, and settings lists match the rest of the IDE.
@@ -221,7 +221,10 @@ internal class ActiveListRenderer(
layers.isVisible = true
title.clear()
title.append(value.title, SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, titleFg))
// Plain, like every platform list and tree renders its primary text. Bold reads as emphasis in
// the IDE (the current branch, an unread entry), so bolding every row makes the list look
// heavier than the surfaces around it.
title.append(value.title, SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, titleFg))
value.note?.takeIf { it.isNotBlank() }?.let {
title.append(" $it", SimpleTextAttributes.GRAYED_ATTRIBUTES)
}
@@ -32,6 +32,7 @@ import com.intellij.testFramework.fixtures.BasePlatformTestCase
import com.intellij.ui.CollectionListModel
import com.intellij.ui.ScrollingUtil
import com.intellij.ui.SimpleColoredComponent
import com.intellij.ui.SimpleTextAttributes
import com.intellij.ui.components.JBLabel
import com.intellij.ui.components.JBList
import com.intellij.ui.components.JBScrollPane
@@ -198,6 +199,24 @@ class SettingsListViewTest : BasePlatformTestCase() {
}
}
fun `test renderer draws the row title in the plain list weight`() {
edt {
val row = item("with", "Alpha", "Description")
val model = CollectionListModel<ActiveListItem>(listOf(row))
val list = JBList(model)
val renderer = ActiveListRenderer(model, ActiveListConfig.Equal)
renderer.getListCellRendererComponent(list, row, 0, true, true)
// Bold reads as emphasis in platform lists, so rows must stay plain like tree/list text.
val title = components(renderer).filterIsInstance<SimpleColoredComponent>().single()
val iter = title.iterator()
iter.next()
assertEquals(SimpleTextAttributes.STYLE_PLAIN, iter.textAttributes.style)
assertEquals("Alpha", iter.fragment)
}
}
fun `test narrow row squeezes title but keeps tags full width`() {
edt {
val row = object : ActiveListItem {