Skip to content

Comments

Make title bar icons more visible, match brand colors#5582

Merged
lambertjosh merged 6 commits intomainfrom
jl-title-icon-very-visible
Feb 4, 2026
Merged

Make title bar icons more visible, match brand colors#5582
lambertjosh merged 6 commits intomainfrom
jl-title-icon-very-visible

Conversation

@lambertjosh
Copy link
Contributor

@lambertjosh lambertjosh commented Feb 1, 2026

Context

We have been getting consistent reports that opening Kilo within VSCode is difficult. New users don't know where to look, and it can be easy to "lose" it in the variety of views and finding it again is not very easy.

One way to solve that has been adding the icon to the view title bar, but it blends in so well most users didn't even know it was added. (In fact it was added recently without most folks knowing in a recent Roo merge)

This change makes the icon pop more in the view bar, and should leave other icons alone. (I think). It uses our brand colors, so on dark themes it will be our green, and light themes our black'ish color.

@changeset-bot
Copy link

changeset-bot bot commented Feb 1, 2026

🦋 Changeset detected

Latest commit: 9bc7fb5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Kilo_Code_Branding" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 39.9997627 39.9999944">
<g transform="scale(0.8)" transform-origin="center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: SVG transform-origin on <g> may be ignored by some renderers

If transform-origin="center" isn’t honored, transform="scale(0.8)" will scale from (0,0), potentially shifting/cropping the icon in VS Code. Consider baking the transform into the viewBox/path data or using an explicit translate(...) scale(...) transform that centers deterministically.

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Kilo_Code_Branding" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 39.9997627 39.9999944">
<g transform="scale(0.8)" transform-origin="center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: SVG transform-origin on <g> may be ignored by some renderers

If transform-origin="center" isn’t honored, transform="scale(0.8)" will scale from (0,0), potentially shifting/cropping the icon in VS Code. Consider baking the transform into the viewBox/path data or using an explicit translate(...) scale(...) transform that centers deterministically.

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 1, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
webview-ui/src/kilocode/agent-manager/components/KiloLogo.tsx 4 Potential document.body null access in getIsLightThemeFromEditor()
webview-ui/src/kilocode/agent-manager/components/KiloLogo.tsx 13 MutationObserver.observe can throw if document.body is unavailable
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
N/A N/A None
Files Reviewed (5 files)
  • .changeset/brand-color-view-icon.md - 0 issues
  • src/assets/icons/kilo-dark.svg - 0 issues
  • src/assets/icons/kilo-light.svg - 0 issues
  • webview-ui/src/components/chat/ChatView.tsx - 0 issues (change overlaps with existing comments re theme switching)
  • webview-ui/src/kilocode/agent-manager/components/KiloLogo.tsx - 2 issues

Fix these issues in Kilo Cloud

@lambertjosh
Copy link
Contributor Author

Light themes:

image

Dark themes:

image

Current:

image

src/package.json Outdated
"light": "assets/icons/kilo-light.svg",
"dark": "assets/icons/kilo-dark.svg"
"light": "assets/icons/kilo-brand-light.svg",
"dark": "assets/icons/kilo-brand-dark.svg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not replace the existing icons? Or are they still used elsewhere? Having multiple seems bad to me for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markijbema - they are used elsewhere:

  • The ChatView
  • Commit message generation
  • AgentManager panel

Let me try to swap them though and see how it looks. I was trying to go for a minimal change, but the color may help on the commit message generation as it's really hard to see otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here is a test, what do you think @markijbema? I'll ask Halyna (our designer) too.

My gut feel is:

  • I like the updated commit message so it pops a bit more, I never knew it was there until someone told me. I think we change this for the same reason as the view title bar to open Kilo Code. (It's so easy to miss)
  • I don't like the agent manager view title icon, it seems unnecessarily attention-grabbing given other view title icons. There is title text to provide the clarity.
  • The agentmanager main page doesn't update currently, but can be adjusted.
  • I'm ambivalent on the chatview change. I tried to make it animate for fun, but lottie is big. (>1MB)

Dark

image image image ### Light image image image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually like the agent manager, since that tab is buried between file tabs, so you might actually need the extra visibility. I'd vote for consistently changing.

I find the yellow icon in the chat a bit much, but then again, you're not often in that tab when you're actually using kilo, so I think it's fine

@lambertjosh
Copy link
Contributor Author

OK this is now updated everywhere:

Dark mode

image

Light mode

image

@lambertjosh
Copy link
Contributor Author

lambertjosh commented Feb 2, 2026

@markijbema - I think this is ready for final review.

Edit: Addressing the chatview feedback.

// kilocode_change start: KiloLogo component
const KiloLogo = () => {
const iconsBaseUri = (window as any).ICONS_BASE_URI || ""
const isLightTheme = /\bvscode-light\b|\bvscode-high-contrast-light\b/i.test(document.body.className)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Theme detection via document.body.className is brittle and won’t react to theme changes

Two concerns here:

  1. className string parsing is a bit fragile vs classList.contains(...).
  2. This value is computed during render; if the user changes VS Code theme while the webview stays open, this component may not re-render, leaving the icon stuck on the old theme.
Suggested change
const isLightTheme = /\bvscode-light\b|\bvscode-high-contrast-light\b/i.test(document.body.className)
const isLightTheme = document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light")

import React from "react"

export const KiloLogo = () => {
const isLightTheme = /\bvscode-light\b|\bvscode-high-contrast-light\b/i.test(document.body.className)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Theme detection computed once; logo color may not update on theme switch

Same pattern as in the chat logo: this is evaluated during render, so if VS Code theme changes without a component re-render, the logo can remain with the old theme’s color. Also, classList.contains is less error-prone than regex on className.

Suggested change
const isLightTheme = /\bvscode-light\b|\bvscode-high-contrast-light\b/i.test(document.body.className)
const isLightTheme = document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light")

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Kilo_Code_Branding" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 39.9997627 39.9999944">
<g transform="scale(0.8)" transform-origin="center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: SVG transform-origin on <g> may be ignored

If transform-origin="center" isn’t honored, transform="scale(0.8)" will scale from (0,0), potentially shifting/cropping the icon in VS Code. Consider baking the transform into the viewBox/path data or using an explicit translate(...) scale(...) transform that centers deterministically.

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Kilo_Code_Branding" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 39.9997627 39.9999944">
<g transform="scale(0.8)" transform-origin="center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: SVG transform-origin on <g> may be ignored

If transform-origin="center" isn’t honored, transform="scale(0.8)" will scale from (0,0), potentially shifting/cropping the icon in VS Code. Consider baking the transform into the viewBox/path data or using an explicit translate(...) scale(...) transform that centers deterministically.

const isLightTheme =
document.body.classList.contains("vscode-light") ||
document.body.classList.contains("vscode-high-contrast-light")
const iconFile = isLightTheme ? "kilo-light.svg" : "kilo-dark.svg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Chat logo may not update on VS Code theme switch

The light/dark choice is computed during render. If the user changes theme while the webview remains open, this component may not re-render, leaving the icon stuck. Consider subscribing to theme changes (e.g., observing document.body class changes like the Agent Manager logo does).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs the same logic as in KiloLogo i think? But cant we just use KiloLogo component here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markijbema - there must be some other listener, as this one updates automatically as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Extension-side listener (ClineProvider.ts:943-948): The VS Code extension listens for workbench.colorTheme configuration changes and sends a { type: "theme", ... } message to the webview.
  2. Context state update (ExtensionStateContext.tsx:458-462): When the webview receives this theme message, it calls setTheme(), updating the context state.
  3. Component re-render: The ChatView component uses useExtensionState() (line 110-133), so when any state in that context changes (including theme), the entire component re-renders.


useEffect(() => {
const observer = new MutationObserver(() => {
setIsLightTheme(getIsLightTheme())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a noop right? seems dubious

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, i see, can you please rename 'getIsLightTheme' to something like getIsLightThemeFromEditor or something, so it clearly isnt the react state?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented!

@lambertjosh lambertjosh enabled auto-merge February 4, 2026 20:13
import React, { useState, useEffect } from "react"

const getIsLightThemeFromEditor = () =>
document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Potential document.body null access in getIsLightThemeFromEditor()

document.body is accessed during render; in some environments (early webview boot / non-browser harness) it can be unavailable and cause a hard crash. A defensive check keeps the component resilient.

Suggested change
document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light")
!!(document.body && (document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light")))

const observer = new MutationObserver(() => {
setIsLightTheme(getIsLightThemeFromEditor())
})
observer.observe(document.body, { attributes: true, attributeFilter: ["class"] })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: MutationObserver.observe can throw if document.body is unavailable

If document.body isn't ready for any reason, this call will throw. Guarding the observe call avoids an unhandled exception.

Suggested change
observer.observe(document.body, { attributes: true, attributeFilter: ["class"] })
document.body && observer.observe(document.body, { attributes: true, attributeFilter: ["class"] })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants